|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[65111],{
|
|
|
|
|
|
/***/ 40001:
|
|
|
/*!*******************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CheckOutlined.js + 1 modules ***!
|
|
|
\*******************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_CheckOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(14809);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/CheckOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var CheckOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_CheckOutlined = (CheckOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(7657);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CheckOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var CheckOutlined_CheckOutlined = function CheckOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_CheckOutlined
|
|
|
}));
|
|
|
};
|
|
|
|
|
|
/** */
|
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(CheckOutlined_CheckOutlined);
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_CheckOutlined = (RefIcon);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 15277:
|
|
|
/*!*****************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***!
|
|
|
\*****************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_EyeOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(14809);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/EyeOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_EyeOutlined = (EyeOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(7657);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/EyeOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_EyeOutlined
|
|
|
}));
|
|
|
};
|
|
|
|
|
|
/** */
|
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(EyeOutlined_EyeOutlined);
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_EyeOutlined = (RefIcon);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 47472:
|
|
|
/*!********************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules ***!
|
|
|
\********************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_SearchOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(14809);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/SearchOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var SearchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_SearchOutlined = (SearchOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(7657);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/SearchOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SearchOutlined_SearchOutlined = function SearchOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_SearchOutlined
|
|
|
}));
|
|
|
};
|
|
|
|
|
|
/** */
|
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(SearchOutlined_SearchOutlined);
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_SearchOutlined = (RefIcon);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 88294:
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/pages/tasks/service/index.js ***!
|
|
|
\******************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ JW: function() { return /* binding */ setUnity3dStatus; },
|
|
|
/* harmony export */ Jd: function() { return /* binding */ rebootEsc; },
|
|
|
/* harmony export */ Kl: function() { return /* binding */ addVncTime; },
|
|
|
/* harmony export */ L5: function() { return /* binding */ saveTaskStar; },
|
|
|
/* harmony export */ MH: function() { return /* binding */ getChooseUnlockAnswer; },
|
|
|
/* harmony export */ MI: function() { return /* binding */ addMyRepositoryFile; },
|
|
|
/* harmony export */ Qo: function() { return /* binding */ getCodeGameStatus; },
|
|
|
/* harmony export */ SO: function() { return /* binding */ fetchPathsTaskList; },
|
|
|
/* harmony export */ Tf: function() { return /* binding */ resetGitCode; },
|
|
|
/* harmony export */ XO: function() { return /* binding */ fetchTaskInfo; },
|
|
|
/* harmony export */ Xy: function() { return /* binding */ codeGameBuild; },
|
|
|
/* harmony export */ Y0: function() { return /* binding */ plusOrCancelPraise; },
|
|
|
/* harmony export */ Ye: function() { return /* binding */ setStartPermanent; },
|
|
|
/* harmony export */ Yv: function() { return /* binding */ stopLogOutput; },
|
|
|
/* harmony export */ ZH: function() { return /* binding */ commitFiles; },
|
|
|
/* harmony export */ am: function() { return /* binding */ resetEnvironment; },
|
|
|
/* harmony export */ bD: function() { return /* binding */ deleteMyGitFile; },
|
|
|
/* harmony export */ fA: function() { return /* binding */ closeWindowsVnc; },
|
|
|
/* harmony export */ fY: function() { return /* binding */ getRemainingTime; },
|
|
|
/* harmony export */ g6: function() { return /* binding */ fetchTaskList; },
|
|
|
/* harmony export */ g7: function() { return /* binding */ moveMyGitFile; },
|
|
|
/* harmony export */ gT: function() { return /* binding */ fetchPictures; },
|
|
|
/* harmony export */ gn: function() { return /* binding */ pullFiles; },
|
|
|
/* harmony export */ h$: function() { return /* binding */ logOutput; },
|
|
|
/* harmony export */ hG: function() { return /* binding */ resetPassedCode; },
|
|
|
/* harmony export */ i8: function() { return /* binding */ getRanking; },
|
|
|
/* harmony export */ j3: function() { return /* binding */ getUnlockAnswer; },
|
|
|
/* harmony export */ lH: function() { return /* binding */ getAnswerInfo; },
|
|
|
/* harmony export */ li: function() { return /* binding */ fetchCode; },
|
|
|
/* harmony export */ n4: function() { return /* binding */ updateCode; },
|
|
|
/* harmony export */ pU: function() { return /* binding */ fetchRepos; },
|
|
|
/* harmony export */ qK: function() { return /* binding */ restoreCode; },
|
|
|
/* harmony export */ sA: function() { return /* binding */ startInit; },
|
|
|
/* harmony export */ sP: function() { return /* binding */ getChooseAnswerInfo; },
|
|
|
/* harmony export */ t$: function() { return /* binding */ unlockTestCase; },
|
|
|
/* harmony export */ zl: function() { return /* binding */ evalateChooseGame; }
|
|
|
/* harmony export */ });
|
|
|
/* unused harmony exports getNoticeDetail, closeSSh, getMyFileContent */
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/fetch */ 35325);
|
|
|
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/utils/util */ 1079);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断是否来自教学课堂助教查看实训
|
|
|
var urlParamsAll = (0,_utils_util__WEBPACK_IMPORTED_MODULE_4__/* .getJsonFromUrl */ .oP)();
|
|
|
var urlParams = {};
|
|
|
if (urlParamsAll !== null && urlParamsAll !== void 0 && urlParamsAll.homework_common_id) {
|
|
|
urlParams.homework_common_id = urlParamsAll === null || urlParamsAll === void 0 ? void 0 : urlParamsAll.homework_common_id;
|
|
|
}
|
|
|
if (urlParamsAll !== null && urlParamsAll !== void 0 && urlParamsAll.exercisesId) {
|
|
|
urlParams.exercise_id = urlParamsAll === null || urlParamsAll === void 0 ? void 0 : urlParamsAll.exercisesId;
|
|
|
}
|
|
|
function fetchTaskInfo(id) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, ".json"), urlParams);
|
|
|
}
|
|
|
function fetchTaskList(id) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/challenges.json"));
|
|
|
}
|
|
|
function fetchPathsTaskList(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/subject_challenges.json"), params);
|
|
|
}
|
|
|
function saveTaskStar(id, shixunId, star) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/star.json"), {
|
|
|
shixun_id: shixunId,
|
|
|
star: star
|
|
|
});
|
|
|
}
|
|
|
function fetchCode(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/rep_content.json"), _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams));
|
|
|
}
|
|
|
function updateCode(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("myshixuns/".concat(id, "/update_file.json"), params);
|
|
|
}
|
|
|
function restoreCode(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/reset_original_code.json"), _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams));
|
|
|
}
|
|
|
function resetGitCode(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("myshixuns/".concat(id, "/reset_repository.json"), params);
|
|
|
}
|
|
|
function resetPassedCode(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/reset_passed_code.json"), _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams));
|
|
|
}
|
|
|
function codeGameBuild(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/game_build.json"), _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams));
|
|
|
}
|
|
|
function getCodeGameStatus(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/game_status.json"), _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams));
|
|
|
}
|
|
|
function evalateChooseGame(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/choose_build.json"), _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams));
|
|
|
}
|
|
|
|
|
|
//获取环境剩余时间
|
|
|
function getRemainingTime(id) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/get_remaining_time.json"));
|
|
|
}
|
|
|
function fetchPictures(id) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/picture_display.json"), urlParams);
|
|
|
}
|
|
|
function getNoticeDetail(id, params) {
|
|
|
return get("courses/".concat(id, "/inform_detail.json"), params);
|
|
|
}
|
|
|
function plusOrCancelPraise(id) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/plus_or_cancel_praise.json"));
|
|
|
}
|
|
|
function fetchRepos(id) {
|
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("myshixuns/".concat(id, "/repository.json"), params);
|
|
|
}
|
|
|
|
|
|
//添加新方法
|
|
|
function startInit(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/start.json"), params || {});
|
|
|
}
|
|
|
function closeSSh(id) {
|
|
|
return get("myshixuns/".concat(id, "/reset_pod.json"));
|
|
|
}
|
|
|
function resetEnvironment(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/reset_pod.json"), params);
|
|
|
}
|
|
|
|
|
|
// 重启云主机
|
|
|
function rebootEsc(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/tasks/".concat(id, "/reboot_esc.json"), {
|
|
|
method: 'post',
|
|
|
body: params
|
|
|
});
|
|
|
}
|
|
|
function unlockTestCase(id) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/check_test_sets.json"));
|
|
|
}
|
|
|
function getAnswerInfo(id) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/get_answer_info.json"));
|
|
|
}
|
|
|
function getChooseAnswerInfo(id) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/get_choose_answer.json"));
|
|
|
}
|
|
|
function getChooseUnlockAnswer(id) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/unlock_choose_answer.json"));
|
|
|
}
|
|
|
function getUnlockAnswer(id, aid) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/unlock_answer.json"), {
|
|
|
answer_id: aid
|
|
|
});
|
|
|
}
|
|
|
function setUnity3dStatus(id, result, data) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/set_games_status.json"), {
|
|
|
result: result,
|
|
|
data: data
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//保留唯一一个方法
|
|
|
function addVncTime(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/active_pod.json"), params);
|
|
|
}
|
|
|
function getRanking(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/rank_list.json"), params);
|
|
|
}
|
|
|
function closeWindowsVnc(id, tpi_id) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/close_windows_vnc.json"), {
|
|
|
tpi_id: tpi_id
|
|
|
});
|
|
|
}
|
|
|
function commitFiles(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/commit_files.json"), params);
|
|
|
}
|
|
|
function pullFiles(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/pull_files.json"), params);
|
|
|
}
|
|
|
function logOutput(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/log_output"), params);
|
|
|
}
|
|
|
function stopLogOutput(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/stop_log_output.json"), params);
|
|
|
}
|
|
|
|
|
|
// myshixuns start
|
|
|
function addMyRepositoryFile(_x) {
|
|
|
return _addMyRepositoryFile.apply(this, arguments);
|
|
|
}
|
|
|
function _addMyRepositoryFile() {
|
|
|
_addMyRepositoryFile = _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(params) {
|
|
|
return _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
return _context.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/myshixuns/".concat(params.id, "/add_file.json"), {
|
|
|
method: 'post',
|
|
|
body: params
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return _addMyRepositoryFile.apply(this, arguments);
|
|
|
}
|
|
|
function deleteMyGitFile(_x2) {
|
|
|
return _deleteMyGitFile.apply(this, arguments);
|
|
|
}
|
|
|
function _deleteMyGitFile() {
|
|
|
_deleteMyGitFile = _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2(params) {
|
|
|
return _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
return _context2.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/myshixuns/".concat(params.id, "/delete_git_file.json"), {
|
|
|
method: 'Delete',
|
|
|
body: params
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return _deleteMyGitFile.apply(this, arguments);
|
|
|
}
|
|
|
function moveMyGitFile(_x3) {
|
|
|
return _moveMyGitFile.apply(this, arguments);
|
|
|
}
|
|
|
function _moveMyGitFile() {
|
|
|
_moveMyGitFile = _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee3(params) {
|
|
|
return _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
return _context3.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/myshixuns/".concat(params.id, "/mv_file.json"), {
|
|
|
method: 'post',
|
|
|
body: params
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return _moveMyGitFile.apply(this, arguments);
|
|
|
}
|
|
|
function getMyFileContent(_x4) {
|
|
|
return _getMyFileContent.apply(this, arguments);
|
|
|
}
|
|
|
function _getMyFileContent() {
|
|
|
_getMyFileContent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
|
|
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
return _context4.abrupt("return", Fetch("/api/tasks/".concat(params.id, "/rep_content.json"), {
|
|
|
method: 'get',
|
|
|
params: params
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return _getMyFileContent.apply(this, arguments);
|
|
|
}
|
|
|
function setStartPermanent(id, params) {
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/shixuns/".concat(id, "/set_start_permanent.json"), {
|
|
|
method: 'put',
|
|
|
body: params
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 13887:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./src/components/Spinner/index.tsx + 1 modules ***!
|
|
|
\******************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ Spinner; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(80184);
|
|
|
;// CONCATENATED MODULE: ./src/components/Spinner/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Spinnermodules = ({"ldsRing":"ldsRing___mpBZC","idsRingWrapper":"idsRingWrapper___Of9_n","ldsring":"ldsring___o0w2t"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/Spinner/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var Spinner = (function (_ref) {
|
|
|
var message = _ref.message,
|
|
|
className = _ref.className,
|
|
|
children = _ref.children,
|
|
|
_ref$style = _ref.style,
|
|
|
style = _ref$style === void 0 ? {} : _ref$style;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "".concat(Spinnermodules.idsRingWrapper, " ").concat(className),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Spinnermodules.ldsRing,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {})]
|
|
|
}), message ? /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
style: style,
|
|
|
children: message
|
|
|
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Outlet, {})]
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 33471:
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/components/modal.tsx ***!
|
|
|
\**********************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Z: function() { return /* binding */ Dialog; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/classCallCheck.js */ 82100);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/createClass.js */ 29186);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/inherits.js */ 80619);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/createSuper.js */ 47074);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ 4676);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Dialog = /*#__PURE__*/function (_React$Component) {
|
|
|
_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2___default()(Dialog, _React$Component);
|
|
|
var _super = _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3___default()(Dialog);
|
|
|
function Dialog(props) {
|
|
|
var _this;
|
|
|
_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0___default()(this, Dialog);
|
|
|
_this = _super.call(this, props);
|
|
|
var doc = window.document;
|
|
|
_this.node = doc.createElement('div');
|
|
|
doc.body.appendChild(_this.node);
|
|
|
return _this;
|
|
|
}
|
|
|
_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1___default()(Dialog, [{
|
|
|
key: "render",
|
|
|
value: function render() {
|
|
|
var children = this.props.children;
|
|
|
return /*#__PURE__*/(0,react_dom__WEBPACK_IMPORTED_MODULE_5__.createPortal)(children, this.node);
|
|
|
}
|
|
|
}, {
|
|
|
key: "componentWillUnmount",
|
|
|
value: function componentWillUnmount() {
|
|
|
window.document.body.removeChild(this.node);
|
|
|
}
|
|
|
}]);
|
|
|
return Dialog;
|
|
|
}(react__WEBPACK_IMPORTED_MODULE_4__.Component);
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 80077:
|
|
|
/*!**************************************!*\
|
|
|
!*** ./src/pages/Terminal/index.tsx ***!
|
|
|
\**************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! umi */ 80184);
|
|
|
/* harmony import */ var _pages_tasks_xterm_panel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/pages/tasks/xterm-panel */ 62682);
|
|
|
/* harmony import */ var _pages_tasks_vnc_view_vnc_panel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/pages/tasks/vnc-view/vnc-panel */ 18477);
|
|
|
/* harmony import */ var _pages_tasks_vnc_view_index_less__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/pages/tasks/vnc-view/index.less */ 84470);
|
|
|
/* harmony import */ var _components_mediator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/mediator */ 1499);
|
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/fetch */ 35325);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ClassroomListPage = function ClassroomListPage(_ref) {
|
|
|
var _taskData$myshixun;
|
|
|
var classroomList = _ref.classroomList,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch;
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)({}),
|
|
|
_useState2 = _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
|
|
|
sshConfigData = _useState2[0],
|
|
|
setSshConfigData = _useState2[1];
|
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)({}),
|
|
|
_useState4 = _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState3, 2),
|
|
|
taskData = _useState4[0],
|
|
|
setTaskData = _useState4[1];
|
|
|
var params = (0,umi__WEBPACK_IMPORTED_MODULE_5__.useParams)();
|
|
|
var _useSearchParams = (0,umi__WEBPACK_IMPORTED_MODULE_5__.useSearchParams)(),
|
|
|
_useSearchParams2 = _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useSearchParams, 1),
|
|
|
searchParams = _useSearchParams2[0];
|
|
|
var tasksId = "68yrbx3ech4a";
|
|
|
switch (searchParams.get("type")) {
|
|
|
case "windows":
|
|
|
tasksId = "hvp5tzfof4wl";
|
|
|
break;
|
|
|
case "vnc":
|
|
|
tasksId = "m3ifqz82epo9";
|
|
|
break;
|
|
|
}
|
|
|
var total;
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
|
|
|
// setTimeout(() => {
|
|
|
// setSshConfigData({
|
|
|
// "host": "172.16.95.1",
|
|
|
// "port": "40468",
|
|
|
// "ws_url": "wss://pre-webssh.educoder.net/ws",
|
|
|
// "username": "root",
|
|
|
// "password": "123123",
|
|
|
// "game_id": 28296,
|
|
|
// "webssh_url": "http://pre-bridge.educoder.net/bridge"
|
|
|
// })
|
|
|
// },500)
|
|
|
getData();
|
|
|
}, []);
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
|
|
|
if (sshConfigData.host) {
|
|
|
setTimeout(function () {
|
|
|
_components_mediator__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.publish('create-socket', 1);
|
|
|
}, 500);
|
|
|
}
|
|
|
}, [sshConfigData]);
|
|
|
// classroomList.courses_count
|
|
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
var _ref2 = _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee() {
|
|
|
var res1, _res1$myshixun, _res1$game, res;
|
|
|
return _root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .ZP)("/api/tasks/".concat(searchParams.get("taskId") || tasksId || '68yrbx3ech4a', ".json"), {
|
|
|
method: "get"
|
|
|
});
|
|
|
case 2:
|
|
|
res1 = _context.sent;
|
|
|
setTaskData(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, res1));
|
|
|
if (!(searchParams.get("type") === 'terminal')) {
|
|
|
_context.next = 9;
|
|
|
break;
|
|
|
}
|
|
|
_context.next = 7;
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .ZP)("/api/myshixuns/".concat(res1 === null || res1 === void 0 || (_res1$myshixun = res1.myshixun) === null || _res1$myshixun === void 0 ? void 0 : _res1$myshixun.identifier, "/start.json"), {
|
|
|
method: "get",
|
|
|
game_id: res1 === null || res1 === void 0 || (_res1$game = res1.game) === null || _res1$game === void 0 ? void 0 : _res1$game.id
|
|
|
});
|
|
|
case 7:
|
|
|
res = _context.sent;
|
|
|
setSshConfigData(_root_workspace_ppte5yg23_local_v10_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, (res === null || res === void 0 ? void 0 : res.data) || {}));
|
|
|
case 9:
|
|
|
if (searchParams.get("type") === 'windows') {}
|
|
|
case 10:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getData() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("section", {
|
|
|
style: {
|
|
|
position: "fixed",
|
|
|
width: "100%",
|
|
|
height: "100%",
|
|
|
zIndex: 22,
|
|
|
top: 0,
|
|
|
right: 0,
|
|
|
bottom: 0,
|
|
|
left: 0
|
|
|
},
|
|
|
children: [searchParams.get("type") === 'terminal' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_pages_tasks_xterm_panel__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
|
|
|
sshConfigData: sshConfigData,
|
|
|
sid: 1
|
|
|
}), searchParams.get("type") !== 'terminal' && (taskData === null || taskData === void 0 ? void 0 : taskData.challenge) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_pages_tasks_vnc_view_vnc_panel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
|
|
|
taskId: tasksId,
|
|
|
myshixunId: taskData === null || taskData === void 0 || (_taskData$myshixun = taskData.myshixun) === null || _taskData$myshixun === void 0 ? void 0 : _taskData$myshixun.identifier,
|
|
|
vnc_url: searchParams.get("type") === 'vnc' ? true : false,
|
|
|
window_vnc_url: searchParams.get("type") === 'windows' ? true : false,
|
|
|
taskData: taskData
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__["default"] = ((0,umi__WEBPACK_IMPORTED_MODULE_5__.connect)(function (_ref3) {
|
|
|
var classroomList = _ref3.classroomList,
|
|
|
loading = _ref3.loading,
|
|
|
globalSetting = _ref3.globalSetting;
|
|
|
return {
|
|
|
classroomList: classroomList,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.models.classroomList
|
|
|
};
|
|
|
})(ClassroomListPage));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 18477:
|
|
|
/*!******************************************************************!*\
|
|
|
!*** ./src/pages/tasks/vnc-view/vnc-panel/index.tsx + 2 modules ***!
|
|
|
\******************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ vnc_panel; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/createForOfIteratorHelper.js
|
|
|
var createForOfIteratorHelper = __webpack_require__(91232);
|
|
|
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/progress/index.js + 13 modules
|
|
|
var progress = __webpack_require__(93948);
|
|
|
// EXTERNAL MODULE: ./src/components/Spinner/index.tsx + 1 modules
|
|
|
var Spinner = __webpack_require__(13887);
|
|
|
// EXTERNAL MODULE: ./node_modules/_resize-observer-polyfill@1.5.1@resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
|
var ResizeObserver_es = __webpack_require__(76374);
|
|
|
// EXTERNAL MODULE: ./src/components/modal.tsx
|
|
|
var components_modal = __webpack_require__(33471);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(80184);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(1079);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(10249);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
;// CONCATENATED MODULE: ./src/pages/tasks/vnc-view/clipboard-box/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/tasks/vnc-view/clipboard-box/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TextArea = input/* default */.Z.TextArea;
|
|
|
/* harmony default export */ var clipboard_box = (function (_ref) {
|
|
|
var onCancel = _ref.onCancel,
|
|
|
onSave = _ref.onSave,
|
|
|
content = _ref.content;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(content),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
value = _useState2[0],
|
|
|
setValue = _useState2[1];
|
|
|
function onChangeValue(e) {
|
|
|
setValue(e.target.value);
|
|
|
}
|
|
|
function onSaveContent() {
|
|
|
onSave(value);
|
|
|
}
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
setValue(content);
|
|
|
}, [content]);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "clipboard-box",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h3", {
|
|
|
children: "\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
|
|
value: value,
|
|
|
onChange: onChangeValue,
|
|
|
className: "clipboard"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
children: " 1.\u4ECE\u5916\u90E8\u590D\u5236\u5185\u5BB9\u5230\u5B9E\u9A8C\u73AF\u5883\u5185\uFF1A "
|
|
|
}), " \u7C98\u8D34\u5185\u5BB9\u5230\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u70B9\u51FB\u4FDD\u5B58\uFF0C\u7136\u540E\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u8FDB\u884C\u7C98\u8D34\u3002 "]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
children: " 2.\u83B7\u53D6\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7684\u5185\u5BB9\uFF1A "
|
|
|
}), " \u8BF7\u5148\u5728\u73AF\u5883\u4E2D\u590D\u5236\u5185\u5BB9\uFF0C\u590D\u5236\u52A8\u4F5C\u5B8C\u6210\u540E\u5185\u5BB9\u4F1A\u663E\u793A\u5728\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u7136\u540E\u5728\u4E0A\u9762\u6587\u672C\u6846\u4E2D\u518D\u6B21\u590D\u5236\u3002 "]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "btn-action-container",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "ghost",
|
|
|
onClick: onCancel,
|
|
|
style: {
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: "\u53D6\u6D88"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
onClick: onSaveContent,
|
|
|
children: "\u4FDD\u5B58"
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./src/utils/fullscreen.ts
|
|
|
var fullscreen = __webpack_require__(17924);
|
|
|
// EXTERNAL MODULE: ./src/pages/tasks/service/index.js
|
|
|
var service = __webpack_require__(88294);
|
|
|
// EXTERNAL MODULE: ./node_modules/_novncrfb@1.2.1@novncrfb/lib/rfb.js
|
|
|
var rfb = __webpack_require__(62013);
|
|
|
// EXTERNAL MODULE: ./src/components/mediator.js
|
|
|
var mediator = __webpack_require__(1499);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(35325);
|
|
|
;// CONCATENATED MODULE: ./src/pages/tasks/vnc-view/vnc-panel/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function unicodeUnEscape(str) {
|
|
|
return str.replace(/\\u([\dA-Za-z]{4})/g, function (_, m1) {
|
|
|
return String.fromCharCode(parseInt("0x" + m1));
|
|
|
});
|
|
|
}
|
|
|
function getJsonFromUrl(url) {
|
|
|
if (!url) url = window.location.search;
|
|
|
var query = url.substr(1);
|
|
|
var result = {};
|
|
|
query.split('&').forEach(function (part) {
|
|
|
var item = part.split('=');
|
|
|
result[item[0]] = decodeURIComponent(item[1]);
|
|
|
});
|
|
|
return result;
|
|
|
}
|
|
|
var initialState = {
|
|
|
loading: true,
|
|
|
isLarge: false,
|
|
|
showClipBoardBox: false,
|
|
|
transferContent: '',
|
|
|
mes: '实验环境准备中'
|
|
|
};
|
|
|
var Types = /*#__PURE__*/function (Types) {
|
|
|
Types[Types["SET_LOADING"] = 0] = "SET_LOADING";
|
|
|
Types[Types["SET_IS_LARGE"] = 1] = "SET_IS_LARGE";
|
|
|
Types[Types["SET_MES"] = 2] = "SET_MES";
|
|
|
Types[Types["SET_STATE"] = 3] = "SET_STATE";
|
|
|
Types[Types["SHOW_CLIPBOARD_BOX"] = 4] = "SHOW_CLIPBOARD_BOX";
|
|
|
Types[Types["SET_TRANSFER_CONTENT"] = 5] = "SET_TRANSFER_CONTENT";
|
|
|
Types[Types["UPDATE_ALL"] = 6] = "UPDATE_ALL";
|
|
|
return Types;
|
|
|
}(Types || {});
|
|
|
function reducer(state, action) {
|
|
|
switch (action.type) {
|
|
|
case Types.SET_LOADING:
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
|
|
|
loading: action.payload
|
|
|
});
|
|
|
case Types.SET_IS_LARGE:
|
|
|
return objectSpread2_default()({}, objectSpread2_default()(objectSpread2_default()({}, state), {}, {
|
|
|
isLarge: action.payload
|
|
|
}));
|
|
|
case Types.SET_MES:
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
|
|
|
mes: action.payload
|
|
|
});
|
|
|
case Types.SET_STATE:
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, state), action.payload);
|
|
|
case Types.SET_TRANSFER_CONTENT:
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
|
|
|
transferContent: action.payload
|
|
|
});
|
|
|
case Types.SHOW_CLIPBOARD_BOX:
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
|
|
|
showClipBoardBox: action.payload
|
|
|
});
|
|
|
case Types.UPDATE_ALL:
|
|
|
return objectSpread2_default()({
|
|
|
loading: state.loading
|
|
|
}, action.payload);
|
|
|
default:
|
|
|
throw new Error();
|
|
|
}
|
|
|
}
|
|
|
/* harmony default export */ var vnc_panel = (function (_ref) {
|
|
|
var vnc_url = _ref.vnc_url,
|
|
|
window_vnc_url = _ref.window_vnc_url,
|
|
|
linux_vnc = _ref.linux_vnc,
|
|
|
virtual_machine = _ref.virtual_machine,
|
|
|
taskData = _ref.taskData,
|
|
|
shixun_environment_id = _ref.shixun_environment_id,
|
|
|
tab_type = _ref.tab_type,
|
|
|
instance_startup_type = _ref.instance_startup_type,
|
|
|
index_tab = _ref.index_tab,
|
|
|
tpi_type = _ref.tpi_type;
|
|
|
var el = (0,_react_17_0_2_react.useRef)();
|
|
|
var guacaRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var rfbRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var roRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var iframeRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var passwordRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var socketUrlRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var reConnectRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var _useReducer = (0,_react_17_0_2_react.useReducer)(reducer, initialState),
|
|
|
_useReducer2 = slicedToArray_default()(_useReducer, 2),
|
|
|
state = _useReducer2[0],
|
|
|
dispatch = _useReducer2[1];
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
linkNum = _useState2[0],
|
|
|
setLinkNum = _useState2[1];
|
|
|
var mes = state.mes,
|
|
|
loading = state.loading,
|
|
|
showClipBoardBox = state.showClipBoardBox,
|
|
|
isLarge = state.isLarge,
|
|
|
transferContent = state.transferContent;
|
|
|
var heartbeatTimerRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var loadingRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
percent = _useState4[0],
|
|
|
setPercent = _useState4[1];
|
|
|
var timeout = (0,_react_17_0_2_react.useRef)();
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
return function () {
|
|
|
var _guacaRef$current, _guacaRef$current$dis;
|
|
|
(_guacaRef$current = guacaRef.current) === null || _guacaRef$current === void 0 || (_guacaRef$current$dis = _guacaRef$current.disconnect) === null || _guacaRef$current$dis === void 0 || _guacaRef$current$dis.call(_guacaRef$current);
|
|
|
clearTimeout(reConnectRef.current);
|
|
|
clearInterval(heartbeatTimerRef.current);
|
|
|
};
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
loadingRef.current = state.loading;
|
|
|
}, [state.loading]);
|
|
|
var fullChange = function fullChange() {
|
|
|
var _rfbRef$current;
|
|
|
if (instance_startup_type === 2) {
|
|
|
setTimeout(function () {
|
|
|
doResize();
|
|
|
}, 1500);
|
|
|
} else if ((rfbRef === null || rfbRef === void 0 || (_rfbRef$current = rfbRef.current) === null || _rfbRef$current === void 0 ? void 0 : _rfbRef$current.resizeSession) !== undefined) {
|
|
|
if ((0,fullscreen/* IsFull */.vp)()) {
|
|
|
rfbRef.current.resizeSession = true;
|
|
|
} else {
|
|
|
setTimeout(function () {
|
|
|
rfbRef.current.resizeSession = false;
|
|
|
}, 900);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
document.addEventListener((0,fullscreen/* fullscreenChange */.gH)(), fullChange);
|
|
|
return function () {
|
|
|
document.removeEventListener((0,fullscreen/* fullscreenChange */.gH)(), fullChange);
|
|
|
};
|
|
|
}, []);
|
|
|
function onCancelClipboardBox() {
|
|
|
dispatch({
|
|
|
type: Types.SHOW_CLIPBOARD_BOX,
|
|
|
payload: false
|
|
|
});
|
|
|
}
|
|
|
function onResizeSet() {
|
|
|
dispatch({
|
|
|
type: Types.SET_IS_LARGE,
|
|
|
payload: !isLarge
|
|
|
});
|
|
|
}
|
|
|
function onLayout(rfb) {
|
|
|
if (el.current) {
|
|
|
roRef.current = new ResizeObserver_es/* default */.Z(function (entries) {
|
|
|
var _iterator = createForOfIteratorHelper_default()(entries),
|
|
|
_step;
|
|
|
try {
|
|
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
|
var entry = _step.value;
|
|
|
if (instance_startup_type === 2) {
|
|
|
doResize();
|
|
|
}
|
|
|
if (entry.target.offsetHeight > 0 || entry.target.offsetWidth > 0) {
|
|
|
setTimeout(function () {
|
|
|
rfb.scaleViewport = false;
|
|
|
// rfb?._eventHandlers?.windowResize()
|
|
|
}, 800);
|
|
|
}
|
|
|
}
|
|
|
} catch (err) {
|
|
|
_iterator.e(err);
|
|
|
} finally {
|
|
|
_iterator.f();
|
|
|
}
|
|
|
});
|
|
|
roRef.current.observe(el.current);
|
|
|
}
|
|
|
return roRef.current;
|
|
|
}
|
|
|
var getWindowVnc = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
var _taskData$myshixun, _res$data;
|
|
|
var res, _res$data2, _res$data3, _res$data4;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
_context3.next = 2;
|
|
|
return (0,service/* startInit */.sA)((_taskData$myshixun = taskData.myshixun) === null || _taskData$myshixun === void 0 ? void 0 : _taskData$myshixun.identifier, objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
|
taskId: params.taskId,
|
|
|
shixun_environment_id: shixun_environment_id,
|
|
|
tab_type: tab_type
|
|
|
}));
|
|
|
case 2:
|
|
|
res = _context3.sent;
|
|
|
if (!(res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && (_res$data = _res$data.data_list) !== null && _res$data !== void 0 && _res$data.length)) {
|
|
|
_context3.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
mediator/* default */.Z.publish('pod-restrict-data', {
|
|
|
identifier: res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.identifier,
|
|
|
data_list: res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.data_list
|
|
|
});
|
|
|
return _context3.abrupt("return", Promise.reject());
|
|
|
case 6:
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === -3)) {
|
|
|
_context3.next = 8;
|
|
|
break;
|
|
|
}
|
|
|
return _context3.abrupt("return", new Promise( /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(resolve, reject) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
modal/* default */.Z.confirm({
|
|
|
content: "检测到您已经开启了其他实验环境,请先关闭环境后,再连接",
|
|
|
okText: "立即关闭",
|
|
|
cancelText: "稍后关闭",
|
|
|
onOk: function () {
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
clearTimeout(timeout.current);
|
|
|
setPercent(0);
|
|
|
_context.next = 4;
|
|
|
return (0,service/* closeWindowsVnc */.fA)(params.taskId, res === null || res === void 0 ? void 0 : res.message);
|
|
|
case 4:
|
|
|
setLinkNum(linkNum + 1);
|
|
|
return _context.abrupt("return");
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function (_x, _x2) {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}()));
|
|
|
case 8:
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === -1)) {
|
|
|
_context3.next = 10;
|
|
|
break;
|
|
|
}
|
|
|
throw new String(res === null || res === void 0 ? void 0 : res.message);
|
|
|
case 10:
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === 0)) {
|
|
|
_context3.next = 15;
|
|
|
break;
|
|
|
}
|
|
|
if (virtual_machine) {
|
|
|
(0,util/* setCookie */.d8)("PVEAuthCookie", res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 || (_res$data4 = _res$data4.cookie_options) === null || _res$data4 === void 0 ? void 0 : _res$data4.cookies_value, 1);
|
|
|
(0,util/* setCookie */.d8)("PVELangCookie", "zh_CN", 1);
|
|
|
}
|
|
|
mediator/* default */.Z.publish('update-windows-time', res === null || res === void 0 ? void 0 : res.data);
|
|
|
// mediator.publish('update-windows-time', {remaining_time: 98000})
|
|
|
mediator/* default */.Z.publish('send-tabs-result-data', objectSpread2_default()(objectSpread2_default()({}, res === null || res === void 0 ? void 0 : res.data), {}, {
|
|
|
index_tab: index_tab
|
|
|
}));
|
|
|
return _context3.abrupt("return", res);
|
|
|
case 15:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return function getWindowVnc() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
function onConnect() {
|
|
|
setPercent(100);
|
|
|
clearTimeout(timeout.current);
|
|
|
setTimeout(function () {
|
|
|
rfbRef.current.resizeSession = false;
|
|
|
dispatch({
|
|
|
type: Types.SET_LOADING,
|
|
|
payload: false
|
|
|
});
|
|
|
}, 1300);
|
|
|
clearTimeout(heartbeatTimerRef.current);
|
|
|
// heartbeatTimerRef.current = setInterval(() => {
|
|
|
// sendRFBMessage();
|
|
|
// },10 * 1000)
|
|
|
// mediator.unsubscribe(`send-ctrl-alt-delete-${index_tab}`)
|
|
|
// mediator.subscribe(`send-ctrl-alt-delete-${index_tab}`, () => {
|
|
|
// rfbRef.current?.sendCtrlAltDel()
|
|
|
// message.success('发送成功')
|
|
|
// })
|
|
|
}
|
|
|
var toConnect = function toConnect() {
|
|
|
rfbRef.current = new rfb/* default */.Z(el.current, socketUrlRef.current, {
|
|
|
credentials: {
|
|
|
password: passwordRef.current
|
|
|
},
|
|
|
wsProtocols: ['binary'],
|
|
|
resize: "scale",
|
|
|
show_dot: true
|
|
|
});
|
|
|
rfbRef.current.removeEventListener('disconnect', onDisconnect);
|
|
|
rfbRef.current.removeEventListener('connect', onConnect);
|
|
|
rfbRef.current.removeEventListener('clipboard', onClipboardReceive);
|
|
|
window.rfbs2 = rfbRef.current;
|
|
|
roRef.current = onLayout(rfbRef.current);
|
|
|
rfbRef.current.viewOnly = params.view_only || false;
|
|
|
if (window_vnc_url) {
|
|
|
rfbRef.current.scaleViewport = true;
|
|
|
} else {
|
|
|
rfbRef.current.scaleViewport = params.scale || false;
|
|
|
}
|
|
|
rfbRef.current.scaleViewport = params.scale || true;
|
|
|
rfbRef.current.showDotCursor = true;
|
|
|
rfbRef.current.resizeSession = true;
|
|
|
rfbRef.current.addEventListener('disconnect', onDisconnect);
|
|
|
rfbRef.current.addEventListener('connect', onConnect);
|
|
|
rfbRef.current.addEventListener('clipboard', onClipboardReceive);
|
|
|
};
|
|
|
function onClipboardReceive(e) {
|
|
|
var rs = unicodeUnEscape(e.detail.text);
|
|
|
dispatch({
|
|
|
type: Types.SET_TRANSFER_CONTENT,
|
|
|
payload: rs
|
|
|
});
|
|
|
}
|
|
|
function onDisconnect() {
|
|
|
if (window_vnc_url) {
|
|
|
dispatch({
|
|
|
type: Types.SET_LOADING,
|
|
|
payload: true
|
|
|
});
|
|
|
setLinkNum(linkNum + 1);
|
|
|
} else {
|
|
|
clearTimeout(reConnectRef.current);
|
|
|
if (loadingRef.current) return;
|
|
|
reConnectRef.current = setTimeout(function () {
|
|
|
setLinkNum(linkNum + 1);
|
|
|
}, 6000);
|
|
|
}
|
|
|
setTimeout(function () {
|
|
|
var _rfbRef$current2, _rfbRef$current2$conn;
|
|
|
(_rfbRef$current2 = rfbRef.current) === null || _rfbRef$current2 === void 0 || (_rfbRef$current2$conn = _rfbRef$current2.connect) === null || _rfbRef$current2$conn === void 0 || _rfbRef$current2$conn.call(_rfbRef$current2);
|
|
|
}, 3000);
|
|
|
}
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
mediator/* default */.Z.subscribe("reset-linux-windows-vnc-".concat(index_tab), function () {
|
|
|
setLinkNum(linkNum + 1);
|
|
|
});
|
|
|
if ((window_vnc_url || vnc_url || linux_vnc || virtual_machine) && el.current) {
|
|
|
clearTimeout(timeout.current);
|
|
|
if (instance_startup_type === 2) {
|
|
|
doResize();
|
|
|
}
|
|
|
new Promise( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
var params, res, _res$data5, _res$data6, character, _res$data7, _res$data8, urlParser, protocol, searchParams, host, search, searchUrl;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
params = getJsonFromUrl();
|
|
|
_context4.next = 3;
|
|
|
return getWindowVnc();
|
|
|
case 3:
|
|
|
res = _context4.sent;
|
|
|
if (!(linux_vnc || virtual_machine)) {
|
|
|
_context4.next = 11;
|
|
|
break;
|
|
|
}
|
|
|
character = res !== null && res !== void 0 && (_res$data5 = res.data) !== null && _res$data5 !== void 0 && (_res$data5 = _res$data5.link_url) !== null && _res$data5 !== void 0 && _res$data5.includes('?') ? "&" : "?";
|
|
|
iframeRef.current.src = (res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.link_url) + character + 'time=' + Date.now();
|
|
|
dispatch({
|
|
|
type: Types.SET_LOADING,
|
|
|
payload: false
|
|
|
});
|
|
|
return _context4.abrupt("return");
|
|
|
case 11:
|
|
|
if (window_vnc_url) {
|
|
|
passwordRef.current = 'Edu123';
|
|
|
socketUrlRef.current = decodeURIComponent(res === null || res === void 0 || (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : _res$data7.link_url);
|
|
|
} else {
|
|
|
urlParser = new URL(decodeURIComponent(res === null || res === void 0 || (_res$data8 = res.data) === null || _res$data8 === void 0 ? void 0 : _res$data8.link_url)); //no IE11 support
|
|
|
protocol = urlParser.protocol, searchParams = urlParser.searchParams, host = urlParser.host, search = urlParser.search;
|
|
|
searchUrl = (0,util/* parseUrl */.en)(search);
|
|
|
passwordRef.current = searchParams.get('password');
|
|
|
socketUrlRef.current = "".concat(protocol === 'https:' ? 'wss' : 'ws', "://").concat(host, "/").concat(searchUrl.path || 'websockify');
|
|
|
}
|
|
|
case 12:
|
|
|
if (!(instance_startup_type === 2)) {
|
|
|
_context4.next = 15;
|
|
|
break;
|
|
|
}
|
|
|
setTimeout(function () {
|
|
|
var _taskData$myshixun2;
|
|
|
onLayout();
|
|
|
iframeRef.current.style.cssText = iframeRef.current.style.cssText + "width:1920px;height:1080px;position:initial";
|
|
|
iframeRef.current.src = "/rdp.html?tpiId=".concat(taskData === null || taskData === void 0 || (_taskData$myshixun2 = taskData.myshixun) === null || _taskData$myshixun2 === void 0 ? void 0 : _taskData$myshixun2.id, "&envId=").concat(shixun_environment_id, "&tpiType=").concat(tpi_type);
|
|
|
dispatch({
|
|
|
type: Types.SET_LOADING,
|
|
|
payload: false
|
|
|
});
|
|
|
}, 5000);
|
|
|
return _context4.abrupt("return");
|
|
|
case 15:
|
|
|
toConnect();
|
|
|
case 16:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
})));
|
|
|
var unsub = mediator/* default */.Z.subscribe("vnc-reset-".concat(index_tab), function (text) {
|
|
|
if (text === '取消') {
|
|
|
dispatch({
|
|
|
type: Types.SET_LOADING,
|
|
|
payload: false
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
setPercent(0);
|
|
|
dispatch({
|
|
|
type: Types.SET_STATE,
|
|
|
payload: {
|
|
|
loading: true,
|
|
|
mes: text || '实验环境重置中'
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
var unsub2 = mediator/* default */.Z.subscribe("send-ctrl-alt-delete-".concat(index_tab), function () {
|
|
|
var _rfbRef$current3;
|
|
|
(_rfbRef$current3 = rfbRef.current) === null || _rfbRef$current3 === void 0 || _rfbRef$current3.sendCtrlAltDel();
|
|
|
message/* default */.ZP.success('发送成功');
|
|
|
});
|
|
|
var unSub3 = mediator/* default */.Z.subscribe("show-clipboard-box-".concat(index_tab), function () {
|
|
|
dispatch({
|
|
|
type: Types.SHOW_CLIPBOARD_BOX,
|
|
|
payload: true
|
|
|
});
|
|
|
});
|
|
|
setPercent(0);
|
|
|
return function () {
|
|
|
var _rfbRef$current4, _rfbRef$current5, _rfbRef$current6, _roRef$current;
|
|
|
(_rfbRef$current4 = rfbRef.current) === null || _rfbRef$current4 === void 0 || _rfbRef$current4.removeEventListener('disconnect', onDisconnect);
|
|
|
(_rfbRef$current5 = rfbRef.current) === null || _rfbRef$current5 === void 0 || _rfbRef$current5.removeEventListener('connect', onConnect);
|
|
|
(_rfbRef$current6 = rfbRef.current) === null || _rfbRef$current6 === void 0 || _rfbRef$current6.removeEventListener('clipboard', onClipboardReceive);
|
|
|
unsub();
|
|
|
unsub2();
|
|
|
unSub3();
|
|
|
el.current && ((_roRef$current = roRef.current) === null || _roRef$current === void 0 ? void 0 : _roRef$current.unobserve(el.current));
|
|
|
};
|
|
|
}
|
|
|
}, [vnc_url, window_vnc_url, linux_vnc, linkNum, shixun_environment_id, tab_type]);
|
|
|
function sendRFBMessage() {
|
|
|
var _rfbRef$current7, _rfbRef$current7$send;
|
|
|
(_rfbRef$current7 = rfbRef.current) === null || _rfbRef$current7 === void 0 || (_rfbRef$current7$send = _rfbRef$current7.sendKey) === null || _rfbRef$current7$send === void 0 || _rfbRef$current7$send.call(_rfbRef$current7, 135);
|
|
|
}
|
|
|
function clipboardSend(_x3) {
|
|
|
return _clipboardSend.apply(this, arguments);
|
|
|
}
|
|
|
function _clipboardSend() {
|
|
|
_clipboardSend = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(content) {
|
|
|
var s, res, _rfbRef$current8;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
if (!vnc_url) {
|
|
|
_context5.next = 8;
|
|
|
break;
|
|
|
}
|
|
|
s = content;
|
|
|
_context5.next = 4;
|
|
|
return (0,fetch/* default */.ZP)("/api/tasks/".concat(params.taskId, "/vnc_paste.json"), {
|
|
|
method: "post",
|
|
|
body: {
|
|
|
content: Base64.encode(s),
|
|
|
shixun_environment_id: shixun_environment_id
|
|
|
}
|
|
|
});
|
|
|
case 4:
|
|
|
res = _context5.sent;
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
dispatch({
|
|
|
type: Types.SET_TRANSFER_CONTENT,
|
|
|
payload: content
|
|
|
});
|
|
|
message/* default */.ZP.success('保存成功!你可以在实验环境中粘贴该内容');
|
|
|
onCancelClipboardBox();
|
|
|
}
|
|
|
_context5.next = 12;
|
|
|
break;
|
|
|
case 8:
|
|
|
(_rfbRef$current8 = rfbRef.current) === null || _rfbRef$current8 === void 0 || _rfbRef$current8.clipboardPasteFrom(content);
|
|
|
dispatch({
|
|
|
type: Types.SET_TRANSFER_CONTENT,
|
|
|
payload: content
|
|
|
});
|
|
|
message/* default */.ZP.success('保存成功!你可以在实验环境中粘贴该内容');
|
|
|
onCancelClipboardBox();
|
|
|
case 12:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
return _clipboardSend.apply(this, arguments);
|
|
|
}
|
|
|
function doResize() {
|
|
|
// function doResize(event, ui) {
|
|
|
var scale, origin;
|
|
|
scale = Math.min(document.getElementById("task-right-panel").clientWidth / 1920, document.getElementById("task-right-panel").clientHeight / 1260);
|
|
|
iframeRef.current.parentElement.className = "wh1080p";
|
|
|
iframeRef.current.parentElement.style.cssText = "transform:scale(".concat(scale, ");transform-origin:center center");
|
|
|
el.current.style.cssText = "translate(-50%, -50%) " + "scale(" + scale + ")";
|
|
|
}
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (percent == 0) {
|
|
|
clearTimeout(timeout.current);
|
|
|
increase();
|
|
|
}
|
|
|
}, [percent]);
|
|
|
var increase = function increase() {
|
|
|
if (percent > 99) {
|
|
|
percent = 99;
|
|
|
} else {
|
|
|
percent = percent + 1;
|
|
|
timeout.current = setTimeout(function () {
|
|
|
increase();
|
|
|
}, 1500);
|
|
|
}
|
|
|
if (percent < 100) setPercent(percent);
|
|
|
};
|
|
|
var showIframe = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
if (loading) {
|
|
|
return 'none';
|
|
|
}
|
|
|
if (linux_vnc || virtual_machine || window_vnc_url && instance_startup_type === 2) {
|
|
|
return 'block';
|
|
|
} else {
|
|
|
return 'none';
|
|
|
}
|
|
|
}, [linux_vnc, loading, virtual_machine, window_vnc_url]);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
|
children: [isLarge && /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
className: "btn-vnc-resize",
|
|
|
onClick: onResizeSet,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-tuichuquanping"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
width: "100%",
|
|
|
height: "100%",
|
|
|
overflow: "hidden",
|
|
|
position: "absolute",
|
|
|
display: showIframe === "block" ? "flex" : "none",
|
|
|
alignItems: "center",
|
|
|
justifyContent: "center",
|
|
|
zIndex: 6
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
|
|
|
style: {
|
|
|
position: isLarge ? "fixed" : "absolute",
|
|
|
left: 0,
|
|
|
top: isLarge ? 40 : 0,
|
|
|
width: "100%",
|
|
|
height: "calc(100% - ".concat(isLarge ? "100px" : "0px", ")")
|
|
|
},
|
|
|
frameBorder: "0",
|
|
|
ref: iframeRef,
|
|
|
allowFullScreen: true
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
position: isLarge ? "fixed" : "absolute",
|
|
|
left: 0,
|
|
|
top: isLarge ? 40 : 0,
|
|
|
zIndex: 5,
|
|
|
width: "100%",
|
|
|
height: "calc(100% - ".concat(isLarge ? "100px" : "0px", ")")
|
|
|
},
|
|
|
className: "".concat(window_vnc_url ? "vnc-panel-wrapper-windows" : "vnc-panel-wrapper", " ").concat(isLarge ? 'full-screen' : ''),
|
|
|
children: [loading ? /*#__PURE__*/(0,jsx_runtime.jsx)(Spinner/* default */.Z, {
|
|
|
message: mes,
|
|
|
style: {
|
|
|
color: '#0152d9'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "tc",
|
|
|
style: {
|
|
|
width: 500,
|
|
|
margin: "0 auto",
|
|
|
color: "#FFF"
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(progress/* default */.Z, {
|
|
|
percent: percent,
|
|
|
format: function format(p) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "c-white",
|
|
|
children: [p, "%"]
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
ref: el,
|
|
|
className: "vnc-panel ".concat(loading ? "hidden zIndexf1" : "animated fadeIn")
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_modal/* default */.Z, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
title: "\u590D\u5236\u7C98\u8D34",
|
|
|
centered: true,
|
|
|
maskClosable: false,
|
|
|
open: showClipBoardBox,
|
|
|
onCancel: onCancelClipboardBox,
|
|
|
footer: null,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(clipboard_box, {
|
|
|
onCancel: onCancelClipboardBox,
|
|
|
onSave: clipboardSend,
|
|
|
content: transferContent
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 62682:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./src/pages/tasks/xterm-panel/index.jsx + 1 modules ***!
|
|
|
\***********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ xterm_panel; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/createForOfIteratorHelper.js
|
|
|
var createForOfIteratorHelper = __webpack_require__(91232);
|
|
|
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_js-base64@2.6.4@js-base64/base64.js
|
|
|
var base64 = __webpack_require__(24334);
|
|
|
// EXTERNAL MODULE: ./node_modules/_xterm@4.8.1@xterm/lib/xterm.js
|
|
|
var xterm = __webpack_require__(34376);
|
|
|
// EXTERNAL MODULE: ./node_modules/_xterm@4.8.1@xterm/css/xterm.css
|
|
|
var css_xterm = __webpack_require__(98119);
|
|
|
;// CONCATENATED MODULE: ./src/pages/tasks/xterm-panel/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var xterm_panelmodules = ({"xterm-panel":"xterm-panel___XA0p9"});
|
|
|
// EXTERNAL MODULE: ./src/components/mediator.js
|
|
|
var mediator = __webpack_require__(1499);
|
|
|
// EXTERNAL MODULE: ./node_modules/_resize-observer-polyfill@1.5.1@resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
|
var ResizeObserver_es = __webpack_require__(76374);
|
|
|
// EXTERNAL MODULE: ./src/pages/tasks/service/index.js
|
|
|
var service = __webpack_require__(88294);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(80184);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/tasks/xterm-panel/index.jsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TimeTicket = 30000;
|
|
|
|
|
|
//建立 websockt 来交互
|
|
|
//根据容器大小计算行数和列数并做到自适应
|
|
|
//socket 与 term 需要分开初始化 因为socket 可能重置连接
|
|
|
//mediator 监听消息,如果和id匹配,则建立连接,重置,或关闭连接
|
|
|
|
|
|
/* harmony default export */ var xterm_panel = (function (_ref) {
|
|
|
var _ref$itemData = _ref.itemData,
|
|
|
itemData = _ref$itemData === void 0 ? {} : _ref$itemData,
|
|
|
game = _ref.game,
|
|
|
myshixun = _ref.myshixun;
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(null),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
term = _useState2[0],
|
|
|
setTerm = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)({}),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
sshConfigData = _useState4[0],
|
|
|
setSshConfigData = _useState4[1];
|
|
|
var link_url = sshConfigData.link_url,
|
|
|
password = sshConfigData.password,
|
|
|
port = sshConfigData.port;
|
|
|
var el = (0,_react_17_0_2_react.useRef)();
|
|
|
var socket = (0,_react_17_0_2_react.useRef)();
|
|
|
var isFirstConnected = (0,_react_17_0_2_react.useRef)(false);
|
|
|
var shixun_environment_id = itemData.shixun_environment_id,
|
|
|
position = itemData.position,
|
|
|
tab_type = itemData.tab_type,
|
|
|
index_tab = itemData.index_tab;
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
getInitData();
|
|
|
}, []);
|
|
|
function getColsAndRows(width, height, term) {
|
|
|
var w = term._core._renderService.dimensions.actualCellWidth || 9.5;
|
|
|
var h = term._core._renderService.dimensions.actualCellHeight || 18;
|
|
|
var rows = Math.floor(height / h);
|
|
|
var cols = Math.floor(width / w);
|
|
|
return [cols, rows];
|
|
|
}
|
|
|
function onLayout(term, el) {
|
|
|
var ro = new ResizeObserver_es/* default */.Z(function (entries) {
|
|
|
var _iterator = createForOfIteratorHelper_default()(entries),
|
|
|
_step;
|
|
|
try {
|
|
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
|
var entry = _step.value;
|
|
|
if (entry.target.offsetHeight > 0 || entry.target.offsetWidth > 0) {
|
|
|
var _getColsAndRows = getColsAndRows(entry.target.offsetWidth, entry.target.offsetHeight, term),
|
|
|
_getColsAndRows2 = slicedToArray_default()(_getColsAndRows, 2),
|
|
|
cols = _getColsAndRows2[0],
|
|
|
rows = _getColsAndRows2[1];
|
|
|
console.log('cols, rows', cols, rows);
|
|
|
mediator/* default */.Z.publish("ssh-xterm-resize-".concat(index_tab), {
|
|
|
columns: cols,
|
|
|
rows: rows,
|
|
|
width: entry.target.offsetWidth,
|
|
|
height: entry.target.offsetHeight
|
|
|
});
|
|
|
term.resize(cols, rows);
|
|
|
var data1 = base64.Base64.decode('IA==');
|
|
|
var data = base64.Base64.decode('CBtbSw==');
|
|
|
term.write(data1);
|
|
|
term.write(data);
|
|
|
}
|
|
|
}
|
|
|
} catch (err) {
|
|
|
_iterator.e(err);
|
|
|
} finally {
|
|
|
_iterator.f();
|
|
|
}
|
|
|
});
|
|
|
ro.observe(el);
|
|
|
return ro;
|
|
|
}
|
|
|
function getInitData() {
|
|
|
return _getInitData.apply(this, arguments);
|
|
|
} //term init
|
|
|
function _getInitData() {
|
|
|
_getInitData = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
var _response$data;
|
|
|
var response, _response$data2, _response$data3;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
_context3.next = 2;
|
|
|
return (0,service/* startInit */.sA)(myshixun === null || myshixun === void 0 ? void 0 : myshixun.identifier, {
|
|
|
shixun_environment_id: shixun_environment_id,
|
|
|
tab_type: tab_type,
|
|
|
game_id: game.id
|
|
|
});
|
|
|
case 2:
|
|
|
response = _context3.sent;
|
|
|
if (!(response !== null && response !== void 0 && (_response$data = response.data) !== null && _response$data !== void 0 && (_response$data = _response$data.data_list) !== null && _response$data !== void 0 && _response$data.length)) {
|
|
|
_context3.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
mediator/* default */.Z.publish('pod-restrict-data', {
|
|
|
identifier: response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.identifier,
|
|
|
data_list: response === null || response === void 0 || (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.data_list
|
|
|
});
|
|
|
return _context3.abrupt("return");
|
|
|
case 6:
|
|
|
if (!((response === null || response === void 0 ? void 0 : response.status) === -3)) {
|
|
|
_context3.next = 8;
|
|
|
break;
|
|
|
}
|
|
|
return _context3.abrupt("return", new Promise( /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(resolve, reject) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
Modal.confirm({
|
|
|
content: '检测到您已经开启了其他实验环境,请先关闭环境后,再连接',
|
|
|
okText: '立即关闭',
|
|
|
cancelText: '稍后关闭',
|
|
|
onOk: function () {
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return closeWindowsVnc(params.taskId, response === null || response === void 0 ? void 0 : response.message);
|
|
|
case 2:
|
|
|
init();
|
|
|
return _context.abrupt("return");
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function (_x, _x2) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}()));
|
|
|
case 8:
|
|
|
if ((response === null || response === void 0 ? void 0 : response.status) === 0) {
|
|
|
mediator/* default */.Z.publish('update-windows-time', response === null || response === void 0 ? void 0 : response.data);
|
|
|
mediator/* default */.Z.publish('send-tabs-result-data', objectSpread2_default()(objectSpread2_default()({}, response === null || response === void 0 ? void 0 : response.data), {}, {
|
|
|
index_tab: index_tab
|
|
|
}));
|
|
|
setSshConfigData(response.data);
|
|
|
setTimeout(function () {
|
|
|
return mediator/* default */.Z.publish("create-socket-".concat(index_tab));
|
|
|
}, 300);
|
|
|
}
|
|
|
case 9:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return _getInitData.apply(this, arguments);
|
|
|
}
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (el.current && link_url) {
|
|
|
var _term = new xterm.Terminal({
|
|
|
fontSize: 16,
|
|
|
rendererType: 'dom'
|
|
|
});
|
|
|
_term.open(el.current);
|
|
|
_term.onData(function (data) {
|
|
|
if (socket.current) {
|
|
|
if (socket.current.readyState === 1) {
|
|
|
socket.current.send(JSON.stringify({
|
|
|
tp: 'client',
|
|
|
data: data
|
|
|
}));
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
_term.write('Connecting...');
|
|
|
setTerm(_term);
|
|
|
var ro = onLayout(_term, el.current);
|
|
|
return function () {
|
|
|
_term.dispose();
|
|
|
el.current && (ro === null || ro === void 0 ? void 0 : ro.unobserve(el.current));
|
|
|
};
|
|
|
}
|
|
|
}, [link_url, el.current]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (term && link_url) {
|
|
|
var createSocket = function createSocket() {
|
|
|
var socketInstance = new WebSocket(link_url);
|
|
|
socket.current = socketInstance;
|
|
|
socketInstance.onopen = function () {
|
|
|
var container = term.element.parentElement;
|
|
|
if (container) {
|
|
|
var width = container.offsetWidth;
|
|
|
var height = container.offsetHeight;
|
|
|
console.log('init', {
|
|
|
tp: 'init',
|
|
|
data: objectSpread2_default()(objectSpread2_default()({}, sshConfigData), {}, {
|
|
|
secret: password,
|
|
|
width: width,
|
|
|
height: height,
|
|
|
rows: term.rows,
|
|
|
columns: term.cols
|
|
|
})
|
|
|
});
|
|
|
socketInstance.send(JSON.stringify({
|
|
|
tp: 'init',
|
|
|
data: objectSpread2_default()(objectSpread2_default()({}, sshConfigData), {}, {
|
|
|
secret: password,
|
|
|
width: width,
|
|
|
height: height,
|
|
|
rows: term.rows,
|
|
|
columns: term.cols
|
|
|
})
|
|
|
}));
|
|
|
}
|
|
|
term.focus();
|
|
|
};
|
|
|
socketInstance.onerror = function (error) {
|
|
|
console.log('------in socket error----', error, socketInstance, link_url);
|
|
|
};
|
|
|
socketInstance.onmessage = function (event) {
|
|
|
if (!isFirstConnected.current) {
|
|
|
term.write('\r');
|
|
|
// term.focus()
|
|
|
setTimeout(function () {
|
|
|
// term.clear();
|
|
|
}, 1000);
|
|
|
}
|
|
|
isFirstConnected.current = true;
|
|
|
console.log('event:', event);
|
|
|
var data = base64.Base64.decode(event.data.toString());
|
|
|
var w = term._core._renderService.dimensions.actualCellWidth || 9.5;
|
|
|
console.log('data:', data, w, term);
|
|
|
term.write(data);
|
|
|
};
|
|
|
var tid = setInterval(function () {
|
|
|
if (socket.current) {
|
|
|
var _socket$current;
|
|
|
(_socket$current = socket.current) === null || _socket$current === void 0 || _socket$current.send(JSON.stringify({
|
|
|
tp: 'h'
|
|
|
}));
|
|
|
}
|
|
|
}, TimeTicket);
|
|
|
socketInstance.onclose = function (evt) {
|
|
|
if (tid) {
|
|
|
clearInterval(tid);
|
|
|
}
|
|
|
console.log(tid, 'tid', index_tab);
|
|
|
term.write('\r\nconnection closed');
|
|
|
setTimeout(function () {
|
|
|
createSocket();
|
|
|
}, 10 * 1000);
|
|
|
};
|
|
|
};
|
|
|
var unSubCreate = mediator/* default */.Z.subscribe("create-socket-".concat(index_tab), function () {
|
|
|
createSocket();
|
|
|
});
|
|
|
var unSubResize = mediator/* default */.Z.subscribe("ssh-xterm-resize-".concat(index_tab), function (option) {
|
|
|
if (socket.current && socket.current.readyState === 1) {
|
|
|
socket.current.send(JSON.stringify({
|
|
|
tp: 'resize',
|
|
|
data: objectSpread2_default()({}, option)
|
|
|
}));
|
|
|
}
|
|
|
});
|
|
|
return function () {
|
|
|
unSubCreate();
|
|
|
unSubResize();
|
|
|
if (socket.current) {
|
|
|
socket.current.close();
|
|
|
isFirstConnected.current = false;
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
}, [term, link_url, port]);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
ref: el,
|
|
|
className: xterm_panelmodules['xterm-panel'],
|
|
|
children: !link_url ? /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
style: {
|
|
|
color: '#fff'
|
|
|
},
|
|
|
children: "\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."
|
|
|
}) : null
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 17924:
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/utils/fullscreen.ts ***!
|
|
|
\*********************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ BU: function() { return /* binding */ exitFull; },
|
|
|
/* harmony export */ Dj: function() { return /* binding */ requestFullScreen; },
|
|
|
/* harmony export */ gH: function() { return /* binding */ fullscreenChange; },
|
|
|
/* harmony export */ vp: function() { return /* binding */ IsFull; }
|
|
|
/* harmony export */ });
|
|
|
function requestFullScreen(element) {
|
|
|
try {
|
|
|
if (element.mozRequestFullScreen) {
|
|
|
element.mozRequestFullScreen();
|
|
|
} else if (element.webkitRequestFullScreen) {
|
|
|
element.webkitRequestFullScreen();
|
|
|
}
|
|
|
} catch (e) {
|
|
|
console.log(e, ":e");
|
|
|
}
|
|
|
}
|
|
|
function exitFull() {
|
|
|
if (window.top.document.webkitExitFullscreen) {
|
|
|
window.top.document.webkitExitFullscreen();
|
|
|
} else if (document.exitFullscreen) {
|
|
|
window.top.document.exitFullscreen();
|
|
|
} else if (document.msExitFullscreen) {
|
|
|
window.top.document.msExitFullscreen();
|
|
|
} else if (document.mozCancelFullScreen) {
|
|
|
window.top.document.mozCancelFullScreen();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// esliint disabled
|
|
|
var fullscreenChange = function fullscreenChange() {
|
|
|
//['fullscreenchange','msfullscreenchange','webkitfullscreenchange', 'mozfullscreenchange']
|
|
|
if (document.webkitExitFullscreen) {
|
|
|
// document.webkitExitFullscreen()
|
|
|
return 'webkitfullscreenchange';
|
|
|
} else if (document.exitFullscreen) {
|
|
|
// document.exitFullscreen()
|
|
|
return 'fullscreenchange';
|
|
|
} else if (document.msExitFullscreen) {
|
|
|
// document.msExitFullscreen()
|
|
|
return 'msfullscreenchange';
|
|
|
} else if (document.mozCancelFullScreen) {
|
|
|
// document.mozCancelFullScreen()
|
|
|
return 'mozfullscreenchange';
|
|
|
}
|
|
|
};
|
|
|
|
|
|
//判断是否全屏
|
|
|
function IsFull() {
|
|
|
var fullscreenElement = window.top.document.fullscreenElement || window.top.document.mozFullscreenElement || window.top.document.webkitFullscreenElement;
|
|
|
var fullscreenEnabled = document.fullscreenEnabled || document.mozFullscreenEnabled || document.webkitFullscreenEnabled;
|
|
|
console.log("fullscreenElement", fullscreenElement);
|
|
|
if (fullscreenElement == null) {
|
|
|
return false;
|
|
|
} else {
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// document.addEventListener("mozfullscreenchange", function (event) {
|
|
|
// console.log("mozfullscreenchange ", event);
|
|
|
// if (IsFull()) {
|
|
|
// console.log('进入全屏')
|
|
|
// $("#closescreen").show();
|
|
|
// $("#openscreen").hide();
|
|
|
// } else {
|
|
|
// console.log('退出全屏')
|
|
|
// $("#closescreen").hide();
|
|
|
// $("#openscreen").show();
|
|
|
// }
|
|
|
// });
|
|
|
// document.addEventListener("webkitfullscreenchange", function (event) {
|
|
|
// console.log("webkitfullscreenchange", event);
|
|
|
// if (IsFull()) {
|
|
|
// console.log('进入全屏')
|
|
|
// $("#closescreen").show();
|
|
|
// $("#openscreen").hide();
|
|
|
// } else {
|
|
|
// console.log('退出全屏')
|
|
|
// $("#closescreen").hide();
|
|
|
// $("#openscreen").show();
|
|
|
// }
|
|
|
// });
|
|
|
// document.addEventListener("msfullscreenchange", function (event) {
|
|
|
// console.log("msfullscreenchange", event);
|
|
|
// if (IsFull()) {
|
|
|
// console.log('进入全屏')
|
|
|
// $("#closescreen").show();
|
|
|
// $("#openscreen").hide();
|
|
|
// } else {
|
|
|
// console.log('退出全屏')
|
|
|
// $("#closescreen").hide();
|
|
|
// $("#openscreen").show();
|
|
|
// }
|
|
|
// });
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 84470:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/pages/tasks/vnc-view/index.less ***!
|
|
|
\*********************************************/
|
|
|
/***/ (function() {
|
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 10249:
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules ***!
|
|
|
\*********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ input; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(36355);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/context.js
|
|
|
var form_context = __webpack_require__(32441);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/style/index.js
|
|
|
var style = __webpack_require__(9937);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Group.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Group = props => {
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction
|
|
|
} = (0,_react_17_0_2_react.useContext)(context/* ConfigContext */.E_);
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
className
|
|
|
} = props;
|
|
|
const prefixCls = getPrefixCls('input-group', customizePrefixCls);
|
|
|
const inputPrefixCls = getPrefixCls('input');
|
|
|
const [wrapSSR, hashId] = (0,style/* default */.ZP)(inputPrefixCls);
|
|
|
const cls = _classnames_2_5_1_classnames_default()(prefixCls, {
|
|
|
[`${prefixCls}-lg`]: props.size === 'large',
|
|
|
[`${prefixCls}-sm`]: props.size === 'small',
|
|
|
[`${prefixCls}-compact`]: props.compact,
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
|
}, hashId, className);
|
|
|
const formItemContext = (0,_react_17_0_2_react.useContext)(form_context/* FormItemInputContext */.aM);
|
|
|
const groupFormItemContext = (0,_react_17_0_2_react.useMemo)(() => Object.assign(Object.assign({}, formItemContext), {
|
|
|
isFormItemInput: false
|
|
|
}), [formItemContext]);
|
|
|
if (false) {}
|
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
|
className: cls,
|
|
|
style: props.style,
|
|
|
onMouseEnter: props.onMouseEnter,
|
|
|
onMouseLeave: props.onMouseLeave,
|
|
|
onFocus: props.onFocus,
|
|
|
onBlur: props.onBlur
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(form_context/* FormItemInputContext */.aM.Provider, {
|
|
|
value: groupFormItemContext
|
|
|
}, props.children)));
|
|
|
};
|
|
|
/* harmony default export */ var input_Group = (Group);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Input.js + 1 modules
|
|
|
var Input = __webpack_require__(9432);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(14809);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_EyeInvisibleOutlined = (EyeInvisibleOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(7657);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/EyeInvisibleOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var EyeInvisibleOutlined_EyeInvisibleOutlined = function EyeInvisibleOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_EyeInvisibleOutlined
|
|
|
}));
|
|
|
};
|
|
|
|
|
|
/** */
|
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined);
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_EyeInvisibleOutlined = (RefIcon);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules
|
|
|
var EyeOutlined = __webpack_require__(15277);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/omit.js
|
|
|
var omit = __webpack_require__(2738);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/ref.js
|
|
|
var es_ref = __webpack_require__(8654);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/hooks/useRemovePasswordTimeout.js
|
|
|
var useRemovePasswordTimeout = __webpack_require__(59412);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Password.js
|
|
|
"use client";
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const defaultIconRender = visible => visible ? /*#__PURE__*/_react_17_0_2_react.createElement(EyeOutlined/* default */.Z, null) : /*#__PURE__*/_react_17_0_2_react.createElement(icons_EyeInvisibleOutlined, null);
|
|
|
const ActionMap = {
|
|
|
click: 'onClick',
|
|
|
hover: 'onMouseOver'
|
|
|
};
|
|
|
const Password = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
visibilityToggle = true
|
|
|
} = props;
|
|
|
const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;
|
|
|
const [visible, setVisible] = (0,_react_17_0_2_react.useState)(() => visibilityControlled ? visibilityToggle.visible : false);
|
|
|
const inputRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
_react_17_0_2_react.useEffect(() => {
|
|
|
if (visibilityControlled) {
|
|
|
setVisible(visibilityToggle.visible);
|
|
|
}
|
|
|
}, [visibilityControlled, visibilityToggle]);
|
|
|
// Remove Password value
|
|
|
const removePasswordTimeout = (0,useRemovePasswordTimeout/* default */.Z)(inputRef);
|
|
|
const onVisibleChange = () => {
|
|
|
const {
|
|
|
disabled
|
|
|
} = props;
|
|
|
if (disabled) {
|
|
|
return;
|
|
|
}
|
|
|
if (visible) {
|
|
|
removePasswordTimeout();
|
|
|
}
|
|
|
setVisible(prevState => {
|
|
|
var _a;
|
|
|
const newState = !prevState;
|
|
|
if (typeof visibilityToggle === 'object') {
|
|
|
(_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);
|
|
|
}
|
|
|
return newState;
|
|
|
});
|
|
|
};
|
|
|
const getIcon = prefixCls => {
|
|
|
const {
|
|
|
action = 'click',
|
|
|
iconRender = defaultIconRender
|
|
|
} = props;
|
|
|
const iconTrigger = ActionMap[action] || '';
|
|
|
const icon = iconRender(visible);
|
|
|
const iconProps = {
|
|
|
[iconTrigger]: onVisibleChange,
|
|
|
className: `${prefixCls}-icon`,
|
|
|
key: 'passwordIcon',
|
|
|
onMouseDown: e => {
|
|
|
// Prevent focused state lost
|
|
|
// https://github.com/ant-design/ant-design/issues/15173
|
|
|
e.preventDefault();
|
|
|
},
|
|
|
onMouseUp: e => {
|
|
|
// Prevent caret position change
|
|
|
// https://github.com/ant-design/ant-design/issues/23524
|
|
|
e.preventDefault();
|
|
|
}
|
|
|
};
|
|
|
return /*#__PURE__*/_react_17_0_2_react.cloneElement( /*#__PURE__*/_react_17_0_2_react.isValidElement(icon) ? icon : /*#__PURE__*/_react_17_0_2_react.createElement("span", null, icon), iconProps);
|
|
|
};
|
|
|
const {
|
|
|
className,
|
|
|
prefixCls: customizePrefixCls,
|
|
|
inputPrefixCls: customizeInputPrefixCls,
|
|
|
size
|
|
|
} = props,
|
|
|
restProps = __rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
|
|
const prefixCls = getPrefixCls('input-password', customizePrefixCls);
|
|
|
const suffixIcon = visibilityToggle && getIcon(prefixCls);
|
|
|
const inputClassName = _classnames_2_5_1_classnames_default()(prefixCls, className, {
|
|
|
[`${prefixCls}-${size}`]: !!size
|
|
|
});
|
|
|
const omittedProps = Object.assign(Object.assign({}, (0,omit/* default */.Z)(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {
|
|
|
type: visible ? 'text' : 'password',
|
|
|
className: inputClassName,
|
|
|
prefixCls: inputPrefixCls,
|
|
|
suffix: suffixIcon
|
|
|
});
|
|
|
if (size) {
|
|
|
omittedProps.size = size;
|
|
|
}
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(Input/* default */.Z, Object.assign({
|
|
|
ref: (0,es_ref/* composeRef */.sQ)(ref, inputRef)
|
|
|
}, omittedProps));
|
|
|
});
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var input_Password = (Password);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules
|
|
|
var SearchOutlined = __webpack_require__(47472);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
|
|
var reactNode = __webpack_require__(92343);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js
|
|
|
var useSize = __webpack_require__(19716);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js
|
|
|
var Compact = __webpack_require__(33234);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Search.js
|
|
|
"use client";
|
|
|
|
|
|
var Search_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Search = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
inputPrefixCls: customizeInputPrefixCls,
|
|
|
className,
|
|
|
size: customizeSize,
|
|
|
suffix,
|
|
|
enterButton = false,
|
|
|
addonAfter,
|
|
|
loading,
|
|
|
disabled,
|
|
|
onSearch: customOnSearch,
|
|
|
onChange: customOnChange,
|
|
|
onCompositionStart,
|
|
|
onCompositionEnd
|
|
|
} = props,
|
|
|
restProps = Search_rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]);
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
const composedRef = _react_17_0_2_react.useRef(false);
|
|
|
const prefixCls = getPrefixCls('input-search', customizePrefixCls);
|
|
|
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
|
|
const {
|
|
|
compactSize
|
|
|
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
|
|
|
const size = (0,useSize/* default */.Z)(ctx => {
|
|
|
var _a;
|
|
|
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
|
|
|
});
|
|
|
const inputRef = _react_17_0_2_react.useRef(null);
|
|
|
const onChange = e => {
|
|
|
if (e && e.target && e.type === 'click' && customOnSearch) {
|
|
|
customOnSearch(e.target.value, e, {
|
|
|
source: 'clear'
|
|
|
});
|
|
|
}
|
|
|
if (customOnChange) {
|
|
|
customOnChange(e);
|
|
|
}
|
|
|
};
|
|
|
const onMouseDown = e => {
|
|
|
var _a;
|
|
|
if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) {
|
|
|
e.preventDefault();
|
|
|
}
|
|
|
};
|
|
|
const onSearch = e => {
|
|
|
var _a, _b;
|
|
|
if (customOnSearch) {
|
|
|
customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e, {
|
|
|
source: 'input'
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
const onPressEnter = e => {
|
|
|
if (composedRef.current || loading) {
|
|
|
return;
|
|
|
}
|
|
|
onSearch(e);
|
|
|
};
|
|
|
const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/_react_17_0_2_react.createElement(SearchOutlined/* default */.Z, null) : null;
|
|
|
const btnClassName = `${prefixCls}-button`;
|
|
|
let button;
|
|
|
const enterButtonAsElement = enterButton || {};
|
|
|
const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
|
|
|
if (isAntdButton || enterButtonAsElement.type === 'button') {
|
|
|
button = (0,reactNode/* cloneElement */.Tm)(enterButtonAsElement, Object.assign({
|
|
|
onMouseDown,
|
|
|
onClick: e => {
|
|
|
var _a, _b;
|
|
|
(_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
|
onSearch(e);
|
|
|
},
|
|
|
key: 'enterButton'
|
|
|
}, isAntdButton ? {
|
|
|
className: btnClassName,
|
|
|
size
|
|
|
} : {}));
|
|
|
} else {
|
|
|
button = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, {
|
|
|
className: btnClassName,
|
|
|
type: enterButton ? 'primary' : undefined,
|
|
|
size: size,
|
|
|
disabled: disabled,
|
|
|
key: "enterButton",
|
|
|
onMouseDown: onMouseDown,
|
|
|
onClick: onSearch,
|
|
|
loading: loading,
|
|
|
icon: searchIcon
|
|
|
}, enterButton);
|
|
|
}
|
|
|
if (addonAfter) {
|
|
|
button = [button, (0,reactNode/* cloneElement */.Tm)(addonAfter, {
|
|
|
key: 'addonAfter'
|
|
|
})];
|
|
|
}
|
|
|
const cls = _classnames_2_5_1_classnames_default()(prefixCls, {
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
|
[`${prefixCls}-${size}`]: !!size,
|
|
|
[`${prefixCls}-with-button`]: !!enterButton
|
|
|
}, className);
|
|
|
const handleOnCompositionStart = e => {
|
|
|
composedRef.current = true;
|
|
|
onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);
|
|
|
};
|
|
|
const handleOnCompositionEnd = e => {
|
|
|
composedRef.current = false;
|
|
|
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
|
|
|
};
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(Input/* default */.Z, Object.assign({
|
|
|
ref: (0,es_ref/* composeRef */.sQ)(inputRef, ref),
|
|
|
onPressEnter: onPressEnter
|
|
|
}, restProps, {
|
|
|
size: size,
|
|
|
onCompositionStart: handleOnCompositionStart,
|
|
|
onCompositionEnd: handleOnCompositionEnd,
|
|
|
prefixCls: inputPrefixCls,
|
|
|
addonAfter: button,
|
|
|
suffix: suffix,
|
|
|
onChange: onChange,
|
|
|
className: cls,
|
|
|
disabled: disabled
|
|
|
}));
|
|
|
});
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var input_Search = (Search);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/TextArea.js
|
|
|
var TextArea = __webpack_require__(1643);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const input_Input = Input/* default */.Z;
|
|
|
if (false) {}
|
|
|
input_Input.Group = input_Group;
|
|
|
input_Input.Search = input_Search;
|
|
|
input_Input.TextArea = TextArea/* default */.Z;
|
|
|
input_Input.Password = input_Password;
|
|
|
/* harmony default export */ var input = (input_Input);
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |