@riil-frontend/component-topology 4.0.0-beta.9 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +32 -32
- package/es/components/BatchAttrMetric/setting.js +47 -7
- package/es/components/Drawer/Drawer.js +60 -0
- package/es/components/Drawer/index.js +1 -59
- package/es/constants/ResourceInfoDisplay.js +1 -4
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +31 -1
- package/es/core/components/AlarmListPanel/hooks/useAlarmList.js +34 -0
- package/es/core/components/AlarmListPanel/index.js +27 -24
- package/es/core/components/AlarmListPanel/index.module.scss +46 -16
- package/es/core/components/DisplaySettingDrawer/EdgeFlow.js +4 -6
- package/es/core/components/DisplaySettingDrawer/EdgeFlowDirection.js +4 -6
- package/es/core/components/DisplaySettingDrawer/NodeTag.js +3 -5
- package/es/core/components/DisplaySettingDrawer/NodeTip.js +4 -5
- package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -1
- package/es/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSetting.js +25 -0
- package/es/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSettingDrawer.js +8 -0
- package/es/core/components/TopoView/topoView.js +25 -1
- package/es/core/editor/components/settings/propertyViews/group/DataTab/GroupNodeList.js +4 -2
- package/es/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +0 -7
- package/es/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +13 -12
- package/es/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +4 -1
- package/es/core/editor/components/settings/propertyViews/group/{DataTab/ClusterGroupRelateData → cluster}/ClusterGroupRelateData.js +22 -9
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +2 -5
- package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeIcon.js +21 -0
- package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +5 -0
- package/es/core/editor/components/settings/propertyViews/node/NodePropertyView.js +3 -1
- package/es/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +36 -0
- package/es/core/editor/components/settings/propertyViews/node/Setting/Setting.js +2 -2
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +3 -5
- package/es/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +4 -2
- package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +28 -0
- package/es/core/models/AttributeMetricDisplay.js +28 -10
- package/es/core/models/TopoApp.js +12 -7
- package/es/core/models/TopoGraphView.js +3 -1
- package/es/core/models/attributeFormatter/index.js +2 -26
- package/es/core/models/cache/{CiTyeCache.js → CiTypeCache.js} +3 -1
- package/es/core/models/tagstips/ElementTagTipConfig.js +132 -0
- package/es/core/models/tagstips/utils.js +44 -0
- package/es/core/models/utils/linkUtils.js +3 -1
- package/es/core/services/topo.js +30 -0
- package/es/core/utils/edgeUtil.js +8 -0
- package/es/core/utils/graphLinkUtil.js +22 -0
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +24 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.module.scss +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +7 -101
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +13 -3
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +166 -89
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +7 -14
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +38 -13
- package/es/core/viewer/components/titlebar/BasicTools.js +5 -2
- package/es/core/viewer/components/titlebar/widgets/NodesDragSwitch.js +4 -2
- package/es/hooks/useAlarm.js +59 -0
- package/es/hooks/useEventData.js +20 -0
- package/es/hooks/useGraphAlarmDisplay.js +68 -18
- package/es/hooks/useManageStatus.js +0 -34
- package/es/hooks/useResourceConfig.js +6 -13
- package/es/hooks/useSelection.js +2 -4
- package/es/hooks/useTopoEdit.js +90 -37
- package/es/models/topoAlarm.js +8 -9
- package/es/models/topoMod.js +16 -8
- package/es/style.js +1 -0
- package/es/topoCenter/components/TopoView.js +6 -1
- package/es/topoCenter/components/Topology.js +7 -1
- package/es/topoCenter/components/editor/propertyViews/LayerRelatedResourceList.js +2 -2
- package/es/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +35 -15
- package/es/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +11 -2
- package/es/topoCenter/components/viewer/displaySetting/LinkTagCommonRidioGroup.js +24 -0
- package/es/topoCenter/components/viewer/displaySetting/LinkTagCommonRidioGroup.module.scss +23 -0
- package/es/topoCenter/components/viewer/displaySetting/LinkTagV2.js +87 -0
- package/es/topoCenter/getTopoData.js +18 -6
- package/es/topoCenter/hooks/editor/useGroupSortResources.js +16 -0
- package/es/topoCenter/hooks/useEdgeExpand.js +25 -0
- package/es/topoCenter/hooks/useLinkDynamicStyle.js +1 -1
- package/es/topoCenter/hooks/useTopoEdit.js +3 -0
- package/es/topoCenter/models/LinkDynamicStyleExecutor.js +38 -10
- package/es/topoCenter/models/TopoCenter.js +3 -11
- package/es/topoCenter/store/functionAuth.js +2 -0
- package/es/topoCenter/utils/SortResourcesUtil.js +3 -3
- package/es/topoCenter/utils/exportData.js +13 -7
- package/es/topoCenter/utils/linkUtil.js +8 -0
- package/es/utils/ResourceConfigUtil.js +4 -5
- package/es/utils/clusterUtil.js +27 -2
- package/es/utils/htElementDataUtil.js +22 -1
- package/es/utils/htElementUtils.js +22 -9
- package/es/utils/showGraphManageStatusUtil.js +67 -0
- package/es/utils/topoData.js +57 -32
- package/lib/components/BatchAttrMetric/setting.js +47 -6
- package/lib/components/Drawer/Drawer.js +73 -0
- package/lib/components/Drawer/index.js +2 -64
- package/lib/constants/ResourceInfoDisplay.js +1 -4
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +31 -1
- package/lib/core/components/AlarmListPanel/hooks/useAlarmList.js +40 -0
- package/lib/core/components/AlarmListPanel/index.js +30 -24
- package/lib/core/components/AlarmListPanel/index.module.scss +46 -16
- package/lib/core/components/DisplaySettingDrawer/EdgeFlow.js +4 -6
- package/lib/core/components/DisplaySettingDrawer/EdgeFlowDirection.js +4 -6
- package/lib/core/components/DisplaySettingDrawer/NodeTag.js +3 -6
- package/lib/core/components/DisplaySettingDrawer/NodeTip.js +4 -6
- package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -1
- package/lib/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSetting.js +39 -0
- package/lib/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSettingDrawer.js +17 -0
- package/lib/core/components/TopoView/topoView.js +28 -1
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/GroupNodeList.js +4 -2
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +0 -8
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +13 -13
- package/lib/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +5 -1
- package/lib/core/editor/components/settings/propertyViews/group/{DataTab/ClusterGroupRelateData → cluster}/ClusterGroupRelateData.js +23 -9
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +2 -5
- package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeIcon.js +31 -0
- package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +6 -0
- package/lib/core/editor/components/settings/propertyViews/node/NodePropertyView.js +3 -1
- package/lib/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +52 -0
- package/lib/core/editor/components/settings/propertyViews/node/Setting/Setting.js +3 -3
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +3 -5
- package/lib/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +5 -2
- package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +37 -0
- package/lib/core/models/AttributeMetricDisplay.js +28 -10
- package/lib/core/models/TopoApp.js +10 -5
- package/lib/core/models/TopoGraphView.js +3 -1
- package/lib/core/models/attributeFormatter/index.js +2 -26
- package/lib/core/models/cache/{CiTyeCache.js → CiTypeCache.js} +3 -1
- package/lib/core/models/tagstips/ElementTagTipConfig.js +142 -0
- package/lib/core/models/tagstips/utils.js +59 -0
- package/lib/core/models/utils/linkUtils.js +3 -1
- package/lib/core/services/topo.js +40 -0
- package/lib/core/utils/edgeUtil.js +12 -0
- package/lib/core/utils/graphLinkUtil.js +27 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +25 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.module.scss +1 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +7 -101
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +13 -3
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +166 -89
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +7 -14
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +38 -13
- package/lib/core/viewer/components/titlebar/BasicTools.js +6 -2
- package/lib/core/viewer/components/titlebar/widgets/NodesDragSwitch.js +4 -2
- package/lib/hooks/useAlarm.js +61 -0
- package/lib/hooks/useEventData.js +28 -0
- package/lib/hooks/useGraphAlarmDisplay.js +69 -18
- package/lib/hooks/useManageStatus.js +0 -34
- package/lib/hooks/useResourceConfig.js +6 -12
- package/lib/hooks/useSelection.js +1 -5
- package/lib/hooks/useTopoEdit.js +94 -36
- package/lib/models/topoAlarm.js +8 -9
- package/lib/models/topoMod.js +15 -8
- package/lib/style.js +1 -0
- package/lib/topoCenter/components/TopoView.js +8 -1
- package/lib/topoCenter/components/Topology.js +8 -1
- package/lib/topoCenter/components/editor/propertyViews/LayerRelatedResourceList.js +1 -1
- package/lib/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +35 -14
- package/lib/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +11 -2
- package/lib/topoCenter/components/viewer/displaySetting/LinkTagCommonRidioGroup.js +35 -0
- package/lib/topoCenter/components/viewer/displaySetting/LinkTagCommonRidioGroup.module.scss +23 -0
- package/lib/topoCenter/components/viewer/displaySetting/LinkTagV2.js +102 -0
- package/lib/topoCenter/getTopoData.js +19 -6
- package/lib/topoCenter/hooks/editor/useGroupSortResources.js +21 -0
- package/lib/topoCenter/hooks/useEdgeExpand.js +33 -0
- package/lib/topoCenter/hooks/useLinkDynamicStyle.js +1 -1
- package/lib/topoCenter/hooks/useTopoEdit.js +3 -0
- package/lib/topoCenter/models/LinkDynamicStyleExecutor.js +38 -9
- package/lib/topoCenter/models/TopoCenter.js +3 -12
- package/lib/topoCenter/store/functionAuth.js +2 -0
- package/lib/topoCenter/utils/SortResourcesUtil.js +3 -3
- package/lib/topoCenter/utils/exportData.js +14 -7
- package/lib/topoCenter/utils/linkUtil.js +15 -0
- package/lib/utils/ResourceConfigUtil.js +4 -4
- package/lib/utils/clusterUtil.js +34 -2
- package/lib/utils/htElementDataUtil.js +38 -1
- package/lib/utils/htElementUtils.js +24 -9
- package/lib/utils/showGraphManageStatusUtil.js +78 -0
- package/lib/utils/topoData.js +59 -32
- package/package.json +5 -5
|
@@ -47,7 +47,7 @@ function formatUrl(url) {
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
export default function ResourceOverview(props) {
|
|
50
|
-
var _viewerProps$resource,
|
|
50
|
+
var _viewerProps$resource, _data$attributes;
|
|
51
51
|
|
|
52
52
|
var topo = props.topo,
|
|
53
53
|
id = props.id,
|
|
@@ -58,18 +58,27 @@ export default function ResourceOverview(props) {
|
|
|
58
58
|
style = props.style;
|
|
59
59
|
var resourceOverviewProps = (viewerProps === null || viewerProps === void 0 ? void 0 : (_viewerProps$resource = viewerProps.resourceDetailProps) === null || _viewerProps$resource === void 0 ? void 0 : _viewerProps$resource.resourceOverviewProps) || {}; // 是否是业务拓扑
|
|
60
60
|
|
|
61
|
-
var isAppTopo = !!
|
|
61
|
+
var isAppTopo = !!resourceOverviewProps.getData;
|
|
62
|
+
console.log('resourceOverviewProps', resourceOverviewProps);
|
|
62
63
|
|
|
63
64
|
var _topo$store$useModelS = topo.store.useModelState('topoMod'),
|
|
64
65
|
topoId = _topo$store$useModelS.topoId; // 拓扑id
|
|
65
66
|
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
if (isAppTopo) {
|
|
69
|
+
// 业务拓扑,下端拓扑场景需要手动传入 topoId
|
|
70
|
+
topoId = topoId || resourceOverviewProps.topoId;
|
|
71
|
+
}
|
|
70
72
|
|
|
71
|
-
console.log('support_templates ', support_templates);
|
|
72
73
|
var data = topo.dataModel.useDataById(id);
|
|
74
|
+
var datas = topo.dataModel.useDatas();
|
|
75
|
+
var childrenIds = datas.filter(function (item) {
|
|
76
|
+
return item.ownerId === data.id;
|
|
77
|
+
}).map(function (item) {
|
|
78
|
+
return item.id;
|
|
79
|
+
});
|
|
80
|
+
var support_templates = (data === null || data === void 0 ? void 0 : (_data$attributes = data.attributes) === null || _data$attributes === void 0 ? void 0 : _data$attributes.support_templates) || ''; // 该资源监控模板
|
|
81
|
+
|
|
73
82
|
var ciAttrAndMetricData = useCiAttrAndMetricData({
|
|
74
83
|
topo: topo,
|
|
75
84
|
id: id
|
|
@@ -100,6 +109,10 @@ export default function ResourceOverview(props) {
|
|
|
100
109
|
metricInitLoading = _useState6[0],
|
|
101
110
|
setMetricInitLoading = _useState6[1];
|
|
102
111
|
|
|
112
|
+
var _useState7 = useState(),
|
|
113
|
+
initFlag = _useState7[0],
|
|
114
|
+
setInitFlag = _useState7[1];
|
|
115
|
+
|
|
103
116
|
var ciTypeMeta = useMemo(function () {
|
|
104
117
|
var typeMeta;
|
|
105
118
|
|
|
@@ -129,7 +142,12 @@ export default function ResourceOverview(props) {
|
|
|
129
142
|
monitorMetricModels = _useMetricModels.metricModels;
|
|
130
143
|
|
|
131
144
|
topo.resourceOverviewDrawer = {
|
|
132
|
-
refreshData:
|
|
145
|
+
refreshData: function refreshData() {
|
|
146
|
+
if (monitorMetricModels) {
|
|
147
|
+
init();
|
|
148
|
+
setInitFlag(new Date().getTime());
|
|
149
|
+
}
|
|
150
|
+
}
|
|
133
151
|
};
|
|
134
152
|
useEffect(function () {
|
|
135
153
|
return function () {
|
|
@@ -149,6 +167,11 @@ export default function ResourceOverview(props) {
|
|
|
149
167
|
function init() {
|
|
150
168
|
getDevice();
|
|
151
169
|
getAlarmRiskData(id);
|
|
170
|
+
} // 跳转前调用关闭操作
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
function onClose() {
|
|
174
|
+
isAppTopo && resourceOverviewProps.onClose && resourceOverviewProps.onClose();
|
|
152
175
|
} // 基本信息可选项
|
|
153
176
|
|
|
154
177
|
|
|
@@ -190,9 +213,8 @@ export default function ResourceOverview(props) {
|
|
|
190
213
|
});
|
|
191
214
|
}
|
|
192
215
|
|
|
193
|
-
console.log('baseInfoCol col', col);
|
|
194
216
|
return col;
|
|
195
|
-
}, [ciTypeMeta, type, isDevice]); // 指标可选项
|
|
217
|
+
}, [id, ciTypeMeta, type, isDevice]); // 指标可选项
|
|
196
218
|
|
|
197
219
|
var metricCol = useMemo(function () {
|
|
198
220
|
console.log('monitorMetricModels', monitorMetricModels);
|
|
@@ -202,7 +224,7 @@ export default function ResourceOverview(props) {
|
|
|
202
224
|
dataIndex: item.code
|
|
203
225
|
};
|
|
204
226
|
})) || [];
|
|
205
|
-
}, [monitorMetricModels]); // 获取上架设备类型,判断资源是否是上架设备
|
|
227
|
+
}, [id, monitorMetricModels, initFlag]); // 获取上架设备类型,判断资源是否是上架设备
|
|
206
228
|
|
|
207
229
|
function getDevice() {
|
|
208
230
|
return _getDevice.apply(this, arguments);
|
|
@@ -293,7 +315,7 @@ export default function ResourceOverview(props) {
|
|
|
293
315
|
|
|
294
316
|
function _getAlarmRiskData() {
|
|
295
317
|
_getAlarmRiskData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id) {
|
|
296
|
-
var
|
|
318
|
+
var _alarmList, _yield$resourceOvervi, alarmList, _yield$alarmService$g, _alarmList2, _yield$service$getRis, riskList;
|
|
297
319
|
|
|
298
320
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
299
321
|
while (1) {
|
|
@@ -305,14 +327,14 @@ export default function ResourceOverview(props) {
|
|
|
305
327
|
}
|
|
306
328
|
|
|
307
329
|
_context3.next = 3;
|
|
308
|
-
return
|
|
309
|
-
id: id,
|
|
310
|
-
|
|
330
|
+
return resourceOverviewProps === null || resourceOverviewProps === void 0 ? void 0 : resourceOverviewProps.getData({
|
|
331
|
+
id: id // metrics: topModelMetrics,
|
|
332
|
+
|
|
311
333
|
});
|
|
312
334
|
|
|
313
335
|
case 3:
|
|
314
|
-
_yield$
|
|
315
|
-
alarmList = _yield$
|
|
336
|
+
_yield$resourceOvervi = _context3.sent;
|
|
337
|
+
alarmList = _yield$resourceOvervi.alarms;
|
|
316
338
|
alarmList = ((_alarmList = alarmList) === null || _alarmList === void 0 ? void 0 : _alarmList.map(function (item) {
|
|
317
339
|
return {
|
|
318
340
|
type: 'alarm',
|
|
@@ -331,29 +353,33 @@ export default function ResourceOverview(props) {
|
|
|
331
353
|
};
|
|
332
354
|
})) || [];
|
|
333
355
|
setAlarmRiskList(alarmList);
|
|
334
|
-
_context3.next =
|
|
356
|
+
_context3.next = 21;
|
|
335
357
|
break;
|
|
336
358
|
|
|
337
359
|
case 9:
|
|
338
360
|
_context3.next = 11;
|
|
339
|
-
return alarmService.getAlarmByIds([id], {
|
|
361
|
+
return alarmService.getAlarmByIds([id].concat(childrenIds), {
|
|
340
362
|
alertStatusList: ['toDeal', 'woDealing', 'dealing'],
|
|
341
363
|
// toDeal: 待处理, dealing:处理中
|
|
342
364
|
pageNum: 1,
|
|
343
365
|
pageSize: 999,
|
|
344
366
|
sortField: 'alertLevel',
|
|
345
|
-
sortOrder: '
|
|
367
|
+
sortOrder: 'asc'
|
|
346
368
|
});
|
|
347
369
|
|
|
348
370
|
case 11:
|
|
349
371
|
_yield$alarmService$g = _context3.sent;
|
|
350
372
|
_alarmList2 = _yield$alarmService$g.datas;
|
|
373
|
+
// 2022-07-16 后端不支持多列排序,暂通过前端实现,按创建时间倒序
|
|
374
|
+
_alarmList2 = _alarmList2.sort(function (a, b) {
|
|
375
|
+
return b.createTime - a.createTime;
|
|
376
|
+
});
|
|
351
377
|
_alarmList2 = _alarmList2.map(function (item) {
|
|
352
378
|
return {
|
|
353
379
|
type: 'alarm',
|
|
354
380
|
icon: 'gaojing-3',
|
|
355
381
|
className: "alarm-color-icon-lv" + item.alertLevel,
|
|
356
|
-
title: "
|
|
382
|
+
title: "" + item.alertObject + item.alertTitle,
|
|
357
383
|
link: "/default/pagecenter/alertDetail/view/" + item.alertId + "?alertId=" + item.alertId + "&resId=" + item.ciId + "&title=" + item.alertObject + "&ruleId=" + item.ruleId,
|
|
358
384
|
time: item.createTime,
|
|
359
385
|
status: item.status,
|
|
@@ -365,15 +391,15 @@ export default function ResourceOverview(props) {
|
|
|
365
391
|
}]
|
|
366
392
|
};
|
|
367
393
|
});
|
|
368
|
-
_context3.next =
|
|
394
|
+
_context3.next = 17;
|
|
369
395
|
return service.getRiskByIds({
|
|
370
|
-
ciIdList: [id],
|
|
396
|
+
ciIdList: [id].concat(childrenIds),
|
|
371
397
|
statusList: ['toDeal', 'dealing'],
|
|
372
398
|
current: 1,
|
|
373
399
|
pageSize: 999
|
|
374
400
|
});
|
|
375
401
|
|
|
376
|
-
case
|
|
402
|
+
case 17:
|
|
377
403
|
_yield$service$getRis = _context3.sent;
|
|
378
404
|
riskList = _yield$service$getRis.content;
|
|
379
405
|
riskList = riskList.map(function (item) {
|
|
@@ -381,15 +407,15 @@ export default function ResourceOverview(props) {
|
|
|
381
407
|
type: 'risk',
|
|
382
408
|
icon: 'Overall_risk_full',
|
|
383
409
|
className: 'risk-icon',
|
|
384
|
-
title: item.itemName,
|
|
385
|
-
link: "/default/inspectionTaskList/inspectionReport?title=" + item.ciName + "&reportId=" + item.executeId + "&reportTime=" + item.executeTime + "&reportType=" + item.viewType + "&reportName=" + item.
|
|
410
|
+
title: "" + item.ciName + item.itemName,
|
|
411
|
+
link: "/default/inspectionTaskList/inspectionReport?title=" + item.ciName + "&reportId=" + item.executeId + "&reportTime=" + item.executeTime + "&reportType=" + item.viewType + "&reportName=" + item.reportName,
|
|
386
412
|
time: item.firstFoundTime
|
|
387
413
|
};
|
|
388
414
|
}); // console.log('告警和风险', alarmList, riskList);
|
|
389
415
|
|
|
390
416
|
setAlarmRiskList([].concat(_alarmList2, riskList));
|
|
391
417
|
|
|
392
|
-
case
|
|
418
|
+
case 21:
|
|
393
419
|
case "end":
|
|
394
420
|
return _context3.stop();
|
|
395
421
|
}
|
|
@@ -406,7 +432,8 @@ export default function ResourceOverview(props) {
|
|
|
406
432
|
cell: function cell(value, index, record) {
|
|
407
433
|
return /*#__PURE__*/React.createElement("div", {
|
|
408
434
|
className: styles['alarm-title'],
|
|
409
|
-
title: value
|
|
435
|
+
title: value,
|
|
436
|
+
onClick: onClose
|
|
410
437
|
}, /*#__PURE__*/React.createElement(_Icon, {
|
|
411
438
|
type: record.icon,
|
|
412
439
|
size: "xs",
|
|
@@ -457,8 +484,7 @@ export default function ResourceOverview(props) {
|
|
|
457
484
|
|
|
458
485
|
function _alarmRiskOperation() {
|
|
459
486
|
_alarmRiskOperation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(type, params) {
|
|
460
|
-
var res
|
|
461
|
-
|
|
487
|
+
var res;
|
|
462
488
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
463
489
|
while (1) {
|
|
464
490
|
switch (_context4.prev = _context4.next) {
|
|
@@ -476,12 +502,16 @@ export default function ResourceOverview(props) {
|
|
|
476
502
|
|
|
477
503
|
_Message.success('受理成功');
|
|
478
504
|
|
|
479
|
-
if (isAppTopo) {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
}
|
|
505
|
+
getAlarmRiskData(id); // if (isAppTopo) {
|
|
506
|
+
// const {
|
|
507
|
+
// displayName: ciName,
|
|
508
|
+
// attributeMap: modelAttributeMap,
|
|
509
|
+
// domain,
|
|
510
|
+
// } = topo.ciTyeCache.getCiType(ciType);
|
|
511
|
+
// initAppTopo(monitorMetricModels, modelAttributeMap, ciName, domain);
|
|
512
|
+
// } else {
|
|
513
|
+
// getAlarmRiskData(id);
|
|
514
|
+
// }
|
|
485
515
|
|
|
486
516
|
case 6:
|
|
487
517
|
case "end":
|
|
@@ -497,7 +527,8 @@ export default function ResourceOverview(props) {
|
|
|
497
527
|
id: id,
|
|
498
528
|
ciType: ciType,
|
|
499
529
|
type: type,
|
|
500
|
-
name:
|
|
530
|
+
// name: '123'
|
|
531
|
+
name: props.name
|
|
501
532
|
}; // 基本信息设置改变
|
|
502
533
|
|
|
503
534
|
function baseInfoColChange(_x5) {
|
|
@@ -509,27 +540,27 @@ export default function ResourceOverview(props) {
|
|
|
509
540
|
_baseInfoColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(col) {
|
|
510
541
|
var _col;
|
|
511
542
|
|
|
512
|
-
var
|
|
543
|
+
var infoData, attributeMap, _iterator, _step, item, value, contentTitle, link, node, _data, _ref2, _ref2$, _item, _attributeMap, object, _object, displayName, attr;
|
|
513
544
|
|
|
514
545
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
515
546
|
while (1) {
|
|
516
547
|
switch (_context5.prev = _context5.next) {
|
|
517
548
|
case 0:
|
|
518
549
|
if ((_col = col) !== null && _col !== void 0 && _col.length) {
|
|
519
|
-
_context5.next =
|
|
550
|
+
_context5.next = 3;
|
|
520
551
|
break;
|
|
521
552
|
}
|
|
522
553
|
|
|
554
|
+
setBaseInfo([]);
|
|
523
555
|
return _context5.abrupt("return");
|
|
524
556
|
|
|
525
|
-
case
|
|
557
|
+
case 3:
|
|
526
558
|
settBaseInfoInitLoading(true);
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
_context5.next = 6;
|
|
559
|
+
infoData = [];
|
|
560
|
+
_context5.next = 7;
|
|
530
561
|
return getAttribute(id);
|
|
531
562
|
|
|
532
|
-
case
|
|
563
|
+
case 7:
|
|
533
564
|
attributeMap = _context5.sent;
|
|
534
565
|
console.log('getAttribute', attributeMap);
|
|
535
566
|
col = col.filter(function (item) {
|
|
@@ -537,62 +568,100 @@ export default function ResourceOverview(props) {
|
|
|
537
568
|
});
|
|
538
569
|
_iterator = _createForOfIteratorHelperLoose(col);
|
|
539
570
|
|
|
540
|
-
case
|
|
571
|
+
case 11:
|
|
541
572
|
if ((_step = _iterator()).done) {
|
|
542
|
-
_context5.next =
|
|
573
|
+
_context5.next = 46;
|
|
543
574
|
break;
|
|
544
575
|
}
|
|
545
576
|
|
|
546
577
|
item = _step.value;
|
|
547
578
|
value = formatMetric(attributeMap[item.dataIndex], ciTypeMeta.attributeMap[item.dataIndex]);
|
|
579
|
+
contentTitle = value;
|
|
548
580
|
_context5.t0 = item.dataIndex;
|
|
549
|
-
_context5.next = _context5.t0 === 'display_name' ?
|
|
581
|
+
_context5.next = _context5.t0 === 'display_name' ? 18 : _context5.t0 === 'ciName' ? 22 : _context5.t0 === 'res_address' ? 25 : _context5.t0 === 'imageName' ? 30 : 34;
|
|
550
582
|
break;
|
|
551
583
|
|
|
552
|
-
case
|
|
584
|
+
case 18:
|
|
553
585
|
link = "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + ciTypeMeta.domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType; // 资源跳转链接
|
|
554
586
|
|
|
555
|
-
value = /*#__PURE__*/React.createElement(
|
|
587
|
+
value = /*#__PURE__*/React.createElement("span", {
|
|
588
|
+
onClick: onClose
|
|
589
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
556
590
|
className: styles.link,
|
|
557
591
|
title: attributeMap.display_name || "",
|
|
558
592
|
to: formatUrl(link)
|
|
559
|
-
}, attributeMap.display_name || "-");
|
|
560
|
-
|
|
593
|
+
}, attributeMap.display_name || "-"));
|
|
594
|
+
contentTitle = attributeMap.display_name || "-";
|
|
595
|
+
return _context5.abrupt("break", 35);
|
|
561
596
|
|
|
562
|
-
case
|
|
597
|
+
case 22:
|
|
563
598
|
value = ciTypeMeta.displayName;
|
|
564
|
-
|
|
599
|
+
contentTitle = value;
|
|
600
|
+
return _context5.abrupt("break", 35);
|
|
565
601
|
|
|
566
|
-
case
|
|
567
|
-
_context5.next =
|
|
602
|
+
case 25:
|
|
603
|
+
_context5.next = 27;
|
|
568
604
|
return getAddressFormat(attributeMap);
|
|
569
605
|
|
|
570
|
-
case
|
|
606
|
+
case 27:
|
|
571
607
|
value = _context5.sent;
|
|
572
|
-
|
|
608
|
+
contentTitle = value;
|
|
609
|
+
return _context5.abrupt("break", 35);
|
|
573
610
|
|
|
574
|
-
case
|
|
611
|
+
case 30:
|
|
575
612
|
node = topo.getDataModel().getDataByTag(id);
|
|
576
613
|
value = (node === null || node === void 0 ? void 0 : node.a('customName')) || (node === null || node === void 0 ? void 0 : node.a('name')) || '-';
|
|
577
|
-
|
|
614
|
+
contentTitle = value;
|
|
615
|
+
return _context5.abrupt("break", 35);
|
|
616
|
+
|
|
617
|
+
case 34:
|
|
618
|
+
return _context5.abrupt("break", 35);
|
|
619
|
+
|
|
620
|
+
case 35:
|
|
621
|
+
// 拿翻译字段属性数据
|
|
622
|
+
if (attributeMap[item.dataIndex] && attributeMap[item.dataIndex + ".name"]) {
|
|
623
|
+
value = attributeMap[item.dataIndex + ".name"];
|
|
624
|
+
contentTitle = value;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
_data = topo.attributeMetricDisplay.getData() || [];
|
|
628
|
+
_ref2 = [].concat(_data.filter(function (m) {
|
|
629
|
+
return m.id === id;
|
|
630
|
+
})), _ref2$ = _ref2[0], _item = _ref2$ === void 0 ? {} : _ref2$;
|
|
631
|
+
_attributeMap = _item.attributeMap || {};
|
|
632
|
+
object = _attributeMap[item.dataIndex + "_object"] || {};
|
|
633
|
+
|
|
634
|
+
if (!attributeMap[item.dataIndex + ".name"] && JSON.stringify(object) !== '{}') {
|
|
635
|
+
_object = _extends({}, object), displayName = _object.displayName;
|
|
636
|
+
value = displayName || _attributeMap["" + item.dataIndex];
|
|
637
|
+
contentTitle = value;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
if (item.dataIndex === 'ipv6_address') {
|
|
641
|
+
value = _attributeMap["" + item.dataIndex];
|
|
642
|
+
contentTitle = value;
|
|
643
|
+
}
|
|
578
644
|
|
|
579
|
-
|
|
580
|
-
|
|
645
|
+
if (isAppTopo && (item.dataIndex === 'source_type' || item.dataIndex === 'destination_type')) {
|
|
646
|
+
attr = topo.ciTyeCache.getCiType(attributeMap["" + item.dataIndex]) || {};
|
|
647
|
+
value = attr.displayName || attributeMap["" + item.dataIndex];
|
|
648
|
+
contentTitle = value;
|
|
649
|
+
}
|
|
581
650
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
651
|
+
infoData.push(_extends({}, item, {
|
|
652
|
+
value: value,
|
|
653
|
+
contentTitle: contentTitle
|
|
585
654
|
}));
|
|
586
655
|
|
|
587
|
-
case
|
|
588
|
-
_context5.next =
|
|
656
|
+
case 44:
|
|
657
|
+
_context5.next = 11;
|
|
589
658
|
break;
|
|
590
659
|
|
|
591
|
-
case
|
|
660
|
+
case 46:
|
|
592
661
|
settBaseInfoInitLoading(false);
|
|
593
|
-
setBaseInfo(
|
|
662
|
+
setBaseInfo(infoData);
|
|
594
663
|
|
|
595
|
-
case
|
|
664
|
+
case 48:
|
|
596
665
|
case "end":
|
|
597
666
|
return _context5.stop();
|
|
598
667
|
}
|
|
@@ -609,7 +678,7 @@ export default function ResourceOverview(props) {
|
|
|
609
678
|
|
|
610
679
|
function _getAttribute() {
|
|
611
680
|
_getAttribute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id) {
|
|
612
|
-
var res,
|
|
681
|
+
var res, _ref3, attributes;
|
|
613
682
|
|
|
614
683
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
615
684
|
while (1) {
|
|
@@ -638,7 +707,7 @@ export default function ResourceOverview(props) {
|
|
|
638
707
|
case 4:
|
|
639
708
|
res = _context6.sent;
|
|
640
709
|
console.log('getAttribute res', res);
|
|
641
|
-
|
|
710
|
+
_ref3 = (res === null || res === void 0 ? void 0 : res.data[0]) || {}, attributes = _ref3.attributes;
|
|
642
711
|
return _context6.abrupt("return", attributes);
|
|
643
712
|
|
|
644
713
|
case 8:
|
|
@@ -659,7 +728,7 @@ export default function ResourceOverview(props) {
|
|
|
659
728
|
_metricColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(col) {
|
|
660
729
|
var _col2, _col3;
|
|
661
730
|
|
|
662
|
-
var codes, endTime, params,
|
|
731
|
+
var codes, endTime, params, _ref4, times, metricList;
|
|
663
732
|
|
|
664
733
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
665
734
|
while (1) {
|
|
@@ -693,7 +762,7 @@ export default function ResourceOverview(props) {
|
|
|
693
762
|
};
|
|
694
763
|
|
|
695
764
|
if (isAppTopo) {
|
|
696
|
-
|
|
765
|
+
_ref4 = resourceOverviewProps.metricProps || {}, times = _ref4.times;
|
|
697
766
|
|
|
698
767
|
if (times !== null && times !== void 0 && times.length) {
|
|
699
768
|
params.startTime = times[0];
|
|
@@ -729,7 +798,7 @@ export default function ResourceOverview(props) {
|
|
|
729
798
|
window.topo_overview_metric_timer && clearInterval(window.topo_overview_metric_timer);
|
|
730
799
|
window.topo_overview_metric_timer = setInterval(function () {
|
|
731
800
|
metricColChange(col);
|
|
732
|
-
},
|
|
801
|
+
}, 60000);
|
|
733
802
|
}
|
|
734
803
|
|
|
735
804
|
case 17:
|
|
@@ -759,26 +828,36 @@ export default function ResourceOverview(props) {
|
|
|
759
828
|
}
|
|
760
829
|
|
|
761
830
|
if (isAppTopo) {
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
831
|
+
var _resourceOverviewProp, _resourceOverviewProp2;
|
|
832
|
+
|
|
833
|
+
if ((_resourceOverviewProp = resourceOverviewProps.baseInfoProps) !== null && _resourceOverviewProp !== void 0 && _resourceOverviewProp.defaultCols) {
|
|
834
|
+
baseInfo = resourceOverviewProps.baseInfoProps.defaultCols({
|
|
835
|
+
type: type,
|
|
836
|
+
data: {
|
|
837
|
+
id: id,
|
|
838
|
+
ciType: ciType
|
|
839
|
+
}
|
|
840
|
+
}) || baseInfo;
|
|
841
|
+
if (baseInfo.indexOf('display_name') === -1) baseInfo = ['display_name'].concat(baseInfo);
|
|
767
842
|
}
|
|
768
843
|
|
|
769
|
-
if (
|
|
770
|
-
keyIndicators =
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
844
|
+
if ((_resourceOverviewProp2 = resourceOverviewProps.metricProps) !== null && _resourceOverviewProp2 !== void 0 && _resourceOverviewProp2.defaultCols) {
|
|
845
|
+
keyIndicators = resourceOverviewProps.metricProps.defaultCols({
|
|
846
|
+
type: type,
|
|
847
|
+
data: {
|
|
848
|
+
id: id,
|
|
849
|
+
ciType: ciType
|
|
850
|
+
}
|
|
851
|
+
}) || keyIndicators;
|
|
774
852
|
}
|
|
775
853
|
}
|
|
776
854
|
|
|
855
|
+
console.log('defaultCols', type, ciType, baseInfo, keyIndicators);
|
|
777
856
|
return {
|
|
778
857
|
baseInfo: baseInfo,
|
|
779
858
|
keyIndicators: keyIndicators
|
|
780
859
|
};
|
|
781
|
-
}, [type, topo, metricCol]);
|
|
860
|
+
}, [id, type, topo, metricCol]);
|
|
782
861
|
return /*#__PURE__*/React.createElement("div", {
|
|
783
862
|
className: styles['resource-overview'],
|
|
784
863
|
style: style
|
|
@@ -787,17 +866,15 @@ export default function ResourceOverview(props) {
|
|
|
787
866
|
data: elementData,
|
|
788
867
|
ciTypeMeta: ciTypeMeta,
|
|
789
868
|
baseInfo: baseInfo,
|
|
869
|
+
isAppTopo: isAppTopo,
|
|
790
870
|
headerExtra: function headerExtra(p) {
|
|
791
|
-
var
|
|
871
|
+
var _resourceOverviewProp3;
|
|
792
872
|
|
|
793
873
|
return /*#__PURE__*/React.createElement("div", {
|
|
794
874
|
style: {
|
|
795
875
|
display: 'flex'
|
|
796
876
|
}
|
|
797
|
-
}, (resourceOverviewProps === null || resourceOverviewProps === void 0 ? void 0 : (
|
|
798
|
-
id: id,
|
|
799
|
-
ciType: ciType
|
|
800
|
-
}) : '', /*#__PURE__*/React.createElement(Configurator, {
|
|
877
|
+
}, (resourceOverviewProps === null || resourceOverviewProps === void 0 ? void 0 : (_resourceOverviewProp3 = resourceOverviewProps.baseInfoProps) === null || _resourceOverviewProp3 === void 0 ? void 0 : _resourceOverviewProp3.headerExtra(p)) || '', /*#__PURE__*/React.createElement(Configurator, {
|
|
801
878
|
btnStyle: {
|
|
802
879
|
marginLeft: 5
|
|
803
880
|
},
|
|
@@ -82,21 +82,14 @@ export default function ResourceOverviewMetric(props) {
|
|
|
82
82
|
function formatChart(itemData) {
|
|
83
83
|
var code = itemData.code,
|
|
84
84
|
metricItem = itemData.metricItem,
|
|
85
|
-
list = itemData.list;
|
|
85
|
+
list = itemData.list; // -2 为异常值,异常记录不显示
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
return list.map(function (item) {
|
|
94
|
-
return {
|
|
95
|
-
time: item.ts,
|
|
96
|
-
value: Number(item.metricValue)
|
|
97
|
-
};
|
|
98
|
-
});
|
|
99
|
-
}
|
|
87
|
+
return list.map(function (item) {
|
|
88
|
+
return {
|
|
89
|
+
time: item.ts,
|
|
90
|
+
value: item.metricValue == -2 ? null : Number(item.metricValue)
|
|
91
|
+
};
|
|
92
|
+
});
|
|
100
93
|
}
|
|
101
94
|
|
|
102
95
|
console.log('ResourceOverviewMetric', data);
|
|
@@ -50,7 +50,13 @@ function Configurator(props) {
|
|
|
50
50
|
setOrgColumns = _useState3[1];
|
|
51
51
|
|
|
52
52
|
useEffect(function () {
|
|
53
|
-
if (columns &&
|
|
53
|
+
if (columns !== null && columns !== void 0 && columns.length && type) {
|
|
54
|
+
init();
|
|
55
|
+
} else {
|
|
56
|
+
setColumnState([]);
|
|
57
|
+
setOrgColumns([]);
|
|
58
|
+
onChange([]);
|
|
59
|
+
}
|
|
54
60
|
}, [columns, topoId, templateCode, type]);
|
|
55
61
|
|
|
56
62
|
function init() {
|
|
@@ -70,13 +76,26 @@ function Configurator(props) {
|
|
|
70
76
|
while (1) {
|
|
71
77
|
switch (_context3.prev = _context3.next) {
|
|
72
78
|
case 0:
|
|
73
|
-
|
|
79
|
+
if (!(topoId && templateCode)) {
|
|
80
|
+
_context3.next = 6;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
_context3.next = 3;
|
|
74
85
|
return service.getOverviewConfig(topoId, templateCode);
|
|
75
86
|
|
|
76
|
-
case
|
|
77
|
-
|
|
78
|
-
|
|
87
|
+
case 3:
|
|
88
|
+
_context3.t0 = _context3.sent;
|
|
89
|
+
_context3.next = 7;
|
|
90
|
+
break;
|
|
79
91
|
|
|
92
|
+
case 6:
|
|
93
|
+
_context3.t0 = {};
|
|
94
|
+
|
|
95
|
+
case 7:
|
|
96
|
+
overviewConfig = _context3.t0;
|
|
97
|
+
// console.log('overviewConfig', overviewConfig);
|
|
98
|
+
// const overviewConfig = ''
|
|
80
99
|
newPrevCols = [];
|
|
81
100
|
newNextCols = [];
|
|
82
101
|
|
|
@@ -98,6 +117,10 @@ function Configurator(props) {
|
|
|
98
117
|
return !oldCols.find(function (old_item) {
|
|
99
118
|
return c_item.dataIndex === old_item.dataIndex;
|
|
100
119
|
});
|
|
120
|
+
}).map(function (item) {
|
|
121
|
+
return _extends({}, item, {
|
|
122
|
+
hidden: true
|
|
123
|
+
});
|
|
101
124
|
});
|
|
102
125
|
} else {
|
|
103
126
|
// 未设置
|
|
@@ -126,7 +149,7 @@ function Configurator(props) {
|
|
|
126
149
|
setOrgColumns(newCols);
|
|
127
150
|
onChange(newCols);
|
|
128
151
|
|
|
129
|
-
case
|
|
152
|
+
case 15:
|
|
130
153
|
case "end":
|
|
131
154
|
return _context3.stop();
|
|
132
155
|
}
|
|
@@ -206,19 +229,21 @@ function Configurator(props) {
|
|
|
206
229
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
207
230
|
var _service$saveOverview;
|
|
208
231
|
|
|
209
|
-
var res;
|
|
210
232
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
211
233
|
while (1) {
|
|
212
234
|
switch (_context2.prev = _context2.next) {
|
|
213
235
|
case 0:
|
|
214
|
-
_context2.next = 2;
|
|
215
|
-
return service.saveOverviewConfig(topoId, templateCode, (_service$saveOverview = {}, _service$saveOverview[type] = JSON.stringify(columnsState), _service$saveOverview));
|
|
216
|
-
|
|
217
|
-
case 2:
|
|
218
|
-
res = _context2.sent;
|
|
219
236
|
onChange(columnsState);
|
|
220
237
|
setVisible(false);
|
|
221
238
|
|
|
239
|
+
if (!(topoId && templateCode)) {
|
|
240
|
+
_context2.next = 5;
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
_context2.next = 5;
|
|
245
|
+
return service.saveOverviewConfig(topoId, templateCode, (_service$saveOverview = {}, _service$saveOverview[type] = JSON.stringify(columnsState), _service$saveOverview));
|
|
246
|
+
|
|
222
247
|
case 5:
|
|
223
248
|
case "end":
|
|
224
249
|
return _context2.stop();
|
|
@@ -303,7 +328,7 @@ function Configurator(props) {
|
|
|
303
328
|
onClick: onOk,
|
|
304
329
|
type: "primary",
|
|
305
330
|
size: "medium",
|
|
306
|
-
disabled: !
|
|
331
|
+
disabled: !columnsState.length
|
|
307
332
|
}, "\u786E\u5B9A"), /*#__PURE__*/React.createElement(_Button, (_React$createElement = {
|
|
308
333
|
size: "small",
|
|
309
334
|
onClick: onClose
|