@riil-frontend/component-topology 10.0.58 → 10.0.59
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/IndexSettingDrawer/index.js +6 -5
- 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/ResourceDisplay/useElementTagTipConfig.js +78 -100
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
- package/es/core/components/titlebar/widgets/TitleWidget.js +5 -4
- 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/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 +110 -122
- package/es/core/hooks/useResourceConfig.js +76 -100
- package/es/core/hooks/useTopoEdit.js +539 -638
- package/es/core/models/Alarm.js +311 -394
- 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 +287 -454
- package/es/core/models/TopoGraphView.js +28 -41
- package/es/core/models/cache/CiCache.js +34 -39
- package/es/core/models/cache/CiTypeCache.js +70 -84
- 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 +34 -40
- package/es/core/models/topoData.js +73 -77
- package/es/core/models/utils/linkUtils.js +46 -51
- 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 +11 -13
- 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 +28 -32
- package/es/core/store/models/topoConfig.js +217 -233
- package/es/core/store/models/topoGraphView.js +4 -6
- package/es/core/store/models/topoMod.js +379 -401
- 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 copy.js +104 -126
- 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 +274 -314
- 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/linkDynamicStyle.js +102 -108
- package/es/networkTopo/store/linkDynamicStyleConfig.js +42 -44
- package/es/networkTopo/store/linkManager.js +4 -6
- 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/IndexSettingDrawer/index.js +6 -5
- 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/ResourceDisplay/useElementTagTipConfig.js +82 -104
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
- package/lib/core/components/titlebar/widgets/TitleWidget.js +5 -4
- 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/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 +108 -120
- package/lib/core/hooks/useResourceConfig.js +76 -100
- package/lib/core/hooks/useTopoEdit.js +530 -629
- package/lib/core/models/Alarm.js +308 -391
- 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 +287 -454
- package/lib/core/models/TopoGraphView.js +28 -41
- package/lib/core/models/cache/CiCache.js +39 -44
- package/lib/core/models/cache/CiTypeCache.js +71 -85
- 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 +34 -40
- package/lib/core/models/topoData.js +73 -78
- package/lib/core/models/utils/linkUtils.js +45 -51
- 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 +13 -15
- 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 +34 -38
- package/lib/core/store/models/topoConfig.js +224 -240
- package/lib/core/store/models/topoGraphView.js +4 -6
- package/lib/core/store/models/topoMod.js +381 -403
- 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 copy.js +105 -127
- 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 +277 -317
- 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/linkDynamicStyle.js +103 -109
- package/lib/networkTopo/store/linkDynamicStyleConfig.js +42 -44
- package/lib/networkTopo/store/linkManager.js +4 -6
- 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 +3 -3
@@ -135,19 +135,17 @@ var _default = (0, _extends2["default"])({
|
|
135
135
|
getTopoTree: function getTopoTree(params) {
|
136
136
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
137
137
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
138
|
-
while (1) {
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
return _context.stop();
|
150
|
-
}
|
138
|
+
while (1) switch (_context.prev = _context.next) {
|
139
|
+
case 0:
|
140
|
+
_context.next = 2;
|
141
|
+
return _componentTopologyUtils.request.get(API_ROOT + "/menu");
|
142
|
+
|
143
|
+
case 2:
|
144
|
+
return _context.abrupt("return", _context.sent);
|
145
|
+
|
146
|
+
case 3:
|
147
|
+
case "end":
|
148
|
+
return _context.stop();
|
151
149
|
}
|
152
150
|
}, _callee);
|
153
151
|
}))();
|
@@ -156,19 +154,17 @@ var _default = (0, _extends2["default"])({
|
|
156
154
|
getTopoTreeByLoginUser: function getTopoTreeByLoginUser(params) {
|
157
155
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
158
156
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
159
|
-
while (1) {
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
return _context2.stop();
|
171
|
-
}
|
157
|
+
while (1) switch (_context2.prev = _context2.next) {
|
158
|
+
case 0:
|
159
|
+
_context2.next = 2;
|
160
|
+
return _componentTopologyUtils.request.get('/topo/v1/api/menuByLoginUser');
|
161
|
+
|
162
|
+
case 2:
|
163
|
+
return _context2.abrupt("return", _context2.sent);
|
164
|
+
|
165
|
+
case 3:
|
166
|
+
case "end":
|
167
|
+
return _context2.stop();
|
172
168
|
}
|
173
169
|
}, _callee2);
|
174
170
|
}))();
|
@@ -184,19 +180,17 @@ var _default = (0, _extends2["default"])({
|
|
184
180
|
addNewTopo: function addNewTopo(params) {
|
185
181
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
186
182
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
187
|
-
while (1) {
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
return _context3.stop();
|
199
|
-
}
|
183
|
+
while (1) switch (_context3.prev = _context3.next) {
|
184
|
+
case 0:
|
185
|
+
_context3.next = 2;
|
186
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/menu", params);
|
187
|
+
|
188
|
+
case 2:
|
189
|
+
return _context3.abrupt("return", _context3.sent);
|
190
|
+
|
191
|
+
case 3:
|
192
|
+
case "end":
|
193
|
+
return _context3.stop();
|
200
194
|
}
|
201
195
|
}, _callee3);
|
202
196
|
}))();
|
@@ -209,19 +203,17 @@ var _default = (0, _extends2["default"])({
|
|
209
203
|
editTopo: function editTopo(params) {
|
210
204
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
211
205
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
212
|
-
while (1) {
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
return _context4.stop();
|
224
|
-
}
|
206
|
+
while (1) switch (_context4.prev = _context4.next) {
|
207
|
+
case 0:
|
208
|
+
_context4.next = 2;
|
209
|
+
return _componentTopologyUtils.request.put(API_ROOT + "/menu", params);
|
210
|
+
|
211
|
+
case 2:
|
212
|
+
return _context4.abrupt("return", _context4.sent);
|
213
|
+
|
214
|
+
case 3:
|
215
|
+
case "end":
|
216
|
+
return _context4.stop();
|
225
217
|
}
|
226
218
|
}, _callee4);
|
227
219
|
}))();
|
@@ -236,19 +228,17 @@ var _default = (0, _extends2["default"])({
|
|
236
228
|
copyTopo: function copyTopo(params) {
|
237
229
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
238
230
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
239
|
-
while (1) {
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
return _context5.stop();
|
251
|
-
}
|
231
|
+
while (1) switch (_context5.prev = _context5.next) {
|
232
|
+
case 0:
|
233
|
+
_context5.next = 2;
|
234
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/menu/copy", params);
|
235
|
+
|
236
|
+
case 2:
|
237
|
+
return _context5.abrupt("return", _context5.sent);
|
238
|
+
|
239
|
+
case 3:
|
240
|
+
case "end":
|
241
|
+
return _context5.stop();
|
252
242
|
}
|
253
243
|
}, _callee5);
|
254
244
|
}))();
|
@@ -262,19 +252,17 @@ var _default = (0, _extends2["default"])({
|
|
262
252
|
deleteTopoonTree: function deleteTopoonTree(id) {
|
263
253
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
264
254
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
265
|
-
while (1) {
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
return _context6.stop();
|
277
|
-
}
|
255
|
+
while (1) switch (_context6.prev = _context6.next) {
|
256
|
+
case 0:
|
257
|
+
_context6.next = 2;
|
258
|
+
return _componentTopologyUtils.request["delete"](API_ROOT + "/menu/" + id);
|
259
|
+
|
260
|
+
case 2:
|
261
|
+
return _context6.abrupt("return", _context6.sent);
|
262
|
+
|
263
|
+
case 3:
|
264
|
+
case "end":
|
265
|
+
return _context6.stop();
|
278
266
|
}
|
279
267
|
}, _callee6);
|
280
268
|
}))();
|
@@ -288,15 +276,13 @@ var _default = (0, _extends2["default"])({
|
|
288
276
|
setDefTopo: function setDefTopo(id) {
|
289
277
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
290
278
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
291
|
-
while (1) {
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
return _context7.stop();
|
299
|
-
}
|
279
|
+
while (1) switch (_context7.prev = _context7.next) {
|
280
|
+
case 0:
|
281
|
+
return _context7.abrupt("return", _componentTopologyUtils.request.put(API_ROOT + "/menu/default/" + id));
|
282
|
+
|
283
|
+
case 1:
|
284
|
+
case "end":
|
285
|
+
return _context7.stop();
|
300
286
|
}
|
301
287
|
}, _callee7);
|
302
288
|
}))();
|
@@ -315,19 +301,17 @@ var _default = (0, _extends2["default"])({
|
|
315
301
|
moveTopoOnTree: function moveTopoOnTree(params) {
|
316
302
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
317
303
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
318
|
-
while (1) {
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
return _context8.stop();
|
330
|
-
}
|
304
|
+
while (1) switch (_context8.prev = _context8.next) {
|
305
|
+
case 0:
|
306
|
+
_context8.next = 2;
|
307
|
+
return _componentTopologyUtils.request.put(API_ROOT + "/menu/move/", params);
|
308
|
+
|
309
|
+
case 2:
|
310
|
+
return _context8.abrupt("return", _context8.sent);
|
311
|
+
|
312
|
+
case 3:
|
313
|
+
case "end":
|
314
|
+
return _context8.stop();
|
331
315
|
}
|
332
316
|
}, _callee8);
|
333
317
|
}))();
|
@@ -343,26 +327,24 @@ var _default = (0, _extends2["default"])({
|
|
343
327
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
344
328
|
var id, template, layout, backgroundId;
|
345
329
|
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
346
|
-
while (1) {
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
return _context9.stop();
|
365
|
-
}
|
330
|
+
while (1) switch (_context9.prev = _context9.next) {
|
331
|
+
case 0:
|
332
|
+
id = _ref.id, template = _ref.template, layout = _ref.layout, backgroundId = _ref.backgroundId;
|
333
|
+
_context9.next = 3;
|
334
|
+
return _componentTopologyUtils.request.put(API_ROOT + "/menu", {
|
335
|
+
id: id,
|
336
|
+
showType: template,
|
337
|
+
layout: layout,
|
338
|
+
backgroundId: backgroundId || -1,
|
339
|
+
type: 1
|
340
|
+
});
|
341
|
+
|
342
|
+
case 3:
|
343
|
+
return _context9.abrupt("return", _context9.sent);
|
344
|
+
|
345
|
+
case 4:
|
346
|
+
case "end":
|
347
|
+
return _context9.stop();
|
366
348
|
}
|
367
349
|
}, _callee9);
|
368
350
|
}))();
|
@@ -377,19 +359,17 @@ var _default = (0, _extends2["default"])({
|
|
377
359
|
getResourceList: function getResourceList(conditions, query) {
|
378
360
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
379
361
|
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
380
|
-
while (1) {
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
return _context10.stop();
|
392
|
-
}
|
362
|
+
while (1) switch (_context10.prev = _context10.next) {
|
363
|
+
case 0:
|
364
|
+
_context10.next = 2;
|
365
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/resource", prepareResourceParams(conditions, query));
|
366
|
+
|
367
|
+
case 2:
|
368
|
+
return _context10.abrupt("return", _context10.sent);
|
369
|
+
|
370
|
+
case 3:
|
371
|
+
case "end":
|
372
|
+
return _context10.stop();
|
393
373
|
}
|
394
374
|
}, _callee10);
|
395
375
|
}))();
|
@@ -403,19 +383,17 @@ var _default = (0, _extends2["default"])({
|
|
403
383
|
getConditions: function getConditions(id) {
|
404
384
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11() {
|
405
385
|
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
406
|
-
while (1) {
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
return _context11.stop();
|
418
|
-
}
|
386
|
+
while (1) switch (_context11.prev = _context11.next) {
|
387
|
+
case 0:
|
388
|
+
_context11.next = 2;
|
389
|
+
return _componentTopologyUtils.request.get(API_ROOT + "/resource/" + id);
|
390
|
+
|
391
|
+
case 2:
|
392
|
+
return _context11.abrupt("return", _context11.sent);
|
393
|
+
|
394
|
+
case 3:
|
395
|
+
case "end":
|
396
|
+
return _context11.stop();
|
419
397
|
}
|
420
398
|
}, _callee11);
|
421
399
|
}))();
|
@@ -432,27 +410,25 @@ var _default = (0, _extends2["default"])({
|
|
432
410
|
|
433
411
|
var result;
|
434
412
|
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
435
|
-
while (1) {
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
return _context12.stop();
|
455
|
-
}
|
413
|
+
while (1) switch (_context12.prev = _context12.next) {
|
414
|
+
case 0:
|
415
|
+
_context12.next = 2;
|
416
|
+
return _componentTopologyUtils.request.get(API_ROOT + "/structure/both/" + id);
|
417
|
+
|
418
|
+
case 2:
|
419
|
+
result = _context12.sent;
|
420
|
+
return _context12.abrupt("return", (0, _exitLinkUtil.processExitLink)((0, _extends2["default"])({}, result, {
|
421
|
+
nodes: (_result$nodes = result.nodes) !== null && _result$nodes !== void 0 ? _result$nodes : [],
|
422
|
+
links: ((_result$links = result.links) !== null && _result$links !== void 0 ? _result$links : []).map(function (item) {
|
423
|
+
return (0, _extends2["default"])({}, item, {
|
424
|
+
ciType: 'network_link'
|
425
|
+
});
|
426
|
+
})
|
427
|
+
})));
|
428
|
+
|
429
|
+
case 4:
|
430
|
+
case "end":
|
431
|
+
return _context12.stop();
|
456
432
|
}
|
457
433
|
}, _callee12);
|
458
434
|
}))();
|
@@ -471,38 +447,36 @@ var _default = (0, _extends2["default"])({
|
|
471
447
|
|
472
448
|
var data, obj, result;
|
473
449
|
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
474
|
-
while (1) {
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
450
|
+
while (1) switch (_context13.prev = _context13.next) {
|
451
|
+
case 0:
|
452
|
+
data = isAvailableArray(groups) ? groups : [];
|
453
|
+
|
454
|
+
if (resources) {
|
455
|
+
data.push({
|
456
|
+
parentId: TOPO_PARENT_ID,
|
457
|
+
order: 100,
|
458
|
+
resources: resources
|
459
|
+
});
|
460
|
+
}
|
461
|
+
|
462
|
+
obj = prepareGroupParams(data);
|
463
|
+
_context13.next = 5;
|
464
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/structure/byCondition/" + id, (0, _extends2["default"])({}, obj));
|
465
|
+
|
466
|
+
case 5:
|
467
|
+
result = _context13.sent;
|
468
|
+
return _context13.abrupt("return", (0, _exitLinkUtil.processByConditionResult)((0, _extends2["default"])({}, result, {
|
469
|
+
nodes: (_result$nodes2 = result.nodes) !== null && _result$nodes2 !== void 0 ? _result$nodes2 : [],
|
470
|
+
links: ((_result$links2 = result.links) !== null && _result$links2 !== void 0 ? _result$links2 : []).map(function (item) {
|
471
|
+
return (0, _extends2["default"])({}, item, {
|
472
|
+
ciType: 'network_link'
|
484
473
|
});
|
485
|
-
}
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
case 5:
|
492
|
-
result = _context13.sent;
|
493
|
-
return _context13.abrupt("return", (0, _exitLinkUtil.processByConditionResult)((0, _extends2["default"])({}, result, {
|
494
|
-
nodes: (_result$nodes2 = result.nodes) !== null && _result$nodes2 !== void 0 ? _result$nodes2 : [],
|
495
|
-
links: ((_result$links2 = result.links) !== null && _result$links2 !== void 0 ? _result$links2 : []).map(function (item) {
|
496
|
-
return (0, _extends2["default"])({}, item, {
|
497
|
-
ciType: 'network_link'
|
498
|
-
});
|
499
|
-
})
|
500
|
-
}), obj.groups));
|
501
|
-
|
502
|
-
case 7:
|
503
|
-
case "end":
|
504
|
-
return _context13.stop();
|
505
|
-
}
|
474
|
+
})
|
475
|
+
}), obj.groups));
|
476
|
+
|
477
|
+
case 7:
|
478
|
+
case "end":
|
479
|
+
return _context13.stop();
|
506
480
|
}
|
507
481
|
}, _callee13);
|
508
482
|
}))();
|
@@ -519,32 +493,30 @@ var _default = (0, _extends2["default"])({
|
|
519
493
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14() {
|
520
494
|
var groups, resources, exportLinkIdList, otherConfig, newGroups, obj;
|
521
495
|
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
522
|
-
while (1) {
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
}
|
496
|
+
while (1) switch (_context14.prev = _context14.next) {
|
497
|
+
case 0:
|
498
|
+
groups = config.groups, resources = config.resources, exportLinkIdList = config.exportLinkIdList, otherConfig = (0, _objectWithoutPropertiesLoose2["default"])(config, _excluded);
|
499
|
+
newGroups = isAvailableArray(groups) ? groups : [];
|
500
|
+
|
501
|
+
if (resources) {
|
502
|
+
// 新建拓扑时
|
503
|
+
newGroups.push({
|
504
|
+
parentId: TOPO_PARENT_ID,
|
505
|
+
order: 100,
|
506
|
+
resources: resources
|
507
|
+
});
|
508
|
+
}
|
536
509
|
|
537
|
-
|
538
|
-
|
539
|
-
|
510
|
+
obj = prepareGroupParams(newGroups);
|
511
|
+
_context14.next = 6;
|
512
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/resource/" + id, (0, _extends2["default"])({}, otherConfig, obj));
|
540
513
|
|
541
|
-
|
542
|
-
|
514
|
+
case 6:
|
515
|
+
return _context14.abrupt("return", _context14.sent);
|
543
516
|
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
}
|
517
|
+
case 7:
|
518
|
+
case "end":
|
519
|
+
return _context14.stop();
|
548
520
|
}
|
549
521
|
}, _callee14);
|
550
522
|
}))();
|
@@ -559,21 +531,19 @@ var _default = (0, _extends2["default"])({
|
|
559
531
|
saveSerializeData: function saveSerializeData(id, data) {
|
560
532
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
561
533
|
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
562
|
-
while (1) {
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
return _context15.stop();
|
576
|
-
}
|
534
|
+
while (1) switch (_context15.prev = _context15.next) {
|
535
|
+
case 0:
|
536
|
+
_context15.next = 2;
|
537
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/structure/" + id, {
|
538
|
+
data: data
|
539
|
+
});
|
540
|
+
|
541
|
+
case 2:
|
542
|
+
return _context15.abrupt("return", _context15.sent);
|
543
|
+
|
544
|
+
case 3:
|
545
|
+
case "end":
|
546
|
+
return _context15.stop();
|
577
547
|
}
|
578
548
|
}, _callee15);
|
579
549
|
}))();
|
@@ -589,21 +559,19 @@ var _default = (0, _extends2["default"])({
|
|
589
559
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16() {
|
590
560
|
var parm;
|
591
561
|
return _regenerator["default"].wrap(function _callee16$(_context16) {
|
592
|
-
while (1) {
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
return _context16.stop();
|
606
|
-
}
|
562
|
+
while (1) switch (_context16.prev = _context16.next) {
|
563
|
+
case 0:
|
564
|
+
_rlog["default"].debug('saveTopoSettings', settings);
|
565
|
+
|
566
|
+
parm = {
|
567
|
+
id: id,
|
568
|
+
globalConfig: settings
|
569
|
+
};
|
570
|
+
return _context16.abrupt("return", _componentTopologyUtils.request.post(API_ROOT + "/config", parm));
|
571
|
+
|
572
|
+
case 3:
|
573
|
+
case "end":
|
574
|
+
return _context16.stop();
|
607
575
|
}
|
608
576
|
}, _callee16);
|
609
577
|
}))();
|
@@ -616,19 +584,17 @@ var _default = (0, _extends2["default"])({
|
|
616
584
|
openTopoAlarm: function openTopoAlarm(id) {
|
617
585
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17() {
|
618
586
|
return _regenerator["default"].wrap(function _callee17$(_context17) {
|
619
|
-
while (1) {
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
return _context17.stop();
|
631
|
-
}
|
587
|
+
while (1) switch (_context17.prev = _context17.next) {
|
588
|
+
case 0:
|
589
|
+
_context17.next = 2;
|
590
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/alarm?topoId=" + id);
|
591
|
+
|
592
|
+
case 2:
|
593
|
+
return _context17.abrupt("return", _context17.sent);
|
594
|
+
|
595
|
+
case 3:
|
596
|
+
case "end":
|
597
|
+
return _context17.stop();
|
632
598
|
}
|
633
599
|
}, _callee17);
|
634
600
|
}))();
|
@@ -641,19 +607,17 @@ var _default = (0, _extends2["default"])({
|
|
641
607
|
closeTopoAlarm: function closeTopoAlarm(id, secretKey) {
|
642
608
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18() {
|
643
609
|
return _regenerator["default"].wrap(function _callee18$(_context18) {
|
644
|
-
while (1) {
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
return _context18.stop();
|
656
|
-
}
|
610
|
+
while (1) switch (_context18.prev = _context18.next) {
|
611
|
+
case 0:
|
612
|
+
_context18.next = 2;
|
613
|
+
return _componentTopologyUtils.request["delete"](API_ROOT + "/alarm?topoId=" + id + "&secretKey=" + secretKey);
|
614
|
+
|
615
|
+
case 2:
|
616
|
+
return _context18.abrupt("return", _context18.sent);
|
617
|
+
|
618
|
+
case 3:
|
619
|
+
case "end":
|
620
|
+
return _context18.stop();
|
657
621
|
}
|
658
622
|
}, _callee18);
|
659
623
|
}))();
|
@@ -669,33 +633,31 @@ var _default = (0, _extends2["default"])({
|
|
669
633
|
|
670
634
|
var param;
|
671
635
|
return _regenerator["default"].wrap(function _callee19$(_context19) {
|
672
|
-
while (1) {
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
return _context19.stop();
|
698
|
-
}
|
636
|
+
while (1) switch (_context19.prev = _context19.next) {
|
637
|
+
case 0:
|
638
|
+
if (!(((_params$ids = params.ids) === null || _params$ids === void 0 ? void 0 : _params$ids.length) > 0)) {
|
639
|
+
_context19.next = 6;
|
640
|
+
break;
|
641
|
+
}
|
642
|
+
|
643
|
+
param = {
|
644
|
+
condition: "id('" + params.ids.join("','") + "')",
|
645
|
+
sort: 'index DESC',
|
646
|
+
currentPage: 1,
|
647
|
+
pageSize: params.ids.length > 10 ? params.ids.length : 10
|
648
|
+
};
|
649
|
+
|
650
|
+
_rlog["default"].debug('getAttributesByIds', param);
|
651
|
+
|
652
|
+
_context19.next = 5;
|
653
|
+
return (0, _cmdb.commonQuery)(param);
|
654
|
+
|
655
|
+
case 5:
|
656
|
+
return _context19.abrupt("return", _context19.sent);
|
657
|
+
|
658
|
+
case 6:
|
659
|
+
case "end":
|
660
|
+
return _context19.stop();
|
699
661
|
}
|
700
662
|
}, _callee19);
|
701
663
|
}))();
|
@@ -751,19 +713,17 @@ var _default = (0, _extends2["default"])({
|
|
751
713
|
getBatchCiPolling: function getBatchCiPolling(params) {
|
752
714
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee20() {
|
753
715
|
return _regenerator["default"].wrap(function _callee20$(_context20) {
|
754
|
-
while (1) {
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
return _context20.stop();
|
766
|
-
}
|
716
|
+
while (1) switch (_context20.prev = _context20.next) {
|
717
|
+
case 0:
|
718
|
+
_context20.next = 2;
|
719
|
+
return _componentTopologyUtils.request.post(_constants.TOPO_API_ROOT + "/attributes/polling", params);
|
720
|
+
|
721
|
+
case 2:
|
722
|
+
return _context20.abrupt("return", _context20.sent);
|
723
|
+
|
724
|
+
case 3:
|
725
|
+
case "end":
|
726
|
+
return _context20.stop();
|
767
727
|
}
|
768
728
|
}, _callee20);
|
769
729
|
}))();
|