Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: template other resource #4098

Merged
merged 2 commits into from Oct 16, 2023
Merged

feat: template other resource #4098

merged 2 commits into from Oct 16, 2023

Conversation

zjy365
Copy link
Contributor

@zjy365 zjy365 commented Oct 16, 2023

πŸ€– Generated by Copilot at ba78a3c

Summary

πŸŒπŸ—‘οΈπŸ“„

Added new API endpoints and UI features for the frontend providers template to support more Kubernetes resources related to an app. Refactored some existing code to improve readability and maintainability. Created a new license service with Next.js, Chakra UI, and MongoDB. Configured the ESLint, Prettier, and i18n options for the license service.

next-i18next changed
use accept-language header
no more NEXT_LOCALE

Walkthrough

  • Remove zh-Hans locale from supported locales in next-i18next.config.js (link)
  • Use accept-language header instead of NEXT_LOCALE cookie to determine user's preferred language in getServerSideProps functions in index.tsx and signin.tsx (link, link)
  • Refactor deleteResourceByKind function to use a record object instead of a switch statement and add new delete functions for ConfigMap, Issuer, Role, RoleBinding, and ServiceAccount resources in delete.ts (link)
  • Add dbProviderKey constant to store the label selector for the database provider custom resource in keys.ts (link)
  • Import deployManagerKey constant and k8sAuth service and add new sections of code to handle the listing of issuer, role, role binding, service account, and config map resources in listOtherByName.ts (link, link, link, link, link, link)
  • Add new files to implement the API endpoints for deleting config map, issuer, role, role binding, and service account resources by name using the corresponding services in delConfigMap.ts, deleteIssuer.ts, delRole.ts, delRoleBinding.ts, and delServiceAccount.ts (link, link, link, link, link)
  • Add new kinds of resources to ResourceKindType type in resource.ts (link)
  • Add new files to configure the ESLint, Git, Prettier, and Next.js options for the license service in .eslintrc.json, .gitignore, .prettierignore, .prettierrc.js, next-i18next.config.js, and next.config.js (link, link, link, link, link, link)
  • Add new file to specify the dependencies and scripts for the license service in package.json (link)
  • Add new file to provide the basic information and instructions for the license service in README.md (link)

@pull-request-size
Copy link

Whoa! Easy there, Partner!

This PR is too big. Please break it up into smaller PRs.

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Oct 16, 2023

πŸ€– Generated by lychee action

Summary

Status Count
πŸ” Total 956
βœ… Successful 375
⏳ Timeouts 0
πŸ”€ Redirected 0
πŸ‘» Excluded 580
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@sweep-ai
Copy link

sweep-ai bot commented Oct 16, 2023

Apply Sweep Rules to your PR?

  • Apply: Leftover TODOs in the code should be handled.
  • Apply: All new business logic should have corresponding unit tests in the tests/ directory.
  • Apply: Any clearly inefficient or repeated code should be optimized or refactored.

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

All modified lines are covered by tests βœ…

πŸ“’ Thoughts on this report? Let us know!.

Signed-off-by: jingyang <3161362058@qq.com>
@zjy365 zjy365 changed the title feat:template other resource && license service feat:template other resource Oct 16, 2023
@zjy365 zjy365 changed the title feat:template other resource feat: template other resource Oct 16, 2023
Signed-off-by: jingyang <3161362058@qq.com>
@c121914yu c121914yu merged commit cf47ac7 into labring:main Oct 16, 2023
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants