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: accomplished create, update and delete function in Kube Panel #4300

Merged
merged 42 commits into from
Nov 27, 2023
Merged

feat: accomplished create, update and delete function in Kube Panel #4300

merged 42 commits into from
Nov 27, 2023

Conversation

Wishrem
Copy link
Contributor

@Wishrem Wishrem commented Nov 15, 2023

πŸ€– Generated by Copilot at d3744f0

Summary

πŸ“„πŸš€πŸ—‘οΈ

This pull request updates the dependencies and the UI of the kubepanel plugin for the frontend of the sealos project. It adds the Monaco code editor for editing YAML files and the latest version of React for the UI. It also adds sample YAML templates for creating different Kubernetes resources and API functions for creating, updating, and deleting resources. It refactors and simplifies some of the code that displays information about Kubernetes objects in a drawer panel. It changes the appearance and layout of some of the components, such as the pie chart and the badge, to make them more readable and consistent with the design of the frontend.

Sing, O Muse, of the kubepanel plugin, the wondrous work of code
That lets the users of Lens create and manage their Kubernetes nodes
With YAML templates and Monaco editor, they shape their ConfigMaps and Pods
And view their PieCharts and KubeBadges, the splendid gifts of the gods

Walkthrough

  • Add dependencies for Monaco code editor, React 18, and Node.js file system module (link, link, link)
  • Add sample YAML files for creating different Kubernetes resources (link, link, link, link, link)
  • Add API functions for creating, deleting, updating, and getting YAML templates for Kubernetes resources (link, link, link, link)
  • Simplify and refactor parseResponse function in list.ts by removing redundant kind parameter (link, link, link, link)
  • Modify PieChart component to make it bigger, less hollow, and more readable (link)
  • Modify KubeBadge component to make it more visible and consistent with frontend design (link)
  • Rename and move KubeRecord component to DrawerItem and update its usage in KubeObjectInfoList component (link, link, link, link, link, link, link, link, link, link, link, link)

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 Nov 15, 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 15, 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 15, 2023

Codecov Report

All modified and coverable lines are covered by tests βœ…

Comparison is base (7a8fffa) 65.45% compared to head (a3575fc) 65.45%.

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

try {
if (req.method !== 'POST') throw new Error(`Method not allowed: ${req.method}`);

const { resource } = req.query;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add ts type

@bxy4543 bxy4543 added this to the v5.0 milestone Nov 26, 2023
@c121914yu c121914yu merged commit 5330a70 into labring:main Nov 27, 2023
10 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

4 participants