Skip to content

Conversation

@lan-yonghui
Copy link
Member

No description provided.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jun 4, 2025

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.

Details

Instructions 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();
Copy link
Member

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: '',
Copy link
Member

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.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 4, 2025

Copy link
Member

@wanghe-fit2cloud wanghe-fit2cloud left a comment

Choose a reason for hiding this comment

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

/lgtm

@wanghe-fit2cloud
Copy link
Member

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jun 4, 2025

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved label Jun 4, 2025
@f2c-ci-robot f2c-ci-robot bot merged commit 470d788 into dev-v2 Jun 4, 2025
7 checks passed
@f2c-ci-robot f2c-ci-robot bot deleted the pr@dev-v2@feat_database branch June 4, 2025 14:40
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.

4 participants