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:db add kafka monitor #4359

Merged
merged 2 commits into from Nov 29, 2023
Merged

feat:db add kafka monitor #4359

merged 2 commits into from Nov 29, 2023

Conversation

zjy365
Copy link
Contributor

@zjy365 zjy365 commented Nov 29, 2023

๐Ÿค–[deprecated] Generated by Copilot at cc2c0e3

Summary

๐ŸŒ๐Ÿ—‘๏ธ๐Ÿš€

This pull request improves the database provider API, adds the feature of deleting the last element in the TagTextarea component, and supports different commands for the enterprise and open source versions of Sealos. It also refactors some code, updates some translations, and deletes an unused file.

Oh, we're the coders of the sea, and we work on the api
We log and translate and refactor, and we do it merrily
We add new features and props, and we handle different dbs
Heave away, me hearties, heave away, heave away

Walkthrough

  • Refactored the dbTypeMap object to use a base object and the spread operator to reduce duplication and improve readability (link)
  • Changed the way the database credentials are decoded from the secret body data to use the dbTypeMap object instead of hard-coded keys (link)
  • Added 'mongodb' to the PublicNetMigration array to enable the public net migration feature for MongoDB databases (link)
  • Added a new parameter type to the onUpdateValue function in the TagTextarea component to implement the feature of deleting the last element using the backspace key (link)
  • Added a new condition to the onKeyDown event handler of the Input component in the TagTextarea component to call the onUpdateValue function with the 'delete' type (link)
  • Added the overflowY prop to the Box component that wraps the TagTextarea component to set the overflow behavior to 'auto' (link)
  • Added a new prop enterprise to the CommandForm component and the CommandFormProps type to support different commands for different versions of Sealos (link)
  • Added a ternary operator to the basePath string in the CommandForm component to set the --proxy-prefix flag according to the enterprise prop (link)
  • Changed the height of the TagTextarea components that collect the master IPs and the node IPs from '50px' to '80px' to increase the space for the input and the tags (link, link)
  • Changed the placeholder of the Input component that collects the ssh password from 'ไธๅกซๅˆ™ๅ…ๅฏ†็™ปๅฝ•' to '้ป˜่ฎคๅ…ๅฏ†็™ปๅฝ•' to clarify the default behavior of the ssh login (link)
  • Changed the label of the Input component that collects the cloud port from 'Sealos Cloud ็ซฏๅฃ' to 'Cloud ็ซฏๅฃ' to simplify the label (link)
  • Changed the placeholder of the Input components that collect the certificate path and the certificate key path from 'ไธๅกซๅˆ™ไฝฟ็”จ Sealos ๆไพ›็š„่‡ช็ญพ่ฏไนฆ' to '้ป˜่ฎคไฝฟ็”จ Sealos ๆไพ›็š„่‡ช็ญพ่ฏไนฆ' to clarify the default behavior of the certificate (link, link)
  • Added the enterprise prop to the CommandForm component in the Tutorial component that shows the command for the enterprise version of Sealos and set it to true (link)
  • Added 'bash' before '/tmp/install.sh' in the basePath string in the Tutorial component that shows the command for the open source version of Sealos to ensure the script is executed with bash (link)
  • Added the translation for 'No Elements to Delete' in the common.json files for the English and Chinese locales to support the new feature of the TagTextarea component (link, link)
  • Changed the console log messages in the getServiceByName.ts and getStatefulSetByName.ts files from 'db get service name err' to 'api:getServiceByName' and 'api:getStatefulSetByName' respectively to make them more informative and accurate (link, link)
  • Removed the console log statement that printed the dbName, dbType, and queryKey variables in the getMonitorData.ts file to clean up the code and avoid unnecessary logging (link)
  • Added the console log statement that printed the params variable in the getMonitorData.ts file to debug the code and check the value of the params variable (link)
  • Deleted the file frontend/providers/template/delRoleBinding.ts (link)

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

๐Ÿค– Generated by lychee action

Summary

Status Count
๐Ÿ” Total 1036
โœ… Successful 368
โณ Timeouts 0
๐Ÿ”€ Redirected 0
๐Ÿ‘ป Excluded 667
โ“ Unknown 0
๐Ÿšซ Errors 0

Full action output

Full Github Actions output

Copy link

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

Codecov Report

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

Comparison is base (30b47a8) 65.45% compared to head (cc2c0e3) 65.45%.
Report is 1 commits behind head on main.

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

@c121914yu c121914yu merged commit 552dac8 into labring:main Nov 29, 2023
36 of 37 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