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