Skip to content
Permalink
Browse files
[fix] fix the condition for polling in node verify page (#36)
fix the condition for polling in node verify page
  • Loading branch information
zhengbowen01 committed Apr 8, 2022
1 parent f26a664 commit b68db6a30f948bacab0c76f40df8d4371daf15b5
Showing 1 changed file with 2 additions and 1 deletion.
@@ -31,6 +31,7 @@ import { LoadingOutlined } from '@ant-design/icons';
const Step = Steps.Step;

const ERROR_STATUS = [OperateStatusEnum.FAIL, OperateStatusEnum.CANCEL];
const PENDING_STATUS = [OperateStatusEnum.PROCESSING, OperateStatusEnum.INIT];

export function NodeVerify(props: any) {
const { reqInfo } = useContext(NewSpaceInfoContext);
@@ -52,7 +53,7 @@ export function NodeVerify(props: any) {
if (failedNode) {
message.error(failedNode.operateResult);
}
if (data.filter(item => item.operateStatus === OperateStatusEnum.PROCESSING).length === 0) {
if (data.filter(item => PENDING_STATUS.includes(item.operateStatus)).length === 0) {
getClusterNodes.cancel();
}
if (data.filter(item => item.operateStatus !== OperateStatusEnum.SUCCESS).length > 0) {

0 comments on commit b68db6a

Please sign in to comment.