@riil-frontend/component-topology 11.0.30 → 11.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +2 -4
- package/build/index.js +34 -49
- package/es/components/MultiResourceDrawer/index.js +18 -16
- package/es/components/ResourceList/ResourceSelect.js +50 -48
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +26 -24
- package/es/components/SingleResourceDrawer/SelectDrawer.js +20 -18
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +25 -23
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
- package/es/core/components/titlebar/widgets/TitleWidget.js +3 -5
- package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
- package/es/core/editor/components/BackgroundView/index.js +129 -119
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +22 -20
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +17 -15
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +9 -7
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +13 -11
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +23 -21
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +12 -10
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +27 -21
- package/es/core/editor/hooks/useKeyboardShortcut.js +2 -2
- package/es/core/editor/hooks/useNewElementTheme.js +2 -2
- package/es/core/editor/store/background.js +10 -8
- package/es/core/editor/store/topoEdit.js +6 -4
- package/es/core/editor/utils/edgeTypeStyleUtil.js +4 -2
- package/es/core/hooks/usePolling.js +121 -117
- package/es/core/hooks/useResourceConfig.js +66 -58
- package/es/core/hooks/useTopoEdit.js +511 -476
- package/es/core/models/Alarm.js +298 -281
- package/es/core/models/AttributeMetricDisplay.js +107 -101
- package/es/core/models/PluginManager.js +3 -4
- package/es/core/models/SelectionModel.js +5 -4
- package/es/core/models/TopoApp.js +240 -205
- package/es/core/models/TopoGraphView.js +21 -18
- package/es/core/models/cache/CiCache.js +27 -28
- package/es/core/models/cache/CiTypeCache.js +41 -37
- package/es/core/models/cache/DictCache.js +35 -33
- package/es/core/models/graph/Background.js +17 -15
- package/es/core/models/plugins/resourceWebControllUrl.js +82 -76
- package/es/core/models/tagstips/ElementTagTipConfig.js +38 -34
- package/es/core/models/topoData.js +70 -68
- package/es/core/models/utils/linkUtils.js +43 -41
- package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/es/core/services/alarm.js +16 -14
- package/es/core/services/background.js +67 -59
- package/es/core/services/cmdb/metric.js +11 -9
- package/es/core/services/cmdb.js +20 -18
- package/es/core/services/index.js +45 -39
- package/es/core/services/overview.js +151 -131
- package/es/core/services/topo/basic.js +13 -11
- package/es/core/services/topo/tagtip.js +12 -10
- package/es/core/store/models/ciModel.js +62 -58
- package/es/core/store/models/customIcon.js +134 -120
- package/es/core/store/models/displayConfig.js +19 -15
- package/es/core/store/models/selection.js +6 -4
- package/es/core/store/models/topoAlarm.js +145 -162
- package/es/core/store/models/topoBaseInfoOverview.js +6 -4
- package/es/core/store/models/topoBizMod.js +32 -28
- package/es/core/store/models/topoConfig.js +231 -215
- package/es/core/store/models/topoGraphView.js +6 -4
- package/es/core/store/models/topoMod.js +395 -373
- package/es/core/utils/imageUtil.js +20 -18
- package/es/core/utils/saveSerialize.js +11 -9
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -15
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +357 -343
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +205 -189
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +109 -107
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +37 -33
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +19 -17
- package/es/networkTopo/components/Link/hook.js +77 -73
- package/es/networkTopo/components/Link/index.js +94 -86
- package/es/networkTopo/components/Link/setting.js +44 -42
- package/es/networkTopo/getTopoData.js +69 -63
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +32 -30
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/es/networkTopo/models/TopoCenter.js +22 -18
- package/es/networkTopo/services/alert.js +22 -18
- package/es/networkTopo/services/authorization.js +55 -45
- package/es/networkTopo/services/cmdb.js +470 -422
- package/es/networkTopo/services/funcAuth.js +24 -22
- package/es/networkTopo/services/link.js +117 -107
- package/es/networkTopo/services/mdc.js +24 -18
- package/es/networkTopo/services/metric.js +27 -23
- package/es/networkTopo/services/model.js +509 -445
- package/es/networkTopo/services/risk.js +11 -9
- package/es/networkTopo/services/topo/auth.js +33 -27
- package/es/networkTopo/services/topo/basic.js +314 -274
- package/es/networkTopo/services/topo/blacklist.js +24 -20
- package/es/networkTopo/services/topo/ciInfo.js +31 -27
- package/es/networkTopo/services/topo/icon.js +59 -49
- package/es/networkTopo/services/topo/networkLink.js +36 -32
- package/es/networkTopo/services/topo/relation.js +11 -9
- package/es/networkTopo/services/topo/resourceWebUrl.js +42 -36
- package/es/networkTopo/store/functionAuth.js +37 -31
- package/es/networkTopo/store/topoCenter.js +152 -142
- package/es/networkTopo/store/topoLinkMod.js +6 -4
- package/es/networkTopo/store/topoTreeMod.js +182 -170
- package/es/networkTopo/utils/exportData.js +54 -52
- package/lib/components/MultiResourceDrawer/index.js +18 -16
- package/lib/components/ResourceList/ResourceSelect.js +50 -48
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +29 -27
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +20 -18
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +32 -30
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
- package/lib/core/components/titlebar/widgets/TitleWidget.js +3 -5
- package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
- package/lib/core/editor/components/BackgroundView/index.js +128 -118
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +24 -22
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +21 -19
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +10 -8
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +14 -12
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +28 -26
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +14 -12
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +31 -25
- package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -2
- package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
- package/lib/core/editor/store/background.js +10 -8
- package/lib/core/editor/store/topoEdit.js +6 -4
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +4 -2
- package/lib/core/hooks/usePolling.js +120 -116
- package/lib/core/hooks/useResourceConfig.js +66 -58
- package/lib/core/hooks/useTopoEdit.js +503 -468
- package/lib/core/models/Alarm.js +292 -275
- package/lib/core/models/AttributeMetricDisplay.js +110 -104
- package/lib/core/models/PluginManager.js +3 -4
- package/lib/core/models/SelectionModel.js +5 -4
- package/lib/core/models/TopoApp.js +240 -205
- package/lib/core/models/TopoGraphView.js +21 -18
- package/lib/core/models/cache/CiCache.js +32 -33
- package/lib/core/models/cache/CiTypeCache.js +42 -38
- package/lib/core/models/cache/DictCache.js +35 -33
- package/lib/core/models/graph/Background.js +18 -16
- package/lib/core/models/plugins/resourceWebControllUrl.js +80 -74
- package/lib/core/models/tagstips/ElementTagTipConfig.js +38 -34
- package/lib/core/models/topoData.js +71 -69
- package/lib/core/models/utils/linkUtils.js +43 -41
- package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/lib/core/services/alarm.js +20 -18
- package/lib/core/services/background.js +78 -70
- package/lib/core/services/cmdb/metric.js +12 -10
- package/lib/core/services/cmdb.js +22 -20
- package/lib/core/services/index.js +51 -45
- package/lib/core/services/overview.js +151 -131
- package/lib/core/services/topo/basic.js +15 -13
- package/lib/core/services/topo/tagtip.js +14 -12
- package/lib/core/store/models/ciModel.js +70 -66
- package/lib/core/store/models/customIcon.js +134 -120
- package/lib/core/store/models/displayConfig.js +19 -15
- package/lib/core/store/models/selection.js +6 -4
- package/lib/core/store/models/topoAlarm.js +145 -163
- package/lib/core/store/models/topoBaseInfoOverview.js +6 -4
- package/lib/core/store/models/topoBizMod.js +38 -34
- package/lib/core/store/models/topoConfig.js +238 -222
- package/lib/core/store/models/topoGraphView.js +6 -4
- package/lib/core/store/models/topoMod.js +397 -375
- package/lib/core/utils/imageUtil.js +24 -22
- package/lib/core/utils/saveSerialize.js +11 -9
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -15
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +358 -344
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +206 -190
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +109 -107
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -29
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +20 -18
- package/lib/networkTopo/components/Link/hook.js +77 -73
- package/lib/networkTopo/components/Link/index.js +95 -87
- package/lib/networkTopo/components/Link/setting.js +44 -42
- package/lib/networkTopo/getTopoData.js +69 -63
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +33 -31
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/lib/networkTopo/models/TopoCenter.js +22 -18
- package/lib/networkTopo/services/alert.js +22 -18
- package/lib/networkTopo/services/authorization.js +65 -55
- package/lib/networkTopo/services/cmdb.js +470 -422
- package/lib/networkTopo/services/funcAuth.js +26 -24
- package/lib/networkTopo/services/link.js +118 -108
- package/lib/networkTopo/services/mdc.js +27 -21
- package/lib/networkTopo/services/metric.js +31 -27
- package/lib/networkTopo/services/model.js +509 -445
- package/lib/networkTopo/services/risk.js +13 -11
- package/lib/networkTopo/services/topo/auth.js +33 -27
- package/lib/networkTopo/services/topo/basic.js +317 -277
- package/lib/networkTopo/services/topo/blacklist.js +24 -20
- package/lib/networkTopo/services/topo/ciInfo.js +38 -34
- package/lib/networkTopo/services/topo/icon.js +69 -59
- package/lib/networkTopo/services/topo/networkLink.js +36 -32
- package/lib/networkTopo/services/topo/relation.js +13 -11
- package/lib/networkTopo/services/topo/resourceWebUrl.js +50 -44
- package/lib/networkTopo/store/functionAuth.js +37 -31
- package/lib/networkTopo/store/topoCenter.js +152 -142
- package/lib/networkTopo/store/topoLinkMod.js +6 -4
- package/lib/networkTopo/store/topoTreeMod.js +178 -166
- package/lib/networkTopo/utils/exportData.js +61 -59
- package/package.json +3 -3
@@ -115,17 +115,19 @@ export default _extends({
|
|
115
115
|
getTopoTree: function getTopoTree(params) {
|
116
116
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
117
117
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
118
|
-
while (1)
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
118
|
+
while (1) {
|
119
|
+
switch (_context.prev = _context.next) {
|
120
|
+
case 0:
|
121
|
+
_context.next = 2;
|
122
|
+
return request.get(API_ROOT + "/menu");
|
123
|
+
|
124
|
+
case 2:
|
125
|
+
return _context.abrupt("return", _context.sent);
|
126
|
+
|
127
|
+
case 3:
|
128
|
+
case "end":
|
129
|
+
return _context.stop();
|
130
|
+
}
|
129
131
|
}
|
130
132
|
}, _callee);
|
131
133
|
}))();
|
@@ -134,17 +136,19 @@ export default _extends({
|
|
134
136
|
getTopoTreeByLoginUser: function getTopoTreeByLoginUser(params) {
|
135
137
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
136
138
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
137
|
-
while (1)
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
139
|
+
while (1) {
|
140
|
+
switch (_context2.prev = _context2.next) {
|
141
|
+
case 0:
|
142
|
+
_context2.next = 2;
|
143
|
+
return request.get('/topo/v1/api/menuByLoginUser');
|
144
|
+
|
145
|
+
case 2:
|
146
|
+
return _context2.abrupt("return", _context2.sent);
|
147
|
+
|
148
|
+
case 3:
|
149
|
+
case "end":
|
150
|
+
return _context2.stop();
|
151
|
+
}
|
148
152
|
}
|
149
153
|
}, _callee2);
|
150
154
|
}))();
|
@@ -160,17 +164,19 @@ export default _extends({
|
|
160
164
|
addNewTopo: function addNewTopo(params) {
|
161
165
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
162
166
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
163
|
-
while (1)
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
167
|
+
while (1) {
|
168
|
+
switch (_context3.prev = _context3.next) {
|
169
|
+
case 0:
|
170
|
+
_context3.next = 2;
|
171
|
+
return request.post(API_ROOT + "/menu", params);
|
172
|
+
|
173
|
+
case 2:
|
174
|
+
return _context3.abrupt("return", _context3.sent);
|
175
|
+
|
176
|
+
case 3:
|
177
|
+
case "end":
|
178
|
+
return _context3.stop();
|
179
|
+
}
|
174
180
|
}
|
175
181
|
}, _callee3);
|
176
182
|
}))();
|
@@ -183,17 +189,19 @@ export default _extends({
|
|
183
189
|
editTopo: function editTopo(params) {
|
184
190
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
185
191
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
186
|
-
while (1)
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
192
|
+
while (1) {
|
193
|
+
switch (_context4.prev = _context4.next) {
|
194
|
+
case 0:
|
195
|
+
_context4.next = 2;
|
196
|
+
return request.put(API_ROOT + "/menu", params);
|
197
|
+
|
198
|
+
case 2:
|
199
|
+
return _context4.abrupt("return", _context4.sent);
|
200
|
+
|
201
|
+
case 3:
|
202
|
+
case "end":
|
203
|
+
return _context4.stop();
|
204
|
+
}
|
197
205
|
}
|
198
206
|
}, _callee4);
|
199
207
|
}))();
|
@@ -208,17 +216,19 @@ export default _extends({
|
|
208
216
|
copyTopo: function copyTopo(params) {
|
209
217
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
210
218
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
211
|
-
while (1)
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
219
|
+
while (1) {
|
220
|
+
switch (_context5.prev = _context5.next) {
|
221
|
+
case 0:
|
222
|
+
_context5.next = 2;
|
223
|
+
return request.post(API_ROOT + "/menu/copy", params);
|
224
|
+
|
225
|
+
case 2:
|
226
|
+
return _context5.abrupt("return", _context5.sent);
|
227
|
+
|
228
|
+
case 3:
|
229
|
+
case "end":
|
230
|
+
return _context5.stop();
|
231
|
+
}
|
222
232
|
}
|
223
233
|
}, _callee5);
|
224
234
|
}))();
|
@@ -232,17 +242,19 @@ export default _extends({
|
|
232
242
|
deleteTopoonTree: function deleteTopoonTree(id) {
|
233
243
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
234
244
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
235
|
-
while (1)
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
245
|
+
while (1) {
|
246
|
+
switch (_context6.prev = _context6.next) {
|
247
|
+
case 0:
|
248
|
+
_context6.next = 2;
|
249
|
+
return request["delete"](API_ROOT + "/menu/" + id);
|
250
|
+
|
251
|
+
case 2:
|
252
|
+
return _context6.abrupt("return", _context6.sent);
|
253
|
+
|
254
|
+
case 3:
|
255
|
+
case "end":
|
256
|
+
return _context6.stop();
|
257
|
+
}
|
246
258
|
}
|
247
259
|
}, _callee6);
|
248
260
|
}))();
|
@@ -256,13 +268,15 @@ export default _extends({
|
|
256
268
|
setDefTopo: function setDefTopo(id) {
|
257
269
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
258
270
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
259
|
-
while (1)
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
271
|
+
while (1) {
|
272
|
+
switch (_context7.prev = _context7.next) {
|
273
|
+
case 0:
|
274
|
+
return _context7.abrupt("return", request.put(API_ROOT + "/menu/default/" + id));
|
275
|
+
|
276
|
+
case 1:
|
277
|
+
case "end":
|
278
|
+
return _context7.stop();
|
279
|
+
}
|
266
280
|
}
|
267
281
|
}, _callee7);
|
268
282
|
}))();
|
@@ -281,17 +295,19 @@ export default _extends({
|
|
281
295
|
moveTopoOnTree: function moveTopoOnTree(params) {
|
282
296
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
283
297
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
284
|
-
while (1)
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
298
|
+
while (1) {
|
299
|
+
switch (_context8.prev = _context8.next) {
|
300
|
+
case 0:
|
301
|
+
_context8.next = 2;
|
302
|
+
return request.put(API_ROOT + "/menu/move/", params);
|
303
|
+
|
304
|
+
case 2:
|
305
|
+
return _context8.abrupt("return", _context8.sent);
|
306
|
+
|
307
|
+
case 3:
|
308
|
+
case "end":
|
309
|
+
return _context8.stop();
|
310
|
+
}
|
295
311
|
}
|
296
312
|
}, _callee8);
|
297
313
|
}))();
|
@@ -307,24 +323,26 @@ export default _extends({
|
|
307
323
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
|
308
324
|
var id, template, layout, backgroundId;
|
309
325
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
310
|
-
while (1)
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
326
|
+
while (1) {
|
327
|
+
switch (_context9.prev = _context9.next) {
|
328
|
+
case 0:
|
329
|
+
id = _ref.id, template = _ref.template, layout = _ref.layout, backgroundId = _ref.backgroundId;
|
330
|
+
_context9.next = 3;
|
331
|
+
return request.put(API_ROOT + "/menu", {
|
332
|
+
id: id,
|
333
|
+
showType: template,
|
334
|
+
layout: layout,
|
335
|
+
backgroundId: backgroundId || -1,
|
336
|
+
type: 1
|
337
|
+
});
|
338
|
+
|
339
|
+
case 3:
|
340
|
+
return _context9.abrupt("return", _context9.sent);
|
341
|
+
|
342
|
+
case 4:
|
343
|
+
case "end":
|
344
|
+
return _context9.stop();
|
345
|
+
}
|
328
346
|
}
|
329
347
|
}, _callee9);
|
330
348
|
}))();
|
@@ -339,17 +357,19 @@ export default _extends({
|
|
339
357
|
getResourceList: function getResourceList(conditions, query) {
|
340
358
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
|
341
359
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
342
|
-
while (1)
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
360
|
+
while (1) {
|
361
|
+
switch (_context10.prev = _context10.next) {
|
362
|
+
case 0:
|
363
|
+
_context10.next = 2;
|
364
|
+
return request.post(API_ROOT + "/resource", prepareResourceParams(conditions, query));
|
365
|
+
|
366
|
+
case 2:
|
367
|
+
return _context10.abrupt("return", _context10.sent);
|
368
|
+
|
369
|
+
case 3:
|
370
|
+
case "end":
|
371
|
+
return _context10.stop();
|
372
|
+
}
|
353
373
|
}
|
354
374
|
}, _callee10);
|
355
375
|
}))();
|
@@ -363,17 +383,19 @@ export default _extends({
|
|
363
383
|
getConditions: function getConditions(id) {
|
364
384
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
|
365
385
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
366
|
-
while (1)
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
386
|
+
while (1) {
|
387
|
+
switch (_context11.prev = _context11.next) {
|
388
|
+
case 0:
|
389
|
+
_context11.next = 2;
|
390
|
+
return request.get(API_ROOT + "/resource/" + id);
|
391
|
+
|
392
|
+
case 2:
|
393
|
+
return _context11.abrupt("return", _context11.sent);
|
394
|
+
|
395
|
+
case 3:
|
396
|
+
case "end":
|
397
|
+
return _context11.stop();
|
398
|
+
}
|
377
399
|
}
|
378
400
|
}, _callee11);
|
379
401
|
}))();
|
@@ -390,25 +412,27 @@ export default _extends({
|
|
390
412
|
|
391
413
|
var result;
|
392
414
|
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
393
|
-
while (1)
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
415
|
+
while (1) {
|
416
|
+
switch (_context12.prev = _context12.next) {
|
417
|
+
case 0:
|
418
|
+
_context12.next = 2;
|
419
|
+
return request.get(API_ROOT + "/structure/both/" + id);
|
420
|
+
|
421
|
+
case 2:
|
422
|
+
result = _context12.sent;
|
423
|
+
return _context12.abrupt("return", processExitLink(_extends({}, result, {
|
424
|
+
nodes: (_result$nodes = result.nodes) !== null && _result$nodes !== void 0 ? _result$nodes : [],
|
425
|
+
links: ((_result$links = result.links) !== null && _result$links !== void 0 ? _result$links : []).map(function (item) {
|
426
|
+
return _extends({}, item, {
|
427
|
+
ciType: 'network_link'
|
428
|
+
});
|
429
|
+
})
|
430
|
+
})));
|
431
|
+
|
432
|
+
case 4:
|
433
|
+
case "end":
|
434
|
+
return _context12.stop();
|
435
|
+
}
|
412
436
|
}
|
413
437
|
}, _callee12);
|
414
438
|
}))();
|
@@ -427,36 +451,38 @@ export default _extends({
|
|
427
451
|
|
428
452
|
var data, obj, result;
|
429
453
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
430
|
-
while (1)
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
}
|
441
|
-
|
442
|
-
obj = prepareGroupParams(data);
|
443
|
-
_context13.next = 5;
|
444
|
-
return request.post(API_ROOT + "/structure/byCondition/" + id, _extends({}, obj));
|
445
|
-
|
446
|
-
case 5:
|
447
|
-
result = _context13.sent;
|
448
|
-
return _context13.abrupt("return", processByConditionResult(_extends({}, result, {
|
449
|
-
nodes: (_result$nodes2 = result.nodes) !== null && _result$nodes2 !== void 0 ? _result$nodes2 : [],
|
450
|
-
links: ((_result$links2 = result.links) !== null && _result$links2 !== void 0 ? _result$links2 : []).map(function (item) {
|
451
|
-
return _extends({}, item, {
|
452
|
-
ciType: 'network_link'
|
454
|
+
while (1) {
|
455
|
+
switch (_context13.prev = _context13.next) {
|
456
|
+
case 0:
|
457
|
+
data = isAvailableArray(groups) ? groups : [];
|
458
|
+
|
459
|
+
if (resources) {
|
460
|
+
data.push({
|
461
|
+
parentId: TOPO_PARENT_ID,
|
462
|
+
order: 100,
|
463
|
+
resources: resources
|
453
464
|
});
|
454
|
-
}
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
465
|
+
}
|
466
|
+
|
467
|
+
obj = prepareGroupParams(data);
|
468
|
+
_context13.next = 5;
|
469
|
+
return request.post(API_ROOT + "/structure/byCondition/" + id, _extends({}, obj));
|
470
|
+
|
471
|
+
case 5:
|
472
|
+
result = _context13.sent;
|
473
|
+
return _context13.abrupt("return", processByConditionResult(_extends({}, result, {
|
474
|
+
nodes: (_result$nodes2 = result.nodes) !== null && _result$nodes2 !== void 0 ? _result$nodes2 : [],
|
475
|
+
links: ((_result$links2 = result.links) !== null && _result$links2 !== void 0 ? _result$links2 : []).map(function (item) {
|
476
|
+
return _extends({}, item, {
|
477
|
+
ciType: 'network_link'
|
478
|
+
});
|
479
|
+
})
|
480
|
+
}), obj.groups));
|
481
|
+
|
482
|
+
case 7:
|
483
|
+
case "end":
|
484
|
+
return _context13.stop();
|
485
|
+
}
|
460
486
|
}
|
461
487
|
}, _callee13);
|
462
488
|
}))();
|
@@ -473,30 +499,32 @@ export default _extends({
|
|
473
499
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
474
500
|
var groups, resources, exportLinkIdList, otherConfig, newGroups, obj;
|
475
501
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
476
|
-
while (1)
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
502
|
+
while (1) {
|
503
|
+
switch (_context14.prev = _context14.next) {
|
504
|
+
case 0:
|
505
|
+
groups = config.groups, resources = config.resources, exportLinkIdList = config.exportLinkIdList, otherConfig = _objectWithoutPropertiesLoose(config, _excluded);
|
506
|
+
newGroups = isAvailableArray(groups) ? groups : [];
|
507
|
+
|
508
|
+
if (resources) {
|
509
|
+
// 新建拓扑时
|
510
|
+
newGroups.push({
|
511
|
+
parentId: TOPO_PARENT_ID,
|
512
|
+
order: 100,
|
513
|
+
resources: resources
|
514
|
+
});
|
515
|
+
}
|
489
516
|
|
490
|
-
|
491
|
-
|
492
|
-
|
517
|
+
obj = prepareGroupParams(newGroups);
|
518
|
+
_context14.next = 6;
|
519
|
+
return request.post(API_ROOT + "/resource/" + id, _extends({}, otherConfig, obj));
|
493
520
|
|
494
|
-
|
495
|
-
|
521
|
+
case 6:
|
522
|
+
return _context14.abrupt("return", _context14.sent);
|
496
523
|
|
497
|
-
|
498
|
-
|
499
|
-
|
524
|
+
case 7:
|
525
|
+
case "end":
|
526
|
+
return _context14.stop();
|
527
|
+
}
|
500
528
|
}
|
501
529
|
}, _callee14);
|
502
530
|
}))();
|
@@ -511,19 +539,21 @@ export default _extends({
|
|
511
539
|
saveSerializeData: function saveSerializeData(id, data) {
|
512
540
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15() {
|
513
541
|
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
514
|
-
while (1)
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
542
|
+
while (1) {
|
543
|
+
switch (_context15.prev = _context15.next) {
|
544
|
+
case 0:
|
545
|
+
_context15.next = 2;
|
546
|
+
return request.post(API_ROOT + "/structure/" + id, {
|
547
|
+
data: data
|
548
|
+
});
|
549
|
+
|
550
|
+
case 2:
|
551
|
+
return _context15.abrupt("return", _context15.sent);
|
552
|
+
|
553
|
+
case 3:
|
554
|
+
case "end":
|
555
|
+
return _context15.stop();
|
556
|
+
}
|
527
557
|
}
|
528
558
|
}, _callee15);
|
529
559
|
}))();
|
@@ -539,18 +569,20 @@ export default _extends({
|
|
539
569
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
|
540
570
|
var parm;
|
541
571
|
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
542
|
-
while (1)
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
572
|
+
while (1) {
|
573
|
+
switch (_context16.prev = _context16.next) {
|
574
|
+
case 0:
|
575
|
+
rlog.debug('saveTopoSettings', settings);
|
576
|
+
parm = {
|
577
|
+
id: id,
|
578
|
+
globalConfig: settings
|
579
|
+
};
|
580
|
+
return _context16.abrupt("return", request.post(API_ROOT + "/config", parm));
|
581
|
+
|
582
|
+
case 3:
|
583
|
+
case "end":
|
584
|
+
return _context16.stop();
|
585
|
+
}
|
554
586
|
}
|
555
587
|
}, _callee16);
|
556
588
|
}))();
|
@@ -563,17 +595,19 @@ export default _extends({
|
|
563
595
|
openTopoAlarm: function openTopoAlarm(id) {
|
564
596
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
|
565
597
|
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
566
|
-
while (1)
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
598
|
+
while (1) {
|
599
|
+
switch (_context17.prev = _context17.next) {
|
600
|
+
case 0:
|
601
|
+
_context17.next = 2;
|
602
|
+
return request.post(API_ROOT + "/alarm?topoId=" + id);
|
603
|
+
|
604
|
+
case 2:
|
605
|
+
return _context17.abrupt("return", _context17.sent);
|
606
|
+
|
607
|
+
case 3:
|
608
|
+
case "end":
|
609
|
+
return _context17.stop();
|
610
|
+
}
|
577
611
|
}
|
578
612
|
}, _callee17);
|
579
613
|
}))();
|
@@ -586,17 +620,19 @@ export default _extends({
|
|
586
620
|
closeTopoAlarm: function closeTopoAlarm(id, secretKey) {
|
587
621
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
|
588
622
|
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
589
|
-
while (1)
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
623
|
+
while (1) {
|
624
|
+
switch (_context18.prev = _context18.next) {
|
625
|
+
case 0:
|
626
|
+
_context18.next = 2;
|
627
|
+
return request["delete"](API_ROOT + "/alarm?topoId=" + id + "&secretKey=" + secretKey);
|
628
|
+
|
629
|
+
case 2:
|
630
|
+
return _context18.abrupt("return", _context18.sent);
|
631
|
+
|
632
|
+
case 3:
|
633
|
+
case "end":
|
634
|
+
return _context18.stop();
|
635
|
+
}
|
600
636
|
}
|
601
637
|
}, _callee18);
|
602
638
|
}))();
|
@@ -612,29 +648,31 @@ export default _extends({
|
|
612
648
|
|
613
649
|
var param;
|
614
650
|
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
615
|
-
while (1)
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
651
|
+
while (1) {
|
652
|
+
switch (_context19.prev = _context19.next) {
|
653
|
+
case 0:
|
654
|
+
if (!(((_params$ids = params.ids) === null || _params$ids === void 0 ? void 0 : _params$ids.length) > 0)) {
|
655
|
+
_context19.next = 6;
|
656
|
+
break;
|
657
|
+
}
|
658
|
+
|
659
|
+
param = {
|
660
|
+
condition: "id('" + params.ids.join("','") + "')",
|
661
|
+
sort: 'index DESC',
|
662
|
+
currentPage: 1,
|
663
|
+
pageSize: params.ids.length > 10 ? params.ids.length : 10
|
664
|
+
};
|
665
|
+
rlog.debug('getAttributesByIds', param);
|
666
|
+
_context19.next = 5;
|
667
|
+
return commonQuery(param);
|
668
|
+
|
669
|
+
case 5:
|
670
|
+
return _context19.abrupt("return", _context19.sent);
|
671
|
+
|
672
|
+
case 6:
|
673
|
+
case "end":
|
674
|
+
return _context19.stop();
|
675
|
+
}
|
638
676
|
}
|
639
677
|
}, _callee19);
|
640
678
|
}))();
|
@@ -690,17 +728,19 @@ export default _extends({
|
|
690
728
|
getBatchCiPolling: function getBatchCiPolling(params) {
|
691
729
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
|
692
730
|
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
693
|
-
while (1)
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
731
|
+
while (1) {
|
732
|
+
switch (_context20.prev = _context20.next) {
|
733
|
+
case 0:
|
734
|
+
_context20.next = 2;
|
735
|
+
return request.post(TOPO_API_ROOT + "/attributes/polling", params);
|
736
|
+
|
737
|
+
case 2:
|
738
|
+
return _context20.abrupt("return", _context20.sent);
|
739
|
+
|
740
|
+
case 3:
|
741
|
+
case "end":
|
742
|
+
return _context20.stop();
|
743
|
+
}
|
704
744
|
}
|
705
745
|
}, _callee20);
|
706
746
|
}))();
|