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:
parent
2d437e5b4e
commit
7b6e8253a6
@ -38,7 +38,10 @@ export default class DeleteClusters extends ConfirmAction {
|
||||
|
||||
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 });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user