@riil-frontend/component-topology 11.0.36 → 11.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.css +2 -4
  4. package/build/index.js +34 -49
  5. package/es/components/MultiResourceDrawer/index.js +18 -16
  6. package/es/components/ResourceList/ResourceSelect.js +50 -48
  7. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +26 -24
  8. package/es/components/SingleResourceDrawer/SelectDrawer.js +20 -18
  9. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +25 -23
  10. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
  11. package/es/core/components/titlebar/widgets/TitleWidget.js +3 -5
  12. package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
  13. package/es/core/editor/components/BackgroundView/index.js +129 -119
  14. package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +22 -20
  15. package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
  16. package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +17 -15
  17. package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +9 -7
  18. package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
  19. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
  20. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
  21. package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +13 -11
  22. package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +23 -21
  23. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
  24. package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +12 -10
  25. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +27 -21
  26. package/es/core/editor/hooks/useKeyboardShortcut.js +2 -2
  27. package/es/core/editor/hooks/useNewElementTheme.js +2 -2
  28. package/es/core/editor/store/background.js +10 -8
  29. package/es/core/editor/store/topoEdit.js +6 -4
  30. package/es/core/editor/utils/edgeTypeStyleUtil.js +4 -2
  31. package/es/core/hooks/usePolling.js +121 -117
  32. package/es/core/hooks/useResourceConfig.js +66 -58
  33. package/es/core/hooks/useTopoEdit.js +511 -476
  34. package/es/core/models/Alarm.js +298 -281
  35. package/es/core/models/AttributeMetricDisplay.js +107 -101
  36. package/es/core/models/PluginManager.js +3 -4
  37. package/es/core/models/SelectionModel.js +5 -4
  38. package/es/core/models/TopoApp.js +240 -205
  39. package/es/core/models/TopoGraphView.js +21 -18
  40. package/es/core/models/cache/CiCache.js +27 -28
  41. package/es/core/models/cache/CiTypeCache.js +41 -37
  42. package/es/core/models/cache/DictCache.js +35 -33
  43. package/es/core/models/graph/Background.js +17 -15
  44. package/es/core/models/plugins/resourceWebControllUrl.js +82 -76
  45. package/es/core/models/tagstips/ElementTagTipConfig.js +38 -34
  46. package/es/core/models/topoData.js +70 -68
  47. package/es/core/models/utils/linkUtils.js +43 -41
  48. package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
  49. package/es/core/services/alarm.js +16 -14
  50. package/es/core/services/background.js +67 -59
  51. package/es/core/services/cmdb/metric.js +11 -9
  52. package/es/core/services/cmdb.js +20 -18
  53. package/es/core/services/index.js +45 -39
  54. package/es/core/services/overview.js +151 -131
  55. package/es/core/services/topo/basic.js +41 -37
  56. package/es/core/services/topo/tagtip.js +12 -10
  57. package/es/core/store/models/ciModel.js +62 -58
  58. package/es/core/store/models/customIcon.js +134 -120
  59. package/es/core/store/models/displayConfig.js +19 -15
  60. package/es/core/store/models/selection.js +6 -4
  61. package/es/core/store/models/topoAlarm.js +145 -162
  62. package/es/core/store/models/topoBaseInfoOverview.js +6 -4
  63. package/es/core/store/models/topoBizMod.js +11 -9
  64. package/es/core/store/models/topoConfig.js +231 -215
  65. package/es/core/store/models/topoGraphView.js +6 -4
  66. package/es/core/store/models/topoMod.js +395 -373
  67. package/es/core/utils/imageUtil.js +20 -18
  68. package/es/core/utils/saveSerialize.js +11 -9
  69. package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
  70. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +29 -28
  71. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +357 -343
  72. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
  73. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
  74. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +205 -189
  75. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +111 -107
  76. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
  77. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +37 -33
  78. package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
  79. package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
  80. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +19 -17
  81. package/es/networkTopo/components/Link/hook.js +77 -73
  82. package/es/networkTopo/components/Link/index.js +94 -86
  83. package/es/networkTopo/components/Link/setting.js +44 -42
  84. package/es/networkTopo/getTopoData.js +69 -63
  85. package/es/networkTopo/hooks/viewer/useRelateTopo.js +32 -30
  86. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  87. package/es/networkTopo/models/TopoCenter.js +22 -18
  88. package/es/networkTopo/services/alert.js +22 -18
  89. package/es/networkTopo/services/authorization.js +55 -45
  90. package/es/networkTopo/services/cmdb.js +470 -422
  91. package/es/networkTopo/services/funcAuth.js +24 -22
  92. package/es/networkTopo/services/link.js +117 -107
  93. package/es/networkTopo/services/mdc.js +24 -18
  94. package/es/networkTopo/services/metric.js +27 -23
  95. package/es/networkTopo/services/model.js +509 -445
  96. package/es/networkTopo/services/risk.js +11 -9
  97. package/es/networkTopo/services/topo/auth.js +33 -27
  98. package/es/networkTopo/services/topo/basic.js +289 -251
  99. package/es/networkTopo/services/topo/blacklist.js +24 -20
  100. package/es/networkTopo/services/topo/ciInfo.js +31 -27
  101. package/es/networkTopo/services/topo/icon.js +59 -49
  102. package/es/networkTopo/services/topo/networkLink.js +36 -32
  103. package/es/networkTopo/services/topo/relation.js +11 -9
  104. package/es/networkTopo/services/topo/resourceWebUrl.js +42 -36
  105. package/es/networkTopo/store/functionAuth.js +37 -31
  106. package/es/networkTopo/store/topoCenter.js +152 -142
  107. package/es/networkTopo/store/topoLinkMod.js +6 -4
  108. package/es/networkTopo/store/topoTreeMod.js +182 -170
  109. package/es/networkTopo/utils/exportData.js +54 -52
  110. package/lib/components/MultiResourceDrawer/index.js +18 -16
  111. package/lib/components/ResourceList/ResourceSelect.js +50 -48
  112. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +29 -27
  113. package/lib/components/SingleResourceDrawer/SelectDrawer.js +20 -18
  114. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +32 -30
  115. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
  116. package/lib/core/components/titlebar/widgets/TitleWidget.js +3 -5
  117. package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
  118. package/lib/core/editor/components/BackgroundView/index.js +128 -118
  119. package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +24 -22
  120. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
  121. package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +21 -19
  122. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +10 -8
  123. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
  124. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
  125. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
  126. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +14 -12
  127. package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +28 -26
  128. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
  129. package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +14 -12
  130. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +31 -25
  131. package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -2
  132. package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
  133. package/lib/core/editor/store/background.js +10 -8
  134. package/lib/core/editor/store/topoEdit.js +6 -4
  135. package/lib/core/editor/utils/edgeTypeStyleUtil.js +4 -2
  136. package/lib/core/hooks/usePolling.js +120 -116
  137. package/lib/core/hooks/useResourceConfig.js +66 -58
  138. package/lib/core/hooks/useTopoEdit.js +503 -468
  139. package/lib/core/models/Alarm.js +292 -275
  140. package/lib/core/models/AttributeMetricDisplay.js +110 -104
  141. package/lib/core/models/PluginManager.js +3 -4
  142. package/lib/core/models/SelectionModel.js +5 -4
  143. package/lib/core/models/TopoApp.js +240 -205
  144. package/lib/core/models/TopoGraphView.js +21 -18
  145. package/lib/core/models/cache/CiCache.js +32 -33
  146. package/lib/core/models/cache/CiTypeCache.js +42 -38
  147. package/lib/core/models/cache/DictCache.js +35 -33
  148. package/lib/core/models/graph/Background.js +18 -16
  149. package/lib/core/models/plugins/resourceWebControllUrl.js +80 -74
  150. package/lib/core/models/tagstips/ElementTagTipConfig.js +38 -34
  151. package/lib/core/models/topoData.js +71 -69
  152. package/lib/core/models/utils/linkUtils.js +43 -41
  153. package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
  154. package/lib/core/services/alarm.js +20 -18
  155. package/lib/core/services/background.js +78 -70
  156. package/lib/core/services/cmdb/metric.js +12 -10
  157. package/lib/core/services/cmdb.js +22 -20
  158. package/lib/core/services/index.js +51 -45
  159. package/lib/core/services/overview.js +151 -131
  160. package/lib/core/services/topo/basic.js +41 -37
  161. package/lib/core/services/topo/tagtip.js +14 -12
  162. package/lib/core/store/models/ciModel.js +70 -66
  163. package/lib/core/store/models/customIcon.js +134 -120
  164. package/lib/core/store/models/displayConfig.js +19 -15
  165. package/lib/core/store/models/selection.js +6 -4
  166. package/lib/core/store/models/topoAlarm.js +145 -163
  167. package/lib/core/store/models/topoBaseInfoOverview.js +6 -4
  168. package/lib/core/store/models/topoBizMod.js +11 -9
  169. package/lib/core/store/models/topoConfig.js +238 -222
  170. package/lib/core/store/models/topoGraphView.js +6 -4
  171. package/lib/core/store/models/topoMod.js +397 -375
  172. package/lib/core/utils/imageUtil.js +24 -22
  173. package/lib/core/utils/saveSerialize.js +11 -9
  174. package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
  175. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +29 -28
  176. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +358 -344
  177. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
  178. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
  179. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +206 -190
  180. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +111 -107
  181. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
  182. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -29
  183. package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
  184. package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
  185. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +20 -18
  186. package/lib/networkTopo/components/Link/hook.js +77 -73
  187. package/lib/networkTopo/components/Link/index.js +95 -87
  188. package/lib/networkTopo/components/Link/setting.js +44 -42
  189. package/lib/networkTopo/getTopoData.js +69 -63
  190. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +33 -31
  191. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  192. package/lib/networkTopo/models/TopoCenter.js +22 -18
  193. package/lib/networkTopo/services/alert.js +22 -18
  194. package/lib/networkTopo/services/authorization.js +65 -55
  195. package/lib/networkTopo/services/cmdb.js +470 -422
  196. package/lib/networkTopo/services/funcAuth.js +26 -24
  197. package/lib/networkTopo/services/link.js +118 -108
  198. package/lib/networkTopo/services/mdc.js +27 -21
  199. package/lib/networkTopo/services/metric.js +31 -27
  200. package/lib/networkTopo/services/model.js +509 -445
  201. package/lib/networkTopo/services/risk.js +13 -11
  202. package/lib/networkTopo/services/topo/auth.js +33 -27
  203. package/lib/networkTopo/services/topo/basic.js +290 -252
  204. package/lib/networkTopo/services/topo/blacklist.js +24 -20
  205. package/lib/networkTopo/services/topo/ciInfo.js +38 -34
  206. package/lib/networkTopo/services/topo/icon.js +69 -59
  207. package/lib/networkTopo/services/topo/networkLink.js +36 -32
  208. package/lib/networkTopo/services/topo/relation.js +13 -11
  209. package/lib/networkTopo/services/topo/resourceWebUrl.js +50 -44
  210. package/lib/networkTopo/store/functionAuth.js +37 -31
  211. package/lib/networkTopo/store/topoCenter.js +152 -142
  212. package/lib/networkTopo/store/topoLinkMod.js +6 -4
  213. package/lib/networkTopo/store/topoTreeMod.js +178 -166
  214. package/lib/networkTopo/utils/exportData.js +61 -59
  215. package/lib/utils/htElementDataUtil.js +2 -4
  216. package/package.json +3 -3
