|
|
|
|
@ -12833,7 +12833,7 @@ var RenderHtml = __webpack_require__(47759);
|
|
|
|
|
var SelectEnvironment = __webpack_require__(62544);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Environment/MirrorModal/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var MirrorModalmodules = ({"mirrorModal":"mirrorModal___z1tEP","right":"right___ZlGrr","title":"title___lWaS3","content":"content___bCC9x","des":"des___ujB5y","btns":"btns___L4vgc","confirm":"confirm___RFRg4","cancel":"cancel___F1WB_","modal":"modal___A5dbG"});
|
|
|
|
|
/* harmony default export */ var MirrorModalmodules = ({"mirrorModal":"mirrorModal___z1tEP","selSpanSty":"selSpanSty___z5X9Y","right":"right___ZlGrr","title":"title___lWaS3","content":"content___bCC9x","des":"des___ujB5y","btns":"btns___L4vgc","confirm":"confirm___RFRg4","cancel":"cancel___F1WB_","modal":"modal___A5dbG"});
|
|
|
|
|
// EXTERNAL MODULE: ./src/pages/Shixuns/New/components/ApplyModal/index.tsx + 1 modules
|
|
|
|
|
var ApplyModal = __webpack_require__(97952);
|
|
|
|
|
// EXTERNAL MODULE: ./src/pages/Shixuns/New/components/CreateEnvironment/index.tsx
|
|
|
|
|
@ -12855,8 +12855,10 @@ var CreateEnvironment = __webpack_require__(50341);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var MirrorModal = function MirrorModal(_ref) {
|
|
|
|
|
var _newShixuns$actionTab, _ref3;
|
|
|
|
|
var _newShixuns$actionTab, _ref5;
|
|
|
|
|
var newShixuns = _ref.newShixuns,
|
|
|
|
|
user = _ref.user,
|
|
|
|
|
dispatch = _ref.dispatch,
|
|
|
|
|
@ -12889,16 +12891,84 @@ var MirrorModal = function MirrorModal(_ref) {
|
|
|
|
|
other_image = _environmentData$othe === void 0 ? [] : _environmentData$othe;
|
|
|
|
|
var name = detail.name,
|
|
|
|
|
description = detail.description;
|
|
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
mirror_types: [],
|
|
|
|
|
mirror_cloud_types: []
|
|
|
|
|
}),
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
mirrtypeInfo = _useState8[0],
|
|
|
|
|
setMirrorTypeInfo = _useState8[1];
|
|
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
mirror_type_id: '',
|
|
|
|
|
mirror_cloud_type_id: ''
|
|
|
|
|
}),
|
|
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
|
|
mirrorTypeIds = _useState10[0],
|
|
|
|
|
setMirrTypeIds = _useState10[1];
|
|
|
|
|
var getMirrorData = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(mirror_type_id, mirror_cloud_type_id) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'newShixuns/getEnvironmentData',
|
|
|
|
|
payload: {
|
|
|
|
|
tab_type: tab_type,
|
|
|
|
|
mirror_type_id: mirror_type_id,
|
|
|
|
|
mirror_cloud_type_id: mirror_cloud_type_id
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 1:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function getMirrorData(_x, _x2) {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var getMirrorTypes = /*#__PURE__*/function () {
|
|
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var res, _res$data, _res$data2;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/shixuns/get_mirror_types.json", {
|
|
|
|
|
method: 'get'
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
mirrtypeInfo.mirror_types = (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.mirror_types) || [];
|
|
|
|
|
mirrtypeInfo.mirror_cloud_types = (res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.mirror_cloud_types) || [];
|
|
|
|
|
setMirrorTypeInfo(objectSpread2_default()({}, mirrtypeInfo));
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}));
|
|
|
|
|
return function getMirrorTypes() {
|
|
|
|
|
return _ref3.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (visible) {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'newShixuns/getEnvironmentData',
|
|
|
|
|
payload: {
|
|
|
|
|
tab_type: tab_type
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// dispatch({
|
|
|
|
|
// type: 'newShixuns/getEnvironmentData',
|
|
|
|
|
// payload:{
|
|
|
|
|
// tab_type
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
getMirrorData();
|
|
|
|
|
setKeyword("");
|
|
|
|
|
setActiveId(useId);
|
|
|
|
|
if (tab_type === 'public') {
|
|
|
|
|
getMirrorTypes();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, [visible, useId]);
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
@ -12911,28 +12981,28 @@ var MirrorModal = function MirrorModal(_ref) {
|
|
|
|
|
getData();
|
|
|
|
|
}, [activeId]);
|
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
_context3.next = 2;
|
|
|
|
|
return (0,shixuns/* getEnvironmentDetail */.Q1)({
|
|
|
|
|
mirror_repository_id: activeId,
|
|
|
|
|
identifier: identifier,
|
|
|
|
|
shixun_environment_id: shixun_environment_id
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
res = _context3.sent;
|
|
|
|
|
setDetail(res.data);
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}));
|
|
|
|
|
return function getData() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
return _ref4.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
@ -12959,7 +13029,64 @@ var MirrorModal = function MirrorModal(_ref) {
|
|
|
|
|
onSearchWord: function onSearchWord(value) {
|
|
|
|
|
return setKeyword(value);
|
|
|
|
|
},
|
|
|
|
|
tab_type: tab_type
|
|
|
|
|
tab_type: tab_type,
|
|
|
|
|
extraContent: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: tab_type === 'public' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
display: "flex"
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: '10px',
|
|
|
|
|
display: 'flex'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: MirrorModalmodules.selSpanSty,
|
|
|
|
|
children: "\u955C\u50CF\u5206\u7C7B"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
value: mirrorTypeIds.mirror_type_id,
|
|
|
|
|
style: {
|
|
|
|
|
width: 77
|
|
|
|
|
},
|
|
|
|
|
options: mirrtypeInfo.mirror_types,
|
|
|
|
|
fieldNames: {
|
|
|
|
|
label: 'name',
|
|
|
|
|
value: 'id'
|
|
|
|
|
},
|
|
|
|
|
onChange: function onChange(value) {
|
|
|
|
|
getMirrorData(value, mirrorTypeIds.mirror_cloud_type_id);
|
|
|
|
|
mirrorTypeIds.mirror_type_id = value;
|
|
|
|
|
setMirrTypeIds(objectSpread2_default()({}, mirrorTypeIds));
|
|
|
|
|
}
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
display: 'flex'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: MirrorModalmodules.selSpanSty,
|
|
|
|
|
children: "\u8DE8\u4E91\u5206\u7C7B"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
value: mirrorTypeIds.mirror_cloud_type_id,
|
|
|
|
|
style: {
|
|
|
|
|
width: 77
|
|
|
|
|
},
|
|
|
|
|
options: mirrtypeInfo.mirror_cloud_types,
|
|
|
|
|
fieldNames: {
|
|
|
|
|
label: 'name',
|
|
|
|
|
value: 'id'
|
|
|
|
|
},
|
|
|
|
|
onChange: function onChange(value) {
|
|
|
|
|
getMirrorData(mirrorTypeIds.mirror_type_id, value);
|
|
|
|
|
mirrorTypeIds.mirror_cloud_type_id = value;
|
|
|
|
|
setMirrTypeIds(objectSpread2_default()({}, mirrorTypeIds));
|
|
|
|
|
}
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: MirrorModalmodules.right,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("header", {
|
|
|
|
|
@ -12967,7 +13094,7 @@ var MirrorModal = function MirrorModal(_ref) {
|
|
|
|
|
className: MirrorModalmodules.title,
|
|
|
|
|
children: ["\u5B9E\u9A8C\u73AF\u5883:\xA0", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
dangerouslySetInnerHTML: {
|
|
|
|
|
__html: activeId === null ? '— —' : (_ref3 = name || "") === null || _ref3 === void 0 ? void 0 : _ref3.replace(new RegExp(keyword === null || keyword === void 0 ? void 0 : keyword.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gi"), '<span style="color:#0152d9;background-color:#1890ff33">$&</span>')
|
|
|
|
|
__html: activeId === null ? '— —' : (_ref5 = name || "") === null || _ref5 === void 0 ? void 0 : _ref5.replace(new RegExp(keyword === null || keyword === void 0 ? void 0 : keyword.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gi"), '<span style="color:#0152d9;background-color:#1890ff33">$&</span>')
|
|
|
|
|
}
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
@ -13007,10 +13134,10 @@ var MirrorModal = function MirrorModal(_ref) {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ApplyModal/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(CreateEnvironment/* default */.Z, {})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var Environment_MirrorModal = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
|
|
var newShixuns = _ref4.newShixuns,
|
|
|
|
|
globalSetting = _ref4.globalSetting,
|
|
|
|
|
user = _ref4.user;
|
|
|
|
|
/* harmony default export */ var Environment_MirrorModal = ((0,_umi_production_exports.connect)(function (_ref6) {
|
|
|
|
|
var newShixuns = _ref6.newShixuns,
|
|
|
|
|
globalSetting = _ref6.globalSetting,
|
|
|
|
|
user = _ref6.user;
|
|
|
|
|
return {
|
|
|
|
|
newShixuns: newShixuns,
|
|
|
|
|
globalSetting: globalSetting,
|