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 draft & default random #3973

Merged
merged 3 commits into from Sep 23, 2023
Merged

feat:template draft & default random #3973

merged 3 commits into from Sep 23, 2023

Conversation

zjy365
Copy link
Contributor

@zjy365 zjy365 commented Sep 22, 2023

🤖 Generated by Copilot at 2cb6726

Summary

🐛🌐🚀

This pull request implements several improvements and bug fixes for the frontend of the sealos template provider. It adds a new API endpoint and function to get the template details by name, filters out draft templates from the listTemplate response, adds error logging for the applyApp call, updates the dependencies and translations, and fixes some code formatting and logic issues in various files.

We're the coders of the sealos, we fix the bugs and improve the flows
We update the dependencies, we add the functions and the APIs
We refactor and format the code, we redirect and filter the load
We're the coders of the sealos, we rock the templates and the modes

Walkthrough

  • Updated the version of the @uiw/react-codemirror dependency to fix bugs and improve performance (link)
  • Added the SideBar section to the common.json files for the English and Chinese translations of the sidebar labels (link, link)
  • Added the getKindTemplate function to the app.ts file to define the API call to get the template details by name (link)
  • Modified the NonePage component in the 404.tsx file to redirect to the root path and return null when the page is not found (link)
  • Modified the applyApp.ts file to check if the yamlList parameter is empty and return an error message (link)
  • Added the getKindTemplate.ts file to define the handler function for the /api/getKindTemplate endpoint (link)
  • Imported the TemplateType type to the listTemplate.ts file and filtered out the draft templates from the response (link, link)
  • Removed the useQuery hook for the /api/listTemplate endpoint and replaced it with the useQuery hook for the /api/getKindTemplate endpoint in the index.tsx file (link, link)
  • Added a console.log statement to print the response from the postDeployApp API call in the index.tsx file (link)
  • Removed the ConfirmChild and Loading components from the _app.tsx file as they were not used (link)
  • Changed the console.log statement to print the error from the applyApp API call in the index.tsx file (link)
  • Added the handleInputs function to the json-yaml.ts file to handle the default values for the inputs in the template (link, link)
  • Added a comment to the user.ts file to indicate that the getUserKubeConfig function is for the edge mode of the sealos platform (link)
  • Removed the getUserNamespace function from the user.ts file as it was not used and not compatible with the edge mode (link)
  • Updated the links to the app launchpad and database pages in the README.md and README_zh.md files (link, link)
  • Removed some extra spaces after some properties in the Flex, Text, Box, Grid, svg, and Button components in the index.tsx files, for code formatting purposes (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)

Signed-off-by: jingyang <3161362058@qq.com>
@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Sep 22, 2023

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 961
✅ Successful 399
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 561
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Patch has no changes to coverable lines.

📢 Thoughts on this report? Let us know!.

@zzjin zzjin added this to the v5.0 milestone Sep 23, 2023
@zzjin zzjin merged commit 91ad2fd into labring:main Sep 23, 2023
23 checks passed
bxy4543 pushed a commit to bxy4543/sealos that referenced this pull request Oct 13, 2023
* feat:template draft & default random

Signed-off-by: jingyang <3161362058@qq.com>

* fix docs link

* fix

---------

Signed-off-by: jingyang <3161362058@qq.com>
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