@@ -126,17 +126,19 @@ 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) 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();
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
+ }
140
142
  }
141
143
  }, _callee);
142
144
  }))();
@@ -145,17 +147,19 @@ var _default = (0, _extends2["default"])({
145
147
  getTopoTreeByLoginUser: function getTopoTreeByLoginUser(params) {
146
148
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
147
149
  return _regenerator["default"].wrap(function _callee2$(_context2) {
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();
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
+ }
159
163
  }
160
164
  }, _callee2);
161
165
  }))();
@@ -171,17 +175,19 @@ var _default = (0, _extends2["default"])({
171
175
  addNewTopo: function addNewTopo(params) {
172
176
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
173
177
  return _regenerator["default"].wrap(function _callee3$(_context3) {
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();
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
+ }
185
191
  }
186
192
  }, _callee3);
187
193
  }))();
@@ -194,17 +200,19 @@ var _default = (0, _extends2["default"])({
194
200
  editTopo: function editTopo(params) {
195
201
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
196
202
  return _regenerator["default"].wrap(function _callee4$(_context4) {
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();
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
+ }
208
216
  }
209
217
  }, _callee4);
210
218
  }))();
@@ -219,17 +227,19 @@ var _default = (0, _extends2["default"])({
219
227
  copyTopo: function copyTopo(params) {
220
228
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
221
229
  return _regenerator["default"].wrap(function _callee5$(_context5) {
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();
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
+ }
233
243
  }
234
244
  }, _callee5);
235
245
  }))();
