Auto Submit

dev_local_v9_bw
autosubmit 2 years ago
parent e31a2d6335
commit e86cf2ecf7

@ -27,7 +27,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.11521b73.js"></script>
<script src="/react/build/umi.fae3a001.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -1195,8 +1195,12 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) {
var exerciseDataRef = (0,_react_17_0_2_react.useRef)();
var _useState35 = (0,_react_17_0_2_react.useState)(false),
_useState36 = slicedToArray_default()(_useState35, 2),
showModal = _useState36[0],
setShowModal = _useState36[1];
istimeshow = _useState36[0],
setistimeshow = _useState36[1];
var _useState37 = (0,_react_17_0_2_react.useState)(false),
_useState38 = slicedToArray_default()(_useState37, 2),
showModal = _useState38[0],
setShowModal = _useState38[1];
var countRef = (0,_react_17_0_2_react.useRef)(checkboxData);
countRef.current = checkboxData;
console.log("---------jupyterDat11111a", jupyterData);
@ -1573,6 +1577,8 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) {
setUrlSign(false);
setStatus(Status.Success);
setTime(Date.now() + (res === null || res === void 0 || (_res$data10 = res.data) === null || _res$data10 === void 0 || (_res$data10 = _res$data10[0]) === null || _res$data10 === void 0 ? void 0 : _res$data10.remaining_time));
// setTime(Date.now() + 3000);
setEndTime((res === null || res === void 0 || (_res$data11 = res.data) === null || _res$data11 === void 0 || (_res$data11 = _res$data11[0]) === null || _res$data11 === void 0 ? void 0 : _res$data11.remaining_time) - 300 * 1000 <= 0 ? Date.now() + 1000 : Date.now() + ((res === null || res === void 0 || (_res$data12 = res.data) === null || _res$data12 === void 0 || (_res$data12 = _res$data12[0]) === null || _res$data12 === void 0 ? void 0 : _res$data12.remaining_time) - 300 * 1000));
return _context8.abrupt("return");
case 21:
@ -1737,20 +1743,18 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) {
});
};
var handleTimeFinish = function handleTimeFinish() {
modal/* default */.Z.destroyAll();
modal/* default */.Z.confirm({
centered: true,
title: '倒计时截止',
content: /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: "tc font14",
children: "\u670D\u52A1\u5DF2\u4E2D\u65AD\uFF0C\u662F\u5426\u786E\u8BA4\u91CD\u7F6E\u5B9E\u9A8C\u73AF\u5883\uFF1F"
}),
okText: '确定',
cancelText: '取消',
onOk: function onOk() {
handleResetEnv();
}
});
setistimeshow(true);
// Modal.destroyAll();
// Modal.confirm({
// centered: true,
// title: '倒计时截止',
// content: <p className="tc font14">服务已中断,是否确认重置实验环境?</p>,
// okText: '确定',
// cancelText: '取消',
// onOk: () => {
// handleResetEnv();
// },
// });
};
var saveNotebook = function saveNotebook() {
var saveEvent = new Event('beforeunload');
@ -1872,10 +1876,10 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) {
payload: status
});
};
var _useState37 = (0,_react_17_0_2_react.useState)(),
_useState38 = slicedToArray_default()(_useState37, 2),
answerData = _useState38[0],
setAnswerData = _useState38[1];
var _useState39 = (0,_react_17_0_2_react.useState)(),
_useState40 = slicedToArray_default()(_useState39, 2),
answerData = _useState40[0],
setAnswerData = _useState40[1];
var getAnswerData = /*#__PURE__*/function () {
var _ref12 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13(identifier) {
var res;
@ -2345,6 +2349,33 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) {
test_sets: (gamesData === null || gamesData === void 0 ? void 0 : gamesData.test_sets) || [],
jupyterData: jupyterData
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
title: [/*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {
className: "modalIconYellow mr10"
}), '实验环境结束提醒'],
maskClosable: false,
closable: false,
centered: true,
open: istimeshow,
onOk: function onOk() {
(0,exercise/* exitDeletePod */.eA)(jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.myshixun_identifier).then(function (res) {});
_umi_production_exports.history.push("/shixuns/".concat(jupyterData.identifier, "/challenges"));
},
cancelButtonProps: {
style: {
// display: time !== 0 ? 'inline-block' : 'none'
background: '#009e9c',
color: '#fff'
}
},
confirmLoading: btnLoading,
onCancel: function onCancel() {
setistimeshow(false);
window.location.reload();
},
okText: '退出',
cancelText: '重新开启实验',
children: "\u5B9E\u9A8C\u73AF\u5883\u5012\u8BA1\u65F6\u7ED3\u675F\uFF0C\u8D44\u6E90\u5DF2\u7ECF\u88AB\u56DE\u6536\u3002"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_modal/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(drawer/* default */.Z, {
width: 280,

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save