|
|
|
|
@ -3687,70 +3687,67 @@ var ProjectDetailPage = function ProjectDetailPage(_ref) {
|
|
|
|
|
right: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
|
|
type: "primary",
|
|
|
|
|
loading: btnLoading,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setBtnLoading(true);
|
|
|
|
|
if (!haveAuth) {
|
|
|
|
|
if (window.localStorage.getItem('hideRemindModal') === 'true') {
|
|
|
|
|
openForkModal('forkButton');
|
|
|
|
|
} else {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'innovation/save',
|
|
|
|
|
payload: {
|
|
|
|
|
visibleModalName: 'remindfork-project',
|
|
|
|
|
hideRemindModal: true
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setBtnLoading(true);
|
|
|
|
|
if (!haveAuth) {
|
|
|
|
|
if (window.localStorage.getItem('hideRemindModal') === 'true') {
|
|
|
|
|
openForkModal('forkButton');
|
|
|
|
|
} else {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'innovation/save',
|
|
|
|
|
payload: {
|
|
|
|
|
visibleModalName: 'remindfork-project',
|
|
|
|
|
hideRemindModal: true
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
(0,service_innovation/* getProjectDetail */.T)(taskId).then(function (res) {
|
|
|
|
|
setDetail(res);
|
|
|
|
|
if (res.verify_info.status === -1) {
|
|
|
|
|
setisshowmodal(true);
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
max_cpu: 2,
|
|
|
|
|
min_cpu: 0.2,
|
|
|
|
|
max_memory: 1024,
|
|
|
|
|
min_memory: 1024,
|
|
|
|
|
max_disk: 1,
|
|
|
|
|
survival_time: 0.5
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
(0,service_innovation/* getProjectDetail */.T)(taskId).then(function (res) {
|
|
|
|
|
setDetail(res);
|
|
|
|
|
if (res.verify_info.status === -1) {
|
|
|
|
|
setisshowmodal(true);
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
max_cpu: 2,
|
|
|
|
|
min_cpu: 0.2,
|
|
|
|
|
max_memory: 1024,
|
|
|
|
|
min_memory: 1024,
|
|
|
|
|
max_disk: 1,
|
|
|
|
|
survival_time: 0.5
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (res.verify_info.status === 0) {
|
|
|
|
|
modal/* default */.Z.warning({
|
|
|
|
|
title: '启动环境提示',
|
|
|
|
|
content: '环境资源正在【审核中】,审核通过后才能启动环境',
|
|
|
|
|
okText: '查看审核结果',
|
|
|
|
|
onOk: function onOk() {
|
|
|
|
|
setkeys('3');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (res.verify_info.status === 1) {
|
|
|
|
|
_umi_production_exports.history.push("/innovation/tasks/".concat(taskId));
|
|
|
|
|
}
|
|
|
|
|
if (res.verify_info.status === 2) {
|
|
|
|
|
modal/* default */.Z.warning({
|
|
|
|
|
title: '启动环境提示',
|
|
|
|
|
content: '您申请的环境资源【未通过】,无法启动环境。',
|
|
|
|
|
okText: '查看审核结果',
|
|
|
|
|
onOk: function onOk() {
|
|
|
|
|
setkeys('3');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
})["finally"](function () {
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
target: "_blank",
|
|
|
|
|
children: "\u542F\u52A8\u73AF\u5883"
|
|
|
|
|
})
|
|
|
|
|
if (res.verify_info.status === 0) {
|
|
|
|
|
modal/* default */.Z.warning({
|
|
|
|
|
title: '启动环境提示',
|
|
|
|
|
content: '环境资源正在【审核中】,审核通过后才能启动环境',
|
|
|
|
|
okText: '查看审核结果',
|
|
|
|
|
onOk: function onOk() {
|
|
|
|
|
setkeys('3');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (res.verify_info.status === 1) {
|
|
|
|
|
_umi_production_exports.history.push("/innovation/tasks/".concat(taskId));
|
|
|
|
|
}
|
|
|
|
|
if (res.verify_info.status === 2) {
|
|
|
|
|
modal/* default */.Z.warning({
|
|
|
|
|
title: '启动环境提示',
|
|
|
|
|
content: '您申请的环境资源【未通过】,无法启动环境。',
|
|
|
|
|
okText: '查看审核结果',
|
|
|
|
|
onOk: function onOk() {
|
|
|
|
|
setkeys('3');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
})["finally"](function () {
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
children: "\u542F\u52A8\u73AF\u5883"
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Detail_TabPane, {
|