@@ -243,17 +253,19 @@ var _default = (0, _extends2["default"])({
243
253
  deleteTopoonTree: function deleteTopoonTree(id) {
244
254
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
245
255
  return _regenerator["default"].wrap(function _callee6$(_context6) {
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();
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
+ }
257
269
  }
258
270
  }, _callee6);
259
271
  }))();
@@ -267,13 +279,15 @@ var _default = (0, _extends2["default"])({
267
279
  setDefTopo: function setDefTopo(id) {
268
280
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
269
281
  return _regenerator["default"].wrap(function _callee7$(_context7) {
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();
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
+ }
277
291
  }
278
292
  }, _callee7);
279
293
  }))();
@@ -292,17 +306,19 @@ var _default = (0, _extends2["default"])({
292
306
  moveTopoOnTree: function moveTopoOnTree(params) {
293
307
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
294
308
  return _regenerator["default"].wrap(function _callee8$(_context8) {
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();
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
+ }
306
322
  }
307
323
  }, _callee8);
308
324
  }))();
@@ -318,24 +334,26 @@ var _default = (0, _extends2["default"])({
318
334
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
319
335
  var id, template, layout, backgroundId;
320
336
  return _regenerator["default"].wrap(function _callee9$(_context9) {
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();
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
+ }
339
357
  }
340
358
  }, _callee9);
