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:frontend new api call && database file migration #4332

Merged
merged 1 commit into from Nov 24, 2023

Conversation

zjy365
Copy link
Contributor

@zjy365 zjy365 commented Nov 22, 2023

🤖[deprecated] Generated by Copilot at 0aad1c8

Summary

🚀🌐📈

This pull request enhances the frontend features and functionality of the app launchpad, dbprovider, and cronjob providers. It improves the type safety, code readability, error handling, and localization of various API handlers and components. It also adds new variables, annotations, and API handlers to support app deployment, PVC resizing, file upload, backup deletion, and pod metrics. Additionally, it refactors the InternalAppCall listener logic into a separate function and fixes some UI and layout issues.

We're the masters of the code, we make the changes that we need
We refactor and enhance, we handle errors and events
We upload and delete, we resize and translate
We're the masters of the code, we rock the PodsMetrics and BackupTable

Walkthrough

  • Add new API handlers to get the pods and metrics of an app, update the replica count of an app, and delete a backup by name (link, link, link, link, link)
  • Add new annotation key for PVC resize and calculate the total storage size of the app's PVCs (link, link, link)
  • Refactor the InternalAppCall listener logic into a separate function and handle errors (link, link, link)
  • Add new translation keys for the input and file components in English and Chinese (link, link, link, link)
  • Add callback function for file upload progress event and update the file upload messages (link, link, link, link, link)
  • Modify the onUpdateValue function of the TagTextarea component to handle the deletion of the last element and change the toast status (link, link)
  • Modify the status variable of the DumpImport and MigrateStatus components to use the pod status phase from the query data (link, link)
  • Add refetchInterval option to the useQuery hook of the MigrateStatus component to periodically refetch the pod status (link)
  • Modify the BackupTable component to show a noEvents icon and a No Data Available text if the query was successful but the backups array was empty (link, link)
  • Modify the maxW prop of the Box component in the FileSelect component to 366px (link)
  • Modify the Box component to a Flex component and add a fontSize prop of 12px to the Text component in the BackupTable component (link, link, link)
  • Modify the error log message in the getServiceByName API handler to include a prefix for clarity (link)
  • Add a comment to explain the logic of getting and deleting the jobs related to the database in the delDBByName API handler (link)
  • Remove the unused imports and the catch block for the deleteNamespacedService function in the DumpImport and delDBByName components (link, link, link)
  • Add blank lines between components for readability in the DumpImport component (link, link, link)
  • Rename the getPodMetrics function to GetPodMetrics and add a return statement (link, link, link)

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Nov 22, 2023

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 1036
✅ Successful 367
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 668
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

Copy link

sweep-ai bot commented Nov 22, 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 Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4ef6bb6) 65.45% compared to head (edfeba0) 65.45%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4332   +/-   ##
=======================================
  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.

@zjy365 zjy365 force-pushed the launchpad branch 4 times, most recently from 67e5d44 to 623bb11 Compare November 24, 2023 03:32
Copy link

Whoa! Easy there, Partner!

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

Signed-off-by: jingyang <3161362058@qq.com>
@c121914yu c121914yu merged commit 7a8fffa into labring:main Nov 24, 2023
20 of 21 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