@riil-frontend/component-topology 11.0.35 → 12.0.0-dev.1
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 +171 -0
- 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/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 +5 -0
- 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/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 +182 -0
- 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/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 +5 -0
- 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/htElementDataUtil.js +4 -2
- package/package.json +3 -2
@@ -82,7 +82,7 @@ function formatUrl(url) {
|
|
82
82
|
|
83
83
|
|
84
84
|
function ResourceOverview(props) {
|
85
|
-
var _data$attributes
|
85
|
+
var _data$attributes;
|
86
86
|
|
87
87
|
var topo = props.topo,
|
88
88
|
id = props.id,
|
@@ -193,8 +193,8 @@ function ResourceOverview(props) {
|
|
193
193
|
isAppTopo && resourceOverviewProps.onClose && resourceOverviewProps.onClose();
|
194
194
|
}
|
195
195
|
|
196
|
-
var jump = function
|
197
|
-
|
196
|
+
var jump = /*#__PURE__*/function () {
|
197
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(roomLink, id) {
|
198
198
|
var power;
|
199
199
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
200
200
|
while (1) switch (_context.prev = _context.next) {
|
@@ -218,8 +218,12 @@ function ResourceOverview(props) {
|
|
218
218
|
return _context.stop();
|
219
219
|
}
|
220
220
|
}, _callee);
|
221
|
-
}))
|
222
|
-
|
221
|
+
}));
|
222
|
+
|
223
|
+
return function jump(_x, _x2) {
|
224
|
+
return _ref.apply(this, arguments);
|
225
|
+
};
|
226
|
+
}(); // 基本信息可选项
|
223
227
|
|
224
228
|
|
225
229
|
var baseInfoCol = (0, _react.useMemo)(function () {
|
@@ -273,11 +277,13 @@ function ResourceOverview(props) {
|
|
273
277
|
})) || [];
|
274
278
|
}, [id, monitorMetricModels, initFlag]);
|
275
279
|
(0, _react.useEffect)(function () {
|
276
|
-
var _getDevice;
|
277
|
-
|
278
280
|
// 获取上架设备类型,判断资源是否是上架设备
|
279
281
|
function getDevice() {
|
280
|
-
return
|
282
|
+
return _getDevice.apply(this, arguments);
|
283
|
+
}
|
284
|
+
|
285
|
+
function _getDevice() {
|
286
|
+
_getDevice = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
281
287
|
var list;
|
282
288
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
283
289
|
while (1) switch (_context2.prev = _context2.next) {
|
@@ -296,14 +302,20 @@ function ResourceOverview(props) {
|
|
296
302
|
return _context2.stop();
|
297
303
|
}
|
298
304
|
}, _callee2);
|
299
|
-
}))
|
305
|
+
}));
|
306
|
+
return _getDevice.apply(this, arguments);
|
300
307
|
}
|
301
308
|
|
302
309
|
getDevice();
|
303
310
|
}, [ciType]); // 获取地址信息:机房 机柜 起始U-结束U
|
304
311
|
|
305
312
|
function getAddressFormat(_x3) {
|
306
|
-
return
|
313
|
+
return _getAddressFormat.apply(this, arguments);
|
314
|
+
} // 告警table列配置
|
315
|
+
|
316
|
+
|
317
|
+
function _getAddressFormat() {
|
318
|
+
_getAddressFormat = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(_ref2) {
|
307
319
|
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;
|
308
320
|
|
309
321
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
@@ -342,9 +354,9 @@ function ResourceOverview(props) {
|
|
342
354
|
return _context3.stop();
|
343
355
|
}
|
344
356
|
}, _callee3);
|
345
|
-
}))
|
346
|
-
|
347
|
-
|
357
|
+
}));
|
358
|
+
return _getAddressFormat.apply(this, arguments);
|
359
|
+
}
|
348
360
|
|
349
361
|
var columns = [{
|
350
362
|
title: '描述',
|
@@ -400,7 +412,11 @@ function ResourceOverview(props) {
|
|
400
412
|
}]; // 告警/风险 操作 (受理)
|
401
413
|
|
402
414
|
function alarmRiskOperation(_x4, _x5) {
|
403
|
-
return
|
415
|
+
return _alarmRiskOperation.apply(this, arguments);
|
416
|
+
}
|
417
|
+
|
418
|
+
function _alarmRiskOperation() {
|
419
|
+
_alarmRiskOperation = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(type, params) {
|
404
420
|
var res;
|
405
421
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
406
422
|
while (1) switch (_context4.prev = _context4.next) {
|
@@ -434,7 +450,8 @@ function ResourceOverview(props) {
|
|
434
450
|
return _context4.stop();
|
435
451
|
}
|
436
452
|
}, _callee4);
|
437
|
-
}))
|
453
|
+
}));
|
454
|
+
return _alarmRiskOperation.apply(this, arguments);
|
438
455
|
}
|
439
456
|
|
440
457
|
var elementData = {
|
@@ -445,7 +462,12 @@ function ResourceOverview(props) {
|
|
445
462
|
}; // 基本信息设置改变
|
446
463
|
|
447
464
|
function baseInfoColChange(_x6) {
|
448
|
-
return
|
465
|
+
return _baseInfoColChange.apply(this, arguments);
|
466
|
+
} // 获取属性信息
|
467
|
+
|
468
|
+
|
469
|
+
function _baseInfoColChange() {
|
470
|
+
_baseInfoColChange = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(col) {
|
449
471
|
var _col;
|
450
472
|
|
451
473
|
var infoData, attributeMap, _loop, _iterator, _step;
|
@@ -611,12 +633,17 @@ function ResourceOverview(props) {
|
|
611
633
|
return _context6.stop();
|
612
634
|
}
|
613
635
|
}, _callee5);
|
614
|
-
}))
|
615
|
-
|
616
|
-
|
636
|
+
}));
|
637
|
+
return _baseInfoColChange.apply(this, arguments);
|
638
|
+
}
|
617
639
|
|
618
640
|
function getAttribute(_x7) {
|
619
|
-
return
|
641
|
+
return _getAttribute.apply(this, arguments);
|
642
|
+
} // 指标设置改变
|
643
|
+
|
644
|
+
|
645
|
+
function _getAttribute() {
|
646
|
+
_getAttribute = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(id) {
|
620
647
|
var _yield$resourceOvervi2, baseInfos, res, _ref4, attributes;
|
621
648
|
|
622
649
|
return _regenerator["default"].wrap(function _callee6$(_context7) {
|
@@ -674,12 +701,16 @@ function ResourceOverview(props) {
|
|
674
701
|
return _context7.stop();
|
675
702
|
}
|
676
703
|
}, _callee6);
|
677
|
-
}))
|
678
|
-
|
679
|
-
|
704
|
+
}));
|
705
|
+
return _getAttribute.apply(this, arguments);
|
706
|
+
}
|
680
707
|
|
681
708
|
function metricColChange(_x8) {
|
682
|
-
return
|
709
|
+
return _metricColChange.apply(this, arguments);
|
710
|
+
}
|
711
|
+
|
712
|
+
function _metricColChange() {
|
713
|
+
_metricColChange = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(col) {
|
683
714
|
var _col2, _col3;
|
684
715
|
|
685
716
|
var codes, endTime, params, _ref6, times, metricList, metricLists;
|
@@ -762,7 +793,8 @@ function ResourceOverview(props) {
|
|
762
793
|
return _context8.stop();
|
763
794
|
}
|
764
795
|
}, _callee7);
|
765
|
-
}))
|
796
|
+
}));
|
797
|
+
return _metricColChange.apply(this, arguments);
|
766
798
|
}
|
767
799
|
|
768
800
|
var getNewMetricList = function getNewMetricList() {
|
@@ -5,6 +5,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
5
5
|
exports.__esModule = true;
|
6
6
|
exports["default"] = void 0;
|
7
7
|
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
9
|
+
|
8
10
|
var _overlay = _interopRequireDefault(require("@alifd/next/lib/overlay"));
|
9
11
|
|
10
12
|
var _checkbox = _interopRequireDefault(require("@alifd/next/lib/checkbox"));
|
@@ -15,8 +17,6 @@ var _icon = _interopRequireDefault(require("@alifd/next/lib/icon"));
|
|
15
17
|
|
16
18
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
17
19
|
|
18
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
19
|
-
|
20
20
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
21
21
|
|
22
22
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
@@ -45,7 +45,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
45
45
|
* @param {(columns:array)=>{}} props.onChange - 点击ok后的回调函数
|
46
46
|
*/
|
47
47
|
function Configurator(props) {
|
48
|
-
var
|
48
|
+
var _React$createElement;
|
49
49
|
|
50
50
|
var columns = props.columns,
|
51
51
|
_props$defaultCol = props.defaultCol,
|
@@ -87,25 +87,35 @@ function Configurator(props) {
|
|
87
87
|
}, [columns, topoId, templateCode, type]);
|
88
88
|
|
89
89
|
function init() {
|
90
|
-
return
|
90
|
+
return _init.apply(this, arguments);
|
91
|
+
}
|
92
|
+
/**
|
93
|
+
* 隐藏列操作回调
|
94
|
+
* @param {string} key 列唯一标识符
|
95
|
+
* @param {boolean} status 勾选状态
|
96
|
+
*/
|
97
|
+
|
98
|
+
|
99
|
+
function _init() {
|
100
|
+
_init = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
91
101
|
var _overviewConfig;
|
92
102
|
|
93
103
|
var overviewConfig, newPrevCols, newNextCols, oldCols, newCols;
|
94
|
-
return _regenerator["default"].wrap(function
|
95
|
-
while (1) switch (
|
104
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
105
|
+
while (1) switch (_context3.prev = _context3.next) {
|
96
106
|
case 0:
|
97
107
|
overviewConfig = {};
|
98
108
|
|
99
109
|
if (!(topoId && templateCode)) {
|
100
|
-
|
110
|
+
_context3.next = 5;
|
101
111
|
break;
|
102
112
|
}
|
103
113
|
|
104
|
-
|
114
|
+
_context3.next = 4;
|
105
115
|
return (getOverviewConfig || _overview["default"].getOverviewConfig)(topoId, templateCode);
|
106
116
|
|
107
117
|
case 4:
|
108
|
-
overviewConfig =
|
118
|
+
overviewConfig = _context3.sent;
|
109
119
|
|
110
120
|
case 5:
|
111
121
|
// console.log('overviewConfig', overviewConfig);
|
@@ -165,17 +175,12 @@ function Configurator(props) {
|
|
165
175
|
|
166
176
|
case 12:
|
167
177
|
case "end":
|
168
|
-
return
|
178
|
+
return _context3.stop();
|
169
179
|
}
|
170
|
-
},
|
171
|
-
}))
|
180
|
+
}, _callee3);
|
181
|
+
}));
|
182
|
+
return _init.apply(this, arguments);
|
172
183
|
}
|
173
|
-
/**
|
174
|
-
* 隐藏列操作回调
|
175
|
-
* @param {string} key 列唯一标识符
|
176
|
-
* @param {boolean} status 勾选状态
|
177
|
-
*/
|
178
|
-
|
179
184
|
|
180
185
|
var onHiddenChange = function onHiddenChange(key, status) {
|
181
186
|
var columnsHiddenChange = function columnsHiddenChange(items) {
|
@@ -218,17 +223,21 @@ function Configurator(props) {
|
|
218
223
|
*/
|
219
224
|
|
220
225
|
|
221
|
-
var onOpen = function
|
222
|
-
|
223
|
-
return _regenerator["default"].wrap(function
|
224
|
-
while (1) switch (
|
226
|
+
var onOpen = /*#__PURE__*/function () {
|
227
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
228
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
229
|
+
while (1) switch (_context.prev = _context.next) {
|
225
230
|
case 0:
|
226
231
|
case "end":
|
227
|
-
return
|
232
|
+
return _context.stop();
|
228
233
|
}
|
229
|
-
},
|
230
|
-
}))
|
231
|
-
|
234
|
+
}, _callee);
|
235
|
+
}));
|
236
|
+
|
237
|
+
return function onOpen() {
|
238
|
+
return _ref.apply(this, arguments);
|
239
|
+
};
|
240
|
+
}();
|
232
241
|
/**
|
233
242
|
* 确认按钮回调
|
234
243
|
* 将配置完毕的列数据传出
|
@@ -236,31 +245,35 @@ function Configurator(props) {
|
|
236
245
|
*/
|
237
246
|
|
238
247
|
|
239
|
-
var onOk = function
|
240
|
-
|
248
|
+
var onOk = /*#__PURE__*/function () {
|
249
|
+
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
241
250
|
var _ref3;
|
242
251
|
|
243
|
-
return _regenerator["default"].wrap(function
|
244
|
-
while (1) switch (
|
252
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
253
|
+
while (1) switch (_context2.prev = _context2.next) {
|
245
254
|
case 0:
|
246
255
|
onChange(columnsState);
|
247
256
|
setVisible(false);
|
248
257
|
|
249
258
|
if (!(topoId && templateCode)) {
|
250
|
-
|
259
|
+
_context2.next = 5;
|
251
260
|
break;
|
252
261
|
}
|
253
262
|
|
254
|
-
|
263
|
+
_context2.next = 5;
|
255
264
|
return (saveOverviewConfig || _overview["default"].saveOverviewConfig)(topoId, templateCode, (_ref3 = {}, _ref3[type] = JSON.stringify(columnsState), _ref3));
|
256
265
|
|
257
266
|
case 5:
|
258
267
|
case "end":
|
259
|
-
return
|
268
|
+
return _context2.stop();
|
260
269
|
}
|
261
|
-
},
|
262
|
-
}))
|
263
|
-
|
270
|
+
}, _callee2);
|
271
|
+
}));
|
272
|
+
|
273
|
+
return function onOk() {
|
274
|
+
return _ref2.apply(this, arguments);
|
275
|
+
};
|
276
|
+
}();
|
264
277
|
/**
|
265
278
|
* 取消按钮回调
|
266
279
|
* 将列数据以及视图恢复到初始状态
|
@@ -24,7 +24,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
25
25
|
|
26
26
|
function LinkTopoCard(props) {
|
27
|
-
var _data$attributes
|
27
|
+
var _data$attributes;
|
28
28
|
|
29
29
|
var topoId = props.topoId,
|
30
30
|
data = props.data,
|
@@ -44,8 +44,8 @@ function LinkTopoCard(props) {
|
|
44
44
|
var analysisUrl = "../../default/trafficControl/linkConfigure?id=" + data.attributes.name + "&num=0";
|
45
45
|
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";
|
46
46
|
|
47
|
-
var isOpenFlows = function
|
48
|
-
|
47
|
+
var isOpenFlows = /*#__PURE__*/function () {
|
48
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
49
49
|
var checkMenus, isOpen;
|
50
50
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
51
51
|
while (1) switch (_context.prev = _context.next) {
|
@@ -93,8 +93,12 @@ function LinkTopoCard(props) {
|
|
93
93
|
return _context.stop();
|
94
94
|
}
|
95
95
|
}, _callee);
|
96
|
-
}))
|
97
|
-
|
96
|
+
}));
|
97
|
+
|
98
|
+
return function isOpenFlows() {
|
99
|
+
return _ref.apply(this, arguments);
|
100
|
+
};
|
101
|
+
}();
|
98
102
|
|
99
103
|
(0, _react.useEffect)(function () {
|
100
104
|
isOpenFlows();
|
@@ -26,10 +26,12 @@ var _constants = require("../constants");
|
|
26
26
|
|
27
27
|
var _metricUtil = require("../../../../../../../../../utils/metricUtil");
|
28
28
|
|
29
|
-
var _queryAssetModel, _queryLatestMetrics, _queryLinkLatestMetrics, _queryLinkInterfacesLatestMetrics, _checkMenu, _isOpenFlow, _queryLastestValue, _queryRetansRatioNetDelayRatio;
|
30
|
-
|
31
29
|
function queryAssetModel(_x) {
|
32
|
-
return
|
30
|
+
return _queryAssetModel.apply(this, arguments);
|
31
|
+
}
|
32
|
+
|
33
|
+
function _queryAssetModel() {
|
34
|
+
_queryAssetModel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(code) {
|
33
35
|
var result;
|
34
36
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
35
37
|
while (1) switch (_context.prev = _context.next) {
|
@@ -46,11 +48,24 @@ function queryAssetModel(_x) {
|
|
46
48
|
return _context.stop();
|
47
49
|
}
|
48
50
|
}, _callee);
|
49
|
-
}))
|
51
|
+
}));
|
52
|
+
return _queryAssetModel.apply(this, arguments);
|
50
53
|
}
|
51
54
|
|
52
55
|
function queryLatestMetrics(_x2) {
|
53
|
-
return
|
56
|
+
return _queryLatestMetrics.apply(this, arguments);
|
57
|
+
}
|
58
|
+
/**
|
59
|
+
* 查询链路及两端接口指标数据
|
60
|
+
*
|
61
|
+
* @param {*} linkCi
|
62
|
+
* @param {*} linkMetricCodes
|
63
|
+
* @returns
|
64
|
+
*/
|
65
|
+
|
66
|
+
|
67
|
+
function _queryLatestMetrics() {
|
68
|
+
_queryLatestMetrics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(params) {
|
54
69
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
55
70
|
while (1) switch (_context2.prev = _context2.next) {
|
56
71
|
case 0:
|
@@ -61,19 +76,16 @@ function queryLatestMetrics(_x2) {
|
|
61
76
|
return _context2.stop();
|
62
77
|
}
|
63
78
|
}, _callee2);
|
64
|
-
}))
|
79
|
+
}));
|
80
|
+
return _queryLatestMetrics.apply(this, arguments);
|
65
81
|
}
|
66
|
-
/**
|
67
|
-
* 查询链路及两端接口指标数据
|
68
|
-
*
|
69
|
-
* @param {*} linkCi
|
70
|
-
* @param {*} linkMetricCodes
|
71
|
-
* @returns
|
72
|
-
*/
|
73
|
-
|
74
82
|
|
75
83
|
function queryLinkLatestMetrics(_x3, _x4) {
|
76
|
-
return
|
84
|
+
return _queryLinkLatestMetrics.apply(this, arguments);
|
85
|
+
}
|
86
|
+
|
87
|
+
function _queryLinkLatestMetrics() {
|
88
|
+
_queryLinkLatestMetrics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(linkCi, linkMetricCodes) {
|
77
89
|
var _linkMetrics$;
|
78
90
|
|
79
91
|
var linkMetrics, resultData;
|
@@ -131,11 +143,21 @@ function queryLinkLatestMetrics(_x3, _x4) {
|
|
131
143
|
return _context3.stop();
|
132
144
|
}
|
133
145
|
}, _callee3);
|
134
|
-
}))
|
146
|
+
}));
|
147
|
+
return _queryLinkLatestMetrics.apply(this, arguments);
|
135
148
|
}
|
136
149
|
|
137
150
|
function queryLinkInterfacesLatestMetrics(_x5) {
|
138
|
-
return
|
151
|
+
return _queryLinkInterfacesLatestMetrics.apply(this, arguments);
|
152
|
+
}
|
153
|
+
/**
|
154
|
+
* @name checkMenu 判断当前流量监控权限
|
155
|
+
* @returns
|
156
|
+
*/
|
157
|
+
|
158
|
+
|
159
|
+
function _queryLinkInterfacesLatestMetrics() {
|
160
|
+
_queryLinkInterfacesLatestMetrics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(linkCi) {
|
139
161
|
var _linkCi$attributes, sourceType, sourceId, destinationId, destinationType, typeCodes, queryInterfaceMetricsParam, interfaceMetrics, resultData, findMetricsBySubCiId, parseInterfaceMetrics;
|
140
162
|
|
141
163
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
@@ -210,16 +232,21 @@ function queryLinkInterfacesLatestMetrics(_x5) {
|
|
210
232
|
return _context4.stop();
|
211
233
|
}
|
212
234
|
}, _callee4);
|
213
|
-
}))
|
235
|
+
}));
|
236
|
+
return _queryLinkInterfacesLatestMetrics.apply(this, arguments);
|
237
|
+
}
|
238
|
+
|
239
|
+
function checkMenu() {
|
240
|
+
return _checkMenu.apply(this, arguments);
|
214
241
|
}
|
215
242
|
/**
|
216
|
-
* @name
|
243
|
+
* @name isOpenFlow 是否配置流量分析
|
217
244
|
* @returns
|
218
245
|
*/
|
219
246
|
|
220
247
|
|
221
|
-
function
|
222
|
-
|
248
|
+
function _checkMenu() {
|
249
|
+
_checkMenu = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
223
250
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
224
251
|
while (1) switch (_context5.prev = _context5.next) {
|
225
252
|
case 0:
|
@@ -232,16 +259,21 @@ function checkMenu() {
|
|
232
259
|
return _context5.stop();
|
233
260
|
}
|
234
261
|
}, _callee5);
|
235
|
-
}))
|
262
|
+
}));
|
263
|
+
return _checkMenu.apply(this, arguments);
|
264
|
+
}
|
265
|
+
|
266
|
+
function isOpenFlow(_x6) {
|
267
|
+
return _isOpenFlow.apply(this, arguments);
|
236
268
|
}
|
237
269
|
/**
|
238
|
-
* @name
|
270
|
+
* @name queryLastestValue 查指标值
|
239
271
|
* @returns
|
240
272
|
*/
|
241
273
|
|
242
274
|
|
243
|
-
function
|
244
|
-
|
275
|
+
function _isOpenFlow() {
|
276
|
+
_isOpenFlow = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(params) {
|
245
277
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
246
278
|
while (1) switch (_context6.prev = _context6.next) {
|
247
279
|
case 0:
|
@@ -252,16 +284,16 @@ function isOpenFlow(_x6) {
|
|
252
284
|
return _context6.stop();
|
253
285
|
}
|
254
286
|
}, _callee6);
|
255
|
-
}))
|
287
|
+
}));
|
288
|
+
return _isOpenFlow.apply(this, arguments);
|
256
289
|
}
|
257
|
-
/**
|
258
|
-
* @name queryLastestValue 查指标值
|
259
|
-
* @returns
|
260
|
-
*/
|
261
|
-
|
262
290
|
|
263
291
|
function queryLastestValue(_x7) {
|
264
|
-
return
|
292
|
+
return _queryLastestValue.apply(this, arguments);
|
293
|
+
}
|
294
|
+
|
295
|
+
function _queryLastestValue() {
|
296
|
+
_queryLastestValue = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(params) {
|
265
297
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
266
298
|
while (1) switch (_context7.prev = _context7.next) {
|
267
299
|
case 0:
|
@@ -272,11 +304,16 @@ function queryLastestValue(_x7) {
|
|
272
304
|
return _context7.stop();
|
273
305
|
}
|
274
306
|
}, _callee7);
|
275
|
-
}))
|
307
|
+
}));
|
308
|
+
return _queryLastestValue.apply(this, arguments);
|
276
309
|
}
|
277
310
|
|
278
311
|
function queryRetansRatioNetDelayRatio(_x8, _x9) {
|
279
|
-
return
|
312
|
+
return _queryRetansRatioNetDelayRatio.apply(this, arguments);
|
313
|
+
}
|
314
|
+
|
315
|
+
function _queryRetansRatioNetDelayRatio() {
|
316
|
+
_queryRetansRatioNetDelayRatio = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(params, retansRatioNetDelayRatioCodes) {
|
280
317
|
var result, linkOther;
|
281
318
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
282
319
|
while (1) switch (_context8.prev = _context8.next) {
|
@@ -321,5 +358,6 @@ function queryRetansRatioNetDelayRatio(_x8, _x9) {
|
|
321
358
|
return _context8.stop();
|
322
359
|
}
|
323
360
|
}, _callee8);
|
324
|
-
}))
|
361
|
+
}));
|
362
|
+
return _queryRetansRatioNetDelayRatio.apply(this, arguments);
|
325
363
|
}
|
@@ -22,8 +22,6 @@ var _overview = _interopRequireDefault(require("../../../../../../../services/ov
|
|
22
22
|
* @param {*} props
|
23
23
|
*/
|
24
24
|
var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
|
25
|
-
var _getAlarmRiskData;
|
26
|
-
|
27
25
|
var id = props.id,
|
28
26
|
isAppTopo = props.isAppTopo,
|
29
27
|
resourceOverviewProps = props.resourceOverviewProps,
|
@@ -36,7 +34,12 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
|
|
36
34
|
|
37
35
|
|
38
36
|
function getAlarmRiskData(_x) {
|
39
|
-
return
|
37
|
+
return _getAlarmRiskData.apply(this, arguments);
|
38
|
+
} // 轮询hooks
|
39
|
+
|
40
|
+
|
41
|
+
function _getAlarmRiskData() {
|
42
|
+
_getAlarmRiskData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(id) {
|
40
43
|
var _alarmList, _yield$resourceOvervi2, alarmList, _yield$alarmService$g2, _alarmList2, AllComponentsByCiId, _yield$service$getRis2, riskList;
|
41
44
|
|
42
45
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
@@ -149,9 +152,9 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
|
|
149
152
|
return _context.stop();
|
150
153
|
}
|
151
154
|
}, _callee);
|
152
|
-
}))
|
153
|
-
|
154
|
-
|
155
|
+
}));
|
156
|
+
return _getAlarmRiskData.apply(this, arguments);
|
157
|
+
}
|
155
158
|
|
156
159
|
var request = (0, _ahooks.useRequest)(getAlarmRiskData, {
|
157
160
|
pollingInterval: 1000 * 15,
|
@@ -20,8 +20,6 @@ var _getCiDisplayMetricModels = require("../../../getCiDisplayMetricModels");
|
|
20
20
|
* @param {*} props
|
21
21
|
*/
|
22
22
|
var useMetricModels = function useMetricModels(props) {
|
23
|
-
var _fetchData;
|
24
|
-
|
25
23
|
var _props$data = props.data,
|
26
24
|
type = _props$data.type,
|
27
25
|
id = _props$data.id,
|
@@ -41,7 +39,12 @@ var useMetricModels = function useMetricModels(props) {
|
|
41
39
|
setInitLoading = _useState2[1];
|
42
40
|
|
43
41
|
function fetchData() {
|
44
|
-
return
|
42
|
+
return _fetchData.apply(this, arguments);
|
43
|
+
} // 轮询hooks
|
44
|
+
|
45
|
+
|
46
|
+
function _fetchData() {
|
47
|
+
_fetchData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
45
48
|
var monitorMetrics, ciMonitorMetricModels, displayMetricModels, _metricCodes;
|
46
49
|
|
47
50
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
@@ -116,9 +119,9 @@ var useMetricModels = function useMetricModels(props) {
|
|
116
119
|
return _context.stop();
|
117
120
|
}
|
118
121
|
}, _callee);
|
119
|
-
}))
|
120
|
-
|
121
|
-
|
122
|
+
}));
|
123
|
+
return _fetchData.apply(this, arguments);
|
124
|
+
}
|
122
125
|
|
123
126
|
var request = (0, _ahooks.useRequest)(fetchData, {
|
124
127
|
pollingInterval: 1000 * 60,
|