341
359
  }))();
@@ -350,17 +368,19 @@ var _default = (0, _extends2["default"])({
350
368
  getResourceList: function getResourceList(conditions, query) {
351
369
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
352
370
  return _regenerator["default"].wrap(function _callee10$(_context10) {
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();
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
+ }
364
384
  }
365
385
  }, _callee10);
366
386
  }))();
@@ -374,17 +394,19 @@ var _default = (0, _extends2["default"])({
374
394
  getConditions: function getConditions(id) {
375
395
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11() {
376
396
  return _regenerator["default"].wrap(function _callee11$(_context11) {
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();
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
+ }
388
410
  }
389
411
  }, _callee11);
390
412
  }))();
@@ -401,25 +423,27 @@ var _default = (0, _extends2["default"])({
401
423
 
402
424
  var result;
403
425
  return _regenerator["default"].wrap(function _callee12$(_context12) {
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();
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
+ }
423
447
  }
424
448
  }, _callee12);
425
449
  }))();
@@ -438,36 +462,38 @@ var _default = (0, _extends2["default"])({
438
462
 
439
463
  var data, obj, result;
440
464
  return _regenerator["default"].wrap(function _callee13$(_context13) {
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'
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
464
475
  });
465
- })
466
- }), obj.groups));
467
-
468
- case 7:
469
- case "end":
470
- return _context13.stop();
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
+ }
471
497
  }
472
498
  }, _callee13);
473
499
  }))();
@@ -484,30 +510,32 @@ var _default = (0, _extends2["default"])({
484
510
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14() {
485
511
  var groups, resources, exportLinkIdList, otherConfig, newGroups, obj;
486
512
  return _regenerator["default"].wrap(function _callee14$(_context14) {
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
- }
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
+ }
500
527
 
501
- obj = prepareGroupParams(newGroups);
502
- _context14.next = 6;
503
- return _componentTopologyUtils.request.post(API_ROOT + "/resource/" + id, (0, _extends2["default"])({}, otherConfig, obj));
528
+ obj = prepareGroupParams(newGroups);
529
+ _context14.next = 6;
530
+ return _componentTopologyUtils.request.post(API_ROOT + "/resource/" + id, (0, _extends2["default"])({}, otherConfig, obj));
504
531
 
505
- case 6:
506
- return _context14.abrupt("return", _context14.sent);
532
+ case 6:
533
+ return _context14.abrupt("return", _context14.sent);
507
534
 
508
- case 7:
509
- case "end":
510
- return _context14.stop();
535
+ case 7:
536
+ case "end":
537
+ return _context14.stop();
538
+ }
511
539
  }
512
540
  }, _callee14);
513
541
  }))();
@@ -522,19 +550,21 @@ var _default = (0, _extends2["default"])({
522
550
  saveSerializeData: function saveSerializeData(id, data) {
523
551
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15() {
524
552
  return _regenerator["default"].wrap(function _callee15$(_context15) {
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();
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
+ }
538
568
  }
539
569
  }, _callee15);
540
570
  }))();
@@ -550,19 +580,21 @@ var _default = (0, _extends2["default"])({
550
580
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16() {
551
581
  var parm;
552
582
  return _regenerator["default"].wrap(function _callee16$(_context16) {
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();
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
+ }
566
598
  }
567
599
  }, _callee16);
568
600
  }))();
@@ -575,17 +607,19 @@ var _default = (0, _extends2["default"])({
575
607
  openTopoAlarm: function openTopoAlarm(id) {
576
608
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17() {
577
609
  return _regenerator["default"].wrap(function _callee17$(_context17) {
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();
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
+ }
589
623
  }
590
624
  }, _callee17);
591
625
  }))();
@@ -598,17 +632,19 @@ var _default = (0, _extends2["default"])({
598
632
  closeTopoAlarm: function closeTopoAlarm(id, secretKey) {
599
633
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18() {
600
634
  return _regenerator["default"].wrap(function _callee18$(_context18) {
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();
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
+ }
612
648
  }
613
649
  }, _callee18);
614
650
  }))();
@@ -645,17 +681,19 @@ var _default = (0, _extends2["default"])({
645
681
  getBatchCiPolling: function getBatchCiPolling(params) {
646
682
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee19() {
647
683
  return _regenerator["default"].wrap(function _callee19$(_context19) {
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();
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
+ }
659
697
  }
660
698
  }, _callee19);
661
699
  }))();