Skip to content

Commit

Permalink
fix(frontend): 集群启用按钮交互逻辑修复 TencentBlueKing#7032
Browse files Browse the repository at this point in the history
  • Loading branch information
jinquantianxia committed Sep 20, 2024
1 parent 42ff26a commit 460700f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dbm-ui/frontend/src/services/model/hdfs/hdfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,8 @@ export default class Hdfs {

return payload;
}

get isStarting() {
return Boolean(this.operations.find((item) => item.ticket_type === Hdfs.HDFS_ENABLE));
}
}
4 changes: 4 additions & 0 deletions dbm-ui/frontend/src/services/model/pulsar/pulsar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,8 @@ export default class Pulsar {

return payload;
}

get isStarting() {
return Boolean(this.operations.find((item) => item.ticket_type === Pulsar.PULSAR_ENABLE));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@
<auth-button
text
theme="primary"
disabled={data.isStarting}
action-id="es_enable_disable"
permission={data.permission.es_enable_disable}
v-db-console="es.clusterManage.enable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@
text
theme="primary"
action-id="hdfs_enable_disable"
disabled={data.isStarting}
permission={data.permission.hdfs_enable_disable}
v-db-console="hdfs.clusterManage.enable"
resource={data.id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@
text
theme="primary"
action-id="pulsar_enable_disable"
disabled={data.isStarting}
permission={data.permission.pulsar_enable_disable}
v-db-console="pulsar.clusterManage.enable"
resource={data.id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@
permission={data.permission.redis_open_close}
style="width: 100%;height: 32px;"
text
disabled={data.isStarting || data.operationDisabled}
disabled={data.isStarting}
onClick={() => handleSwitchRedis(TicketTypes.REDIS_PROXY_OPEN, data)}>
{ t('启用') }
</auth-button>
Expand Down

0 comments on commit 460700f

Please sign in to comment.