@riil-frontend/component-topology 11.0.33 → 11.0.35
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 +52 -45
- package/es/components/MultiResourceDrawer/index.js +22 -26
- package/es/components/ResourceList/ResourceSelect.js +55 -58
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +30 -34
- package/es/components/SingleResourceDrawer/SelectDrawer.js +24 -28
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +29 -33
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
- 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 +149 -178
- package/es/core/editor/components/BackgroundView/index.module.scss +2 -1
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +26 -30
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -34
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +20 -24
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +13 -17
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +17 -21
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +27 -31
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +16 -20
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +37 -55
- 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 +8 -10
- package/es/core/editor/store/topoEdit.js +4 -6
- package/es/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/es/core/hooks/usePolling.js +130 -142
- package/es/core/hooks/useResourceConfig.js +76 -100
- package/es/core/hooks/useTopoEdit.js +525 -623
- package/es/core/models/Alarm.js +319 -402
- package/es/core/models/AttributeMetricDisplay.js +115 -143
- package/es/core/models/PluginManager.js +4 -3
- package/es/core/models/SelectionModel.js +4 -5
- package/es/core/models/TopoApp.js +279 -436
- package/es/core/models/TopoGraphView.js +28 -41
- package/es/core/models/cache/CiCache.js +34 -39
- package/es/core/models/cache/CiTypeCache.js +47 -61
- package/es/core/models/cache/DictCache.js +36 -42
- package/es/core/models/graph/Background.js +21 -26
- package/es/core/models/plugins/resourceWebControllUrl.js +84 -103
- package/es/core/models/tagstips/ElementTagTipConfig.js +44 -58
- package/es/core/models/topoData.js +73 -77
- package/es/core/models/utils/linkUtils.js +46 -51
- 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 +14 -18
- package/es/core/services/cmdb.js +23 -27
- package/es/core/services/index.js +48 -68
- package/es/core/services/overview.js +131 -151
- package/es/core/services/topo/basic.js +37 -41
- package/es/core/services/topo/tagtip.js +15 -19
- package/es/core/store/models/ciModel.js +58 -62
- package/es/core/store/models/customIcon.js +126 -145
- 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 +23 -27
- package/es/core/utils/saveSerialize.js +14 -18
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +20 -25
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +363 -409
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +112 -131
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +40 -46
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +219 -275
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +45 -54
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +32 -44
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +23 -27
- package/es/networkTopo/components/Link/hook.js +85 -96
- package/es/networkTopo/components/Link/index.js +104 -126
- package/es/networkTopo/components/Link/setting.js +48 -52
- package/es/networkTopo/getTopoData.js +73 -92
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +34 -39
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/es/networkTopo/models/TopoCenter.js +28 -46
- package/es/networkTopo/services/alert.js +18 -22
- package/es/networkTopo/services/authorization.js +45 -55
- package/es/networkTopo/services/cmdb.js +548 -696
- package/es/networkTopo/services/funcAuth.js +22 -24
- package/es/networkTopo/services/link.js +107 -117
- package/es/networkTopo/services/mdc.js +33 -48
- package/es/networkTopo/services/metric.js +38 -47
- package/es/networkTopo/services/model.js +616 -809
- 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 +57 -61
- package/lib/components/MultiResourceDrawer/index.js +22 -26
- package/lib/components/ResourceList/ResourceSelect.js +54 -58
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +33 -37
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +24 -28
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +36 -40
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
- 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 +148 -177
- package/lib/core/editor/components/BackgroundView/index.module.scss +2 -1
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +28 -32
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +34 -34
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +23 -28
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +14 -18
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +18 -22
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +32 -36
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +18 -22
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +41 -59
- 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 +8 -10
- package/lib/core/editor/store/topoEdit.js +4 -6
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/lib/core/hooks/usePolling.js +129 -141
- package/lib/core/hooks/useResourceConfig.js +76 -100
- package/lib/core/hooks/useTopoEdit.js +517 -615
- package/lib/core/models/Alarm.js +313 -396
- package/lib/core/models/AttributeMetricDisplay.js +118 -146
- package/lib/core/models/PluginManager.js +4 -3
- package/lib/core/models/SelectionModel.js +4 -5
- package/lib/core/models/TopoApp.js +279 -436
- package/lib/core/models/TopoGraphView.js +28 -41
- package/lib/core/models/cache/CiCache.js +39 -44
- package/lib/core/models/cache/CiTypeCache.js +48 -62
- package/lib/core/models/cache/DictCache.js +39 -45
- package/lib/core/models/graph/Background.js +22 -27
- package/lib/core/models/plugins/resourceWebControllUrl.js +82 -101
- package/lib/core/models/tagstips/ElementTagTipConfig.js +44 -58
- package/lib/core/models/topoData.js +73 -78
- package/lib/core/models/utils/linkUtils.js +45 -51
- 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 +14 -19
- package/lib/core/services/cmdb.js +24 -29
- package/lib/core/services/index.js +53 -72
- package/lib/core/services/overview.js +131 -151
- package/lib/core/services/topo/basic.js +37 -41
- package/lib/core/services/topo/tagtip.js +16 -21
- package/lib/core/store/models/ciModel.js +66 -70
- package/lib/core/store/models/customIcon.js +126 -145
- 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 +26 -31
- package/lib/core/utils/saveSerialize.js +13 -18
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +21 -26
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +364 -410
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +114 -133
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +44 -50
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +220 -274
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +40 -50
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +35 -47
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +24 -28
- package/lib/networkTopo/components/Link/hook.js +86 -98
- package/lib/networkTopo/components/Link/index.js +105 -127
- package/lib/networkTopo/components/Link/setting.js +48 -52
- package/lib/networkTopo/getTopoData.js +73 -92
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +35 -40
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/lib/networkTopo/models/TopoCenter.js +28 -46
- package/lib/networkTopo/services/alert.js +18 -22
- package/lib/networkTopo/services/authorization.js +55 -65
- package/lib/networkTopo/services/cmdb.js +551 -700
- package/lib/networkTopo/services/funcAuth.js +24 -26
- package/lib/networkTopo/services/link.js +108 -118
- package/lib/networkTopo/services/mdc.js +35 -51
- package/lib/networkTopo/services/metric.js +37 -47
- package/lib/networkTopo/services/model.js +615 -809
- 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 +63 -68
- package/package.json +4 -3
@@ -25,19 +25,17 @@ 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
|
-
|
39
|
-
return _context.stop();
|
40
|
-
}
|
28
|
+
while (1) switch (_context.prev = _context.next) {
|
29
|
+
case 0:
|
30
|
+
_context.next = 2;
|
31
|
+
return _componentTopologyUtils.request.post('/health/v1/api/management/getRiskList', params);
|
32
|
+
|
33
|
+
case 2:
|
34
|
+
return _context.abrupt("return", _context.sent);
|
35
|
+
|
36
|
+
case 3:
|
37
|
+
case "end":
|
38
|
+
return _context.stop();
|
41
39
|
}
|
42
40
|
}, _callee);
|
43
41
|
}))();
|
@@ -52,32 +50,30 @@ var _default = {
|
|
52
50
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
53
51
|
var components;
|
54
52
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
55
|
-
while (1) {
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
return _context2.stop();
|
80
|
-
}
|
53
|
+
while (1) switch (_context2.prev = _context2.next) {
|
54
|
+
case 0:
|
55
|
+
components = ciComponentsMap[id];
|
56
|
+
|
57
|
+
if (components) {
|
58
|
+
_context2.next = 6;
|
59
|
+
break;
|
60
|
+
}
|
61
|
+
|
62
|
+
_context2.next = 4;
|
63
|
+
return _componentTopologyUtils.request.post('/mdc/v1/api/cmdb/queryAllComponentsByCiId', {
|
64
|
+
id: id
|
65
|
+
});
|
66
|
+
|
67
|
+
case 4:
|
68
|
+
components = _context2.sent;
|
69
|
+
ciComponentsMap[id] = components;
|
70
|
+
|
71
|
+
case 6:
|
72
|
+
return _context2.abrupt("return", components);
|
73
|
+
|
74
|
+
case 7:
|
75
|
+
case "end":
|
76
|
+
return _context2.stop();
|
81
77
|
}
|
82
78
|
}, _callee2);
|
83
79
|
}))();
|
@@ -90,19 +86,17 @@ var _default = {
|
|
90
86
|
handleAlarm: function handleAlarm(params) {
|
91
87
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
92
88
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
93
|
-
while (1) {
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
return _context3.stop();
|
105
|
-
}
|
89
|
+
while (1) switch (_context3.prev = _context3.next) {
|
90
|
+
case 0:
|
91
|
+
_context3.next = 2;
|
92
|
+
return _componentTopologyUtils.request.post('/alert/v1/api/alert/handleAlerts', params);
|
93
|
+
|
94
|
+
case 2:
|
95
|
+
return _context3.abrupt("return", _context3.sent);
|
96
|
+
|
97
|
+
case 3:
|
98
|
+
case "end":
|
99
|
+
return _context3.stop();
|
106
100
|
}
|
107
101
|
}, _callee3);
|
108
102
|
}))();
|
@@ -114,19 +108,17 @@ var _default = {
|
|
114
108
|
getUserId: function getUserId() {
|
115
109
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
116
110
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
117
|
-
while (1) {
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
return _context4.stop();
|
129
|
-
}
|
111
|
+
while (1) switch (_context4.prev = _context4.next) {
|
112
|
+
case 0:
|
113
|
+
_context4.next = 2;
|
114
|
+
return _componentTopologyUtils.request.post('/auth-ui/v1/api/user/token/checkToken');
|
115
|
+
|
116
|
+
case 2:
|
117
|
+
return _context4.abrupt("return", _context4.sent);
|
118
|
+
|
119
|
+
case 3:
|
120
|
+
case "end":
|
121
|
+
return _context4.stop();
|
130
122
|
}
|
131
123
|
}, _callee4);
|
132
124
|
}))();
|
@@ -138,19 +130,17 @@ var _default = {
|
|
138
130
|
getOverviewConfig: function getOverviewConfig(topoId, templateCode) {
|
139
131
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
140
132
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
141
|
-
while (1) {
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
return _context5.stop();
|
153
|
-
}
|
133
|
+
while (1) switch (_context5.prev = _context5.next) {
|
134
|
+
case 0:
|
135
|
+
_context5.next = 2;
|
136
|
+
return _componentTopologyUtils.request.get("/topo/v1/api/config/overview/" + topoId + "/" + templateCode);
|
137
|
+
|
138
|
+
case 2:
|
139
|
+
return _context5.abrupt("return", _context5.sent);
|
140
|
+
|
141
|
+
case 3:
|
142
|
+
case "end":
|
143
|
+
return _context5.stop();
|
154
144
|
}
|
155
145
|
}, _callee5);
|
156
146
|
}))();
|
@@ -162,19 +152,17 @@ var _default = {
|
|
162
152
|
saveOverviewConfig: function saveOverviewConfig(topoId, templateCode, data) {
|
163
153
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
164
154
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
165
|
-
while (1) {
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
return _context6.stop();
|
177
|
-
}
|
155
|
+
while (1) switch (_context6.prev = _context6.next) {
|
156
|
+
case 0:
|
157
|
+
_context6.next = 2;
|
158
|
+
return _componentTopologyUtils.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();
|
178
166
|
}
|
179
167
|
}, _callee6);
|
180
168
|
}))();
|
@@ -186,19 +174,17 @@ var _default = {
|
|
186
174
|
getResMetricList: function getResMetricList(data) {
|
187
175
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
188
176
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
189
|
-
while (1) {
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
return _context7.stop();
|
201
|
-
}
|
177
|
+
while (1) switch (_context7.prev = _context7.next) {
|
178
|
+
case 0:
|
179
|
+
_context7.next = 2;
|
180
|
+
return _componentTopologyUtils.request.post("/mdc/v1/api/metric/list", data);
|
181
|
+
|
182
|
+
case 2:
|
183
|
+
return _context7.abrupt("return", _context7.sent);
|
184
|
+
|
185
|
+
case 3:
|
186
|
+
case "end":
|
187
|
+
return _context7.stop();
|
202
188
|
}
|
203
189
|
}, _callee7);
|
204
190
|
}))();
|
@@ -210,27 +196,25 @@ var _default = {
|
|
210
196
|
getDeviceTypeList: function getDeviceTypeList() {
|
211
197
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
212
198
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
213
|
-
while (1) {
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
return _context8.stop();
|
233
|
-
}
|
199
|
+
while (1) switch (_context8.prev = _context8.next) {
|
200
|
+
case 0:
|
201
|
+
if (roomDeviceTypeList) {
|
202
|
+
_context8.next = 4;
|
203
|
+
break;
|
204
|
+
}
|
205
|
+
|
206
|
+
_context8.next = 3;
|
207
|
+
return _componentTopologyUtils.request.post("/room/v1/api/device/type/list", {});
|
208
|
+
|
209
|
+
case 3:
|
210
|
+
roomDeviceTypeList = _context8.sent;
|
211
|
+
|
212
|
+
case 4:
|
213
|
+
return _context8.abrupt("return", roomDeviceTypeList);
|
214
|
+
|
215
|
+
case 5:
|
216
|
+
case "end":
|
217
|
+
return _context8.stop();
|
234
218
|
}
|
235
219
|
}, _callee8);
|
236
220
|
}))();
|
@@ -242,19 +226,17 @@ var _default = {
|
|
242
226
|
getMetricList: function getMetricList(data) {
|
243
227
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
244
228
|
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
245
|
-
while (1) {
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
return _context9.stop();
|
257
|
-
}
|
229
|
+
while (1) switch (_context9.prev = _context9.next) {
|
230
|
+
case 0:
|
231
|
+
_context9.next = 2;
|
232
|
+
return _componentTopologyUtils.request.post("/mdc/v1/api/metric/list", data);
|
233
|
+
|
234
|
+
case 2:
|
235
|
+
return _context9.abrupt("return", _context9.sent);
|
236
|
+
|
237
|
+
case 3:
|
238
|
+
case "end":
|
239
|
+
return _context9.stop();
|
258
240
|
}
|
259
241
|
}, _callee9);
|
260
242
|
}))();
|
@@ -266,19 +248,17 @@ var _default = {
|
|
266
248
|
commonQueryCiData: function commonQueryCiData(params) {
|
267
249
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
268
250
|
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
269
|
-
while (1) {
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
return _context10.stop();
|
281
|
-
}
|
251
|
+
while (1) switch (_context10.prev = _context10.next) {
|
252
|
+
case 0:
|
253
|
+
_context10.next = 2;
|
254
|
+
return _componentTopologyUtils.request.post("/mdc/v1/api/cmdb/commonQueryCiData", params);
|
255
|
+
|
256
|
+
case 2:
|
257
|
+
return _context10.abrupt("return", _context10.sent);
|
258
|
+
|
259
|
+
case 3:
|
260
|
+
case "end":
|
261
|
+
return _context10.stop();
|
282
262
|
}
|
283
263
|
}, _callee10);
|
284
264
|
}))();
|
@@ -122,32 +122,30 @@ var _default = {
|
|
122
122
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
123
123
|
var data, obj;
|
124
124
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
125
|
-
while (1) {
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
return _context.stop();
|
150
|
-
}
|
125
|
+
while (1) switch (_context.prev = _context.next) {
|
126
|
+
case 0:
|
127
|
+
data = Array.isArray(groups) ? groups : [];
|
128
|
+
|
129
|
+
if (resources) {
|
130
|
+
data.push({
|
131
|
+
parentId: TOPO_PARENT_ID,
|
132
|
+
order: 100,
|
133
|
+
resources: resources
|
134
|
+
});
|
135
|
+
}
|
136
|
+
|
137
|
+
obj = prepareGroupParams(data);
|
138
|
+
_context.next = 5;
|
139
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/structure/byCondition/" + id, (0, _extends2["default"])({}, obj, {
|
140
|
+
exportLinkIdList: exportLinkIdList
|
141
|
+
}));
|
142
|
+
|
143
|
+
case 5:
|
144
|
+
return _context.abrupt("return", _context.sent);
|
145
|
+
|
146
|
+
case 6:
|
147
|
+
case "end":
|
148
|
+
return _context.stop();
|
151
149
|
}
|
152
150
|
}, _callee);
|
153
151
|
}))();
|
@@ -162,21 +160,19 @@ var _default = {
|
|
162
160
|
saveSerializeData: function saveSerializeData(id, data) {
|
163
161
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
164
162
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
165
|
-
while (1) {
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
return _context2.stop();
|
179
|
-
}
|
163
|
+
while (1) switch (_context2.prev = _context2.next) {
|
164
|
+
case 0:
|
165
|
+
_context2.next = 2;
|
166
|
+
return _componentTopologyUtils.request.post(_constants.TOPO_API_ROOT + "/structure/" + id, {
|
167
|
+
data: data
|
168
|
+
});
|
169
|
+
|
170
|
+
case 2:
|
171
|
+
return _context2.abrupt("return", _context2.sent);
|
172
|
+
|
173
|
+
case 3:
|
174
|
+
case "end":
|
175
|
+
return _context2.stop();
|
180
176
|
}
|
181
177
|
}, _callee2);
|
182
178
|
}))();
|
@@ -11,30 +11,25 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
11
11
|
|
12
12
|
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
13
13
|
|
14
|
-
|
15
|
-
return _getMetricsByMonitorTemplateCodes.apply(this, arguments);
|
16
|
-
}
|
14
|
+
var _getMetricsByMonitorTemplateCodes;
|
17
15
|
|
18
|
-
function
|
19
|
-
_getMetricsByMonitorTemplateCodes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(mtCodes) {
|
16
|
+
function getMetricsByMonitorTemplateCodes(_x) {
|
17
|
+
return (_getMetricsByMonitorTemplateCodes = _getMetricsByMonitorTemplateCodes || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(mtCodes) {
|
20
18
|
var result;
|
21
19
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
22
|
-
while (1) {
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
return _context.stop();
|
35
|
-
}
|
20
|
+
while (1) switch (_context.prev = _context.next) {
|
21
|
+
case 0:
|
22
|
+
_context.next = 2;
|
23
|
+
return _componentTopologyUtils.request.post('/topo/v1/api/attributes/metricByTemplateCode', mtCodes);
|
24
|
+
|
25
|
+
case 2:
|
26
|
+
result = _context.sent;
|
27
|
+
return _context.abrupt("return", result);
|
28
|
+
|
29
|
+
case 4:
|
30
|
+
case "end":
|
31
|
+
return _context.stop();
|
36
32
|
}
|
37
33
|
}, _callee);
|
38
|
-
}));
|
39
|
-
return _getMetricsByMonitorTemplateCodes.apply(this, arguments);
|
34
|
+
}))).apply(this, arguments);
|
40
35
|
}
|
@@ -33,29 +33,27 @@ var _default = {
|
|
33
33
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
34
34
|
var modelTree, dicts;
|
35
35
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
36
|
-
while (1) {
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
return _context.stop();
|
58
|
-
}
|
36
|
+
while (1) switch (_context.prev = _context.next) {
|
37
|
+
case 0:
|
38
|
+
_context.next = 2;
|
39
|
+
return (0, _model.queryAllModel)();
|
40
|
+
|
41
|
+
case 2:
|
42
|
+
modelTree = _context.sent;
|
43
|
+
dicts = (0, _ciType.getAllCiTypes)(modelTree);
|
44
|
+
|
45
|
+
_this.update({
|
46
|
+
typeDicts: dicts.map(function (item) {
|
47
|
+
return (0, _extends2["default"])({}, item, {
|
48
|
+
label: item.name,
|
49
|
+
value: item.code
|
50
|
+
});
|
51
|
+
})
|
52
|
+
});
|
53
|
+
|
54
|
+
case 5:
|
55
|
+
case "end":
|
56
|
+
return _context.stop();
|
59
57
|
}
|
60
58
|
}, _callee);
|
61
59
|
}))();
|
@@ -67,53 +65,51 @@ var _default = {
|
|
67
65
|
var attrData, metricsData, code, _attrData$attributes, attributes, _metricsData$metrics, metrics, meta;
|
68
66
|
|
69
67
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
70
|
-
while (1) {
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
return _context2.stop();
|
116
|
-
}
|
68
|
+
while (1) switch (_context2.prev = _context2.next) {
|
69
|
+
case 0:
|
70
|
+
_this2.update({
|
71
|
+
currentCi: {
|
72
|
+
code: ciCode,
|
73
|
+
meta: []
|
74
|
+
}
|
75
|
+
});
|
76
|
+
|
77
|
+
_context2.next = 3;
|
78
|
+
return (0, _model.getCi)(ciCode);
|
79
|
+
|
80
|
+
case 3:
|
81
|
+
attrData = _context2.sent;
|
82
|
+
_context2.next = 6;
|
83
|
+
return (0, _model.getCiMetric)(ciCode);
|
84
|
+
|
85
|
+
case 6:
|
86
|
+
metricsData = _context2.sent;
|
87
|
+
code = attrData.code, _attrData$attributes = attrData.attributes, attributes = _attrData$attributes === void 0 ? [] : _attrData$attributes;
|
88
|
+
_metricsData$metrics = metricsData.metrics, metrics = _metricsData$metrics === void 0 ? [] : _metricsData$metrics;
|
89
|
+
meta = attributes.map(function (attr) {
|
90
|
+
return {
|
91
|
+
code: attr.code,
|
92
|
+
name: attr.name,
|
93
|
+
type: 'attributes'
|
94
|
+
};
|
95
|
+
}).concat(metrics.map(function (metric) {
|
96
|
+
return {
|
97
|
+
code: metric.code,
|
98
|
+
name: metric.name,
|
99
|
+
type: 'metrics'
|
100
|
+
};
|
101
|
+
}));
|
102
|
+
|
103
|
+
_this2.update({
|
104
|
+
currentCi: {
|
105
|
+
code: code,
|
106
|
+
meta: meta
|
107
|
+
}
|
108
|
+
});
|
109
|
+
|
110
|
+
case 11:
|
111
|
+
case "end":
|
112
|
+
return _context2.stop();
|
117
113
|
}
|
118
114
|
}, _callee2);
|
119
115
|
}))();
|