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:launchpad support multiple containers #4380

Merged
merged 2 commits into from Dec 6, 2023
Merged

Conversation

zjy365
Copy link
Contributor

@zjy365 zjy365 commented Dec 6, 2023

🤖[deprecated] Generated by Copilot at 9067d7a

Summary

🌐🛠️🚀

This pull request introduces several changes to the frontend of the app launchpad feature. It improves the user interface and experience by adjusting the size and position of some icons, using icons with tooltips instead of buttons with labels, and adding toast notifications. It also adds a new feature that handles the conversion and patching of the deployment YAML files for editing or creating an app. It enhances the utility functions and hooks to support different scenarios and cases for the app deployment process. It also provides localization support for the new features and validations by adding new keys and values to the common.json files for the English and Chinese locales.

This pull request has many changes
To localize and patch app ranges
It tweaks some icons and hooks
And adds some toasts and checks
And converts YAMLs with deployYaml2Json

Walkthrough

  • Add localization support for new features and validations in app edit and create pages by adding new keys and values to common.json files for English and Chinese locales (link, link)
  • Improve alignment and consistency of icons and buttons in app list and detail pages by adjusting width, height, and transform props of MyIcon components in Button and Menu components (link, link, link, link, link)
  • Enhance user interface and experience of pods table by adding tooltips and centering icons for log, terminal, detail, and restart actions using MyTooltip and Center components (link, link)
  • Add validation rule to app edit and create form that prevents user from removing all store items by checking store list length and displaying toast notification using useToast hook and toast function (link, link, link)
  • Implement logic and algorithm for converting and patching deployment or statefulset YAML file based on form data and original YAML files using json2DeployCr function with handleType, crYamlList, and crOldYamls parameters (link, link)
  • Use patchYamlListV1 function to handle conversion and patching of YAML files in a different and improved way by comparing newYamlList and oldYamlList parameters and returning array of actions (link, link)
  • Pass correct and updated arguments to formData2Yamls function based on appName, handleType, and crOldYamls values in EditApp component (link, link)
  • Rename query keys and variables to make them more descriptive and avoid potential conflicts in PodDetailModal, EditApp, and formData2Yamls components (link, link, link, link)
  • Remove unnecessary and unused code and variables related to formOldYamls in EditApp and formData2Yamls components (link, link)
  • Improve robustness and consistency of pathToNameFormat function by handling edge cases and variations of path string (link)

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

sealos-ci-robot commented Dec 6, 2023

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 1081
✅ Successful 395
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 685
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

Copy link

sweep-ai bot commented Dec 6, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b6654c4) 65.45% compared to head (372b2e2) 65.45%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4380   +/-   ##
=======================================
  Coverage   65.45%   65.45%           
=======================================
  Files           8        8           
  Lines         660      660           
=======================================
  Hits          432      432           
  Misses        180      180           
  Partials       48       48           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: jingyang <3161362058@qq.com>
@c121914yu c121914yu merged commit 2255850 into labring:main Dec 6, 2023
21 of 22 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