fix: fix the delete operation of cluster instance

Disable the delete operation if the stack is not ready or the status is `DELETE_IN_PROGRESS`

Change-Id: I18457d3593761e36a7173488b646ebdedf656ec2
This commit is contained in:
xusongfu 2022-12-19 14:59:12 +08:00
parent 2d437e5b4e
commit 7b6e8253a6

View File

@ -38,7 +38,10 @@ export default class DeleteClusters extends ConfirmAction {
policy = 'cluster:delete'; policy = 'cluster:delete';
allowedCheckFunc = () => true; allowedCheckFunc = (item) => {
const { stack_id, status } = item;
return !!stack_id && status !== 'DELETE_IN_PROGRESS';
};
onSubmit = (data) => globalClustersStore.delete({ id: data.id }); onSubmit = (data) => globalClustersStore.delete({ id: data.id });
} }