@riil-frontend/component-topology 11.0.35 → 12.0.0-dev.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.js +45 -29
- package/es/components/BatchAttrMetric/setting.js +1 -1
- package/es/components/MultiResourceDrawer/index.js +8 -6
- package/es/components/ResourceList/ResourceSelect.js +8 -7
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
- package/es/components/SingleResourceDrawer/SelectDrawer.js +8 -6
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
- package/es/core/editor/components/BackgroundView/index.js +73 -54
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -5
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
- package/es/core/editor/hooks/useKeyboardShortcut.js +36 -32
- package/es/core/editor/utils/copyElementUtil.js +174 -0
- package/es/core/hooks/useCiAttributeChange.js +6 -3
- package/es/core/hooks/usePolling.js +21 -13
- package/es/core/hooks/useResourceConfig.js +37 -21
- package/es/core/hooks/useTopoEdit.js +202 -139
- package/es/core/models/Alarm.js +104 -38
- package/es/core/models/AttributeMetricDisplay.js +36 -14
- package/es/core/models/TopoApp.js +197 -75
- package/es/core/models/TopoGraphView.js +20 -10
- package/es/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
- package/es/core/models/cache/CiCache.js +12 -6
- package/es/core/models/cache/CiTypeCache.js +20 -10
- package/es/core/models/cache/DictCache.js +10 -6
- package/es/core/models/graph/Background.js +9 -6
- package/es/core/models/plugins/resourceWebControllUrl.js +21 -8
- package/es/core/models/tagstips/ElementTagTipConfig.js +20 -10
- package/es/core/models/topoData.js +7 -5
- package/es/core/models/utils/linkUtils.js +8 -5
- package/es/core/services/cmdb/metric.js +7 -5
- package/es/core/services/cmdb.js +9 -5
- package/es/core/services/index.js +23 -9
- package/es/core/services/topo/tagtip.js +7 -5
- package/es/core/store/models/customIcon.js +11 -6
- package/es/core/utils/imageUtil.js +7 -5
- package/es/core/utils/metricUtil.js +13 -1
- package/es/core/utils/saveSerialize.js +7 -5
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +8 -5
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +47 -34
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +74 -34
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -26
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +15 -7
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
- package/es/networkTopo/components/Link/hook.js +21 -14
- package/es/networkTopo/components/Link/index.js +32 -18
- package/es/networkTopo/components/Link/setting.js +8 -6
- package/es/networkTopo/getTopoData.js +23 -10
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
- package/es/networkTopo/models/TopoCenter.js +24 -10
- package/es/networkTopo/services/cmdb.js +333 -233
- package/es/networkTopo/services/mdc.js +24 -15
- package/es/networkTopo/services/metric.js +16 -11
- package/es/networkTopo/services/model.js +412 -283
- package/es/networkTopo/utils/exportData.js +7 -5
- package/es/utils/clipboardUtil.d.ts +7 -0
- package/es/utils/clipboardUtil.js +104 -0
- package/lib/components/BatchAttrMetric/setting.js +1 -1
- package/lib/components/MultiResourceDrawer/index.js +8 -6
- package/lib/components/ResourceList/ResourceSelect.js +8 -6
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +8 -6
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
- package/lib/core/editor/components/BackgroundView/index.js +74 -55
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -4
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
- package/lib/core/editor/hooks/useKeyboardShortcut.js +37 -34
- package/lib/core/editor/utils/copyElementUtil.js +187 -0
- package/lib/core/hooks/useCiAttributeChange.js +6 -3
- package/lib/core/hooks/usePolling.js +21 -13
- package/lib/core/hooks/useResourceConfig.js +37 -21
- package/lib/core/hooks/useTopoEdit.js +202 -139
- package/lib/core/models/Alarm.js +104 -38
- package/lib/core/models/AttributeMetricDisplay.js +36 -14
- package/lib/core/models/TopoApp.js +197 -75
- package/lib/core/models/TopoGraphView.js +20 -10
- package/lib/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
- package/lib/core/models/cache/CiCache.js +12 -6
- package/lib/core/models/cache/CiTypeCache.js +20 -10
- package/lib/core/models/cache/DictCache.js +10 -6
- package/lib/core/models/graph/Background.js +9 -6
- package/lib/core/models/plugins/resourceWebControllUrl.js +21 -8
- package/lib/core/models/tagstips/ElementTagTipConfig.js +20 -10
- package/lib/core/models/topoData.js +7 -4
- package/lib/core/models/utils/linkUtils.js +8 -4
- package/lib/core/services/cmdb/metric.js +7 -4
- package/lib/core/services/cmdb.js +9 -4
- package/lib/core/services/index.js +21 -8
- package/lib/core/services/topo/tagtip.js +7 -4
- package/lib/core/store/models/customIcon.js +11 -6
- package/lib/core/utils/imageUtil.js +7 -4
- package/lib/core/utils/metricUtil.js +13 -1
- package/lib/core/utils/saveSerialize.js +7 -4
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +9 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +49 -36
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +73 -35
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +14 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
- package/lib/networkTopo/components/Link/hook.js +23 -15
- package/lib/networkTopo/components/Link/index.js +32 -18
- package/lib/networkTopo/components/Link/setting.js +8 -6
- package/lib/networkTopo/getTopoData.js +23 -10
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
- package/lib/networkTopo/models/TopoCenter.js +24 -10
- package/lib/networkTopo/services/cmdb.js +336 -235
- package/lib/networkTopo/services/mdc.js +24 -14
- package/lib/networkTopo/services/metric.js +16 -10
- package/lib/networkTopo/services/model.js +414 -284
- package/lib/networkTopo/utils/exportData.js +7 -4
- package/lib/utils/clipboardUtil.d.ts +7 -0
- package/lib/utils/clipboardUtil.js +113 -0
- package/lib/utils/htElementDataUtil.js +4 -2
- package/package.json +3 -2
@@ -48,7 +48,7 @@ function formatUrl(url) {
|
|
48
48
|
|
49
49
|
|
50
50
|
export default function ResourceOverview(props) {
|
51
|
-
var _data$attributes
|
51
|
+
var _data$attributes;
|
52
52
|
|
53
53
|
var topo = props.topo,
|
54
54
|
id = props.id,
|
@@ -159,8 +159,8 @@ export default function ResourceOverview(props) {
|
|
159
159
|
isAppTopo && resourceOverviewProps.onClose && resourceOverviewProps.onClose();
|
160
160
|
}
|
161
161
|
|
162
|
-
var jump = function
|
163
|
-
|
162
|
+
var jump = /*#__PURE__*/function () {
|
163
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(roomLink, id) {
|
164
164
|
var power;
|
165
165
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
166
166
|
while (1) switch (_context.prev = _context.next) {
|
@@ -184,8 +184,12 @@ export default function ResourceOverview(props) {
|
|
184
184
|
return _context.stop();
|
185
185
|
}
|
186
186
|
}, _callee);
|
187
|
-
}))
|
188
|
-
|
187
|
+
}));
|
188
|
+
|
189
|
+
return function jump(_x, _x2) {
|
190
|
+
return _ref.apply(this, arguments);
|
191
|
+
};
|
192
|
+
}(); // 基本信息可选项
|
189
193
|
|
190
194
|
|
191
195
|
var baseInfoCol = useMemo(function () {
|
@@ -239,11 +243,13 @@ export default function ResourceOverview(props) {
|
|
239
243
|
})) || [];
|
240
244
|
}, [id, monitorMetricModels, initFlag]);
|
241
245
|
useEffect(function () {
|
242
|
-
var _getDevice;
|
243
|
-
|
244
246
|
// 获取上架设备类型,判断资源是否是上架设备
|
245
247
|
function getDevice() {
|
246
|
-
return
|
248
|
+
return _getDevice.apply(this, arguments);
|
249
|
+
}
|
250
|
+
|
251
|
+
function _getDevice() {
|
252
|
+
_getDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
247
253
|
var list;
|
248
254
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
249
255
|
while (1) switch (_context2.prev = _context2.next) {
|
@@ -262,14 +268,20 @@ export default function ResourceOverview(props) {
|
|
262
268
|
return _context2.stop();
|
263
269
|
}
|
264
270
|
}, _callee2);
|
265
|
-
}))
|
271
|
+
}));
|
272
|
+
return _getDevice.apply(this, arguments);
|
266
273
|
}
|
267
274
|
|
268
275
|
getDevice();
|
269
276
|
}, [ciType]); // 获取地址信息:机房 机柜 起始U-结束U
|
270
277
|
|
271
278
|
function getAddressFormat(_x3) {
|
272
|
-
return
|
279
|
+
return _getAddressFormat.apply(this, arguments);
|
280
|
+
} // 告警table列配置
|
281
|
+
|
282
|
+
|
283
|
+
function _getAddressFormat() {
|
284
|
+
_getAddressFormat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref2) {
|
273
285
|
var owned_computer_room, owned_cabinet, start_u_location, end_u_location, address, _res$find, _res$find$attributes, _res$find2, _res$find2$attributes, res, u;
|
274
286
|
|
275
287
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
@@ -308,9 +320,9 @@ export default function ResourceOverview(props) {
|
|
308
320
|
return _context3.stop();
|
309
321
|
}
|
310
322
|
}, _callee3);
|
311
|
-
}))
|
312
|
-
|
313
|
-
|
323
|
+
}));
|
324
|
+
return _getAddressFormat.apply(this, arguments);
|
325
|
+
}
|
314
326
|
|
315
327
|
var columns = [{
|
316
328
|
title: '描述',
|
@@ -366,7 +378,11 @@ export default function ResourceOverview(props) {
|
|
366
378
|
}]; // 告警/风险 操作 (受理)
|
367
379
|
|
368
380
|
function alarmRiskOperation(_x4, _x5) {
|
369
|
-
return
|
381
|
+
return _alarmRiskOperation.apply(this, arguments);
|
382
|
+
}
|
383
|
+
|
384
|
+
function _alarmRiskOperation() {
|
385
|
+
_alarmRiskOperation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(type, params) {
|
370
386
|
var res;
|
371
387
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
372
388
|
while (1) switch (_context4.prev = _context4.next) {
|
@@ -400,7 +416,8 @@ export default function ResourceOverview(props) {
|
|
400
416
|
return _context4.stop();
|
401
417
|
}
|
402
418
|
}, _callee4);
|
403
|
-
}))
|
419
|
+
}));
|
420
|
+
return _alarmRiskOperation.apply(this, arguments);
|
404
421
|
}
|
405
422
|
|
406
423
|
var elementData = {
|
@@ -411,7 +428,12 @@ export default function ResourceOverview(props) {
|
|
411
428
|
}; // 基本信息设置改变
|
412
429
|
|
413
430
|
function baseInfoColChange(_x6) {
|
414
|
-
return
|
431
|
+
return _baseInfoColChange.apply(this, arguments);
|
432
|
+
} // 获取属性信息
|
433
|
+
|
434
|
+
|
435
|
+
function _baseInfoColChange() {
|
436
|
+
_baseInfoColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(col) {
|
415
437
|
var _col;
|
416
438
|
|
417
439
|
var infoData, attributeMap, _loop, _iterator, _step;
|
@@ -577,12 +599,17 @@ export default function ResourceOverview(props) {
|
|
577
599
|
return _context6.stop();
|
578
600
|
}
|
579
601
|
}, _callee5);
|
580
|
-
}))
|
581
|
-
|
582
|
-
|
602
|
+
}));
|
603
|
+
return _baseInfoColChange.apply(this, arguments);
|
604
|
+
}
|
583
605
|
|
584
606
|
function getAttribute(_x7) {
|
585
|
-
return
|
607
|
+
return _getAttribute.apply(this, arguments);
|
608
|
+
} // 指标设置改变
|
609
|
+
|
610
|
+
|
611
|
+
function _getAttribute() {
|
612
|
+
_getAttribute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id) {
|
586
613
|
var _yield$resourceOvervi2, baseInfos, res, _ref4, attributes;
|
587
614
|
|
588
615
|
return _regeneratorRuntime.wrap(function _callee6$(_context7) {
|
@@ -640,12 +667,16 @@ export default function ResourceOverview(props) {
|
|
640
667
|
return _context7.stop();
|
641
668
|
}
|
642
669
|
}, _callee6);
|
643
|
-
}))
|
644
|
-
|
645
|
-
|
670
|
+
}));
|
671
|
+
return _getAttribute.apply(this, arguments);
|
672
|
+
}
|
646
673
|
|
647
674
|
function metricColChange(_x8) {
|
648
|
-
return
|
675
|
+
return _metricColChange.apply(this, arguments);
|
676
|
+
}
|
677
|
+
|
678
|
+
function _metricColChange() {
|
679
|
+
_metricColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(col) {
|
649
680
|
var _col2, _col3;
|
650
681
|
|
651
682
|
var codes, endTime, params, _ref6, times, metricList, metricLists;
|
@@ -726,7 +757,8 @@ export default function ResourceOverview(props) {
|
|
726
757
|
return _context8.stop();
|
727
758
|
}
|
728
759
|
}, _callee7);
|
729
|
-
}))
|
760
|
+
}));
|
761
|
+
return _metricColChange.apply(this, arguments);
|
730
762
|
}
|
731
763
|
|
732
764
|
var getNewMetricList = function getNewMetricList() {
|
@@ -20,7 +20,7 @@ import "./index.scss";
|
|
20
20
|
*/
|
21
21
|
|
22
22
|
function Configurator(props) {
|
23
|
-
var
|
23
|
+
var _React$createElement;
|
24
24
|
|
25
25
|
var columns = props.columns,
|
26
26
|
_props$defaultCol = props.defaultCol,
|
@@ -62,25 +62,35 @@ function Configurator(props) {
|
|
62
62
|
}, [columns, topoId, templateCode, type]);
|
63
63
|
|
64
64
|
function init() {
|
65
|
-
return
|
65
|
+
return _init.apply(this, arguments);
|
66
|
+
}
|
67
|
+
/**
|
68
|
+
* 隐藏列操作回调
|
69
|
+
* @param {string} key 列唯一标识符
|
70
|
+
* @param {boolean} status 勾选状态
|
71
|
+
*/
|
72
|
+
|
73
|
+
|
74
|
+
function _init() {
|
75
|
+
_init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
66
76
|
var _overviewConfig;
|
67
77
|
|
68
78
|
var overviewConfig, newPrevCols, newNextCols, oldCols, newCols;
|
69
|
-
return _regeneratorRuntime.wrap(function
|
70
|
-
while (1) switch (
|
79
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
80
|
+
while (1) switch (_context3.prev = _context3.next) {
|
71
81
|
case 0:
|
72
82
|
overviewConfig = {};
|
73
83
|
|
74
84
|
if (!(topoId && templateCode)) {
|
75
|
-
|
85
|
+
_context3.next = 5;
|
76
86
|
break;
|
77
87
|
}
|
78
88
|
|
79
|
-
|
89
|
+
_context3.next = 4;
|
80
90
|
return (getOverviewConfig || service.getOverviewConfig)(topoId, templateCode);
|
81
91
|
|
82
92
|
case 4:
|
83
|
-
overviewConfig =
|
93
|
+
overviewConfig = _context3.sent;
|
84
94
|
|
85
95
|
case 5:
|
86
96
|
// console.log('overviewConfig', overviewConfig);
|
@@ -140,17 +150,12 @@ function Configurator(props) {
|
|
140
150
|
|
141
151
|
case 12:
|
142
152
|
case "end":
|
143
|
-
return
|
153
|
+
return _context3.stop();
|
144
154
|
}
|
145
|
-
},
|
146
|
-
}))
|
155
|
+
}, _callee3);
|
156
|
+
}));
|
157
|
+
return _init.apply(this, arguments);
|
147
158
|
}
|
148
|
-
/**
|
149
|
-
* 隐藏列操作回调
|
150
|
-
* @param {string} key 列唯一标识符
|
151
|
-
* @param {boolean} status 勾选状态
|
152
|
-
*/
|
153
|
-
|
154
159
|
|
155
160
|
var onHiddenChange = function onHiddenChange(key, status) {
|
156
161
|
var columnsHiddenChange = function columnsHiddenChange(items) {
|
@@ -194,17 +199,21 @@ function Configurator(props) {
|
|
194
199
|
*/
|
195
200
|
|
196
201
|
|
197
|
-
var onOpen = function
|
198
|
-
|
199
|
-
return _regeneratorRuntime.wrap(function
|
200
|
-
while (1) switch (
|
202
|
+
var onOpen = /*#__PURE__*/function () {
|
203
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
204
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
205
|
+
while (1) switch (_context.prev = _context.next) {
|
201
206
|
case 0:
|
202
207
|
case "end":
|
203
|
-
return
|
208
|
+
return _context.stop();
|
204
209
|
}
|
205
|
-
},
|
206
|
-
}))
|
207
|
-
|
210
|
+
}, _callee);
|
211
|
+
}));
|
212
|
+
|
213
|
+
return function onOpen() {
|
214
|
+
return _ref.apply(this, arguments);
|
215
|
+
};
|
216
|
+
}();
|
208
217
|
/**
|
209
218
|
* 确认按钮回调
|
210
219
|
* 将配置完毕的列数据传出
|
@@ -212,31 +221,35 @@ function Configurator(props) {
|
|
212
221
|
*/
|
213
222
|
|
214
223
|
|
215
|
-
var onOk = function
|
216
|
-
|
224
|
+
var onOk = /*#__PURE__*/function () {
|
225
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
217
226
|
var _ref3;
|
218
227
|
|
219
|
-
return _regeneratorRuntime.wrap(function
|
220
|
-
while (1) switch (
|
228
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
229
|
+
while (1) switch (_context2.prev = _context2.next) {
|
221
230
|
case 0:
|
222
231
|
onChange(columnsState);
|
223
232
|
setVisible(false);
|
224
233
|
|
225
234
|
if (!(topoId && templateCode)) {
|
226
|
-
|
235
|
+
_context2.next = 5;
|
227
236
|
break;
|
228
237
|
}
|
229
238
|
|
230
|
-
|
239
|
+
_context2.next = 5;
|
231
240
|
return (saveOverviewConfig || service.saveOverviewConfig)(topoId, templateCode, (_ref3 = {}, _ref3[type] = JSON.stringify(columnsState), _ref3));
|
232
241
|
|
233
242
|
case 5:
|
234
243
|
case "end":
|
235
|
-
return
|
244
|
+
return _context2.stop();
|
236
245
|
}
|
237
|
-
},
|
238
|
-
}))
|
239
|
-
|
246
|
+
}, _callee2);
|
247
|
+
}));
|
248
|
+
|
249
|
+
return function onOk() {
|
250
|
+
return _ref2.apply(this, arguments);
|
251
|
+
};
|
252
|
+
}();
|
240
253
|
/**
|
241
254
|
* 取消按钮回调
|
242
255
|
* 将列数据以及视图恢复到初始状态
|
@@ -6,7 +6,7 @@ import Configurator from "../Configurator";
|
|
6
6
|
import LinkTopo from "./LinkTopo";
|
7
7
|
import { isOpenFlow, checkMenu } from "./services";
|
8
8
|
export default function LinkTopoCard(props) {
|
9
|
-
var _data$attributes
|
9
|
+
var _data$attributes;
|
10
10
|
|
11
11
|
var topoId = props.topoId,
|
12
12
|
data = props.data,
|
@@ -26,8 +26,8 @@ export default function LinkTopoCard(props) {
|
|
26
26
|
var analysisUrl = "../../default/trafficControl/linkConfigure?id=" + data.attributes.name + "&num=0";
|
27
27
|
var linkDetailsUrl = "/default/pagecenter/linkDetail/view/" + data.id + "?resId=" + data.id + "&domainCode=network&title=" + data.attributes.name + "&ciCode=network_link&tabByComType=uicbb-res-crucial-link-flow";
|
28
28
|
|
29
|
-
var isOpenFlows = function
|
30
|
-
|
29
|
+
var isOpenFlows = /*#__PURE__*/function () {
|
30
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
31
31
|
var checkMenus, isOpen;
|
32
32
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
33
33
|
while (1) switch (_context.prev = _context.next) {
|
@@ -75,8 +75,12 @@ export default function LinkTopoCard(props) {
|
|
75
75
|
return _context.stop();
|
76
76
|
}
|
77
77
|
}, _callee);
|
78
|
-
}))
|
79
|
-
|
78
|
+
}));
|
79
|
+
|
80
|
+
return function isOpenFlows() {
|
81
|
+
return _ref.apply(this, arguments);
|
82
|
+
};
|
83
|
+
}();
|
80
84
|
|
81
85
|
useEffect(function () {
|
82
86
|
isOpenFlows();
|
@@ -1,7 +1,4 @@
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
2
|
-
|
3
|
-
var _queryAssetModel, _queryLatestMetrics, _queryLinkLatestMetrics, _queryLinkInterfacesLatestMetrics, _checkMenu, _isOpenFlow, _queryLastestValue, _queryRetansRatioNetDelayRatio;
|
4
|
-
|
5
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
6
3
|
import { request } from '@riil-frontend/component-topology-utils';
|
7
4
|
import rlog from '@riil-frontend/component-topology-utils/es/rlog';
|
@@ -9,7 +6,11 @@ import ciTypeCache from "../../../../../../../../../models/cache/CiTypeCache";
|
|
9
6
|
import { INTERFACE_METRIC_CODES } from "../constants";
|
10
7
|
import { formatMetric } from "../../../../../../../../../utils/metricUtil";
|
11
8
|
export function queryAssetModel(_x) {
|
12
|
-
return
|
9
|
+
return _queryAssetModel.apply(this, arguments);
|
10
|
+
}
|
11
|
+
|
12
|
+
function _queryAssetModel() {
|
13
|
+
_queryAssetModel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
|
13
14
|
var result;
|
14
15
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
15
16
|
while (1) switch (_context.prev = _context.next) {
|
@@ -26,10 +27,23 @@ export function queryAssetModel(_x) {
|
|
26
27
|
return _context.stop();
|
27
28
|
}
|
28
29
|
}, _callee);
|
29
|
-
}))
|
30
|
+
}));
|
31
|
+
return _queryAssetModel.apply(this, arguments);
|
30
32
|
}
|
33
|
+
|
31
34
|
export function queryLatestMetrics(_x2) {
|
32
|
-
return
|
35
|
+
return _queryLatestMetrics.apply(this, arguments);
|
36
|
+
}
|
37
|
+
/**
|
38
|
+
* 查询链路及两端接口指标数据
|
39
|
+
*
|
40
|
+
* @param {*} linkCi
|
41
|
+
* @param {*} linkMetricCodes
|
42
|
+
* @returns
|
43
|
+
*/
|
44
|
+
|
45
|
+
function _queryLatestMetrics() {
|
46
|
+
_queryLatestMetrics = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(params) {
|
33
47
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
34
48
|
while (1) switch (_context2.prev = _context2.next) {
|
35
49
|
case 0:
|
@@ -40,18 +54,16 @@ export function queryLatestMetrics(_x2) {
|
|
40
54
|
return _context2.stop();
|
41
55
|
}
|
42
56
|
}, _callee2);
|
43
|
-
}))
|
57
|
+
}));
|
58
|
+
return _queryLatestMetrics.apply(this, arguments);
|
44
59
|
}
|
45
|
-
/**
|
46
|
-
* 查询链路及两端接口指标数据
|
47
|
-
*
|
48
|
-
* @param {*} linkCi
|
49
|
-
* @param {*} linkMetricCodes
|
50
|
-
* @returns
|
51
|
-
*/
|
52
60
|
|
53
61
|
export function queryLinkLatestMetrics(_x3, _x4) {
|
54
|
-
return
|
62
|
+
return _queryLinkLatestMetrics.apply(this, arguments);
|
63
|
+
}
|
64
|
+
|
65
|
+
function _queryLinkLatestMetrics() {
|
66
|
+
_queryLinkLatestMetrics = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(linkCi, linkMetricCodes) {
|
55
67
|
var _linkMetrics$;
|
56
68
|
|
57
69
|
var linkMetrics, resultData;
|
@@ -107,10 +119,20 @@ export function queryLinkLatestMetrics(_x3, _x4) {
|
|
107
119
|
return _context3.stop();
|
108
120
|
}
|
109
121
|
}, _callee3);
|
110
|
-
}))
|
122
|
+
}));
|
123
|
+
return _queryLinkLatestMetrics.apply(this, arguments);
|
111
124
|
}
|
125
|
+
|
112
126
|
export function queryLinkInterfacesLatestMetrics(_x5) {
|
113
|
-
return
|
127
|
+
return _queryLinkInterfacesLatestMetrics.apply(this, arguments);
|
128
|
+
}
|
129
|
+
/**
|
130
|
+
* @name checkMenu 判断当前流量监控权限
|
131
|
+
* @returns
|
132
|
+
*/
|
133
|
+
|
134
|
+
function _queryLinkInterfacesLatestMetrics() {
|
135
|
+
_queryLinkInterfacesLatestMetrics = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(linkCi) {
|
114
136
|
var _linkCi$attributes, sourceType, sourceId, destinationId, destinationType, typeCodes, queryInterfaceMetricsParam, interfaceMetrics, resultData, findMetricsBySubCiId, parseInterfaceMetrics;
|
115
137
|
|
116
138
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
@@ -179,15 +201,20 @@ export function queryLinkInterfacesLatestMetrics(_x5) {
|
|
179
201
|
return _context4.stop();
|
180
202
|
}
|
181
203
|
}, _callee4);
|
182
|
-
}))
|
204
|
+
}));
|
205
|
+
return _queryLinkInterfacesLatestMetrics.apply(this, arguments);
|
206
|
+
}
|
207
|
+
|
208
|
+
export function checkMenu() {
|
209
|
+
return _checkMenu.apply(this, arguments);
|
183
210
|
}
|
184
211
|
/**
|
185
|
-
* @name
|
212
|
+
* @name isOpenFlow 是否配置流量分析
|
186
213
|
* @returns
|
187
214
|
*/
|
188
215
|
|
189
|
-
|
190
|
-
|
216
|
+
function _checkMenu() {
|
217
|
+
_checkMenu = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
191
218
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
192
219
|
while (1) switch (_context5.prev = _context5.next) {
|
193
220
|
case 0:
|
@@ -200,15 +227,20 @@ export function checkMenu() {
|
|
200
227
|
return _context5.stop();
|
201
228
|
}
|
202
229
|
}, _callee5);
|
203
|
-
}))
|
230
|
+
}));
|
231
|
+
return _checkMenu.apply(this, arguments);
|
232
|
+
}
|
233
|
+
|
234
|
+
export function isOpenFlow(_x6) {
|
235
|
+
return _isOpenFlow.apply(this, arguments);
|
204
236
|
}
|
205
237
|
/**
|
206
|
-
* @name
|
238
|
+
* @name queryLastestValue 查指标值
|
207
239
|
* @returns
|
208
240
|
*/
|
209
241
|
|
210
|
-
|
211
|
-
|
242
|
+
function _isOpenFlow() {
|
243
|
+
_isOpenFlow = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(params) {
|
212
244
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
213
245
|
while (1) switch (_context6.prev = _context6.next) {
|
214
246
|
case 0:
|
@@ -219,15 +251,16 @@ export function isOpenFlow(_x6) {
|
|
219
251
|
return _context6.stop();
|
220
252
|
}
|
221
253
|
}, _callee6);
|
222
|
-
}))
|
254
|
+
}));
|
255
|
+
return _isOpenFlow.apply(this, arguments);
|
223
256
|
}
|
224
|
-
/**
|
225
|
-
* @name queryLastestValue 查指标值
|
226
|
-
* @returns
|
227
|
-
*/
|
228
257
|
|
229
258
|
export function queryLastestValue(_x7) {
|
230
|
-
return
|
259
|
+
return _queryLastestValue.apply(this, arguments);
|
260
|
+
}
|
261
|
+
|
262
|
+
function _queryLastestValue() {
|
263
|
+
_queryLastestValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(params) {
|
231
264
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
232
265
|
while (1) switch (_context7.prev = _context7.next) {
|
233
266
|
case 0:
|
@@ -238,10 +271,16 @@ export function queryLastestValue(_x7) {
|
|
238
271
|
return _context7.stop();
|
239
272
|
}
|
240
273
|
}, _callee7);
|
241
|
-
}))
|
274
|
+
}));
|
275
|
+
return _queryLastestValue.apply(this, arguments);
|
242
276
|
}
|
277
|
+
|
243
278
|
export function queryRetansRatioNetDelayRatio(_x8, _x9) {
|
244
|
-
return
|
279
|
+
return _queryRetansRatioNetDelayRatio.apply(this, arguments);
|
280
|
+
}
|
281
|
+
|
282
|
+
function _queryRetansRatioNetDelayRatio() {
|
283
|
+
_queryRetansRatioNetDelayRatio = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(params, retansRatioNetDelayRatioCodes) {
|
245
284
|
var result, linkOther;
|
246
285
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
247
286
|
while (1) switch (_context8.prev = _context8.next) {
|
@@ -286,5 +325,6 @@ export function queryRetansRatioNetDelayRatio(_x8, _x9) {
|
|
286
325
|
return _context8.stop();
|
287
326
|
}
|
288
327
|
}, _callee8);
|
289
|
-
}))
|
328
|
+
}));
|
329
|
+
return _queryRetansRatioNetDelayRatio.apply(this, arguments);
|
290
330
|
}
|
@@ -10,8 +10,6 @@ import service from "../../../../../../../services/overview";
|
|
10
10
|
*/
|
11
11
|
|
12
12
|
var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
|
13
|
-
var _getAlarmRiskData;
|
14
|
-
|
15
13
|
var id = props.id,
|
16
14
|
isAppTopo = props.isAppTopo,
|
17
15
|
resourceOverviewProps = props.resourceOverviewProps,
|
@@ -24,7 +22,12 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
|
|
24
22
|
|
25
23
|
|
26
24
|
function getAlarmRiskData(_x) {
|
27
|
-
return
|
25
|
+
return _getAlarmRiskData.apply(this, arguments);
|
26
|
+
} // 轮询hooks
|
27
|
+
|
28
|
+
|
29
|
+
function _getAlarmRiskData() {
|
30
|
+
_getAlarmRiskData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(id) {
|
28
31
|
var _alarmList, _yield$resourceOvervi2, alarmList, _yield$alarmService$g2, _alarmList2, AllComponentsByCiId, _yield$service$getRis2, riskList;
|
29
32
|
|
30
33
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
@@ -137,9 +140,9 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
|
|
137
140
|
return _context.stop();
|
138
141
|
}
|
139
142
|
}, _callee);
|
140
|
-
}))
|
141
|
-
|
142
|
-
|
143
|
+
}));
|
144
|
+
return _getAlarmRiskData.apply(this, arguments);
|
145
|
+
}
|
143
146
|
|
144
147
|
var request = useRequest(getAlarmRiskData, {
|
145
148
|
pollingInterval: 1000 * 15,
|
@@ -9,8 +9,6 @@ import { queryCiMonitorMetricCodes } from "../../../getCiDisplayMetricModels";
|
|
9
9
|
*/
|
10
10
|
|
11
11
|
var useMetricModels = function useMetricModels(props) {
|
12
|
-
var _fetchData;
|
13
|
-
|
14
12
|
var _props$data = props.data,
|
15
13
|
type = _props$data.type,
|
16
14
|
id = _props$data.id,
|
@@ -30,7 +28,12 @@ var useMetricModels = function useMetricModels(props) {
|
|
30
28
|
setInitLoading = _useState2[1];
|
31
29
|
|
32
30
|
function fetchData() {
|
33
|
-
return
|
31
|
+
return _fetchData.apply(this, arguments);
|
32
|
+
} // 轮询hooks
|
33
|
+
|
34
|
+
|
35
|
+
function _fetchData() {
|
36
|
+
_fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
34
37
|
var monitorMetrics, ciMonitorMetricModels, displayMetricModels, _metricCodes;
|
35
38
|
|
36
39
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
@@ -105,9 +108,9 @@ var useMetricModels = function useMetricModels(props) {
|
|
105
108
|
return _context.stop();
|
106
109
|
}
|
107
110
|
}, _callee);
|
108
|
-
}))
|
109
|
-
|
110
|
-
|
111
|
+
}));
|
112
|
+
return _fetchData.apply(this, arguments);
|
113
|
+
}
|
111
114
|
|
112
115
|
var request = useRequest(fetchData, {
|
113
116
|
pollingInterval: 1000 * 60,
|