-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: Move current status to first position in MySQL and Redis settings and set as default tab #8910
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
Conversation
…gs and set as default tab
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
| changeTab('status'); | ||
| }; | ||
|
|
||
| const portRef = ref(); |
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 is an issue with the duplication of the conf button near line 18. It appears twice and changes the tab to conf when clicked.
To optimize, remove one instance of the conf button at position 18 and ensure only one is present. The ref should also be adjusted from "conf" to "status" starting at line 173 for consistency in the logic and user interface.
Final suggestion:
@@ -6,9 +6,6 @@
{{ database }}
</el-text>
<el-divider direction="vertical" />
- <el-button type="primary" :plain="activeName !== 'conf'" @click="changeTab('conf')">
- {{ $t('database.confChange') }}
- </el-button>
<el-button
type="primary"
:disabled="redisStatus !== 'Running'"
@@ -17,6 +14,9 @@
>
{{ $t('database.currentStatus') }}
</el-button>
+ <el-button type="primary" :plain="activeName !== 'conf'" @click="changeTab('conf')"> <!-- Removed -->
+ </el-button>
<el-button
type="primary"
:disabled="redisStatus !== 'Running'"
@@ -145,7 +145,7 @@ const rules = reactive({
maxmemory: [Rules.number, checkNumberRange(0, 999999)],
});
-const activeName = ref('conf'); // Changed to state
+const activeName = ref('status'); // Consistent naming scheme
const statusRef = ref();
const persistenceRef = ref();This simplification reduces redundancy while maintaining functionality, making it clearer where users can change configurations for Redis.
| const activeName = ref('status'); | ||
|
|
||
| const baseInfo = reactive({ | ||
| name: '', |
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.
The only change made to the activeName variable is changing the initial value from 'conf' to 'status'. This suggests that there may have been no need to make this change since both buttons now refer to "currentStatus".
However, it's recommended to ensure consistency throughout the component. Since one button refers to status changes and another to configuration changes, using a unified key like 'options' or 'buttons' could improve readability and maintainability of the code. If these changes don't affect functionality, consider removing the duplicate button with its plain styling option and use a single style for all "Options" buttons if they perform similar actions across different tabs or sections.
|
wanghe-fit2cloud
left a comment
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.
/lgtm
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wanghe-fit2cloud The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



No description provided.