-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: Fix the exception of some 1pctl commands #8268
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1835,17 +1835,16 @@ const message = { | |
| noUpgrade: 'It is currently the latest version', | ||
| versionHelper: | ||
| 'Name rules: [major version].[functional version].[Bug fix version], as shown in the following example:', | ||
| versionHelper1: 'v1.0.1 is a Bug fix after v1.0.0', | ||
| versionHelper2: 'v1.1.0 is a feature release after v1.0.0', | ||
| rollbackLocalHelper: | ||
| 'The primary node does not support direct rollback. Please manually execute the [1pctl restore] command to rollback!', | ||
| upgradeCheck: 'Check for updates', | ||
| upgradeNotes: 'Release note', | ||
| upgradeNow: 'Upgrade now', | ||
| source: 'Download source', | ||
| hasNewVersion: 'New version Available', | ||
| versionHigher: | ||
| 'Detected that node {0} version is higher than the main node, switching is not supported at this time. Please upgrade the main node system version and try again!', | ||
| versionLower: | ||
| 'Detected that node {0} version is lower than the main node, switching is not supported at this time. Please upgrade the system version of this node and try again!', | ||
| versionNotSame: | ||
| 'The version of this node does not match the primary node. Switching is not supported at this time. Please check and try again!', | ||
| versionCompare: | ||
| 'Detected that node {0} is already at the latest upgradable version. Please check the primary node version and try again!', | ||
|
|
||
| about: 'About', | ||
| project: 'Project Address', | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code snippet contains several changes and minor adjustments aimed at improving clarity and robustness: Changes and Adjustments:
Summary of Changes:
These changes ensure that the interface remains intuitive and maintainable, addressing both usability and operational efficiency.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes you've made appear to be consistent with the intended functionality of the application. However, there are a few points noted:
Overall, the logic seems sound, but adding some additional detail or validation could improve robustness and maintainability. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1629,15 +1629,13 @@ const message = { | |
| upgradeHelper: '升級操作需要重啟 1Panel 服務,是否繼續?', | ||
| noUpgrade: '當前已經是最新版本', | ||
| versionHelper: '1Panel 版本號命名規則為: [大版本].[功能版本].[Bug 修復版本],例:', | ||
| versionHelper1: 'v1.0.1 是 v1.0.0 之後的 Bug 修復版本', | ||
| versionHelper2: 'v1.1.0 是 v1.0.0 之後的功能版本', | ||
| rollbackLocalHelper: '主節點暫不支援直接回滾,請手動執行「1pctl restore」命令回滾!', | ||
| upgradeCheck: '檢查更新', | ||
| upgradeNotes: '更新內容', | ||
| upgradeNow: '立即更新', | ||
| source: '下載源', | ||
| hasNewVersion: '有新版本', | ||
| versionHigher: '檢測到節點 {0} 版本高於主節點,暫不支持切換,請先升級主節點系統版本後重試!', | ||
| versionLower: '檢測到節點 {0} 版本低於主節點,暫不支持切換,請先升級該節點系統版本後重試!', | ||
| versionNotSame: '檢測到該節點版本與主節點不一致,暫不支援切換,請檢查後重試!', | ||
| versionCompare: '檢測到節點 {0} 版本已是當前可升級最新版本,請檢查主節點版本後重試!', | ||
|
|
||
| safe: '安全', | ||
| bindInfo: '監聽地址', | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code snippet seems to contain several inconsistencies, potential issues, or optimization suggestions:
To address these points more effectively, it would help to gather additional details about the broader functionality and intended use case before making further changes.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code Differences Analysis:1.
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several improvements and optimizations that can be made to the code snippet you provided:
Simplify Version Helper Text:
versionHelper,rollbackLocalHelper, etc., into a single explanation if they share similar content.Consistency in Upgrade Messages:
upgradeCheckand other messages related to upgrades.Optimize About Section:
Consider Adding Default Values or Null Checks:
switchNode, add default values for options or null checks.Here's an optimized version of the code snippets with comments for clarity:
Key Changes/Updates Summary:
versionHelper.\n) and backticks (``) for multi-line string handling.