@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
@@ -14,17 +14,19 @@ export default {
|
|
14
14
|
getRiskByIds: function getRiskByIds(params) {
|
15
15
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
16
16
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
17
|
-
while (1)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
17
|
+
while (1) {
|
18
|
+
switch (_context.prev = _context.next) {
|
19
|
+
case 0:
|
20
|
+
_context.next = 2;
|
21
|
+
return request.post('/health/v1/api/management/getRiskList', params);
|
22
|
+
|
23
|
+
case 2:
|
24
|
+
return _context.abrupt("return", _context.sent);
|
25
|
+
|
26
|
+
case 3:
|
27
|
+
case "end":
|
28
|
+
return _context.stop();
|
29
|
+
}
|
28
30
|
}
|
29
31
|
}, _callee);
|
30
32
|
}))();
|
@@ -39,30 +41,32 @@ export default {
|
|
39
41
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
40
42
|
var components;
|
41
43
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
42
|
-
while (1)
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
44
|
+
while (1) {
|
45
|
+
switch (_context2.prev = _context2.next) {
|
46
|
+
case 0:
|
47
|
+
components = ciComponentsMap[id];
|
48
|
+
|
49
|
+
if (components) {
|
50
|
+
_context2.next = 6;
|
51
|
+
break;
|
52
|
+
}
|
53
|
+
|
54
|
+
_context2.next = 4;
|
55
|
+
return request.post('/mdc/v1/api/cmdb/queryAllComponentsByCiId', {
|
56
|
+
id: id
|
57
|
+
});
|
58
|
+
|
59
|
+
case 4:
|
60
|
+
components = _context2.sent;
|
61
|
+
ciComponentsMap[id] = components;
|
62
|
+
|
63
|
+
case 6:
|
64
|
+
return _context2.abrupt("return", components);
|
65
|
+
|
66
|
+
case 7:
|
67
|
+
case "end":
|
68
|
+
return _context2.stop();
|
69
|
+
}
|
66
70
|
}
|
67
71
|
}, _callee2);
|
68
72
|
}))();
|
@@ -75,17 +79,19 @@ export default {
|
|
75
79
|
handleAlarm: function handleAlarm(params) {
|
76
80
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
77
81
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
78
|
-
while (1)
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
82
|
+
while (1) {
|
83
|
+
switch (_context3.prev = _context3.next) {
|
84
|
+
case 0:
|
85
|
+
_context3.next = 2;
|
86
|
+
return request.post('/alert/v1/api/alert/handleAlerts', params);
|
87
|
+
|
88
|
+
case 2:
|
89
|
+
return _context3.abrupt("return", _context3.sent);
|
90
|
+
|
91
|
+
case 3:
|
92
|
+
case "end":
|
93
|
+
return _context3.stop();
|
94
|
+
}
|
89
95
|
}
|
90
96
|
}, _callee3);
|
91
97
|
}))();
|
@@ -97,17 +103,19 @@ export default {
|
|
97
103
|
getUserId: function getUserId() {
|
98
104
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
99
105
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
100
|
-
while (1)
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
106
|
+
while (1) {
|
107
|
+
switch (_context4.prev = _context4.next) {
|
108
|
+
case 0:
|
109
|
+
_context4.next = 2;
|
110
|
+
return request.post('/auth-ui/v1/api/user/token/checkToken');
|
111
|
+
|
112
|
+
case 2:
|
113
|
+
return _context4.abrupt("return", _context4.sent);
|
114
|
+
|
115
|
+
case 3:
|
116
|
+
case "end":
|
117
|
+
return _context4.stop();
|
118
|
+
}
|
111
119
|
}
|
112
120
|
}, _callee4);
|
113
121
|
}))();
|
@@ -119,17 +127,19 @@ export default {
|
|
119
127
|
getOverviewConfig: function getOverviewConfig(topoId, templateCode) {
|
120
128
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
121
129
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
122
|
-
while (1)
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
130
|
+
while (1) {
|
131
|
+
switch (_context5.prev = _context5.next) {
|
132
|
+
case 0:
|
133
|
+
_context5.next = 2;
|
134
|
+
return request.get("/topo/v1/api/config/overview/" + topoId + "/" + templateCode);
|
135
|
+
|
136
|
+
case 2:
|
137
|
+
return _context5.abrupt("return", _context5.sent);
|
138
|
+
|
139
|
+
case 3:
|
140
|
+
case "end":
|
141
|
+
return _context5.stop();
|
142
|
+
}
|
133
143
|
}
|
134
144
|
}, _callee5);
|
135
145
|
}))();
|
@@ -141,17 +151,19 @@ export default {
|
|
141
151
|
saveOverviewConfig: function saveOverviewConfig(topoId, templateCode, data) {
|
142
152
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
143
153
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
144
|
-
while (1)
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
154
|
+
while (1) {
|
155
|
+
switch (_context6.prev = _context6.next) {
|
156
|
+
case 0:
|
157
|
+
_context6.next = 2;
|
158
|
+
return request.post("/topo/v1/api/config/overview/" + topoId + "/" + templateCode, data);
|
159
|
+
|
160
|
+
case 2:
|
161
|
+
return _context6.abrupt("return", _context6.sent);
|
162
|
+
|
163
|
+
case 3:
|
164
|
+
case "end":
|
165
|
+
return _context6.stop();
|
166
|
+
}
|
155
167
|
}
|
156
168
|
}, _callee6);
|
157
169
|
}))();
|
@@ -163,17 +175,19 @@ export default {
|
|
163
175
|
getResMetricList: function getResMetricList(data) {
|
164
176
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
165
177
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
166
|
-
while (1)
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
178
|
+
while (1) {
|
179
|
+
switch (_context7.prev = _context7.next) {
|
180
|
+
case 0:
|
181
|
+
_context7.next = 2;
|
182
|
+
return request.post("/mdc/v1/api/metric/list", data);
|
183
|
+
|
184
|
+
case 2:
|
185
|
+
return _context7.abrupt("return", _context7.sent);
|
186
|
+
|
187
|
+
case 3:
|
188
|
+
case "end":
|
189
|
+
return _context7.stop();
|
190
|
+
}
|
177
191
|
}
|
178
192
|
}, _callee7);
|
179
193
|
}))();
|
@@ -185,25 +199,27 @@ export default {
|
|
185
199
|
getDeviceTypeList: function getDeviceTypeList() {
|
186
200
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
187
201
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
188
|
-
while (1)
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
202
|
+
while (1) {
|
203
|
+
switch (_context8.prev = _context8.next) {
|
204
|
+
case 0:
|
205
|
+
if (roomDeviceTypeList) {
|
206
|
+
_context8.next = 4;
|
207
|
+
break;
|
208
|
+
}
|
209
|
+
|
210
|
+
_context8.next = 3;
|
211
|
+
return request.post("/room/v1/api/device/type/list", {});
|
212
|
+
|
213
|
+
case 3:
|
214
|
+
roomDeviceTypeList = _context8.sent;
|
215
|
+
|
216
|
+
case 4:
|
217
|
+
return _context8.abrupt("return", roomDeviceTypeList);
|
218
|
+
|
219
|
+
case 5:
|
220
|
+
case "end":
|
221
|
+
return _context8.stop();
|
222
|
+
}
|
207
223
|
}
|
208
224
|
}, _callee8);
|
209
225
|
}))();
|
@@ -215,17 +231,19 @@ export default {
|
|
215
231
|
getMetricList: function getMetricList(data) {
|
216
232
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
|
217
233
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
218
|
-
while (1)
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
234
|
+
while (1) {
|
235
|
+
switch (_context9.prev = _context9.next) {
|
236
|
+
case 0:
|
237
|
+
_context9.next = 2;
|
238
|
+
return request.post("/mdc/v1/api/metric/list", data);
|
239
|
+
|
240
|
+
case 2:
|
241
|
+
return _context9.abrupt("return", _context9.sent);
|
242
|
+
|
243
|
+
case 3:
|
244
|
+
case "end":
|
245
|
+
return _context9.stop();
|
246
|
+
}
|
229
247
|
}
|
230
248
|
}, _callee9);
|
231
249
|
}))();
|
@@ -237,17 +255,19 @@ export default {
|
|
237
255
|
commonQueryCiData: function commonQueryCiData(params) {
|
238
256
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
|
239
257
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
240
|
-
while (1)
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
258
|
+
while (1) {
|
259
|
+
switch (_context10.prev = _context10.next) {
|
260
|
+
case 0:
|
261
|
+
_context10.next = 2;
|
262
|
+
return request.post("/mdc/v1/api/cmdb/commonQueryCiData", params);
|
263
|
+
|
264
|
+
case 2:
|
265
|
+
return _context10.abrupt("return", _context10.sent);
|
266
|
+
|
267
|
+
case 3:
|
268
|
+
case "end":
|
269
|
+
return _context10.stop();
|
270
|
+
}
|
251
271
|
}
|
252
272
|
}, _callee10);
|
253
273
|
}))();
|
@@ -12,19 +12,21 @@ export default {
|
|
12
12
|
saveSerializeData: function saveSerializeData(id, data) {
|
13
13
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
14
14
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
15
|
-
while (1)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
while (1) {
|
16
|
+
switch (_context.prev = _context.next) {
|
17
|
+
case 0:
|
18
|
+
_context.next = 2;
|
19
|
+
return request.post(TOPO_API_ROOT + "/structure/" + id, {
|
20
|
+
data: data
|
21
|
+
});
|
21
22
|
|
22
|
-
|
23
|
-
|
23
|
+
case 2:
|
24
|
+
return _context.abrupt("return", _context.sent);
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
case 3:
|
27
|
+
case "end":
|
28
|
+
return _context.stop();
|
29
|
+
}
|
28
30
|
}
|
29
31
|
}, _callee);
|
30
32
|
}))();
|
@@ -9,18 +9,20 @@ function _getMetricsByMonitorTemplateCodes() {
|
|
9
9
|
_getMetricsByMonitorTemplateCodes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(mtCodes) {
|
10
10
|
var result;
|
11
11
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
12
|
-
while (1)
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
while (1) {
|
13
|
+
switch (_context.prev = _context.next) {
|
14
|
+
case 0:
|
15
|
+
_context.next = 2;
|
16
|
+
return request.post('/topo/v1/api/attributes/metricByTemplateCode', mtCodes);
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
case 2:
|
19
|
+
result = _context.sent;
|
20
|
+
return _context.abrupt("return", result);
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
22
|
+
case 4:
|
23
|
+
case "end":
|
24
|
+
return _context.stop();
|
25
|
+
}
|
24
26
|
}
|
25
27
|
}, _callee);
|
26
28
|
}));
|
@@ -21,27 +21,29 @@ export default {
|
|
21
21
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
22
22
|
var modelTree, dicts;
|
23
23
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
24
|
-
while (1)
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
while (1) {
|
25
|
+
switch (_context.prev = _context.next) {
|
26
|
+
case 0:
|
27
|
+
_context.next = 2;
|
28
|
+
return queryAllModel();
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
30
|
+
case 2:
|
31
|
+
modelTree = _context.sent;
|
32
|
+
dicts = getAllCiTypes(modelTree);
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
34
|
+
_this.update({
|
35
|
+
typeDicts: dicts.map(function (item) {
|
36
|
+
return _extends({}, item, {
|
37
|
+
label: item.name,
|
38
|
+
value: item.code
|
39
|
+
});
|
40
|
+
})
|
41
|
+
});
|
41
42
|
|
42
|
-
|
43
|
-
|
44
|
-
|
43
|
+
case 5:
|
44
|
+
case "end":
|
45
|
+
return _context.stop();
|
46
|
+
}
|
45
47
|
}
|
46
48
|
}, _callee);
|
47
49
|
}))();
|
@@ -53,51 +55,53 @@ export default {
|
|
53
55
|
var attrData, metricsData, code, _attrData$attributes, attributes, _metricsData$metrics, metrics, meta;
|
54
56
|
|
55
57
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
56
|
-
while (1)
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
while (1) {
|
59
|
+
switch (_context2.prev = _context2.next) {
|
60
|
+
case 0:
|
61
|
+
_this2.update({
|
62
|
+
currentCi: {
|
63
|
+
code: ciCode,
|
64
|
+
meta: []
|
65
|
+
}
|
66
|
+
});
|
64
67
|
|
65
|
-
|
66
|
-
|
68
|
+
_context2.next = 3;
|
69
|
+
return getCi(ciCode);
|
67
70
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
71
|
+
case 3:
|
72
|
+
attrData = _context2.sent;
|
73
|
+
_context2.next = 6;
|
74
|
+
return getCiMetric(ciCode);
|
72
75
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
76
|
+
case 6:
|
77
|
+
metricsData = _context2.sent;
|
78
|
+
code = attrData.code, _attrData$attributes = attrData.attributes, attributes = _attrData$attributes === void 0 ? [] : _attrData$attributes;
|
79
|
+
_metricsData$metrics = metricsData.metrics, metrics = _metricsData$metrics === void 0 ? [] : _metricsData$metrics;
|
80
|
+
meta = attributes.map(function (attr) {
|
81
|
+
return {
|
82
|
+
code: attr.code,
|
83
|
+
name: attr.name,
|
84
|
+
type: 'attributes'
|
85
|
+
};
|
86
|
+
}).concat(metrics.map(function (metric) {
|
87
|
+
return {
|
88
|
+
code: metric.code,
|
89
|
+
name: metric.name,
|
90
|
+
type: 'metrics'
|
91
|
+
};
|
92
|
+
}));
|
90
93
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
_this2.update({
|
95
|
+
currentCi: {
|
96
|
+
code: code,
|
97
|
+
meta: meta
|
98
|
+
}
|
99
|
+
});
|
97
100
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
+
case 11:
|
102
|
+
case "end":
|
103
|
+
return _context2.stop();
|
104
|
+
}
|
101
105
|
}
|
102
106
|
}, _callee2);
|
103
107
|
}))();
|