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