@riil-frontend/component-topology 10.0.57 → 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/useCanvasTheme.js +1 -1
- 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/useCanvasTheme.js +1 -1
- 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
@@ -115,19 +115,17 @@ 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
|
-
|
129
|
-
return _context.stop();
|
130
|
-
}
|
118
|
+
while (1) switch (_context.prev = _context.next) {
|
119
|
+
case 0:
|
120
|
+
_context.next = 2;
|
121
|
+
return request.get(API_ROOT + "/menu");
|
122
|
+
|
123
|
+
case 2:
|
124
|
+
return _context.abrupt("return", _context.sent);
|
125
|
+
|
126
|
+
case 3:
|
127
|
+
case "end":
|
128
|
+
return _context.stop();
|
131
129
|
}
|
132
130
|
}, _callee);
|
133
131
|
}))();
|
@@ -136,19 +134,17 @@ export default _extends({
|
|
136
134
|
getTopoTreeByLoginUser: function getTopoTreeByLoginUser(params) {
|
137
135
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
138
136
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
139
|
-
while (1) {
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
return _context2.stop();
|
151
|
-
}
|
137
|
+
while (1) switch (_context2.prev = _context2.next) {
|
138
|
+
case 0:
|
139
|
+
_context2.next = 2;
|
140
|
+
return request.get('/topo/v1/api/menuByLoginUser');
|
141
|
+
|
142
|
+
case 2:
|
143
|
+
return _context2.abrupt("return", _context2.sent);
|
144
|
+
|
145
|
+
case 3:
|
146
|
+
case "end":
|
147
|
+
return _context2.stop();
|
152
148
|
}
|
153
149
|
}, _callee2);
|
154
150
|
}))();
|
@@ -164,19 +160,17 @@ export default _extends({
|
|
164
160
|
addNewTopo: function addNewTopo(params) {
|
165
161
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
166
162
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
167
|
-
while (1) {
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
return _context3.stop();
|
179
|
-
}
|
163
|
+
while (1) switch (_context3.prev = _context3.next) {
|
164
|
+
case 0:
|
165
|
+
_context3.next = 2;
|
166
|
+
return request.post(API_ROOT + "/menu", params);
|
167
|
+
|
168
|
+
case 2:
|
169
|
+
return _context3.abrupt("return", _context3.sent);
|
170
|
+
|
171
|
+
case 3:
|
172
|
+
case "end":
|
173
|
+
return _context3.stop();
|
180
174
|
}
|
181
175
|
}, _callee3);
|
182
176
|
}))();
|
@@ -189,19 +183,17 @@ export default _extends({
|
|
189
183
|
editTopo: function editTopo(params) {
|
190
184
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
191
185
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
192
|
-
while (1) {
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
return _context4.stop();
|
204
|
-
}
|
186
|
+
while (1) switch (_context4.prev = _context4.next) {
|
187
|
+
case 0:
|
188
|
+
_context4.next = 2;
|
189
|
+
return request.put(API_ROOT + "/menu", params);
|
190
|
+
|
191
|
+
case 2:
|
192
|
+
return _context4.abrupt("return", _context4.sent);
|
193
|
+
|
194
|
+
case 3:
|
195
|
+
case "end":
|
196
|
+
return _context4.stop();
|
205
197
|
}
|
206
198
|
}, _callee4);
|
207
199
|
}))();
|
@@ -216,19 +208,17 @@ export default _extends({
|
|
216
208
|
copyTopo: function copyTopo(params) {
|
217
209
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
218
210
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
219
|
-
while (1) {
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
return _context5.stop();
|
231
|
-
}
|
211
|
+
while (1) switch (_context5.prev = _context5.next) {
|
212
|
+
case 0:
|
213
|
+
_context5.next = 2;
|
214
|
+
return request.post(API_ROOT + "/menu/copy", params);
|
215
|
+
|
216
|
+
case 2:
|
217
|
+
return _context5.abrupt("return", _context5.sent);
|
218
|
+
|
219
|
+
case 3:
|
220
|
+
case "end":
|
221
|
+
return _context5.stop();
|
232
222
|
}
|
233
223
|
}, _callee5);
|
234
224
|
}))();
|
@@ -242,19 +232,17 @@ export default _extends({
|
|
242
232
|
deleteTopoonTree: function deleteTopoonTree(id) {
|
243
233
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
244
234
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
245
|
-
while (1) {
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
return _context6.stop();
|
257
|
-
}
|
235
|
+
while (1) switch (_context6.prev = _context6.next) {
|
236
|
+
case 0:
|
237
|
+
_context6.next = 2;
|
238
|
+
return request["delete"](API_ROOT + "/menu/" + id);
|
239
|
+
|
240
|
+
case 2:
|
241
|
+
return _context6.abrupt("return", _context6.sent);
|
242
|
+
|
243
|
+
case 3:
|
244
|
+
case "end":
|
245
|
+
return _context6.stop();
|
258
246
|
}
|
259
247
|
}, _callee6);
|
260
248
|
}))();
|
@@ -268,15 +256,13 @@ export default _extends({
|
|
268
256
|
setDefTopo: function setDefTopo(id) {
|
269
257
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
270
258
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
271
|
-
while (1) {
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
return _context7.stop();
|
279
|
-
}
|
259
|
+
while (1) switch (_context7.prev = _context7.next) {
|
260
|
+
case 0:
|
261
|
+
return _context7.abrupt("return", request.put(API_ROOT + "/menu/default/" + id));
|
262
|
+
|
263
|
+
case 1:
|
264
|
+
case "end":
|
265
|
+
return _context7.stop();
|
280
266
|
}
|
281
267
|
}, _callee7);
|
282
268
|
}))();
|
@@ -295,19 +281,17 @@ export default _extends({
|
|
295
281
|
moveTopoOnTree: function moveTopoOnTree(params) {
|
296
282
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
297
283
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
298
|
-
while (1) {
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
return _context8.stop();
|
310
|
-
}
|
284
|
+
while (1) switch (_context8.prev = _context8.next) {
|
285
|
+
case 0:
|
286
|
+
_context8.next = 2;
|
287
|
+
return request.put(API_ROOT + "/menu/move/", params);
|
288
|
+
|
289
|
+
case 2:
|
290
|
+
return _context8.abrupt("return", _context8.sent);
|
291
|
+
|
292
|
+
case 3:
|
293
|
+
case "end":
|
294
|
+
return _context8.stop();
|
311
295
|
}
|
312
296
|
}, _callee8);
|
313
297
|
}))();
|
@@ -323,26 +307,24 @@ export default _extends({
|
|
323
307
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
|
324
308
|
var id, template, layout, backgroundId;
|
325
309
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
326
|
-
while (1) {
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
return _context9.stop();
|
345
|
-
}
|
310
|
+
while (1) switch (_context9.prev = _context9.next) {
|
311
|
+
case 0:
|
312
|
+
id = _ref.id, template = _ref.template, layout = _ref.layout, backgroundId = _ref.backgroundId;
|
313
|
+
_context9.next = 3;
|
314
|
+
return request.put(API_ROOT + "/menu", {
|
315
|
+
id: id,
|
316
|
+
showType: template,
|
317
|
+
layout: layout,
|
318
|
+
backgroundId: backgroundId || -1,
|
319
|
+
type: 1
|
320
|
+
});
|
321
|
+
|
322
|
+
case 3:
|
323
|
+
return _context9.abrupt("return", _context9.sent);
|
324
|
+
|
325
|
+
case 4:
|
326
|
+
case "end":
|
327
|
+
return _context9.stop();
|
346
328
|
}
|
347
329
|
}, _callee9);
|
348
330
|
}))();
|
@@ -357,19 +339,17 @@ export default _extends({
|
|
357
339
|
getResourceList: function getResourceList(conditions, query) {
|
358
340
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
|
359
341
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
360
|
-
while (1) {
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
return _context10.stop();
|
372
|
-
}
|
342
|
+
while (1) switch (_context10.prev = _context10.next) {
|
343
|
+
case 0:
|
344
|
+
_context10.next = 2;
|
345
|
+
return request.post(API_ROOT + "/resource", prepareResourceParams(conditions, query));
|
346
|
+
|
347
|
+
case 2:
|
348
|
+
return _context10.abrupt("return", _context10.sent);
|
349
|
+
|
350
|
+
case 3:
|
351
|
+
case "end":
|
352
|
+
return _context10.stop();
|
373
353
|
}
|
374
354
|
}, _callee10);
|
375
355
|
}))();
|
@@ -383,19 +363,17 @@ export default _extends({
|
|
383
363
|
getConditions: function getConditions(id) {
|
384
364
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
|
385
365
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
386
|
-
while (1) {
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
return _context11.stop();
|
398
|
-
}
|
366
|
+
while (1) switch (_context11.prev = _context11.next) {
|
367
|
+
case 0:
|
368
|
+
_context11.next = 2;
|
369
|
+
return request.get(API_ROOT + "/resource/" + id);
|
370
|
+
|
371
|
+
case 2:
|
372
|
+
return _context11.abrupt("return", _context11.sent);
|
373
|
+
|
374
|
+
case 3:
|
375
|
+
case "end":
|
376
|
+
return _context11.stop();
|
399
377
|
}
|
400
378
|
}, _callee11);
|
401
379
|
}))();
|
@@ -412,27 +390,25 @@ export default _extends({
|
|
412
390
|
|
413
391
|
var result;
|
414
392
|
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
415
|
-
while (1) {
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
return _context12.stop();
|
435
|
-
}
|
393
|
+
while (1) switch (_context12.prev = _context12.next) {
|
394
|
+
case 0:
|
395
|
+
_context12.next = 2;
|
396
|
+
return request.get(API_ROOT + "/structure/both/" + id);
|
397
|
+
|
398
|
+
case 2:
|
399
|
+
result = _context12.sent;
|
400
|
+
return _context12.abrupt("return", processExitLink(_extends({}, result, {
|
401
|
+
nodes: (_result$nodes = result.nodes) !== null && _result$nodes !== void 0 ? _result$nodes : [],
|
402
|
+
links: ((_result$links = result.links) !== null && _result$links !== void 0 ? _result$links : []).map(function (item) {
|
403
|
+
return _extends({}, item, {
|
404
|
+
ciType: 'network_link'
|
405
|
+
});
|
406
|
+
})
|
407
|
+
})));
|
408
|
+
|
409
|
+
case 4:
|
410
|
+
case "end":
|
411
|
+
return _context12.stop();
|
436
412
|
}
|
437
413
|
}, _callee12);
|
438
414
|
}))();
|
@@ -451,38 +427,36 @@ export default _extends({
|
|
451
427
|
|
452
428
|
var data, obj, result;
|
453
429
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
454
|
-
while (1) {
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
430
|
+
while (1) switch (_context13.prev = _context13.next) {
|
431
|
+
case 0:
|
432
|
+
data = isAvailableArray(groups) ? groups : [];
|
433
|
+
|
434
|
+
if (resources) {
|
435
|
+
data.push({
|
436
|
+
parentId: TOPO_PARENT_ID,
|
437
|
+
order: 100,
|
438
|
+
resources: resources
|
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'
|
464
453
|
});
|
465
|
-
}
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
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
|
-
}
|
454
|
+
})
|
455
|
+
}), obj.groups));
|
456
|
+
|
457
|
+
case 7:
|
458
|
+
case "end":
|
459
|
+
return _context13.stop();
|
486
460
|
}
|
487
461
|
}, _callee13);
|
488
462
|
}))();
|
@@ -499,32 +473,30 @@ export default _extends({
|
|
499
473
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
500
474
|
var groups, resources, exportLinkIdList, otherConfig, newGroups, obj;
|
501
475
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
502
|
-
while (1) {
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
}
|
476
|
+
while (1) switch (_context14.prev = _context14.next) {
|
477
|
+
case 0:
|
478
|
+
groups = config.groups, resources = config.resources, exportLinkIdList = config.exportLinkIdList, otherConfig = _objectWithoutPropertiesLoose(config, _excluded);
|
479
|
+
newGroups = isAvailableArray(groups) ? groups : [];
|
480
|
+
|
481
|
+
if (resources) {
|
482
|
+
// 新建拓扑时
|
483
|
+
newGroups.push({
|
484
|
+
parentId: TOPO_PARENT_ID,
|
485
|
+
order: 100,
|
486
|
+
resources: resources
|
487
|
+
});
|
488
|
+
}
|
516
489
|
|
517
|
-
|
518
|
-
|
519
|
-
|
490
|
+
obj = prepareGroupParams(newGroups);
|
491
|
+
_context14.next = 6;
|
492
|
+
return request.post(API_ROOT + "/resource/" + id, _extends({}, otherConfig, obj));
|
520
493
|
|
521
|
-
|
522
|
-
|
494
|
+
case 6:
|
495
|
+
return _context14.abrupt("return", _context14.sent);
|
523
496
|
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
}
|
497
|
+
case 7:
|
498
|
+
case "end":
|
499
|
+
return _context14.stop();
|
528
500
|
}
|
529
501
|
}, _callee14);
|
530
502
|
}))();
|
@@ -539,21 +511,19 @@ export default _extends({
|
|
539
511
|
saveSerializeData: function saveSerializeData(id, data) {
|
540
512
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15() {
|
541
513
|
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
542
|
-
while (1) {
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
return _context15.stop();
|
556
|
-
}
|
514
|
+
while (1) switch (_context15.prev = _context15.next) {
|
515
|
+
case 0:
|
516
|
+
_context15.next = 2;
|
517
|
+
return request.post(API_ROOT + "/structure/" + id, {
|
518
|
+
data: data
|
519
|
+
});
|
520
|
+
|
521
|
+
case 2:
|
522
|
+
return _context15.abrupt("return", _context15.sent);
|
523
|
+
|
524
|
+
case 3:
|
525
|
+
case "end":
|
526
|
+
return _context15.stop();
|
557
527
|
}
|
558
528
|
}, _callee15);
|
559
529
|
}))();
|
@@ -569,20 +539,18 @@ export default _extends({
|
|
569
539
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
|
570
540
|
var parm;
|
571
541
|
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
572
|
-
while (1) {
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
return _context16.stop();
|
585
|
-
}
|
542
|
+
while (1) switch (_context16.prev = _context16.next) {
|
543
|
+
case 0:
|
544
|
+
rlog.debug('saveTopoSettings', settings);
|
545
|
+
parm = {
|
546
|
+
id: id,
|
547
|
+
globalConfig: settings
|
548
|
+
};
|
549
|
+
return _context16.abrupt("return", request.post(API_ROOT + "/config", parm));
|
550
|
+
|
551
|
+
case 3:
|
552
|
+
case "end":
|
553
|
+
return _context16.stop();
|
586
554
|
}
|
587
555
|
}, _callee16);
|
588
556
|
}))();
|
@@ -595,19 +563,17 @@ export default _extends({
|
|
595
563
|
openTopoAlarm: function openTopoAlarm(id) {
|
596
564
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
|
597
565
|
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
598
|
-
while (1) {
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
return _context17.stop();
|
610
|
-
}
|
566
|
+
while (1) switch (_context17.prev = _context17.next) {
|
567
|
+
case 0:
|
568
|
+
_context17.next = 2;
|
569
|
+
return request.post(API_ROOT + "/alarm?topoId=" + id);
|
570
|
+
|
571
|
+
case 2:
|
572
|
+
return _context17.abrupt("return", _context17.sent);
|
573
|
+
|
574
|
+
case 3:
|
575
|
+
case "end":
|
576
|
+
return _context17.stop();
|
611
577
|
}
|
612
578
|
}, _callee17);
|
613
579
|
}))();
|
@@ -620,19 +586,17 @@ export default _extends({
|
|
620
586
|
closeTopoAlarm: function closeTopoAlarm(id, secretKey) {
|
621
587
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
|
622
588
|
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
623
|
-
while (1) {
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
return _context18.stop();
|
635
|
-
}
|
589
|
+
while (1) switch (_context18.prev = _context18.next) {
|
590
|
+
case 0:
|
591
|
+
_context18.next = 2;
|
592
|
+
return request["delete"](API_ROOT + "/alarm?topoId=" + id + "&secretKey=" + secretKey);
|
593
|
+
|
594
|
+
case 2:
|
595
|
+
return _context18.abrupt("return", _context18.sent);
|
596
|
+
|
597
|
+
case 3:
|
598
|
+
case "end":
|
599
|
+
return _context18.stop();
|
636
600
|
}
|
637
601
|
}, _callee18);
|
638
602
|
}))();
|
@@ -648,31 +612,29 @@ export default _extends({
|
|
648
612
|
|
649
613
|
var param;
|
650
614
|
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
651
|
-
while (1) {
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
return _context19.stop();
|
675
|
-
}
|
615
|
+
while (1) switch (_context19.prev = _context19.next) {
|
616
|
+
case 0:
|
617
|
+
if (!(((_params$ids = params.ids) === null || _params$ids === void 0 ? void 0 : _params$ids.length) > 0)) {
|
618
|
+
_context19.next = 6;
|
619
|
+
break;
|
620
|
+
}
|
621
|
+
|
622
|
+
param = {
|
623
|
+
condition: "id('" + params.ids.join("','") + "')",
|
624
|
+
sort: 'index DESC',
|
625
|
+
currentPage: 1,
|
626
|
+
pageSize: params.ids.length > 10 ? params.ids.length : 10
|
627
|
+
};
|
628
|
+
rlog.debug('getAttributesByIds', param);
|
629
|
+
_context19.next = 5;
|
630
|
+
return commonQuery(param);
|
631
|
+
|
632
|
+
case 5:
|
633
|
+
return _context19.abrupt("return", _context19.sent);
|
634
|
+
|
635
|
+
case 6:
|
636
|
+
case "end":
|
637
|
+
return _context19.stop();
|
676
638
|
}
|
677
639
|
}, _callee19);
|
678
640
|
}))();
|
@@ -728,19 +690,17 @@ export default _extends({
|
|
728
690
|
getBatchCiPolling: function getBatchCiPolling(params) {
|
729
691
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
|
730
692
|
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
731
|
-
while (1) {
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
return _context20.stop();
|
743
|
-
}
|
693
|
+
while (1) switch (_context20.prev = _context20.next) {
|
694
|
+
case 0:
|
695
|
+
_context20.next = 2;
|
696
|
+
return request.post(TOPO_API_ROOT + "/attributes/polling", params);
|
697
|
+
|
698
|
+
case 2:
|
699
|
+
return _context20.abrupt("return", _context20.sent);
|
700
|
+
|
701
|
+
case 3:
|
702
|
+
case "end":
|
703
|
+
return _context20.stop();
|
744
704
|
}
|
745
705
|
}, _callee20);
|
746
706
|
}))();
|