@riil-frontend/component-topology 11.0.33 → 11.0.35

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.
Files changed (217) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.css +4 -2
  4. package/build/index.js +52 -45
  5. package/es/components/MultiResourceDrawer/index.js +22 -26
  6. package/es/components/ResourceList/ResourceSelect.js +55 -58
  7. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +30 -34
  8. package/es/components/SingleResourceDrawer/SelectDrawer.js +24 -28
  9. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +29 -33
  10. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
  11. package/es/core/components/titlebar/widgets/TitleWidget.js +5 -3
  12. package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -18
  13. package/es/core/editor/components/BackgroundView/index.js +149 -178
  14. package/es/core/editor/components/BackgroundView/index.module.scss +2 -1
  15. package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +26 -30
  16. package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -34
  17. package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +20 -24
  18. package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +13 -17
  19. package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
  20. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
  21. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
  22. package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +17 -21
  23. package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +27 -31
  24. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
  25. package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +16 -20
  26. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +37 -55
  27. package/es/core/editor/hooks/useKeyboardShortcut.js +2 -2
  28. package/es/core/editor/hooks/useNewElementTheme.js +2 -2
  29. package/es/core/editor/store/background.js +8 -10
  30. package/es/core/editor/store/topoEdit.js +4 -6
  31. package/es/core/editor/utils/edgeTypeStyleUtil.js +2 -4
  32. package/es/core/hooks/usePolling.js +130 -142
  33. package/es/core/hooks/useResourceConfig.js +76 -100
  34. package/es/core/hooks/useTopoEdit.js +525 -623
  35. package/es/core/models/Alarm.js +319 -402
  36. package/es/core/models/AttributeMetricDisplay.js +115 -143
  37. package/es/core/models/PluginManager.js +4 -3
  38. package/es/core/models/SelectionModel.js +4 -5
  39. package/es/core/models/TopoApp.js +279 -436
  40. package/es/core/models/TopoGraphView.js +28 -41
  41. package/es/core/models/cache/CiCache.js +34 -39
  42. package/es/core/models/cache/CiTypeCache.js +47 -61
  43. package/es/core/models/cache/DictCache.js +36 -42
  44. package/es/core/models/graph/Background.js +21 -26
  45. package/es/core/models/plugins/resourceWebControllUrl.js +84 -103
  46. package/es/core/models/tagstips/ElementTagTipConfig.js +44 -58
  47. package/es/core/models/topoData.js +73 -77
  48. package/es/core/models/utils/linkUtils.js +46 -51
  49. package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
  50. package/es/core/services/alarm.js +14 -16
  51. package/es/core/services/background.js +59 -67
  52. package/es/core/services/cmdb/metric.js +14 -18
  53. package/es/core/services/cmdb.js +23 -27
  54. package/es/core/services/index.js +48 -68
  55. package/es/core/services/overview.js +131 -151
  56. package/es/core/services/topo/basic.js +37 -41
  57. package/es/core/services/topo/tagtip.js +15 -19
  58. package/es/core/store/models/ciModel.js +58 -62
  59. package/es/core/store/models/customIcon.js +126 -145
  60. package/es/core/store/models/displayConfig.js +15 -19
  61. package/es/core/store/models/selection.js +4 -6
  62. package/es/core/store/models/topoAlarm.js +162 -145
  63. package/es/core/store/models/topoBaseInfoOverview.js +4 -6
  64. package/es/core/store/models/topoBizMod.js +9 -11
  65. package/es/core/store/models/topoConfig.js +215 -231
  66. package/es/core/store/models/topoGraphView.js +4 -6
  67. package/es/core/store/models/topoMod.js +373 -395
  68. package/es/core/utils/imageUtil.js +23 -27
  69. package/es/core/utils/saveSerialize.js +14 -18
  70. package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
  71. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +20 -25
  72. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +363 -409
  73. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +112 -131
  74. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +40 -46
  75. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +219 -275
  76. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
  77. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
  78. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +45 -54
  79. package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +32 -44
  80. package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
  81. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +23 -27
  82. package/es/networkTopo/components/Link/hook.js +85 -96
  83. package/es/networkTopo/components/Link/index.js +104 -126
  84. package/es/networkTopo/components/Link/setting.js +48 -52
  85. package/es/networkTopo/getTopoData.js +73 -92
  86. package/es/networkTopo/hooks/viewer/useRelateTopo.js +34 -39
  87. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  88. package/es/networkTopo/models/TopoCenter.js +28 -46
  89. package/es/networkTopo/services/alert.js +18 -22
  90. package/es/networkTopo/services/authorization.js +45 -55
  91. package/es/networkTopo/services/cmdb.js +548 -696
  92. package/es/networkTopo/services/funcAuth.js +22 -24
  93. package/es/networkTopo/services/link.js +107 -117
  94. package/es/networkTopo/services/mdc.js +33 -48
  95. package/es/networkTopo/services/metric.js +38 -47
  96. package/es/networkTopo/services/model.js +616 -809
  97. package/es/networkTopo/services/risk.js +9 -11
  98. package/es/networkTopo/services/topo/auth.js +27 -33
  99. package/es/networkTopo/services/topo/basic.js +251 -289
  100. package/es/networkTopo/services/topo/blacklist.js +20 -24
  101. package/es/networkTopo/services/topo/ciInfo.js +27 -31
  102. package/es/networkTopo/services/topo/icon.js +49 -59
  103. package/es/networkTopo/services/topo/networkLink.js +32 -36
  104. package/es/networkTopo/services/topo/relation.js +9 -11
  105. package/es/networkTopo/services/topo/resourceWebUrl.js +36 -42
  106. package/es/networkTopo/store/functionAuth.js +31 -37
  107. package/es/networkTopo/store/topoCenter.js +142 -152
  108. package/es/networkTopo/store/topoLinkMod.js +4 -6
  109. package/es/networkTopo/store/topoTreeMod.js +170 -182
  110. package/es/networkTopo/utils/exportData.js +57 -61
  111. package/lib/components/MultiResourceDrawer/index.js +22 -26
  112. package/lib/components/ResourceList/ResourceSelect.js +54 -58
  113. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +33 -37
  114. package/lib/components/SingleResourceDrawer/SelectDrawer.js +24 -28
  115. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +36 -40
  116. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
  117. package/lib/core/components/titlebar/widgets/TitleWidget.js +5 -3
  118. package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +18 -18
  119. package/lib/core/editor/components/BackgroundView/index.js +148 -177
  120. package/lib/core/editor/components/BackgroundView/index.module.scss +2 -1
  121. package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +28 -32
  122. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +34 -34
  123. package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +23 -28
  124. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +14 -18
  125. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
  126. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
  127. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
  128. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +18 -22
  129. package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +32 -36
  130. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
  131. package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +18 -22
  132. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +41 -59
  133. package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -2
  134. package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
  135. package/lib/core/editor/store/background.js +8 -10
  136. package/lib/core/editor/store/topoEdit.js +4 -6
  137. package/lib/core/editor/utils/edgeTypeStyleUtil.js +2 -4
  138. package/lib/core/hooks/usePolling.js +129 -141
  139. package/lib/core/hooks/useResourceConfig.js +76 -100
  140. package/lib/core/hooks/useTopoEdit.js +517 -615
  141. package/lib/core/models/Alarm.js +313 -396
  142. package/lib/core/models/AttributeMetricDisplay.js +118 -146
  143. package/lib/core/models/PluginManager.js +4 -3
  144. package/lib/core/models/SelectionModel.js +4 -5
  145. package/lib/core/models/TopoApp.js +279 -436
  146. package/lib/core/models/TopoGraphView.js +28 -41
  147. package/lib/core/models/cache/CiCache.js +39 -44
  148. package/lib/core/models/cache/CiTypeCache.js +48 -62
  149. package/lib/core/models/cache/DictCache.js +39 -45
  150. package/lib/core/models/graph/Background.js +22 -27
  151. package/lib/core/models/plugins/resourceWebControllUrl.js +82 -101
  152. package/lib/core/models/tagstips/ElementTagTipConfig.js +44 -58
  153. package/lib/core/models/topoData.js +73 -78
  154. package/lib/core/models/utils/linkUtils.js +45 -51
  155. package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
  156. package/lib/core/services/alarm.js +18 -20
  157. package/lib/core/services/background.js +70 -78
  158. package/lib/core/services/cmdb/metric.js +14 -19
  159. package/lib/core/services/cmdb.js +24 -29
  160. package/lib/core/services/index.js +53 -72
  161. package/lib/core/services/overview.js +131 -151
  162. package/lib/core/services/topo/basic.js +37 -41
  163. package/lib/core/services/topo/tagtip.js +16 -21
  164. package/lib/core/store/models/ciModel.js +66 -70
  165. package/lib/core/store/models/customIcon.js +126 -145
  166. package/lib/core/store/models/displayConfig.js +15 -19
  167. package/lib/core/store/models/selection.js +4 -6
  168. package/lib/core/store/models/topoAlarm.js +163 -145
  169. package/lib/core/store/models/topoBaseInfoOverview.js +4 -6
  170. package/lib/core/store/models/topoBizMod.js +9 -11
  171. package/lib/core/store/models/topoConfig.js +222 -238
  172. package/lib/core/store/models/topoGraphView.js +4 -6
  173. package/lib/core/store/models/topoMod.js +375 -397
  174. package/lib/core/utils/imageUtil.js +26 -31
  175. package/lib/core/utils/saveSerialize.js +13 -18
  176. package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
  177. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +21 -26
  178. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +364 -410
  179. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +114 -133
  180. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +44 -50
  181. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +220 -274
  182. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
  183. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
  184. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +40 -50
  185. package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +35 -47
  186. package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
  187. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +24 -28
  188. package/lib/networkTopo/components/Link/hook.js +86 -98
  189. package/lib/networkTopo/components/Link/index.js +105 -127
  190. package/lib/networkTopo/components/Link/setting.js +48 -52
  191. package/lib/networkTopo/getTopoData.js +73 -92
  192. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +35 -40
  193. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  194. package/lib/networkTopo/models/TopoCenter.js +28 -46
  195. package/lib/networkTopo/services/alert.js +18 -22
  196. package/lib/networkTopo/services/authorization.js +55 -65
  197. package/lib/networkTopo/services/cmdb.js +551 -700
  198. package/lib/networkTopo/services/funcAuth.js +24 -26
  199. package/lib/networkTopo/services/link.js +108 -118
  200. package/lib/networkTopo/services/mdc.js +35 -51
  201. package/lib/networkTopo/services/metric.js +37 -47
  202. package/lib/networkTopo/services/model.js +615 -809
  203. package/lib/networkTopo/services/risk.js +11 -13
  204. package/lib/networkTopo/services/topo/auth.js +27 -33
  205. package/lib/networkTopo/services/topo/basic.js +252 -290
  206. package/lib/networkTopo/services/topo/blacklist.js +20 -24
  207. package/lib/networkTopo/services/topo/ciInfo.js +34 -38
  208. package/lib/networkTopo/services/topo/icon.js +59 -69
  209. package/lib/networkTopo/services/topo/networkLink.js +32 -36
  210. package/lib/networkTopo/services/topo/relation.js +11 -13
  211. package/lib/networkTopo/services/topo/resourceWebUrl.js +44 -50
  212. package/lib/networkTopo/store/functionAuth.js +31 -37
  213. package/lib/networkTopo/store/topoCenter.js +142 -152
  214. package/lib/networkTopo/store/topoLinkMod.js +4 -6
  215. package/lib/networkTopo/store/topoTreeMod.js +166 -178
  216. package/lib/networkTopo/utils/exportData.js +63 -68
  217. package/package.json +4 -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
