@riil-frontend/component-topology 11.0.34 → 12.0.0-dev.1
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 +57 -34
- package/es/components/BatchAttrMetric/setting.js +1 -1
- package/es/components/MultiResourceDrawer/index.js +16 -18
- package/es/components/ResourceList/ResourceSelect.js +48 -50
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +24 -26
- package/es/components/SingleResourceDrawer/SelectDrawer.js +18 -20
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +23 -25
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +78 -84
- package/es/core/components/titlebar/widgets/TitleWidget.js +5 -3
- package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -18
- package/es/core/editor/components/BackgroundView/index.js +119 -129
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +20 -22
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -34
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +15 -17
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +7 -9
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +37 -41
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +50 -54
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +50 -54
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +11 -13
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +21 -23
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +15 -17
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +10 -12
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +21 -27
- package/es/core/editor/hooks/useKeyboardShortcut.js +36 -32
- 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/copyElementUtil.js +171 -0
- package/es/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/es/core/hooks/usePolling.js +117 -121
- package/es/core/hooks/useResourceConfig.js +58 -66
- package/es/core/hooks/useTopoEdit.js +473 -503
- package/es/core/models/Alarm.js +281 -298
- package/es/core/models/AttributeMetricDisplay.js +101 -107
- package/es/core/models/PluginManager.js +4 -3
- package/es/core/models/SelectionModel.js +4 -5
- package/es/core/models/TopoApp.js +205 -240
- package/es/core/models/TopoGraphView.js +18 -21
- package/es/core/models/cache/CiCache.js +28 -27
- package/es/core/models/cache/CiTypeCache.js +37 -41
- package/es/core/models/cache/DictCache.js +33 -35
- package/es/core/models/graph/Background.js +15 -17
- package/es/core/models/plugins/resourceWebControllUrl.js +76 -82
- package/es/core/models/tagstips/ElementTagTipConfig.js +34 -38
- package/es/core/models/topoData.js +68 -70
- package/es/core/models/utils/linkUtils.js +41 -43
- package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/es/core/services/alarm.js +14 -16
- package/es/core/services/background.js +59 -67
- package/es/core/services/cmdb/metric.js +9 -11
- package/es/core/services/cmdb.js +20 -20
- package/es/core/services/index.js +39 -45
- package/es/core/services/overview.js +131 -151
- package/es/core/services/topo/basic.js +37 -41
- package/es/core/services/topo/tagtip.js +10 -12
- package/es/core/store/models/ciModel.js +58 -62
- package/es/core/store/models/customIcon.js +120 -134
- 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 +9 -11
- package/es/core/store/models/topoConfig.js +215 -231
- package/es/core/store/models/topoGraphView.js +4 -6
- package/es/core/store/models/topoMod.js +373 -395
- package/es/core/utils/imageUtil.js +18 -20
- package/es/core/utils/metricUtil.js +5 -0
- package/es/core/utils/saveSerialize.js +9 -11
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +56 -58
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +15 -17
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +343 -357
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +86 -92
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +39 -41
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +189 -205
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +107 -109
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +57 -59
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -37
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +25 -29
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +32 -36
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +17 -19
- package/es/networkTopo/components/Link/hook.js +73 -77
- package/es/networkTopo/components/Link/index.js +86 -94
- package/es/networkTopo/components/Link/setting.js +42 -44
- package/es/networkTopo/getTopoData.js +63 -69
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +30 -32
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/es/networkTopo/models/TopoCenter.js +18 -22
- package/es/networkTopo/services/alert.js +18 -22
- package/es/networkTopo/services/authorization.js +45 -55
- package/es/networkTopo/services/cmdb.js +422 -470
- package/es/networkTopo/services/funcAuth.js +22 -24
- package/es/networkTopo/services/link.js +107 -117
- package/es/networkTopo/services/mdc.js +18 -24
- package/es/networkTopo/services/metric.js +23 -27
- package/es/networkTopo/services/model.js +445 -509
- package/es/networkTopo/services/risk.js +9 -11
- package/es/networkTopo/services/topo/auth.js +27 -33
- package/es/networkTopo/services/topo/basic.js +251 -289
- 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/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 +52 -54
- package/lib/components/BatchAttrMetric/setting.js +1 -1
- package/lib/components/MultiResourceDrawer/index.js +16 -18
- package/lib/components/ResourceList/ResourceSelect.js +48 -50
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +27 -29
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +18 -20
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +30 -32
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +78 -84
- package/lib/core/components/titlebar/widgets/TitleWidget.js +5 -3
- package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +18 -18
- package/lib/core/editor/components/BackgroundView/index.js +118 -128
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +22 -24
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +34 -34
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +19 -21
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -10
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +37 -41
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +50 -54
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +50 -54
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +12 -14
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +26 -28
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +15 -17
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +12 -14
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +25 -31
- package/lib/core/editor/hooks/useKeyboardShortcut.js +37 -34
- 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/copyElementUtil.js +182 -0
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/lib/core/hooks/usePolling.js +116 -120
- package/lib/core/hooks/useResourceConfig.js +58 -66
- package/lib/core/hooks/useTopoEdit.js +465 -495
- package/lib/core/models/Alarm.js +275 -292
- package/lib/core/models/AttributeMetricDisplay.js +104 -110
- package/lib/core/models/PluginManager.js +4 -3
- package/lib/core/models/SelectionModel.js +4 -5
- package/lib/core/models/TopoApp.js +205 -240
- package/lib/core/models/TopoGraphView.js +18 -21
- package/lib/core/models/cache/CiCache.js +33 -32
- package/lib/core/models/cache/CiTypeCache.js +38 -42
- package/lib/core/models/cache/DictCache.js +33 -35
- package/lib/core/models/graph/Background.js +16 -18
- package/lib/core/models/plugins/resourceWebControllUrl.js +74 -80
- package/lib/core/models/tagstips/ElementTagTipConfig.js +34 -38
- package/lib/core/models/topoData.js +69 -71
- package/lib/core/models/utils/linkUtils.js +41 -43
- package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/lib/core/services/alarm.js +18 -20
- package/lib/core/services/background.js +70 -78
- package/lib/core/services/cmdb/metric.js +10 -12
- package/lib/core/services/cmdb.js +22 -22
- package/lib/core/services/index.js +45 -51
- package/lib/core/services/overview.js +131 -151
- package/lib/core/services/topo/basic.js +37 -41
- package/lib/core/services/topo/tagtip.js +12 -14
- package/lib/core/store/models/ciModel.js +66 -70
- package/lib/core/store/models/customIcon.js +120 -134
- 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 +9 -11
- package/lib/core/store/models/topoConfig.js +222 -238
- package/lib/core/store/models/topoGraphView.js +4 -6
- package/lib/core/store/models/topoMod.js +375 -397
- package/lib/core/utils/imageUtil.js +22 -24
- package/lib/core/utils/metricUtil.js +5 -0
- package/lib/core/utils/saveSerialize.js +9 -11
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +56 -58
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +15 -17
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +344 -358
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +86 -92
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +39 -41
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +190 -206
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +107 -109
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +57 -59
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +29 -33
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +25 -29
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +32 -36
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +18 -20
- package/lib/networkTopo/components/Link/hook.js +73 -77
- package/lib/networkTopo/components/Link/index.js +87 -95
- package/lib/networkTopo/components/Link/setting.js +42 -44
- package/lib/networkTopo/getTopoData.js +63 -69
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +31 -33
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/lib/networkTopo/models/TopoCenter.js +18 -22
- package/lib/networkTopo/services/alert.js +18 -22
- package/lib/networkTopo/services/authorization.js +55 -65
- package/lib/networkTopo/services/cmdb.js +422 -470
- package/lib/networkTopo/services/funcAuth.js +24 -26
- package/lib/networkTopo/services/link.js +108 -118
- package/lib/networkTopo/services/mdc.js +21 -27
- package/lib/networkTopo/services/metric.js +27 -31
- package/lib/networkTopo/services/model.js +445 -509
- package/lib/networkTopo/services/risk.js +11 -13
- package/lib/networkTopo/services/topo/auth.js +27 -33
- package/lib/networkTopo/services/topo/basic.js +252 -290
- 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/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 +59 -61
- package/lib/utils/htElementDataUtil.js +4 -2
- package/package.json +5 -3
@@ -126,19 +126,17 @@ var _default = (0, _extends2["default"])({
|
|
126
126
|
getTopoTree: function getTopoTree(params) {
|
127
127
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
128
128
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
129
|
-
while (1) {
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
return _context.stop();
|
141
|
-
}
|
129
|
+
while (1) switch (_context.prev = _context.next) {
|
130
|
+
case 0:
|
131
|
+
_context.next = 2;
|
132
|
+
return _componentTopologyUtils.request.get(API_ROOT + "/menu");
|
133
|
+
|
134
|
+
case 2:
|
135
|
+
return _context.abrupt("return", _context.sent);
|
136
|
+
|
137
|
+
case 3:
|
138
|
+
case "end":
|
139
|
+
return _context.stop();
|
142
140
|
}
|
143
141
|
}, _callee);
|
144
142
|
}))();
|
@@ -147,19 +145,17 @@ var _default = (0, _extends2["default"])({
|
|
147
145
|
getTopoTreeByLoginUser: function getTopoTreeByLoginUser(params) {
|
148
146
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
149
147
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
150
|
-
while (1) {
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
return _context2.stop();
|
162
|
-
}
|
148
|
+
while (1) switch (_context2.prev = _context2.next) {
|
149
|
+
case 0:
|
150
|
+
_context2.next = 2;
|
151
|
+
return _componentTopologyUtils.request.get('/topo/v1/api/menuByLoginUser');
|
152
|
+
|
153
|
+
case 2:
|
154
|
+
return _context2.abrupt("return", _context2.sent);
|
155
|
+
|
156
|
+
case 3:
|
157
|
+
case "end":
|
158
|
+
return _context2.stop();
|
163
159
|
}
|
164
160
|
}, _callee2);
|
165
161
|
}))();
|
@@ -175,19 +171,17 @@ var _default = (0, _extends2["default"])({
|
|
175
171
|
addNewTopo: function addNewTopo(params) {
|
176
172
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
177
173
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
178
|
-
while (1) {
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
return _context3.stop();
|
190
|
-
}
|
174
|
+
while (1) switch (_context3.prev = _context3.next) {
|
175
|
+
case 0:
|
176
|
+
_context3.next = 2;
|
177
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/menu", params);
|
178
|
+
|
179
|
+
case 2:
|
180
|
+
return _context3.abrupt("return", _context3.sent);
|
181
|
+
|
182
|
+
case 3:
|
183
|
+
case "end":
|
184
|
+
return _context3.stop();
|
191
185
|
}
|
192
186
|
}, _callee3);
|
193
187
|
}))();
|
@@ -200,19 +194,17 @@ var _default = (0, _extends2["default"])({
|
|
200
194
|
editTopo: function editTopo(params) {
|
201
195
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
202
196
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
203
|
-
while (1) {
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
return _context4.stop();
|
215
|
-
}
|
197
|
+
while (1) switch (_context4.prev = _context4.next) {
|
198
|
+
case 0:
|
199
|
+
_context4.next = 2;
|
200
|
+
return _componentTopologyUtils.request.put(API_ROOT + "/menu", params);
|
201
|
+
|
202
|
+
case 2:
|
203
|
+
return _context4.abrupt("return", _context4.sent);
|
204
|
+
|
205
|
+
case 3:
|
206
|
+
case "end":
|
207
|
+
return _context4.stop();
|
216
208
|
}
|
217
209
|
}, _callee4);
|
218
210
|
}))();
|
@@ -227,19 +219,17 @@ var _default = (0, _extends2["default"])({
|
|
227
219
|
copyTopo: function copyTopo(params) {
|
228
220
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
229
221
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
230
|
-
while (1) {
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
return _context5.stop();
|
242
|
-
}
|
222
|
+
while (1) switch (_context5.prev = _context5.next) {
|
223
|
+
case 0:
|
224
|
+
_context5.next = 2;
|
225
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/menu/copy", params);
|
226
|
+
|
227
|
+
case 2:
|
228
|
+
return _context5.abrupt("return", _context5.sent);
|
229
|
+
|
230
|
+
case 3:
|
231
|
+
case "end":
|
232
|
+
return _context5.stop();
|
243
233
|
}
|
244
234
|
}, _callee5);
|
245
235
|
}))();
|
@@ -253,19 +243,17 @@ var _default = (0, _extends2["default"])({
|
|
253
243
|
deleteTopoonTree: function deleteTopoonTree(id) {
|
254
244
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
255
245
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
256
|
-
while (1) {
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
return _context6.stop();
|
268
|
-
}
|
246
|
+
while (1) switch (_context6.prev = _context6.next) {
|
247
|
+
case 0:
|
248
|
+
_context6.next = 2;
|
249
|
+
return _componentTopologyUtils.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();
|
269
257
|
}
|
270
258
|
}, _callee6);
|
271
259
|
}))();
|
@@ -279,15 +267,13 @@ var _default = (0, _extends2["default"])({
|
|
279
267
|
setDefTopo: function setDefTopo(id) {
|
280
268
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
281
269
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
282
|
-
while (1) {
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
return _context7.stop();
|
290
|
-
}
|
270
|
+
while (1) switch (_context7.prev = _context7.next) {
|
271
|
+
case 0:
|
272
|
+
return _context7.abrupt("return", _componentTopologyUtils.request.put(API_ROOT + "/menu/default/" + id));
|
273
|
+
|
274
|
+
case 1:
|
275
|
+
case "end":
|
276
|
+
return _context7.stop();
|
291
277
|
}
|
292
278
|
}, _callee7);
|
293
279
|
}))();
|
@@ -306,19 +292,17 @@ var _default = (0, _extends2["default"])({
|
|
306
292
|
moveTopoOnTree: function moveTopoOnTree(params) {
|
307
293
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
308
294
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
309
|
-
while (1) {
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
return _context8.stop();
|
321
|
-
}
|
295
|
+
while (1) switch (_context8.prev = _context8.next) {
|
296
|
+
case 0:
|
297
|
+
_context8.next = 2;
|
298
|
+
return _componentTopologyUtils.request.put(API_ROOT + "/menu/move/", params);
|
299
|
+
|
300
|
+
case 2:
|
301
|
+
return _context8.abrupt("return", _context8.sent);
|
302
|
+
|
303
|
+
case 3:
|
304
|
+
case "end":
|
305
|
+
return _context8.stop();
|
322
306
|
}
|
323
307
|
}, _callee8);
|
324
308
|
}))();
|
@@ -334,26 +318,24 @@ var _default = (0, _extends2["default"])({
|
|
334
318
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
335
319
|
var id, template, layout, backgroundId;
|
336
320
|
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
337
|
-
while (1) {
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
return _context9.stop();
|
356
|
-
}
|
321
|
+
while (1) switch (_context9.prev = _context9.next) {
|
322
|
+
case 0:
|
323
|
+
id = _ref.id, template = _ref.template, layout = _ref.layout, backgroundId = _ref.backgroundId;
|
324
|
+
_context9.next = 3;
|
325
|
+
return _componentTopologyUtils.request.put(API_ROOT + "/menu", {
|
326
|
+
id: id,
|
327
|
+
showType: template,
|
328
|
+
layout: layout,
|
329
|
+
backgroundId: backgroundId || -1,
|
330
|
+
type: 1
|
331
|
+
});
|
332
|
+
|
333
|
+
case 3:
|
334
|
+
return _context9.abrupt("return", _context9.sent);
|
335
|
+
|
336
|
+
case 4:
|
337
|
+
case "end":
|
338
|
+
return _context9.stop();
|
357
339
|
}
|
358
340
|
}, _callee9);
|
359
341
|
}))();
|
@@ -368,19 +350,17 @@ var _default = (0, _extends2["default"])({
|
|
368
350
|
getResourceList: function getResourceList(conditions, query) {
|
369
351
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
370
352
|
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
371
|
-
while (1) {
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
return _context10.stop();
|
383
|
-
}
|
353
|
+
while (1) switch (_context10.prev = _context10.next) {
|
354
|
+
case 0:
|
355
|
+
_context10.next = 2;
|
356
|
+
return _componentTopologyUtils.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();
|
384
364
|
}
|
385
365
|
}, _callee10);
|
386
366
|
}))();
|
@@ -394,19 +374,17 @@ var _default = (0, _extends2["default"])({
|
|
394
374
|
getConditions: function getConditions(id) {
|
395
375
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11() {
|
396
376
|
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
397
|
-
while (1) {
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
return _context11.stop();
|
409
|
-
}
|
377
|
+
while (1) switch (_context11.prev = _context11.next) {
|
378
|
+
case 0:
|
379
|
+
_context11.next = 2;
|
380
|
+
return _componentTopologyUtils.request.get(API_ROOT + "/resource/" + id);
|
381
|
+
|
382
|
+
case 2:
|
383
|
+
return _context11.abrupt("return", _context11.sent);
|
384
|
+
|
385
|
+
case 3:
|
386
|
+
case "end":
|
387
|
+
return _context11.stop();
|
410
388
|
}
|
411
389
|
}, _callee11);
|
412
390
|
}))();
|
@@ -423,27 +401,25 @@ var _default = (0, _extends2["default"])({
|
|
423
401
|
|
424
402
|
var result;
|
425
403
|
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
426
|
-
while (1) {
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
return _context12.stop();
|
446
|
-
}
|
404
|
+
while (1) switch (_context12.prev = _context12.next) {
|
405
|
+
case 0:
|
406
|
+
_context12.next = 2;
|
407
|
+
return _componentTopologyUtils.request.get(API_ROOT + "/structure/both/" + id);
|
408
|
+
|
409
|
+
case 2:
|
410
|
+
result = _context12.sent;
|
411
|
+
return _context12.abrupt("return", (0, _exitLinkUtil.processExitLink)((0, _extends2["default"])({}, result, {
|
412
|
+
nodes: (_result$nodes = result.nodes) !== null && _result$nodes !== void 0 ? _result$nodes : [],
|
413
|
+
links: ((_result$links = result.links) !== null && _result$links !== void 0 ? _result$links : []).map(function (item) {
|
414
|
+
return (0, _extends2["default"])({}, item, {
|
415
|
+
ciType: 'network_link'
|
416
|
+
});
|
417
|
+
})
|
418
|
+
})));
|
419
|
+
|
420
|
+
case 4:
|
421
|
+
case "end":
|
422
|
+
return _context12.stop();
|
447
423
|
}
|
448
424
|
}, _callee12);
|
449
425
|
}))();
|
@@ -462,38 +438,36 @@ var _default = (0, _extends2["default"])({
|
|
462
438
|
|
463
439
|
var data, obj, result;
|
464
440
|
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
465
|
-
while (1) {
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
441
|
+
while (1) switch (_context13.prev = _context13.next) {
|
442
|
+
case 0:
|
443
|
+
data = Array.isArray(groups) ? groups : [];
|
444
|
+
|
445
|
+
if (resources) {
|
446
|
+
data.push({
|
447
|
+
parentId: TOPO_PARENT_ID,
|
448
|
+
order: 100,
|
449
|
+
resources: resources
|
450
|
+
});
|
451
|
+
}
|
452
|
+
|
453
|
+
obj = prepareGroupParams(data);
|
454
|
+
_context13.next = 5;
|
455
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/structure/byCondition/" + id, (0, _extends2["default"])({}, obj));
|
456
|
+
|
457
|
+
case 5:
|
458
|
+
result = _context13.sent;
|
459
|
+
return _context13.abrupt("return", (0, _exitLinkUtil.processByConditionResult)((0, _extends2["default"])({}, result, {
|
460
|
+
nodes: (_result$nodes2 = result.nodes) !== null && _result$nodes2 !== void 0 ? _result$nodes2 : [],
|
461
|
+
links: ((_result$links2 = result.links) !== null && _result$links2 !== void 0 ? _result$links2 : []).map(function (item) {
|
462
|
+
return (0, _extends2["default"])({}, item, {
|
463
|
+
ciType: 'network_link'
|
475
464
|
});
|
476
|
-
}
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
case 5:
|
483
|
-
result = _context13.sent;
|
484
|
-
return _context13.abrupt("return", (0, _exitLinkUtil.processByConditionResult)((0, _extends2["default"])({}, result, {
|
485
|
-
nodes: (_result$nodes2 = result.nodes) !== null && _result$nodes2 !== void 0 ? _result$nodes2 : [],
|
486
|
-
links: ((_result$links2 = result.links) !== null && _result$links2 !== void 0 ? _result$links2 : []).map(function (item) {
|
487
|
-
return (0, _extends2["default"])({}, item, {
|
488
|
-
ciType: 'network_link'
|
489
|
-
});
|
490
|
-
})
|
491
|
-
}), obj.groups));
|
492
|
-
|
493
|
-
case 7:
|
494
|
-
case "end":
|
495
|
-
return _context13.stop();
|
496
|
-
}
|
465
|
+
})
|
466
|
+
}), obj.groups));
|
467
|
+
|
468
|
+
case 7:
|
469
|
+
case "end":
|
470
|
+
return _context13.stop();
|
497
471
|
}
|
498
472
|
}, _callee13);
|
499
473
|
}))();
|
@@ -510,32 +484,30 @@ var _default = (0, _extends2["default"])({
|
|
510
484
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14() {
|
511
485
|
var groups, resources, exportLinkIdList, otherConfig, newGroups, obj;
|
512
486
|
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
513
|
-
while (1) {
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
}
|
487
|
+
while (1) switch (_context14.prev = _context14.next) {
|
488
|
+
case 0:
|
489
|
+
groups = config.groups, resources = config.resources, exportLinkIdList = config.exportLinkIdList, otherConfig = (0, _objectWithoutPropertiesLoose2["default"])(config, _excluded);
|
490
|
+
newGroups = Array.isArray(groups) ? groups : [];
|
491
|
+
|
492
|
+
if (resources) {
|
493
|
+
// 新建拓扑时
|
494
|
+
newGroups.push({
|
495
|
+
parentId: TOPO_PARENT_ID,
|
496
|
+
order: 100,
|
497
|
+
resources: resources
|
498
|
+
});
|
499
|
+
}
|
527
500
|
|
528
|
-
|
529
|
-
|
530
|
-
|
501
|
+
obj = prepareGroupParams(newGroups);
|
502
|
+
_context14.next = 6;
|
503
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/resource/" + id, (0, _extends2["default"])({}, otherConfig, obj));
|
531
504
|
|
532
|
-
|
533
|
-
|
505
|
+
case 6:
|
506
|
+
return _context14.abrupt("return", _context14.sent);
|
534
507
|
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
}
|
508
|
+
case 7:
|
509
|
+
case "end":
|
510
|
+
return _context14.stop();
|
539
511
|
}
|
540
512
|
}, _callee14);
|
541
513
|
}))();
|
@@ -550,21 +522,19 @@ var _default = (0, _extends2["default"])({
|
|
550
522
|
saveSerializeData: function saveSerializeData(id, data) {
|
551
523
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
552
524
|
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
553
|
-
while (1) {
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
return _context15.stop();
|
567
|
-
}
|
525
|
+
while (1) switch (_context15.prev = _context15.next) {
|
526
|
+
case 0:
|
527
|
+
_context15.next = 2;
|
528
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/structure/" + id, {
|
529
|
+
data: data
|
530
|
+
});
|
531
|
+
|
532
|
+
case 2:
|
533
|
+
return _context15.abrupt("return", _context15.sent);
|
534
|
+
|
535
|
+
case 3:
|
536
|
+
case "end":
|
537
|
+
return _context15.stop();
|
568
538
|
}
|
569
539
|
}, _callee15);
|
570
540
|
}))();
|
@@ -580,21 +550,19 @@ var _default = (0, _extends2["default"])({
|
|
580
550
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16() {
|
581
551
|
var parm;
|
582
552
|
return _regenerator["default"].wrap(function _callee16$(_context16) {
|
583
|
-
while (1) {
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
return _context16.stop();
|
597
|
-
}
|
553
|
+
while (1) switch (_context16.prev = _context16.next) {
|
554
|
+
case 0:
|
555
|
+
_rlog["default"].debug('saveTopoSettings', settings);
|
556
|
+
|
557
|
+
parm = {
|
558
|
+
id: id,
|
559
|
+
globalConfig: settings
|
560
|
+
};
|
561
|
+
return _context16.abrupt("return", _componentTopologyUtils.request.post(API_ROOT + "/config", parm));
|
562
|
+
|
563
|
+
case 3:
|
564
|
+
case "end":
|
565
|
+
return _context16.stop();
|
598
566
|
}
|
599
567
|
}, _callee16);
|
600
568
|
}))();
|
@@ -607,19 +575,17 @@ var _default = (0, _extends2["default"])({
|
|
607
575
|
openTopoAlarm: function openTopoAlarm(id) {
|
608
576
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17() {
|
609
577
|
return _regenerator["default"].wrap(function _callee17$(_context17) {
|
610
|
-
while (1) {
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
return _context17.stop();
|
622
|
-
}
|
578
|
+
while (1) switch (_context17.prev = _context17.next) {
|
579
|
+
case 0:
|
580
|
+
_context17.next = 2;
|
581
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/alarm?topoId=" + id);
|
582
|
+
|
583
|
+
case 2:
|
584
|
+
return _context17.abrupt("return", _context17.sent);
|
585
|
+
|
586
|
+
case 3:
|
587
|
+
case "end":
|
588
|
+
return _context17.stop();
|
623
589
|
}
|
624
590
|
}, _callee17);
|
625
591
|
}))();
|
@@ -632,19 +598,17 @@ var _default = (0, _extends2["default"])({
|
|
632
598
|
closeTopoAlarm: function closeTopoAlarm(id, secretKey) {
|
633
599
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18() {
|
634
600
|
return _regenerator["default"].wrap(function _callee18$(_context18) {
|
635
|
-
while (1) {
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
return _context18.stop();
|
647
|
-
}
|
601
|
+
while (1) switch (_context18.prev = _context18.next) {
|
602
|
+
case 0:
|
603
|
+
_context18.next = 2;
|
604
|
+
return _componentTopologyUtils.request["delete"](API_ROOT + "/alarm?topoId=" + id + "&secretKey=" + secretKey);
|
605
|
+
|
606
|
+
case 2:
|
607
|
+
return _context18.abrupt("return", _context18.sent);
|
608
|
+
|
609
|
+
case 3:
|
610
|
+
case "end":
|
611
|
+
return _context18.stop();
|
648
612
|
}
|
649
613
|
}, _callee18);
|
650
614
|
}))();
|
@@ -681,19 +645,17 @@ var _default = (0, _extends2["default"])({
|
|
681
645
|
getBatchCiPolling: function getBatchCiPolling(params) {
|
682
646
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee19() {
|
683
647
|
return _regenerator["default"].wrap(function _callee19$(_context19) {
|
684
|
-
while (1) {
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
return _context19.stop();
|
696
|
-
}
|
648
|
+
while (1) switch (_context19.prev = _context19.next) {
|
649
|
+
case 0:
|
650
|
+
_context19.next = 2;
|
651
|
+
return _componentTopologyUtils.request.post(_constants.TOPO_API_ROOT + "/attributes/polling", params);
|
652
|
+
|
653
|
+
case 2:
|
654
|
+
return _context19.abrupt("return", _context19.sent);
|
655
|
+
|
656
|
+
case 3:
|
657
|
+
case "end":
|
658
|
+
return _context19.stop();
|
697
659
|
}
|
698
660
|
}, _callee19);
|
699
661
|
}))();
|