Skip to content

Commit c1d9826

Browse files
committed
feat: add conditional rendering for rebalance button in Cluster.vue and History.vue based on user permissions
1 parent 9905efa commit c1d9826

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

apps/daas/src/views/cluster/Cluster.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,11 @@ const onUpdateLicenseSuccess = () => {
12291229
:items="filterItems"
12301230
@fetch="getDataApi()"
12311231
/>
1232-
<el-button type="primary" @click="showRebalanceDrawer = true">
1232+
<el-button
1233+
v-if="hasRebalancePermission"
1234+
type="primary"
1235+
@click="showRebalanceDrawer = true"
1236+
>
12331237
{{ $t('daas_task_rebalance_button') }}
12341238
</el-button>
12351239
</div>

apps/daas/src/views/task-rebalance/History.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,11 @@ onUnmounted(stopDetailPolling)
461461
}}</span>
462462
</template>
463463
<template #actions>
464-
<el-button type="primary" @click="showRebalanceDrawer = true">
464+
<el-button
465+
v-if="hasEditPermission"
466+
type="primary"
467+
@click="showRebalanceDrawer = true"
468+
>
465469
{{ $t('daas_task_rebalance_button') }}
466470
</el-button>
467471
</template>

0 commit comments

Comments
 (0)