@riil-frontend/component-topology 11.0.36 → 11.0.39
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/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 +41 -37
- 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 +11 -9
- 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 +29 -28
- 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 +111 -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 +289 -251
- 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/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 +41 -37
- 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 +11 -9
- 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 +29 -28
- 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 +111 -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 +290 -252
- 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/lib/utils/htElementDataUtil.js +2 -4
- package/package.json +3 -3
@@ -126,17 +126,19 @@ var _default = (0, _extends2["default"])({
|
|
126
126
|
getTopoTree: function getTopoTree(params) {
|
127
127
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
128
128
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
129
|
-
while (1)
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
129
|
+
while (1) {
|
130
|
+
switch (_context.prev = _context.next) {
|
131
|
+
case 0:
|
132
|
+
_context.next = 2;
|
133
|
+
return _componentTopologyUtils.request.get(API_ROOT + "/menu");
|
134
|
+
|
135
|
+
case 2:
|
136
|
+
return _context.abrupt("return", _context.sent);
|
137
|
+
|
138
|
+
case 3:
|
139
|
+
case "end":
|
140
|
+
return _context.stop();
|
141
|
+
}
|
140
142
|
}
|
141
143
|
}, _callee);
|
142
144
|
}))();
|
@@ -145,17 +147,19 @@ var _default = (0, _extends2["default"])({
|
|
145
147
|
getTopoTreeByLoginUser: function getTopoTreeByLoginUser(params) {
|
146
148
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
147
149
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
148
|
-
while (1)
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
150
|
+
while (1) {
|
151
|
+
switch (_context2.prev = _context2.next) {
|
152
|
+
case 0:
|
153
|
+
_context2.next = 2;
|
154
|
+
return _componentTopologyUtils.request.get('/topo/v1/api/menuByLoginUser');
|
155
|
+
|
156
|
+
case 2:
|
157
|
+
return _context2.abrupt("return", _context2.sent);
|
158
|
+
|
159
|
+
case 3:
|
160
|
+
case "end":
|
161
|
+
return _context2.stop();
|
162
|
+
}
|
159
163
|
}
|
160
164
|
}, _callee2);
|
161
165
|
}))();
|
@@ -171,17 +175,19 @@ var _default = (0, _extends2["default"])({
|
|
171
175
|
addNewTopo: function addNewTopo(params) {
|
172
176
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
173
177
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
174
|
-
while (1)
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
178
|
+
while (1) {
|
179
|
+
switch (_context3.prev = _context3.next) {
|
180
|
+
case 0:
|
181
|
+
_context3.next = 2;
|
182
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/menu", params);
|
183
|
+
|
184
|
+
case 2:
|
185
|
+
return _context3.abrupt("return", _context3.sent);
|
186
|
+
|
187
|
+
case 3:
|
188
|
+
case "end":
|
189
|
+
return _context3.stop();
|
190
|
+
}
|
185
191
|
}
|
186
192
|
}, _callee3);
|
187
193
|
}))();
|
@@ -194,17 +200,19 @@ var _default = (0, _extends2["default"])({
|
|
194
200
|
editTopo: function editTopo(params) {
|
195
201
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
196
202
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
197
|
-
while (1)
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
203
|
+
while (1) {
|
204
|
+
switch (_context4.prev = _context4.next) {
|
205
|
+
case 0:
|
206
|
+
_context4.next = 2;
|
207
|
+
return _componentTopologyUtils.request.put(API_ROOT + "/menu", params);
|
208
|
+
|
209
|
+
case 2:
|
210
|
+
return _context4.abrupt("return", _context4.sent);
|
211
|
+
|
212
|
+
case 3:
|
213
|
+
case "end":
|
214
|
+
return _context4.stop();
|
215
|
+
}
|
208
216
|
}
|
209
217
|
}, _callee4);
|
210
218
|
}))();
|
@@ -219,17 +227,19 @@ var _default = (0, _extends2["default"])({
|
|
219
227
|
copyTopo: function copyTopo(params) {
|
220
228
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
221
229
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
222
|
-
while (1)
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
230
|
+
while (1) {
|
231
|
+
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();
|
242
|
+
}
|
233
243
|
}
|
234
244
|
}, _callee5);
|
235
245
|
}))();
|
@@ -243,17 +253,19 @@ var _default = (0, _extends2["default"])({
|
|
243
253
|
deleteTopoonTree: function deleteTopoonTree(id) {
|
244
254
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
245
255
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
246
|
-
while (1)
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
256
|
+
while (1) {
|
257
|
+
switch (_context6.prev = _context6.next) {
|
258
|
+
case 0:
|
259
|
+
_context6.next = 2;
|
260
|
+
return _componentTopologyUtils.request["delete"](API_ROOT + "/menu/" + id);
|
261
|
+
|
262
|
+
case 2:
|
263
|
+
return _context6.abrupt("return", _context6.sent);
|
264
|
+
|
265
|
+
case 3:
|
266
|
+
case "end":
|
267
|
+
return _context6.stop();
|
268
|
+
}
|
257
269
|
}
|
258
270
|
}, _callee6);
|
259
271
|
}))();
|
@@ -267,13 +279,15 @@ var _default = (0, _extends2["default"])({
|
|
267
279
|
setDefTopo: function setDefTopo(id) {
|
268
280
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
269
281
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
270
|
-
while (1)
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
282
|
+
while (1) {
|
283
|
+
switch (_context7.prev = _context7.next) {
|
284
|
+
case 0:
|
285
|
+
return _context7.abrupt("return", _componentTopologyUtils.request.put(API_ROOT + "/menu/default/" + id));
|
286
|
+
|
287
|
+
case 1:
|
288
|
+
case "end":
|
289
|
+
return _context7.stop();
|
290
|
+
}
|
277
291
|
}
|
278
292
|
}, _callee7);
|
279
293
|
}))();
|
@@ -292,17 +306,19 @@ var _default = (0, _extends2["default"])({
|
|
292
306
|
moveTopoOnTree: function moveTopoOnTree(params) {
|
293
307
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
294
308
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
295
|
-
while (1)
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
309
|
+
while (1) {
|
310
|
+
switch (_context8.prev = _context8.next) {
|
311
|
+
case 0:
|
312
|
+
_context8.next = 2;
|
313
|
+
return _componentTopologyUtils.request.put(API_ROOT + "/menu/move/", params);
|
314
|
+
|
315
|
+
case 2:
|
316
|
+
return _context8.abrupt("return", _context8.sent);
|
317
|
+
|
318
|
+
case 3:
|
319
|
+
case "end":
|
320
|
+
return _context8.stop();
|
321
|
+
}
|
306
322
|
}
|
307
323
|
}, _callee8);
|
308
324
|
}))();
|
@@ -318,24 +334,26 @@ var _default = (0, _extends2["default"])({
|
|
318
334
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
319
335
|
var id, template, layout, backgroundId;
|
320
336
|
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
321
|
-
while (1)
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
337
|
+
while (1) {
|
338
|
+
switch (_context9.prev = _context9.next) {
|
339
|
+
case 0:
|
340
|
+
id = _ref.id, template = _ref.template, layout = _ref.layout, backgroundId = _ref.backgroundId;
|
341
|
+
_context9.next = 3;
|
342
|
+
return _componentTopologyUtils.request.put(API_ROOT + "/menu", {
|
343
|
+
id: id,
|
344
|
+
showType: template,
|
345
|
+
layout: layout,
|
346
|
+
backgroundId: backgroundId || -1,
|
347
|
+
type: 1
|
348
|
+
});
|
349
|
+
|
350
|
+
case 3:
|
351
|
+
return _context9.abrupt("return", _context9.sent);
|
352
|
+
|
353
|
+
case 4:
|
354
|
+
case "end":
|
355
|
+
return _context9.stop();
|
356
|
+
}
|
339
357
|
}
|
340
358
|
}, _callee9);
|
341
359
|
}))();
|
@@ -350,17 +368,19 @@ var _default = (0, _extends2["default"])({
|
|
350
368
|
getResourceList: function getResourceList(conditions, query) {
|
351
369
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
352
370
|
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
353
|
-
while (1)
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
371
|
+
while (1) {
|
372
|
+
switch (_context10.prev = _context10.next) {
|
373
|
+
case 0:
|
374
|
+
_context10.next = 2;
|
375
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/resource", prepareResourceParams(conditions, query));
|
376
|
+
|
377
|
+
case 2:
|
378
|
+
return _context10.abrupt("return", _context10.sent);
|
379
|
+
|
380
|
+
case 3:
|
381
|
+
case "end":
|
382
|
+
return _context10.stop();
|
383
|
+
}
|
364
384
|
}
|
365
385
|
}, _callee10);
|
366
386
|
}))();
|
@@ -374,17 +394,19 @@ var _default = (0, _extends2["default"])({
|
|
374
394
|
getConditions: function getConditions(id) {
|
375
395
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11() {
|
376
396
|
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
377
|
-
while (1)
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
397
|
+
while (1) {
|
398
|
+
switch (_context11.prev = _context11.next) {
|
399
|
+
case 0:
|
400
|
+
_context11.next = 2;
|
401
|
+
return _componentTopologyUtils.request.get(API_ROOT + "/resource/" + id);
|
402
|
+
|
403
|
+
case 2:
|
404
|
+
return _context11.abrupt("return", _context11.sent);
|
405
|
+
|
406
|
+
case 3:
|
407
|
+
case "end":
|
408
|
+
return _context11.stop();
|
409
|
+
}
|
388
410
|
}
|
389
411
|
}, _callee11);
|
390
412
|
}))();
|
@@ -401,25 +423,27 @@ var _default = (0, _extends2["default"])({
|
|
401
423
|
|
402
424
|
var result;
|
403
425
|
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
404
|
-
while (1)
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
426
|
+
while (1) {
|
427
|
+
switch (_context12.prev = _context12.next) {
|
428
|
+
case 0:
|
429
|
+
_context12.next = 2;
|
430
|
+
return _componentTopologyUtils.request.get(API_ROOT + "/structure/both/" + id);
|
431
|
+
|
432
|
+
case 2:
|
433
|
+
result = _context12.sent;
|
434
|
+
return _context12.abrupt("return", (0, _exitLinkUtil.processExitLink)((0, _extends2["default"])({}, result, {
|
435
|
+
nodes: (_result$nodes = result.nodes) !== null && _result$nodes !== void 0 ? _result$nodes : [],
|
436
|
+
links: ((_result$links = result.links) !== null && _result$links !== void 0 ? _result$links : []).map(function (item) {
|
437
|
+
return (0, _extends2["default"])({}, item, {
|
438
|
+
ciType: 'network_link'
|
439
|
+
});
|
440
|
+
})
|
441
|
+
})));
|
442
|
+
|
443
|
+
case 4:
|
444
|
+
case "end":
|
445
|
+
return _context12.stop();
|
446
|
+
}
|
423
447
|
}
|
424
448
|
}, _callee12);
|
425
449
|
}))();
|
@@ -438,36 +462,38 @@ var _default = (0, _extends2["default"])({
|
|
438
462
|
|
439
463
|
var data, obj, result;
|
440
464
|
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
441
|
-
while (1)
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
}
|
452
|
-
|
453
|
-
obj = prepareGroupParams(data);
|
454
|
-
_context13.next = 5;
|
455
|
-
return _componentTopologyUtils.request.post(API_ROOT + "/structure/byCondition/" + id, (0, _extends2["default"])({}, obj));
|
456
|
-
|
457
|
-
case 5:
|
458
|
-
result = _context13.sent;
|
459
|
-
return _context13.abrupt("return", (0, _exitLinkUtil.processByConditionResult)((0, _extends2["default"])({}, result, {
|
460
|
-
nodes: (_result$nodes2 = result.nodes) !== null && _result$nodes2 !== void 0 ? _result$nodes2 : [],
|
461
|
-
links: ((_result$links2 = result.links) !== null && _result$links2 !== void 0 ? _result$links2 : []).map(function (item) {
|
462
|
-
return (0, _extends2["default"])({}, item, {
|
463
|
-
ciType: 'network_link'
|
465
|
+
while (1) {
|
466
|
+
switch (_context13.prev = _context13.next) {
|
467
|
+
case 0:
|
468
|
+
data = Array.isArray(groups) ? groups : [];
|
469
|
+
|
470
|
+
if (resources) {
|
471
|
+
data.push({
|
472
|
+
parentId: TOPO_PARENT_ID,
|
473
|
+
order: 100,
|
474
|
+
resources: resources
|
464
475
|
});
|
465
|
-
}
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
476
|
+
}
|
477
|
+
|
478
|
+
obj = prepareGroupParams(data);
|
479
|
+
_context13.next = 5;
|
480
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/structure/byCondition/" + id, (0, _extends2["default"])({}, obj));
|
481
|
+
|
482
|
+
case 5:
|
483
|
+
result = _context13.sent;
|
484
|
+
return _context13.abrupt("return", (0, _exitLinkUtil.processByConditionResult)((0, _extends2["default"])({}, result, {
|
485
|
+
nodes: (_result$nodes2 = result.nodes) !== null && _result$nodes2 !== void 0 ? _result$nodes2 : [],
|
486
|
+
links: ((_result$links2 = result.links) !== null && _result$links2 !== void 0 ? _result$links2 : []).map(function (item) {
|
487
|
+
return (0, _extends2["default"])({}, item, {
|
488
|
+
ciType: 'network_link'
|
489
|
+
});
|
490
|
+
})
|
491
|
+
}), obj.groups));
|
492
|
+
|
493
|
+
case 7:
|
494
|
+
case "end":
|
495
|
+
return _context13.stop();
|
496
|
+
}
|
471
497
|
}
|
472
498
|
}, _callee13);
|
473
499
|
}))();
|
@@ -484,30 +510,32 @@ var _default = (0, _extends2["default"])({
|
|
484
510
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14() {
|
485
511
|
var groups, resources, exportLinkIdList, otherConfig, newGroups, obj;
|
486
512
|
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
487
|
-
while (1)
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
513
|
+
while (1) {
|
514
|
+
switch (_context14.prev = _context14.next) {
|
515
|
+
case 0:
|
516
|
+
groups = config.groups, resources = config.resources, exportLinkIdList = config.exportLinkIdList, otherConfig = (0, _objectWithoutPropertiesLoose2["default"])(config, _excluded);
|
517
|
+
newGroups = Array.isArray(groups) ? groups : [];
|
518
|
+
|
519
|
+
if (resources) {
|
520
|
+
// 新建拓扑时
|
521
|
+
newGroups.push({
|
522
|
+
parentId: TOPO_PARENT_ID,
|
523
|
+
order: 100,
|
524
|
+
resources: resources
|
525
|
+
});
|
526
|
+
}
|
500
527
|
|
501
|
-
|
502
|
-
|
503
|
-
|
528
|
+
obj = prepareGroupParams(newGroups);
|
529
|
+
_context14.next = 6;
|
530
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/resource/" + id, (0, _extends2["default"])({}, otherConfig, obj));
|
504
531
|
|
505
|
-
|
506
|
-
|
532
|
+
case 6:
|
533
|
+
return _context14.abrupt("return", _context14.sent);
|
507
534
|
|
508
|
-
|
509
|
-
|
510
|
-
|
535
|
+
case 7:
|
536
|
+
case "end":
|
537
|
+
return _context14.stop();
|
538
|
+
}
|
511
539
|
}
|
512
540
|
}, _callee14);
|
513
541
|
}))();
|
@@ -522,19 +550,21 @@ var _default = (0, _extends2["default"])({
|
|
522
550
|
saveSerializeData: function saveSerializeData(id, data) {
|
523
551
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
524
552
|
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
525
|
-
while (1)
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
553
|
+
while (1) {
|
554
|
+
switch (_context15.prev = _context15.next) {
|
555
|
+
case 0:
|
556
|
+
_context15.next = 2;
|
557
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/structure/" + id, {
|
558
|
+
data: data
|
559
|
+
});
|
560
|
+
|
561
|
+
case 2:
|
562
|
+
return _context15.abrupt("return", _context15.sent);
|
563
|
+
|
564
|
+
case 3:
|
565
|
+
case "end":
|
566
|
+
return _context15.stop();
|
567
|
+
}
|
538
568
|
}
|
539
569
|
}, _callee15);
|
540
570
|
}))();
|
@@ -550,19 +580,21 @@ var _default = (0, _extends2["default"])({
|
|
550
580
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16() {
|
551
581
|
var parm;
|
552
582
|
return _regenerator["default"].wrap(function _callee16$(_context16) {
|
553
|
-
while (1)
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
583
|
+
while (1) {
|
584
|
+
switch (_context16.prev = _context16.next) {
|
585
|
+
case 0:
|
586
|
+
_rlog["default"].debug('saveTopoSettings', settings);
|
587
|
+
|
588
|
+
parm = {
|
589
|
+
id: id,
|
590
|
+
globalConfig: settings
|
591
|
+
};
|
592
|
+
return _context16.abrupt("return", _componentTopologyUtils.request.post(API_ROOT + "/config", parm));
|
593
|
+
|
594
|
+
case 3:
|
595
|
+
case "end":
|
596
|
+
return _context16.stop();
|
597
|
+
}
|
566
598
|
}
|
567
599
|
}, _callee16);
|
568
600
|
}))();
|
@@ -575,17 +607,19 @@ var _default = (0, _extends2["default"])({
|
|
575
607
|
openTopoAlarm: function openTopoAlarm(id) {
|
576
608
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17() {
|
577
609
|
return _regenerator["default"].wrap(function _callee17$(_context17) {
|
578
|
-
while (1)
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
610
|
+
while (1) {
|
611
|
+
switch (_context17.prev = _context17.next) {
|
612
|
+
case 0:
|
613
|
+
_context17.next = 2;
|
614
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/alarm?topoId=" + id);
|
615
|
+
|
616
|
+
case 2:
|
617
|
+
return _context17.abrupt("return", _context17.sent);
|
618
|
+
|
619
|
+
case 3:
|
620
|
+
case "end":
|
621
|
+
return _context17.stop();
|
622
|
+
}
|
589
623
|
}
|
590
624
|
}, _callee17);
|
591
625
|
}))();
|
@@ -598,17 +632,19 @@ var _default = (0, _extends2["default"])({
|
|
598
632
|
closeTopoAlarm: function closeTopoAlarm(id, secretKey) {
|
599
633
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18() {
|
600
634
|
return _regenerator["default"].wrap(function _callee18$(_context18) {
|
601
|
-
while (1)
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
635
|
+
while (1) {
|
636
|
+
switch (_context18.prev = _context18.next) {
|
637
|
+
case 0:
|
638
|
+
_context18.next = 2;
|
639
|
+
return _componentTopologyUtils.request["delete"](API_ROOT + "/alarm?topoId=" + id + "&secretKey=" + secretKey);
|
640
|
+
|
641
|
+
case 2:
|
642
|
+
return _context18.abrupt("return", _context18.sent);
|
643
|
+
|
644
|
+
case 3:
|
645
|
+
case "end":
|
646
|
+
return _context18.stop();
|
647
|
+
}
|
612
648
|
}
|
613
649
|
}, _callee18);
|
614
650
|
}))();
|
@@ -645,17 +681,19 @@ var _default = (0, _extends2["default"])({
|
|
645
681
|
getBatchCiPolling: function getBatchCiPolling(params) {
|
646
682
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee19() {
|
647
683
|
return _regenerator["default"].wrap(function _callee19$(_context19) {
|
648
|
-
while (1)
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
684
|
+
while (1) {
|
685
|
+
switch (_context19.prev = _context19.next) {
|
686
|
+
case 0:
|
687
|
+
_context19.next = 2;
|
688
|
+
return _componentTopologyUtils.request.post(_constants.TOPO_API_ROOT + "/attributes/polling", params);
|
689
|
+
|
690
|
+
case 2:
|
691
|
+
return _context19.abrupt("return", _context19.sent);
|
692
|
+
|
693
|
+
case 3:
|
694
|
+
case "end":
|
695
|
+
return _context19.stop();
|
696
|
+
}
|
659
697
|
}
|
660
698
|
}, _callee19);
|
661
699
|
}))();
|