- switch (_context.prev = _context.next) {
131
- case 0:
132
- _context.next = 2;
133
- return _componentTopologyUtils.request.get(API_ROOT + "/menu");
134
-
135
- case 2:
136
- return _context.abrupt("return", _context.sent);
137
-
138
- case 3:
139
- case "end":
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
- switch (_context2.prev = _context2.next) {
152
- case 0:
153
- _context2.next = 2;
154
- return _componentTopologyUtils.request.get('/topo/v1/api/menuByLoginUser');
155
-
156
- case 2:
157
- return _context2.abrupt("return", _context2.sent);
158
-
159
- case 3:
160
- case "end":
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
- switch (_context3.prev = _context3.next) {
180
- case 0:
181
- _context3.next = 2;
182
- return _componentTopologyUtils.request.post(API_ROOT + "/menu", params);
183
-
184
- case 2:
185
- return _context3.abrupt("return", _context3.sent);
186
-
187
- case 3:
188
- case "end":
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
- switch (_context4.prev = _context4.next) {
205
- case 0:
206
- _context4.next = 2;
207
- return _componentTopologyUtils.request.put(API_ROOT + "/menu", params);
208
-
209
- case 2:
210
- return _context4.abrupt("return", _context4.sent);
211
-
212
- case 3:
213
- case "end":
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
- switch (_context5.prev = _context5.next) {
232
- case 0:
233
- _context5.next = 2;
234
- return _componentTopologyUtils.request.post(API_ROOT + "/menu/copy", params);
235
-
236
- case 2:
237
- return _context5.abrupt("return", _context5.sent);
238
-
239
- case 3:
240
- case "end":
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
- switch (_context6.prev = _context6.next) {
258
- case 0:
259
- _context6.next = 2;
260
- return _componentTopologyUtils.request["delete"](API_ROOT + "/menu/" + id);
261
-
262
- case 2:
263
- return _context6.abrupt("return", _context6.sent);
264
-
265
- case 3:
266
- case "end":
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
- switch (_context7.prev = _context7.next) {
284
- case 0:
285
- return _context7.abrupt("return", _componentTopologyUtils.request.put(API_ROOT + "/menu/default/" + id));
286
-
287
- case 1:
288
- case "end":
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
- switch (_context8.prev = _context8.next) {
311
- case 0:
312
- _context8.next = 2;
313
- return _componentTopologyUtils.request.put(API_ROOT + "/menu/move/", params);
314
-
315
- case 2:
316
- return _context8.abrupt("return", _context8.sent);
317
-
318
- case 3:
319
- case "end":
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
- switch (_context9.prev = _context9.next) {
339
- case 0:
340
- id = _ref.id, template = _ref.template, layout = _ref.layout, backgroundId = _ref.backgroundId;
341
- _context9.next = 3;
342
- return _componentTopologyUtils.request.put(API_ROOT + "/menu", {
343
- id: id,
344
- showType: template,
345
- layout: layout,
346
- backgroundId: backgroundId || -1,
347
- type: 1
348
- });
349
-
350
- case 3:
351
- return _context9.abrupt("return", _context9.sent);
352
-
353
- case 4:
354
- case "end":
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
- switch (_context10.prev = _context10.next) {
373
- case 0:
374
- _context10.next = 2;
375
- return _componentTopologyUtils.request.post(API_ROOT + "/resource", prepareResourceParams(conditions, query));
376
-
377
- case 2:
378
- return _context10.abrupt("return", _context10.sent);
379
-
380
- case 3:
381
- case "end":
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
- switch (_context11.prev = _context11.next) {
399
- case 0:
400
- _context11.next = 2;
401
- return _componentTopologyUtils.request.get(API_ROOT + "/resource/" + id);
402
-
403
- case 2:
404
- return _context11.abrupt("return", _context11.sent);
405
-
406
- case 3:
407
- case "end":
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
- switch (_context12.prev = _context12.next) {
428
- case 0:
429
- _context12.next = 2;
430
- return _componentTopologyUtils.request.get(API_ROOT + "/structure/both/" + id);
431
-
432
- case 2:
433
- result = _context12.sent;
434
- return _context12.abrupt("return", (0, _exitLinkUtil.processExitLink)((0, _extends2["default"])({}, result, {
435
- nodes: (_result$nodes = result.nodes) !== null && _result$nodes !== void 0 ? _result$nodes : [],
436
- links: ((_result$links = result.links) !== null && _result$links !== void 0 ? _result$links : []).map(function (item) {
437
- return (0, _extends2["default"])({}, item, {
438
- ciType: 'network_link'
439
- });
440
- })
441
- })));
442
-
443
- case 4:
444
- case "end":
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
- switch (_context13.prev = _context13.next) {
467
- case 0:
468
- data = Array.isArray(groups) ? groups : [];
469
-
470
- if (resources) {
471
- data.push({
472
- parentId: TOPO_PARENT_ID,
473
- order: 100,
474
- resources: resources
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
- obj = prepareGroupParams(data);
479
- _context13.next = 5;
480
- return _componentTopologyUtils.request.post(API_ROOT + "/structure/byCondition/" + id, (0, _extends2["default"])({}, obj));
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
- switch (_context14.prev = _context14.next) {
515
- case 0:
516
- groups = config.groups, resources = config.resources, exportLinkIdList = config.exportLinkIdList, otherConfig = (0, _objectWithoutPropertiesLoose2["default"])(config, _excluded);
517
- newGroups = Array.isArray(groups) ? groups : [];
518
-
519
- if (resources) {
520
- // 新建拓扑时
521
- newGroups.push({
522
- parentId: TOPO_PARENT_ID,
523
- order: 100,
524
- resources: resources
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
- obj = prepareGroupParams(newGroups);
529
- _context14.next = 6;
530
- return _componentTopologyUtils.request.post(API_ROOT + "/resource/" + id, (0, _extends2["default"])({}, otherConfig, obj));
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
- case 6:
533
- return _context14.abrupt("return", _context14.sent);
505
+ case 6:
506
+ return _context14.abrupt("return", _context14.sent);
534
507
 
535
- case 7:
536
- case "end":
537
- return _context14.stop();
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
- switch (_context15.prev = _context15.next) {
555
- case 0:
556
- _context15.next = 2;
557
- return _componentTopologyUtils.request.post(API_ROOT + "/structure/" + id, {
558
- data: data
559
- });
560
-
561
- case 2:
562
- return _context15.abrupt("return", _context15.sent);
563
-
564
- case 3:
565
- case "end":
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
- switch (_context16.prev = _context16.next) {
585
- case 0:
586
- _rlog["default"].debug('saveTopoSettings', settings);
587
-
588
- parm = {
589
- id: id,
590
- globalConfig: settings
591
- };
592
- return _context16.abrupt("return", _componentTopologyUtils.request.post(API_ROOT + "/config", parm));
593
-
594
- case 3:
595
- case "end":
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
- switch (_context17.prev = _context17.next) {
612
- case 0:
613
- _context17.next = 2;
614
- return _componentTopologyUtils.request.post(API_ROOT + "/alarm?topoId=" + id);
615
-
616
- case 2:
617
- return _context17.abrupt("return", _context17.sent);
618
-
619
- case 3:
620
- case "end":
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
- switch (_context18.prev = _context18.next) {
637
- case 0:
638
- _context18.next = 2;
639
- return _componentTopologyUtils.request["delete"](API_ROOT + "/alarm?topoId=" + id + "&secretKey=" + secretKey);
640
-
641
- case 2:
642
- return _context18.abrupt("return", _context18.sent);
643
-
644
- case 3:
645
- case "end":
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
- switch (_context19.prev = _context19.next) {
686
- case 0:
687
- _context19.next = 2;
688
- return _componentTopologyUtils.request.post(_constants.TOPO_API_ROOT + "/attributes/polling", params);
689
-
690
- case 2:
691
- return _context19.abrupt("return", _context19.sent);
692
-
693
- case 3:
694
- case "end":
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
  }))();