@riil-frontend/component-topology 11.0.34 → 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.css +4 -2
- package/build/index.js +57 -34
- package/es/components/BatchAttrMetric/setting.js +1 -1
- package/es/components/MultiResourceDrawer/index.js +16 -18
- package/es/components/ResourceList/ResourceSelect.js +48 -50
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +24 -26
- package/es/components/SingleResourceDrawer/SelectDrawer.js +18 -20
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +23 -25
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +78 -84
- package/es/core/components/titlebar/widgets/TitleWidget.js +5 -3
- package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -18
- package/es/core/editor/components/BackgroundView/index.js +119 -129
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +20 -22
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -34
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +15 -17
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +7 -9
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +37 -41
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +50 -54
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +50 -54
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +11 -13
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +21 -23
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +15 -17
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +10 -12
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +21 -27
- package/es/core/editor/hooks/useKeyboardShortcut.js +36 -32
- package/es/core/editor/hooks/useNewElementTheme.js +2 -2
- package/es/core/editor/store/background.js +8 -10
- package/es/core/editor/store/topoEdit.js +4 -6
- package/es/core/editor/utils/copyElementUtil.js +171 -0
- package/es/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/es/core/hooks/usePolling.js +117 -121
- package/es/core/hooks/useResourceConfig.js +58 -66
- package/es/core/hooks/useTopoEdit.js +473 -503
- package/es/core/models/Alarm.js +281 -298
- package/es/core/models/AttributeMetricDisplay.js +101 -107
- package/es/core/models/PluginManager.js +4 -3
- package/es/core/models/SelectionModel.js +4 -5
- package/es/core/models/TopoApp.js +205 -240
- package/es/core/models/TopoGraphView.js +18 -21
- package/es/core/models/cache/CiCache.js +28 -27
- package/es/core/models/cache/CiTypeCache.js +37 -41
- package/es/core/models/cache/DictCache.js +33 -35
- package/es/core/models/graph/Background.js +15 -17
- package/es/core/models/plugins/resourceWebControllUrl.js +76 -82
- package/es/core/models/tagstips/ElementTagTipConfig.js +34 -38
- package/es/core/models/topoData.js +68 -70
- package/es/core/models/utils/linkUtils.js +41 -43
- package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/es/core/services/alarm.js +14 -16
- package/es/core/services/background.js +59 -67
- package/es/core/services/cmdb/metric.js +9 -11
- package/es/core/services/cmdb.js +20 -20
- package/es/core/services/index.js +39 -45
- package/es/core/services/overview.js +131 -151
- package/es/core/services/topo/basic.js +37 -41
- package/es/core/services/topo/tagtip.js +10 -12
- package/es/core/store/models/ciModel.js +58 -62
- package/es/core/store/models/customIcon.js +120 -134
- package/es/core/store/models/displayConfig.js +15 -19
- package/es/core/store/models/selection.js +4 -6
- package/es/core/store/models/topoAlarm.js +162 -145
- package/es/core/store/models/topoBaseInfoOverview.js +4 -6
- package/es/core/store/models/topoBizMod.js +9 -11
- package/es/core/store/models/topoConfig.js +215 -231
- package/es/core/store/models/topoGraphView.js +4 -6
- package/es/core/store/models/topoMod.js +373 -395
- package/es/core/utils/imageUtil.js +18 -20
- package/es/core/utils/metricUtil.js +5 -0
- package/es/core/utils/saveSerialize.js +9 -11
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +56 -58
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +15 -17
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +343 -357
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +86 -92
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +39 -41
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +189 -205
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +107 -109
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +57 -59
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -37
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +25 -29
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +32 -36
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +17 -19
- package/es/networkTopo/components/Link/hook.js +73 -77
- package/es/networkTopo/components/Link/index.js +86 -94
- package/es/networkTopo/components/Link/setting.js +42 -44
- package/es/networkTopo/getTopoData.js +63 -69
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +30 -32
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/es/networkTopo/models/TopoCenter.js +18 -22
- package/es/networkTopo/services/alert.js +18 -22
- package/es/networkTopo/services/authorization.js +45 -55
- package/es/networkTopo/services/cmdb.js +422 -470
- package/es/networkTopo/services/funcAuth.js +22 -24
- package/es/networkTopo/services/link.js +107 -117
- package/es/networkTopo/services/mdc.js +18 -24
- package/es/networkTopo/services/metric.js +23 -27
- package/es/networkTopo/services/model.js +445 -509
- package/es/networkTopo/services/risk.js +9 -11
- package/es/networkTopo/services/topo/auth.js +27 -33
- package/es/networkTopo/services/topo/basic.js +251 -289
- package/es/networkTopo/services/topo/blacklist.js +20 -24
- package/es/networkTopo/services/topo/ciInfo.js +27 -31
- package/es/networkTopo/services/topo/icon.js +49 -59
- package/es/networkTopo/services/topo/networkLink.js +32 -36
- package/es/networkTopo/services/topo/relation.js +9 -11
- package/es/networkTopo/services/topo/resourceWebUrl.js +36 -42
- package/es/networkTopo/store/functionAuth.js +31 -37
- package/es/networkTopo/store/topoCenter.js +142 -152
- package/es/networkTopo/store/topoLinkMod.js +4 -6
- package/es/networkTopo/store/topoTreeMod.js +170 -182
- package/es/networkTopo/utils/exportData.js +52 -54
- package/lib/components/BatchAttrMetric/setting.js +1 -1
- package/lib/components/MultiResourceDrawer/index.js +16 -18
- package/lib/components/ResourceList/ResourceSelect.js +48 -50
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +27 -29
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +18 -20
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +30 -32
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +78 -84
- package/lib/core/components/titlebar/widgets/TitleWidget.js +5 -3
- package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +18 -18
- package/lib/core/editor/components/BackgroundView/index.js +118 -128
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +22 -24
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +34 -34
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +19 -21
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -10
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +37 -41
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +50 -54
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +50 -54
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +12 -14
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +26 -28
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +15 -17
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +12 -14
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +25 -31
- package/lib/core/editor/hooks/useKeyboardShortcut.js +37 -34
- package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
- package/lib/core/editor/store/background.js +8 -10
- package/lib/core/editor/store/topoEdit.js +4 -6
- package/lib/core/editor/utils/copyElementUtil.js +182 -0
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/lib/core/hooks/usePolling.js +116 -120
- package/lib/core/hooks/useResourceConfig.js +58 -66
- package/lib/core/hooks/useTopoEdit.js +465 -495
- package/lib/core/models/Alarm.js +275 -292
- package/lib/core/models/AttributeMetricDisplay.js +104 -110
- package/lib/core/models/PluginManager.js +4 -3
- package/lib/core/models/SelectionModel.js +4 -5
- package/lib/core/models/TopoApp.js +205 -240
- package/lib/core/models/TopoGraphView.js +18 -21
- package/lib/core/models/cache/CiCache.js +33 -32
- package/lib/core/models/cache/CiTypeCache.js +38 -42
- package/lib/core/models/cache/DictCache.js +33 -35
- package/lib/core/models/graph/Background.js +16 -18
- package/lib/core/models/plugins/resourceWebControllUrl.js +74 -80
- package/lib/core/models/tagstips/ElementTagTipConfig.js +34 -38
- package/lib/core/models/topoData.js +69 -71
- package/lib/core/models/utils/linkUtils.js +41 -43
- package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/lib/core/services/alarm.js +18 -20
- package/lib/core/services/background.js +70 -78
- package/lib/core/services/cmdb/metric.js +10 -12
- package/lib/core/services/cmdb.js +22 -22
- package/lib/core/services/index.js +45 -51
- package/lib/core/services/overview.js +131 -151
- package/lib/core/services/topo/basic.js +37 -41
- package/lib/core/services/topo/tagtip.js +12 -14
- package/lib/core/store/models/ciModel.js +66 -70
- package/lib/core/store/models/customIcon.js +120 -134
- package/lib/core/store/models/displayConfig.js +15 -19
- package/lib/core/store/models/selection.js +4 -6
- package/lib/core/store/models/topoAlarm.js +163 -145
- package/lib/core/store/models/topoBaseInfoOverview.js +4 -6
- package/lib/core/store/models/topoBizMod.js +9 -11
- package/lib/core/store/models/topoConfig.js +222 -238
- package/lib/core/store/models/topoGraphView.js +4 -6
- package/lib/core/store/models/topoMod.js +375 -397
- package/lib/core/utils/imageUtil.js +22 -24
- package/lib/core/utils/metricUtil.js +5 -0
- package/lib/core/utils/saveSerialize.js +9 -11
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +56 -58
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +15 -17
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +344 -358
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +86 -92
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +39 -41
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +190 -206
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +107 -109
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +57 -59
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +29 -33
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +25 -29
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +32 -36
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +18 -20
- package/lib/networkTopo/components/Link/hook.js +73 -77
- package/lib/networkTopo/components/Link/index.js +87 -95
- package/lib/networkTopo/components/Link/setting.js +42 -44
- package/lib/networkTopo/getTopoData.js +63 -69
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +31 -33
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/lib/networkTopo/models/TopoCenter.js +18 -22
- package/lib/networkTopo/services/alert.js +18 -22
- package/lib/networkTopo/services/authorization.js +55 -65
- package/lib/networkTopo/services/cmdb.js +422 -470
- package/lib/networkTopo/services/funcAuth.js +24 -26
- package/lib/networkTopo/services/link.js +108 -118
- package/lib/networkTopo/services/mdc.js +21 -27
- package/lib/networkTopo/services/metric.js +27 -31
- package/lib/networkTopo/services/model.js +445 -509
- package/lib/networkTopo/services/risk.js +11 -13
- package/lib/networkTopo/services/topo/auth.js +27 -33
- package/lib/networkTopo/services/topo/basic.js +252 -290
- package/lib/networkTopo/services/topo/blacklist.js +20 -24
- package/lib/networkTopo/services/topo/ciInfo.js +34 -38
- package/lib/networkTopo/services/topo/icon.js +59 -69
- package/lib/networkTopo/services/topo/networkLink.js +32 -36
- package/lib/networkTopo/services/topo/relation.js +11 -13
- package/lib/networkTopo/services/topo/resourceWebUrl.js +44 -50
- package/lib/networkTopo/store/functionAuth.js +31 -37
- package/lib/networkTopo/store/topoCenter.js +142 -152
- package/lib/networkTopo/store/topoLinkMod.js +4 -6
- package/lib/networkTopo/store/topoTreeMod.js +166 -178
- package/lib/networkTopo/utils/exportData.js +59 -61
- package/lib/utils/htElementDataUtil.js +4 -2
- package/package.json +5 -3
@@ -6,32 +6,30 @@ export default {
|
|
6
6
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
7
7
|
var funcResult, permissions;
|
8
8
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
9
|
-
while (1) {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
}]);
|
9
|
+
while (1) switch (_context.prev = _context.next) {
|
10
|
+
case 0:
|
11
|
+
_context.next = 2;
|
12
|
+
return authServices.checkFuncAuthentication([{
|
13
|
+
func: 'topo_createTopo'
|
14
|
+
}, {
|
15
|
+
func: 'topo_manageNavTree'
|
16
|
+
}, {
|
17
|
+
func: 'topo_setTopoPermission'
|
18
|
+
}, {
|
19
|
+
func: 'addResource'
|
20
|
+
}]);
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
22
|
+
case 2:
|
23
|
+
funcResult = _context.sent;
|
24
|
+
permissions = {};
|
25
|
+
funcResult.forEach(function (func) {
|
26
|
+
permissions[func.func.replace('topo_', '')] = func.passed === 'PASS';
|
27
|
+
});
|
28
|
+
return _context.abrupt("return", permissions);
|
30
29
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
}
|
30
|
+
case 6:
|
31
|
+
case "end":
|
32
|
+
return _context.stop();
|
35
33
|
}
|
36
34
|
}, _callee);
|
37
35
|
}))();
|
@@ -13,27 +13,25 @@ export default {
|
|
13
13
|
var _result$id, result;
|
14
14
|
|
15
15
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
16
|
-
while (1) {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
return _context.stop();
|
36
|
-
}
|
16
|
+
while (1) switch (_context.prev = _context.next) {
|
17
|
+
case 0:
|
18
|
+
_context.prev = 0;
|
19
|
+
_context.next = 3;
|
20
|
+
return request.post("/topo/v1/api/networkLink/devicesInterfaces", [id]);
|
21
|
+
|
22
|
+
case 3:
|
23
|
+
result = _context.sent;
|
24
|
+
rlog.debug("查询端口列表", id, result[id]);
|
25
|
+
return _context.abrupt("return", (_result$id = result[id]) !== null && _result$id !== void 0 ? _result$id : []);
|
26
|
+
|
27
|
+
case 8:
|
28
|
+
_context.prev = 8;
|
29
|
+
_context.t0 = _context["catch"](0);
|
30
|
+
rlog.error("查询端口列表", _context.t0);
|
31
|
+
|
32
|
+
case 11:
|
33
|
+
case "end":
|
34
|
+
return _context.stop();
|
37
35
|
}
|
38
36
|
}, _callee, null, [[0, 8]]);
|
39
37
|
}))();
|
@@ -48,26 +46,24 @@ export default {
|
|
48
46
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
49
47
|
var result;
|
50
48
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
51
|
-
while (1) {
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
return _context2.stop();
|
70
|
-
}
|
49
|
+
while (1) switch (_context2.prev = _context2.next) {
|
50
|
+
case 0:
|
51
|
+
_context2.prev = 0;
|
52
|
+
_context2.next = 3;
|
53
|
+
return request.post("/topo/v1/api/networkLink", parm);
|
54
|
+
|
55
|
+
case 3:
|
56
|
+
result = _context2.sent;
|
57
|
+
return _context2.abrupt("return", result);
|
58
|
+
|
59
|
+
case 7:
|
60
|
+
_context2.prev = 7;
|
61
|
+
_context2.t0 = _context2["catch"](0);
|
62
|
+
rlog.error("新建链路", _context2.t0);
|
63
|
+
|
64
|
+
case 10:
|
65
|
+
case "end":
|
66
|
+
return _context2.stop();
|
71
67
|
}
|
72
68
|
}, _callee2, null, [[0, 7]]);
|
73
69
|
}))();
|
@@ -82,26 +78,24 @@ export default {
|
|
82
78
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
83
79
|
var result;
|
84
80
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
85
|
-
while (1) {
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
return _context3.stop();
|
104
|
-
}
|
81
|
+
while (1) switch (_context3.prev = _context3.next) {
|
82
|
+
case 0:
|
83
|
+
_context3.prev = 0;
|
84
|
+
_context3.next = 3;
|
85
|
+
return request.put("/topo/v1/api/networkLink", parm);
|
86
|
+
|
87
|
+
case 3:
|
88
|
+
result = _context3.sent;
|
89
|
+
return _context3.abrupt("return", result);
|
90
|
+
|
91
|
+
case 7:
|
92
|
+
_context3.prev = 7;
|
93
|
+
_context3.t0 = _context3["catch"](0);
|
94
|
+
rlog.error("编辑链路", _context3.t0);
|
95
|
+
|
96
|
+
case 10:
|
97
|
+
case "end":
|
98
|
+
return _context3.stop();
|
105
99
|
}
|
106
100
|
}, _callee3, null, [[0, 7]]);
|
107
101
|
}))();
|
@@ -116,26 +110,24 @@ export default {
|
|
116
110
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
117
111
|
var result;
|
118
112
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
119
|
-
while (1) {
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
return _context4.stop();
|
138
|
-
}
|
113
|
+
while (1) switch (_context4.prev = _context4.next) {
|
114
|
+
case 0:
|
115
|
+
_context4.prev = 0;
|
116
|
+
_context4.next = 3;
|
117
|
+
return request["delete"]("/topo/v1/api/networkLink/" + id);
|
118
|
+
|
119
|
+
case 3:
|
120
|
+
result = _context4.sent;
|
121
|
+
return _context4.abrupt("return", result);
|
122
|
+
|
123
|
+
case 7:
|
124
|
+
_context4.prev = 7;
|
125
|
+
_context4.t0 = _context4["catch"](0);
|
126
|
+
rlog.error("删除链路", _context4.t0);
|
127
|
+
|
128
|
+
case 10:
|
129
|
+
case "end":
|
130
|
+
return _context4.stop();
|
139
131
|
}
|
140
132
|
}, _callee4, null, [[0, 7]]);
|
141
133
|
}))();
|
@@ -150,42 +142,40 @@ export default {
|
|
150
142
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
151
143
|
var stag, ttag, condition, parm, result;
|
152
144
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
153
|
-
while (1) {
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
return _context5.stop();
|
188
|
-
}
|
145
|
+
while (1) switch (_context5.prev = _context5.next) {
|
146
|
+
case 0:
|
147
|
+
// const idtxt = `'${ids[0]}','${ids[1]}'`;
|
148
|
+
stag = ids[0];
|
149
|
+
ttag = ids[1];
|
150
|
+
condition = "type('network_link') && !destination_id && network_link.source_device_id ='" + stag + "'";
|
151
|
+
|
152
|
+
if (ttag) {
|
153
|
+
condition = "type('network_link') && !destination_id && network_link.source_device_id ='" + stag + "' && network_link.destination_device_id='" + ttag + "'";
|
154
|
+
}
|
155
|
+
|
156
|
+
parm = {
|
157
|
+
condition: condition,
|
158
|
+
sort: "name asc",
|
159
|
+
currentPage: 1,
|
160
|
+
pageSize: 99
|
161
|
+
}; // console.log("queryAssociatedlinks", ids, parm, jsonParm);
|
162
|
+
|
163
|
+
_context5.prev = 5;
|
164
|
+
_context5.next = 8;
|
165
|
+
return request.post("/mdc/v1/api/cmdb/commonQueryCiData", parm);
|
166
|
+
|
167
|
+
case 8:
|
168
|
+
result = _context5.sent;
|
169
|
+
return _context5.abrupt("return", result);
|
170
|
+
|
171
|
+
case 12:
|
172
|
+
_context5.prev = 12;
|
173
|
+
_context5.t0 = _context5["catch"](5);
|
174
|
+
rlog.error("查询可关联链路", _context5.t0);
|
175
|
+
|
176
|
+
case 15:
|
177
|
+
case "end":
|
178
|
+
return _context5.stop();
|
189
179
|
}
|
190
180
|
}, _callee5, null, [[5, 12]]);
|
191
181
|
}))();
|
@@ -9,15 +9,13 @@ import { request } from '@riil-frontend/component-topology-utils';
|
|
9
9
|
export var getModelAssert = /*#__PURE__*/function () {
|
10
10
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
|
11
11
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
12
|
-
while (1) {
|
13
|
-
|
14
|
-
|
15
|
-
return _context.abrupt("return", request.get("/mdc/v1/api/model-asset/" + code));
|
12
|
+
while (1) switch (_context.prev = _context.next) {
|
13
|
+
case 0:
|
14
|
+
return _context.abrupt("return", request.get("/mdc/v1/api/model-asset/" + code));
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
16
|
+
case 1:
|
17
|
+
case "end":
|
18
|
+
return _context.stop();
|
21
19
|
}
|
22
20
|
}, _callee);
|
23
21
|
}));
|
@@ -30,15 +28,13 @@ export var getModelAssert = /*#__PURE__*/function () {
|
|
30
28
|
export var modelAssertTree = /*#__PURE__*/function () {
|
31
29
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
32
30
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
33
|
-
while (1) {
|
34
|
-
|
35
|
-
|
36
|
-
return _context2.abrupt("return", request.get('/mdc/v1/api/model-asset/tree'));
|
31
|
+
while (1) switch (_context2.prev = _context2.next) {
|
32
|
+
case 0:
|
33
|
+
return _context2.abrupt("return", request.get('/mdc/v1/api/model-asset/tree'));
|
37
34
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
}
|
35
|
+
case 1:
|
36
|
+
case "end":
|
37
|
+
return _context2.stop();
|
42
38
|
}
|
43
39
|
}, _callee2);
|
44
40
|
}));
|
@@ -55,15 +51,13 @@ export var modelAssertTree = /*#__PURE__*/function () {
|
|
55
51
|
export var modelDictList = /*#__PURE__*/function () {
|
56
52
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(dictCodes) {
|
57
53
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
58
|
-
while (1) {
|
59
|
-
|
60
|
-
|
61
|
-
return _context3.abrupt("return", request.post('/mdc/v1/api/model-dict/list', dictCodes));
|
54
|
+
while (1) switch (_context3.prev = _context3.next) {
|
55
|
+
case 0:
|
56
|
+
return _context3.abrupt("return", request.post('/mdc/v1/api/model-dict/list', dictCodes));
|
62
57
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}
|
58
|
+
case 1:
|
59
|
+
case "end":
|
60
|
+
return _context3.stop();
|
67
61
|
}
|
68
62
|
}, _callee3);
|
69
63
|
}));
|
@@ -12,22 +12,20 @@ import { request } from '@riil-frontend/component-topology-utils';
|
|
12
12
|
export var getLatestMetrics = /*#__PURE__*/function () {
|
13
13
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ciId, code) {
|
14
14
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
15
|
-
while (1) {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
});
|
15
|
+
while (1) switch (_context.prev = _context.next) {
|
16
|
+
case 0:
|
17
|
+
_context.next = 2;
|
18
|
+
return request.post("/metric/v1/api/latestMetrics", {
|
19
|
+
ciId: ciId,
|
20
|
+
code: code
|
21
|
+
});
|
23
22
|
|
24
|
-
|
25
|
-
|
23
|
+
case 2:
|
24
|
+
return _context.abrupt("return", _context.sent);
|
26
25
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}
|
26
|
+
case 3:
|
27
|
+
case "end":
|
28
|
+
return _context.stop();
|
31
29
|
}
|
32
30
|
}, _callee);
|
33
31
|
}));
|
@@ -43,21 +41,19 @@ export var getLatestMetrics = /*#__PURE__*/function () {
|
|
43
41
|
export var getCiMetric = /*#__PURE__*/function () {
|
44
42
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(ciCode) {
|
45
43
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
46
|
-
while (1) {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
});
|
44
|
+
while (1) switch (_context2.prev = _context2.next) {
|
45
|
+
case 0:
|
46
|
+
_context2.next = 2;
|
47
|
+
return request.post('/model/v1/api/getCiMetric', {
|
48
|
+
ciCode: ciCode
|
49
|
+
});
|
53
50
|
|
54
|
-
|
55
|
-
|
51
|
+
case 2:
|
52
|
+
return _context2.abrupt("return", _context2.sent);
|
56
53
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
}
|
54
|
+
case 3:
|
55
|
+
case "end":
|
56
|
+
return _context2.stop();
|
61
57
|
}
|
62
58
|
}, _callee2);
|
63
59
|
}));
|