|
|
|
|
@ -700,6 +700,7 @@ var ProjectDetailPage = function ProjectDetailPage(_ref) {
|
|
|
|
|
columns: [{
|
|
|
|
|
title: '序号',
|
|
|
|
|
dataIndex: 'filename',
|
|
|
|
|
width: 70,
|
|
|
|
|
key: 'filename',
|
|
|
|
|
render: function render(text, item, index) {
|
|
|
|
|
return params.limit * (params.page - 1) + index + 1;
|
|
|
|
|
@ -707,26 +708,33 @@ var ProjectDetailPage = function ProjectDetailPage(_ref) {
|
|
|
|
|
}, {
|
|
|
|
|
title: '镜像名称',
|
|
|
|
|
dataIndex: 'name',
|
|
|
|
|
width: '20%',
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
key: 'name'
|
|
|
|
|
}, {
|
|
|
|
|
title: '镜像类型',
|
|
|
|
|
dataIndex: 'mirror_type_cn',
|
|
|
|
|
key: 'mirror_type_cn',
|
|
|
|
|
width: '10%',
|
|
|
|
|
width: 140,
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '镜像描述',
|
|
|
|
|
dataIndex: 'description',
|
|
|
|
|
key: 'description',
|
|
|
|
|
width: '20%',
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '状态',
|
|
|
|
|
dataIndex: 'save_status',
|
|
|
|
|
key: 'save_status',
|
|
|
|
|
width: 100,
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text) {
|
|
|
|
|
return text === 1 ? '成功' : text === 2 ? '失败' : '进行中';
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '创建时间',
|
|
|
|
|
dataIndex: 'created_at',
|
|
|
|
|
key: 'created_at',
|
|
|
|
|
width: '10%',
|
|
|
|
|
width: 142,
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text) {
|
|
|
|
|
return moment__WEBPACK_IMPORTED_MODULE_7___default()(text).format('YYYY-MM-DD HH:mm');
|
|
|
|
|
@ -735,32 +743,47 @@ var ProjectDetailPage = function ProjectDetailPage(_ref) {
|
|
|
|
|
title: '创建者',
|
|
|
|
|
dataIndex: 'user_name',
|
|
|
|
|
key: 'user_name',
|
|
|
|
|
width: '10%',
|
|
|
|
|
width: 160,
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '操作',
|
|
|
|
|
dataIndex: 'id',
|
|
|
|
|
key: 'id',
|
|
|
|
|
width: '20%',
|
|
|
|
|
width: 150,
|
|
|
|
|
render: function render(text, record) {
|
|
|
|
|
var mirror_type = record.mirror_type,
|
|
|
|
|
mirror_repository_id = record.mirror_repository_id;
|
|
|
|
|
mirror_repository_id = record.mirror_repository_id,
|
|
|
|
|
save_status = record.save_status;
|
|
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
|
|
|
|
|
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.link,
|
|
|
|
|
style: [0, 2].includes(save_status) ? {
|
|
|
|
|
color: '#999',
|
|
|
|
|
cursor: 'not-allowed'
|
|
|
|
|
} : {},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return handleCreateProject(mirror_type, mirror_repository_id);
|
|
|
|
|
if ([0, 2].includes(save_status)) return;
|
|
|
|
|
handleCreateProject(mirror_type, mirror_repository_id);
|
|
|
|
|
},
|
|
|
|
|
children: "\u521B\u5EFA\u9879\u76EE"
|
|
|
|
|
}), (params === null || params === void 0 ? void 0 : params.tab) === 'mine' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("a", {
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 20,
|
|
|
|
|
className: "ml20",
|
|
|
|
|
style: [0].includes(save_status) ? {
|
|
|
|
|
color: '#999',
|
|
|
|
|
cursor: 'not-allowed'
|
|
|
|
|
} : {
|
|
|
|
|
color: 'red'
|
|
|
|
|
},
|
|
|
|
|
onClick: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2() {
|
|
|
|
|
return _root_workspace_ppte5yg23_local_v9_test3_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:
|
|
|
|
|
if (![0].includes(save_status)) {
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context2.abrupt("return");
|
|
|
|
|
case 2:
|
|
|
|
|
antd__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z.confirm({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '当前镜像删除后不可恢复,是否确认删除',
|
|
|
|
|
@ -798,7 +821,7 @@ var ProjectDetailPage = function ProjectDetailPage(_ref) {
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
case 1:
|
|
|
|
|
case 3:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|