@riil-frontend/component-topology 11.0.30 → 11.0.31
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 +2 -4
- package/build/index.js +34 -49
- package/es/components/MultiResourceDrawer/index.js +18 -16
- package/es/components/ResourceList/ResourceSelect.js +50 -48
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +26 -24
- package/es/components/SingleResourceDrawer/SelectDrawer.js +20 -18
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +25 -23
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
- package/es/core/components/titlebar/widgets/TitleWidget.js +3 -5
- package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
- package/es/core/editor/components/BackgroundView/index.js +129 -119
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +22 -20
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +17 -15
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +9 -7
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +13 -11
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +23 -21
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +12 -10
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +27 -21
- package/es/core/editor/hooks/useKeyboardShortcut.js +2 -2
- package/es/core/editor/hooks/useNewElementTheme.js +2 -2
- package/es/core/editor/store/background.js +10 -8
- package/es/core/editor/store/topoEdit.js +6 -4
- package/es/core/editor/utils/edgeTypeStyleUtil.js +4 -2
- package/es/core/hooks/usePolling.js +121 -117
- package/es/core/hooks/useResourceConfig.js +66 -58
- package/es/core/hooks/useTopoEdit.js +511 -476
- package/es/core/models/Alarm.js +298 -281
- package/es/core/models/AttributeMetricDisplay.js +107 -101
- package/es/core/models/PluginManager.js +3 -4
- package/es/core/models/SelectionModel.js +5 -4
- package/es/core/models/TopoApp.js +240 -205
- package/es/core/models/TopoGraphView.js +21 -18
- package/es/core/models/cache/CiCache.js +27 -28
- package/es/core/models/cache/CiTypeCache.js +41 -37
- package/es/core/models/cache/DictCache.js +35 -33
- package/es/core/models/graph/Background.js +17 -15
- package/es/core/models/plugins/resourceWebControllUrl.js +82 -76
- package/es/core/models/tagstips/ElementTagTipConfig.js +38 -34
- package/es/core/models/topoData.js +70 -68
- package/es/core/models/utils/linkUtils.js +43 -41
- package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/es/core/services/alarm.js +16 -14
- package/es/core/services/background.js +67 -59
- package/es/core/services/cmdb/metric.js +11 -9
- package/es/core/services/cmdb.js +20 -18
- package/es/core/services/index.js +45 -39
- package/es/core/services/overview.js +151 -131
- package/es/core/services/topo/basic.js +13 -11
- package/es/core/services/topo/tagtip.js +12 -10
- package/es/core/store/models/ciModel.js +62 -58
- package/es/core/store/models/customIcon.js +134 -120
- package/es/core/store/models/displayConfig.js +19 -15
- package/es/core/store/models/selection.js +6 -4
- package/es/core/store/models/topoAlarm.js +145 -162
- package/es/core/store/models/topoBaseInfoOverview.js +6 -4
- package/es/core/store/models/topoBizMod.js +32 -28
- package/es/core/store/models/topoConfig.js +231 -215
- package/es/core/store/models/topoGraphView.js +6 -4
- package/es/core/store/models/topoMod.js +395 -373
- package/es/core/utils/imageUtil.js +20 -18
- package/es/core/utils/saveSerialize.js +11 -9
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -15
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +357 -343
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +205 -189
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +109 -107
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +37 -33
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +19 -17
- package/es/networkTopo/components/Link/hook.js +77 -73
- package/es/networkTopo/components/Link/index.js +94 -86
- package/es/networkTopo/components/Link/setting.js +44 -42
- package/es/networkTopo/getTopoData.js +69 -63
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +32 -30
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/es/networkTopo/models/TopoCenter.js +22 -18
- package/es/networkTopo/services/alert.js +22 -18
- package/es/networkTopo/services/authorization.js +55 -45
- package/es/networkTopo/services/cmdb.js +470 -422
- package/es/networkTopo/services/funcAuth.js +24 -22
- package/es/networkTopo/services/link.js +117 -107
- package/es/networkTopo/services/mdc.js +24 -18
- package/es/networkTopo/services/metric.js +27 -23
- package/es/networkTopo/services/model.js +509 -445
- package/es/networkTopo/services/risk.js +11 -9
- package/es/networkTopo/services/topo/auth.js +33 -27
- package/es/networkTopo/services/topo/basic.js +314 -274
- package/es/networkTopo/services/topo/blacklist.js +24 -20
- package/es/networkTopo/services/topo/ciInfo.js +31 -27
- package/es/networkTopo/services/topo/icon.js +59 -49
- package/es/networkTopo/services/topo/networkLink.js +36 -32
- package/es/networkTopo/services/topo/relation.js +11 -9
- package/es/networkTopo/services/topo/resourceWebUrl.js +42 -36
- package/es/networkTopo/store/functionAuth.js +37 -31
- package/es/networkTopo/store/topoCenter.js +152 -142
- package/es/networkTopo/store/topoLinkMod.js +6 -4
- package/es/networkTopo/store/topoTreeMod.js +182 -170
- package/es/networkTopo/utils/exportData.js +54 -52
- package/lib/components/MultiResourceDrawer/index.js +18 -16
- package/lib/components/ResourceList/ResourceSelect.js +50 -48
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +29 -27
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +20 -18
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +32 -30
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
- package/lib/core/components/titlebar/widgets/TitleWidget.js +3 -5
- package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
- package/lib/core/editor/components/BackgroundView/index.js +128 -118
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +24 -22
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +21 -19
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +10 -8
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +14 -12
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +28 -26
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +14 -12
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +31 -25
- package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -2
- package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
- package/lib/core/editor/store/background.js +10 -8
- package/lib/core/editor/store/topoEdit.js +6 -4
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +4 -2
- package/lib/core/hooks/usePolling.js +120 -116
- package/lib/core/hooks/useResourceConfig.js +66 -58
- package/lib/core/hooks/useTopoEdit.js +503 -468
- package/lib/core/models/Alarm.js +292 -275
- package/lib/core/models/AttributeMetricDisplay.js +110 -104
- package/lib/core/models/PluginManager.js +3 -4
- package/lib/core/models/SelectionModel.js +5 -4
- package/lib/core/models/TopoApp.js +240 -205
- package/lib/core/models/TopoGraphView.js +21 -18
- package/lib/core/models/cache/CiCache.js +32 -33
- package/lib/core/models/cache/CiTypeCache.js +42 -38
- package/lib/core/models/cache/DictCache.js +35 -33
- package/lib/core/models/graph/Background.js +18 -16
- package/lib/core/models/plugins/resourceWebControllUrl.js +80 -74
- package/lib/core/models/tagstips/ElementTagTipConfig.js +38 -34
- package/lib/core/models/topoData.js +71 -69
- package/lib/core/models/utils/linkUtils.js +43 -41
- package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/lib/core/services/alarm.js +20 -18
- package/lib/core/services/background.js +78 -70
- package/lib/core/services/cmdb/metric.js +12 -10
- package/lib/core/services/cmdb.js +22 -20
- package/lib/core/services/index.js +51 -45
- package/lib/core/services/overview.js +151 -131
- package/lib/core/services/topo/basic.js +15 -13
- package/lib/core/services/topo/tagtip.js +14 -12
- package/lib/core/store/models/ciModel.js +70 -66
- package/lib/core/store/models/customIcon.js +134 -120
- package/lib/core/store/models/displayConfig.js +19 -15
- package/lib/core/store/models/selection.js +6 -4
- package/lib/core/store/models/topoAlarm.js +145 -163
- package/lib/core/store/models/topoBaseInfoOverview.js +6 -4
- package/lib/core/store/models/topoBizMod.js +38 -34
- package/lib/core/store/models/topoConfig.js +238 -222
- package/lib/core/store/models/topoGraphView.js +6 -4
- package/lib/core/store/models/topoMod.js +397 -375
- package/lib/core/utils/imageUtil.js +24 -22
- package/lib/core/utils/saveSerialize.js +11 -9
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -15
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +358 -344
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +206 -190
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +109 -107
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -29
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +20 -18
- package/lib/networkTopo/components/Link/hook.js +77 -73
- package/lib/networkTopo/components/Link/index.js +95 -87
- package/lib/networkTopo/components/Link/setting.js +44 -42
- package/lib/networkTopo/getTopoData.js +69 -63
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +33 -31
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/lib/networkTopo/models/TopoCenter.js +22 -18
- package/lib/networkTopo/services/alert.js +22 -18
- package/lib/networkTopo/services/authorization.js +65 -55
- package/lib/networkTopo/services/cmdb.js +470 -422
- package/lib/networkTopo/services/funcAuth.js +26 -24
- package/lib/networkTopo/services/link.js +118 -108
- package/lib/networkTopo/services/mdc.js +27 -21
- package/lib/networkTopo/services/metric.js +31 -27
- package/lib/networkTopo/services/model.js +509 -445
- package/lib/networkTopo/services/risk.js +13 -11
- package/lib/networkTopo/services/topo/auth.js +33 -27
- package/lib/networkTopo/services/topo/basic.js +317 -277
- package/lib/networkTopo/services/topo/blacklist.js +24 -20
- package/lib/networkTopo/services/topo/ciInfo.js +38 -34
- package/lib/networkTopo/services/topo/icon.js +69 -59
- package/lib/networkTopo/services/topo/networkLink.js +36 -32
- package/lib/networkTopo/services/topo/relation.js +13 -11
- package/lib/networkTopo/services/topo/resourceWebUrl.js +50 -44
- package/lib/networkTopo/store/functionAuth.js +37 -31
- package/lib/networkTopo/store/topoCenter.js +152 -142
- package/lib/networkTopo/store/topoLinkMod.js +6 -4
- package/lib/networkTopo/store/topoTreeMod.js +178 -166
- package/lib/networkTopo/utils/exportData.js +61 -59
- package/package.json +3 -3
@@ -23,22 +23,24 @@ function _queryCisByIds() {
|
|
23
23
|
_queryCisByIds = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids) {
|
24
24
|
var result;
|
25
25
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
26
|
-
while (1)
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
26
|
+
while (1) {
|
27
|
+
switch (_context.prev = _context.next) {
|
28
|
+
case 0:
|
29
|
+
_context.next = 2;
|
30
|
+
return (0, _cmdb.commonQueryCiDataByIds)(ids, {
|
31
|
+
orders: [],
|
32
|
+
pageIndex: 1,
|
33
|
+
pageSize: 100000
|
34
|
+
});
|
35
|
+
|
36
|
+
case 2:
|
37
|
+
result = _context.sent;
|
38
|
+
return _context.abrupt("return", result.data);
|
39
|
+
|
40
|
+
case 4:
|
41
|
+
case "end":
|
42
|
+
return _context.stop();
|
43
|
+
}
|
42
44
|
}
|
43
45
|
}, _callee);
|
44
46
|
}));
|
@@ -53,18 +55,20 @@ function _queryModelAsset() {
|
|
53
55
|
_queryModelAsset = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(code) {
|
54
56
|
var result;
|
55
57
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
56
|
-
while (1)
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
58
|
+
while (1) {
|
59
|
+
switch (_context2.prev = _context2.next) {
|
60
|
+
case 0:
|
61
|
+
_context2.next = 2;
|
62
|
+
return _componentTopologyUtils.request.get("/mdc/v1/api/model-asset/" + code);
|
63
|
+
|
64
|
+
case 2:
|
65
|
+
result = _context2.sent;
|
66
|
+
return _context2.abrupt("return", result);
|
67
|
+
|
68
|
+
case 4:
|
69
|
+
case "end":
|
70
|
+
return _context2.stop();
|
71
|
+
}
|
68
72
|
}
|
69
73
|
}, _callee2);
|
70
74
|
}));
|
@@ -79,23 +83,25 @@ function _commonQueryCiData() {
|
|
79
83
|
_commonQueryCiData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(id) {
|
80
84
|
var result;
|
81
85
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
82
|
-
while (1)
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
86
|
+
while (1) {
|
87
|
+
switch (_context3.prev = _context3.next) {
|
88
|
+
case 0:
|
89
|
+
_context3.next = 2;
|
90
|
+
return _componentTopologyUtils.request.post('/mdc/v1/api/cmdb/authority/commonQueryCiData', {
|
91
|
+
condition: "type('machine_room') && id('" + id + "')",
|
92
|
+
orders: [],
|
93
|
+
pageIndex: 1,
|
94
|
+
pageSize: 20
|
95
|
+
});
|
96
|
+
|
97
|
+
case 2:
|
98
|
+
result = _context3.sent;
|
99
|
+
return _context3.abrupt("return", result);
|
100
|
+
|
101
|
+
case 4:
|
102
|
+
case "end":
|
103
|
+
return _context3.stop();
|
104
|
+
}
|
99
105
|
}
|
100
106
|
}, _callee3);
|
101
107
|
}));
|
@@ -25,17 +25,19 @@ var _default = {
|
|
25
25
|
getRiskByIds: function getRiskByIds(params) {
|
26
26
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
27
27
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
28
|
-
while (1)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
28
|
+
while (1) {
|
29
|
+
switch (_context.prev = _context.next) {
|
30
|
+
case 0:
|
31
|
+
_context.next = 2;
|
32
|
+
return _componentTopologyUtils.request.post('/health/v1/api/management/getRiskList', params);
|
33
|
+
|
34
|
+
case 2:
|
35
|
+
return _context.abrupt("return", _context.sent);
|
36
|
+
|
37
|
+
case 3:
|
38
|
+
case "end":
|
39
|
+
return _context.stop();
|
40
|
+
}
|
39
41
|
}
|
40
42
|
}, _callee);
|
41
43
|
}))();
|
@@ -50,30 +52,32 @@ var _default = {
|
|
50
52
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
51
53
|
var components;
|
52
54
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
53
|
-
while (1)
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
55
|
+
while (1) {
|
56
|
+
switch (_context2.prev = _context2.next) {
|
57
|
+
case 0:
|
58
|
+
components = ciComponentsMap[id];
|
59
|
+
|
60
|
+
if (components) {
|
61
|
+
_context2.next = 6;
|
62
|
+
break;
|
63
|
+
}
|
64
|
+
|
65
|
+
_context2.next = 4;
|
66
|
+
return _componentTopologyUtils.request.post('/mdc/v1/api/cmdb/queryAllComponentsByCiId', {
|
67
|
+
id: id
|
68
|
+
});
|
69
|
+
|
70
|
+
case 4:
|
71
|
+
components = _context2.sent;
|
72
|
+
ciComponentsMap[id] = components;
|
73
|
+
|
74
|
+
case 6:
|
75
|
+
return _context2.abrupt("return", components);
|
76
|
+
|
77
|
+
case 7:
|
78
|
+
case "end":
|
79
|
+
return _context2.stop();
|
80
|
+
}
|
77
81
|
}
|
78
82
|
}, _callee2);
|
79
83
|
}))();
|
@@ -86,17 +90,19 @@ var _default = {
|
|
86
90
|
handleAlarm: function handleAlarm(params) {
|
87
91
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
88
92
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
89
|
-
while (1)
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
93
|
+
while (1) {
|
94
|
+
switch (_context3.prev = _context3.next) {
|
95
|
+
case 0:
|
96
|
+
_context3.next = 2;
|
97
|
+
return _componentTopologyUtils.request.post('/alert/v1/api/alert/handleAlerts', params);
|
98
|
+
|
99
|
+
case 2:
|
100
|
+
return _context3.abrupt("return", _context3.sent);
|
101
|
+
|
102
|
+
case 3:
|
103
|
+
case "end":
|
104
|
+
return _context3.stop();
|
105
|
+
}
|
100
106
|
}
|
101
107
|
}, _callee3);
|
102
108
|
}))();
|
@@ -108,17 +114,19 @@ var _default = {
|
|
108
114
|
getUserId: function getUserId() {
|
109
115
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
110
116
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
111
|
-
while (1)
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
117
|
+
while (1) {
|
118
|
+
switch (_context4.prev = _context4.next) {
|
119
|
+
case 0:
|
120
|
+
_context4.next = 2;
|
121
|
+
return _componentTopologyUtils.request.post('/auth-ui/v1/api/user/token/checkToken');
|
122
|
+
|
123
|
+
case 2:
|
124
|
+
return _context4.abrupt("return", _context4.sent);
|
125
|
+
|
126
|
+
case 3:
|
127
|
+
case "end":
|
128
|
+
return _context4.stop();
|
129
|
+
}
|
122
130
|
}
|
123
131
|
}, _callee4);
|
124
132
|
}))();
|
@@ -130,17 +138,19 @@ var _default = {
|
|
130
138
|
getOverviewConfig: function getOverviewConfig(topoId, templateCode) {
|
131
139
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
132
140
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
133
|
-
while (1)
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
141
|
+
while (1) {
|
142
|
+
switch (_context5.prev = _context5.next) {
|
143
|
+
case 0:
|
144
|
+
_context5.next = 2;
|
145
|
+
return _componentTopologyUtils.request.get("/topo/v1/api/config/overview/" + topoId + "/" + templateCode);
|
146
|
+
|
147
|
+
case 2:
|
148
|
+
return _context5.abrupt("return", _context5.sent);
|
149
|
+
|
150
|
+
case 3:
|
151
|
+
case "end":
|
152
|
+
return _context5.stop();
|
153
|
+
}
|
144
154
|
}
|
145
155
|
}, _callee5);
|
146
156
|
}))();
|
@@ -152,17 +162,19 @@ var _default = {
|
|
152
162
|
saveOverviewConfig: function saveOverviewConfig(topoId, templateCode, data) {
|
153
163
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
154
164
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
155
|
-
while (1)
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
165
|
+
while (1) {
|
166
|
+
switch (_context6.prev = _context6.next) {
|
167
|
+
case 0:
|
168
|
+
_context6.next = 2;
|
169
|
+
return _componentTopologyUtils.request.post("/topo/v1/api/config/overview/" + topoId + "/" + templateCode, data);
|
170
|
+
|
171
|
+
case 2:
|
172
|
+
return _context6.abrupt("return", _context6.sent);
|
173
|
+
|
174
|
+
case 3:
|
175
|
+
case "end":
|
176
|
+
return _context6.stop();
|
177
|
+
}
|
166
178
|
}
|
167
179
|
}, _callee6);
|
168
180
|
}))();
|
@@ -174,17 +186,19 @@ var _default = {
|
|
174
186
|
getResMetricList: function getResMetricList(data) {
|
175
187
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
176
188
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
177
|
-
while (1)
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
189
|
+
while (1) {
|
190
|
+
switch (_context7.prev = _context7.next) {
|
191
|
+
case 0:
|
192
|
+
_context7.next = 2;
|
193
|
+
return _componentTopologyUtils.request.post("/mdc/v1/api/metric/list", data);
|
194
|
+
|
195
|
+
case 2:
|
196
|
+
return _context7.abrupt("return", _context7.sent);
|
197
|
+
|
198
|
+
case 3:
|
199
|
+
case "end":
|
200
|
+
return _context7.stop();
|
201
|
+
}
|
188
202
|
}
|
189
203
|
}, _callee7);
|
190
204
|
}))();
|
@@ -196,25 +210,27 @@ var _default = {
|
|
196
210
|
getDeviceTypeList: function getDeviceTypeList() {
|
197
211
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
198
212
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
199
|
-
while (1)
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
213
|
+
while (1) {
|
214
|
+
switch (_context8.prev = _context8.next) {
|
215
|
+
case 0:
|
216
|
+
if (roomDeviceTypeList) {
|
217
|
+
_context8.next = 4;
|
218
|
+
break;
|
219
|
+
}
|
220
|
+
|
221
|
+
_context8.next = 3;
|
222
|
+
return _componentTopologyUtils.request.post("/room/v1/api/device/type/list", {});
|
223
|
+
|
224
|
+
case 3:
|
225
|
+
roomDeviceTypeList = _context8.sent;
|
226
|
+
|
227
|
+
case 4:
|
228
|
+
return _context8.abrupt("return", roomDeviceTypeList);
|
229
|
+
|
230
|
+
case 5:
|
231
|
+
case "end":
|
232
|
+
return _context8.stop();
|
233
|
+
}
|
218
234
|
}
|
219
235
|
}, _callee8);
|
220
236
|
}))();
|
@@ -226,17 +242,19 @@ var _default = {
|
|
226
242
|
getMetricList: function getMetricList(data) {
|
227
243
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
228
244
|
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
229
|
-
while (1)
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
245
|
+
while (1) {
|
246
|
+
switch (_context9.prev = _context9.next) {
|
247
|
+
case 0:
|
248
|
+
_context9.next = 2;
|
249
|
+
return _componentTopologyUtils.request.post("/mdc/v1/api/metric/list", data);
|
250
|
+
|
251
|
+
case 2:
|
252
|
+
return _context9.abrupt("return", _context9.sent);
|
253
|
+
|
254
|
+
case 3:
|
255
|
+
case "end":
|
256
|
+
return _context9.stop();
|
257
|
+
}
|
240
258
|
}
|
241
259
|
}, _callee9);
|
242
260
|
}))();
|
@@ -248,17 +266,19 @@ var _default = {
|
|
248
266
|
commonQueryCiData: function commonQueryCiData(params) {
|
249
267
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
250
268
|
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
251
|
-
while (1)
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
269
|
+
while (1) {
|
270
|
+
switch (_context10.prev = _context10.next) {
|
271
|
+
case 0:
|
272
|
+
_context10.next = 2;
|
273
|
+
return _componentTopologyUtils.request.post("/mdc/v1/api/cmdb/commonQueryCiData", params);
|
274
|
+
|
275
|
+
case 2:
|
276
|
+
return _context10.abrupt("return", _context10.sent);
|
277
|
+
|
278
|
+
case 3:
|
279
|
+
case "end":
|
280
|
+
return _context10.stop();
|
281
|
+
}
|
262
282
|
}
|
263
283
|
}, _callee10);
|
264
284
|
}))();
|
@@ -23,19 +23,21 @@ var _default = {
|
|
23
23
|
saveSerializeData: function saveSerializeData(id, data) {
|
24
24
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
25
25
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
26
|
-
while (1)
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
26
|
+
while (1) {
|
27
|
+
switch (_context.prev = _context.next) {
|
28
|
+
case 0:
|
29
|
+
_context.next = 2;
|
30
|
+
return _componentTopologyUtils.request.post(_constants.TOPO_API_ROOT + "/structure/" + id, {
|
31
|
+
data: data
|
32
|
+
});
|
33
|
+
|
34
|
+
case 2:
|
35
|
+
return _context.abrupt("return", _context.sent);
|
36
|
+
|
37
|
+
case 3:
|
38
|
+
case "end":
|
39
|
+
return _context.stop();
|
40
|
+
}
|
39
41
|
}
|
40
42
|
}, _callee);
|
41
43
|
}))();
|
@@ -19,18 +19,20 @@ function _getMetricsByMonitorTemplateCodes() {
|
|
19
19
|
_getMetricsByMonitorTemplateCodes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(mtCodes) {
|
20
20
|
var result;
|
21
21
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
22
|
-
while (1)
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
22
|
+
while (1) {
|
23
|
+
switch (_context.prev = _context.next) {
|
24
|
+
case 0:
|
25
|
+
_context.next = 2;
|
26
|
+
return _componentTopologyUtils.request.post('/topo/v1/api/attributes/metricByTemplateCode', mtCodes);
|
27
|
+
|
28
|
+
case 2:
|
29
|
+
result = _context.sent;
|
30
|
+
return _context.abrupt("return", result);
|
31
|
+
|
32
|
+
case 4:
|
33
|
+
case "end":
|
34
|
+
return _context.stop();
|
35
|
+
}
|
34
36
|
}
|
35
37
|
}, _callee);
|
36
38
|
}));
|