@riil-frontend/component-topology 11.0.30 → 11.0.31

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 +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/Toolbar/widgets/IconSelect/index.module.scss +1 -1
  22. package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +13 -11
  23. package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +23 -21
  24. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
  25. package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +12 -10
  26. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +27 -21
  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 +10 -8
  30. package/es/core/editor/store/topoEdit.js +6 -4
  31. package/es/core/editor/utils/edgeTypeStyleUtil.js +4 -2
  32. package/es/core/hooks/usePolling.js +121 -117
  33. package/es/core/hooks/useResourceConfig.js +66 -58
  34. package/es/core/hooks/useTopoEdit.js +511 -476
  35. package/es/core/models/Alarm.js +298 -281
  36. package/es/core/models/AttributeMetricDisplay.js +107 -101
  37. package/es/core/models/PluginManager.js +3 -4
  38. package/es/core/models/SelectionModel.js +5 -4
  39. package/es/core/models/TopoApp.js +240 -205
  40. package/es/core/models/TopoGraphView.js +21 -18
  41. package/es/core/models/cache/CiCache.js +27 -28
  42. package/es/core/models/cache/CiTypeCache.js +41 -37
  43. package/es/core/models/cache/DictCache.js +35 -33
  44. package/es/core/models/graph/Background.js +17 -15
  45. package/es/core/models/plugins/resourceWebControllUrl.js +82 -76
  46. package/es/core/models/tagstips/ElementTagTipConfig.js +38 -34
  47. package/es/core/models/topoData.js +70 -68
  48. package/es/core/models/utils/linkUtils.js +43 -41
  49. package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
  50. package/es/core/services/alarm.js +16 -14
  51. package/es/core/services/background.js +67 -59
  52. package/es/core/services/cmdb/metric.js +11 -9
  53. package/es/core/services/cmdb.js +20 -18
  54. package/es/core/services/index.js +45 -39
  55. package/es/core/services/overview.js +151 -131
  56. package/es/core/services/topo/basic.js +13 -11
  57. package/es/core/services/topo/tagtip.js +12 -10
  58. package/es/core/store/models/ciModel.js +62 -58
  59. package/es/core/store/models/customIcon.js +134 -120
  60. package/es/core/store/models/displayConfig.js +19 -15
  61. package/es/core/store/models/selection.js +6 -4
  62. package/es/core/store/models/topoAlarm.js +145 -162
  63. package/es/core/store/models/topoBaseInfoOverview.js +6 -4
  64. package/es/core/store/models/topoBizMod.js +32 -28
  65. package/es/core/store/models/topoConfig.js +231 -215
  66. package/es/core/store/models/topoGraphView.js +6 -4
  67. package/es/core/store/models/topoMod.js +395 -373
  68. package/es/core/utils/imageUtil.js +20 -18
  69. package/es/core/utils/saveSerialize.js +11 -9
  70. package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
  71. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -15
  72. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +357 -343
  73. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
  74. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
  75. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +205 -189
  76. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +109 -107
  77. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
  78. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +37 -33
  79. package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
  80. package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
  81. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +19 -17
  82. package/es/networkTopo/components/Link/hook.js +77 -73
  83. package/es/networkTopo/components/Link/index.js +94 -86
  84. package/es/networkTopo/components/Link/setting.js +44 -42
  85. package/es/networkTopo/getTopoData.js +69 -63
  86. package/es/networkTopo/hooks/viewer/useRelateTopo.js +32 -30
  87. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  88. package/es/networkTopo/models/TopoCenter.js +22 -18
  89. package/es/networkTopo/services/alert.js +22 -18
  90. package/es/networkTopo/services/authorization.js +55 -45
  91. package/es/networkTopo/services/cmdb.js +470 -422
  92. package/es/networkTopo/services/funcAuth.js +24 -22
  93. package/es/networkTopo/services/link.js +117 -107
  94. package/es/networkTopo/services/mdc.js +24 -18
  95. package/es/networkTopo/services/metric.js +27 -23
  96. package/es/networkTopo/services/model.js +509 -445
  97. package/es/networkTopo/services/risk.js +11 -9
  98. package/es/networkTopo/services/topo/auth.js +33 -27
  99. package/es/networkTopo/services/topo/basic.js +314 -274
  100. package/es/networkTopo/services/topo/blacklist.js +24 -20
  101. package/es/networkTopo/services/topo/ciInfo.js +31 -27
  102. package/es/networkTopo/services/topo/icon.js +59 -49
  103. package/es/networkTopo/services/topo/networkLink.js +36 -32
  104. package/es/networkTopo/services/topo/relation.js +11 -9
  105. package/es/networkTopo/services/topo/resourceWebUrl.js +42 -36
  106. package/es/networkTopo/store/functionAuth.js +37 -31
  107. package/es/networkTopo/store/topoCenter.js +152 -142
  108. package/es/networkTopo/store/topoLinkMod.js +6 -4
  109. package/es/networkTopo/store/topoTreeMod.js +182 -170
  110. package/es/networkTopo/utils/exportData.js +54 -52
  111. package/lib/components/MultiResourceDrawer/index.js +18 -16
  112. package/lib/components/ResourceList/ResourceSelect.js +50 -48
  113. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +29 -27
  114. package/lib/components/SingleResourceDrawer/SelectDrawer.js +20 -18
  115. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +32 -30
  116. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
  117. package/lib/core/components/titlebar/widgets/TitleWidget.js +3 -5
  118. package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
  119. package/lib/core/editor/components/BackgroundView/index.js +128 -118
  120. package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +24 -22
  121. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
  122. package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +21 -19
  123. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +10 -8
  124. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
  125. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
  126. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
  127. package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
  128. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +14 -12
  129. package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +28 -26
  130. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
  131. package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +14 -12
  132. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +31 -25
  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 +10 -8
  136. package/lib/core/editor/store/topoEdit.js +6 -4
  137. package/lib/core/editor/utils/edgeTypeStyleUtil.js +4 -2
  138. package/lib/core/hooks/usePolling.js +120 -116
  139. package/lib/core/hooks/useResourceConfig.js +66 -58
  140. package/lib/core/hooks/useTopoEdit.js +503 -468
  141. package/lib/core/models/Alarm.js +292 -275
  142. package/lib/core/models/AttributeMetricDisplay.js +110 -104
  143. package/lib/core/models/PluginManager.js +3 -4
  144. package/lib/core/models/SelectionModel.js +5 -4
  145. package/lib/core/models/TopoApp.js +240 -205
  146. package/lib/core/models/TopoGraphView.js +21 -18
  147. package/lib/core/models/cache/CiCache.js +32 -33
  148. package/lib/core/models/cache/CiTypeCache.js +42 -38
  149. package/lib/core/models/cache/DictCache.js +35 -33
  150. package/lib/core/models/graph/Background.js +18 -16
  151. package/lib/core/models/plugins/resourceWebControllUrl.js +80 -74
  152. package/lib/core/models/tagstips/ElementTagTipConfig.js +38 -34
  153. package/lib/core/models/topoData.js +71 -69
  154. package/lib/core/models/utils/linkUtils.js +43 -41
  155. package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
  156. package/lib/core/services/alarm.js +20 -18
  157. package/lib/core/services/background.js +78 -70
  158. package/lib/core/services/cmdb/metric.js +12 -10
  159. package/lib/core/services/cmdb.js +22 -20
  160. package/lib/core/services/index.js +51 -45
  161. package/lib/core/services/overview.js +151 -131
  162. package/lib/core/services/topo/basic.js +15 -13
  163. package/lib/core/services/topo/tagtip.js +14 -12
  164. package/lib/core/store/models/ciModel.js +70 -66
  165. package/lib/core/store/models/customIcon.js +134 -120
  166. package/lib/core/store/models/displayConfig.js +19 -15
  167. package/lib/core/store/models/selection.js +6 -4
  168. package/lib/core/store/models/topoAlarm.js +145 -163
  169. package/lib/core/store/models/topoBaseInfoOverview.js +6 -4
  170. package/lib/core/store/models/topoBizMod.js +38 -34
  171. package/lib/core/store/models/topoConfig.js +238 -222
  172. package/lib/core/store/models/topoGraphView.js +6 -4
  173. package/lib/core/store/models/topoMod.js +397 -375
  174. package/lib/core/utils/imageUtil.js +24 -22
  175. package/lib/core/utils/saveSerialize.js +11 -9
  176. package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
  177. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -15
  178. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +358 -344
  179. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
  180. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
  181. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +206 -190
  182. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +109 -107
  183. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
  184. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -29
  185. package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
  186. package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
  187. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +20 -18
  188. package/lib/networkTopo/components/Link/hook.js +77 -73
  189. package/lib/networkTopo/components/Link/index.js +95 -87
  190. package/lib/networkTopo/components/Link/setting.js +44 -42
  191. package/lib/networkTopo/getTopoData.js +69 -63
  192. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +33 -31
  193. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  194. package/lib/networkTopo/models/TopoCenter.js +22 -18
  195. package/lib/networkTopo/services/alert.js +22 -18
  196. package/lib/networkTopo/services/authorization.js +65 -55
  197. package/lib/networkTopo/services/cmdb.js +470 -422
  198. package/lib/networkTopo/services/funcAuth.js +26 -24
  199. package/lib/networkTopo/services/link.js +118 -108
  200. package/lib/networkTopo/services/mdc.js +27 -21
  201. package/lib/networkTopo/services/metric.js +31 -27
  202. package/lib/networkTopo/services/model.js +509 -445
  203. package/lib/networkTopo/services/risk.js +13 -11
  204. package/lib/networkTopo/services/topo/auth.js +33 -27
  205. package/lib/networkTopo/services/topo/basic.js +317 -277
  206. package/lib/networkTopo/services/topo/blacklist.js +24 -20
  207. package/lib/networkTopo/services/topo/ciInfo.js +38 -34
  208. package/lib/networkTopo/services/topo/icon.js +69 -59
  209. package/lib/networkTopo/services/topo/networkLink.js +36 -32
  210. package/lib/networkTopo/services/topo/relation.js +13 -11
  211. package/lib/networkTopo/services/topo/resourceWebUrl.js +50 -44
  212. package/lib/networkTopo/store/functionAuth.js +37 -31
  213. package/lib/networkTopo/store/topoCenter.js +152 -142
  214. package/lib/networkTopo/store/topoLinkMod.js +6 -4
  215. package/lib/networkTopo/store/topoTreeMod.js +178 -166
  216. package/lib/networkTopo/utils/exportData.js +61 -59
  217. package/package.json +3 -3
@@ -23,22 +23,24 @@ function _queryCisByIds() {
23
23
  _queryCisByIds = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids) {
24
24
  var result;
25
25
  return _regenerator["default"].wrap(function _callee$(_context) {
26
- while (1) switch (_context.prev = _context.next) {
27
- case 0:
28
- _context.next = 2;
29
- return (0, _cmdb.commonQueryCiDataByIds)(ids, {
30
- orders: [],
31
- pageIndex: 1,
32
- pageSize: 100000
33
- });
34
-
35
- case 2:
36
- result = _context.sent;
37
- return _context.abrupt("return", result.data);
38
-
39
- case 4:
40
- case "end":
41
- return _context.stop();
26
+ while (1) {
27
+ switch (_context.prev = _context.next) {
28
+ case 0:
29
+ _context.next = 2;
30
+ return (0, _cmdb.commonQueryCiDataByIds)(ids, {
31
+ orders: [],
32
+ pageIndex: 1,
33
+ pageSize: 100000
34
+ });
35
+
36
+ case 2:
37
+ result = _context.sent;
38
+ return _context.abrupt("return", result.data);
39
+
40
+ case 4:
41
+ case "end":
42
+ return _context.stop();
43
+ }
42
44
  }
43
45
  }, _callee);
44
46
  }));
@@ -53,18 +55,20 @@ function _queryModelAsset() {
53
55
  _queryModelAsset = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(code) {
54
56
  var result;
55
57
  return _regenerator["default"].wrap(function _callee2$(_context2) {
56
- while (1) switch (_context2.prev = _context2.next) {
57
- case 0:
58
- _context2.next = 2;
59
- return _componentTopologyUtils.request.get("/mdc/v1/api/model-asset/" + code);
60
-
61
- case 2:
62
- result = _context2.sent;
63
- return _context2.abrupt("return", result);
64
-
65
- case 4:
66
- case "end":
67
- return _context2.stop();
58
+ while (1) {
59
+ switch (_context2.prev = _context2.next) {
60
+ case 0:
61
+ _context2.next = 2;
62
+ return _componentTopologyUtils.request.get("/mdc/v1/api/model-asset/" + code);
63
+
64
+ case 2:
65
+ result = _context2.sent;
66
+ return _context2.abrupt("return", result);
67
+
68
+ case 4:
69
+ case "end":
70
+ return _context2.stop();
71
+ }
68
72
  }
69
73
  }, _callee2);
70
74
  }));
@@ -79,23 +83,25 @@ function _commonQueryCiData() {
79
83
  _commonQueryCiData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(id) {
80
84
  var result;
81
85
  return _regenerator["default"].wrap(function _callee3$(_context3) {
82
- while (1) switch (_context3.prev = _context3.next) {
83
- case 0:
84
- _context3.next = 2;
85
- return _componentTopologyUtils.request.post('/mdc/v1/api/cmdb/authority/commonQueryCiData', {
86
- condition: "type('machine_room') && id('" + id + "')",
87
- orders: [],
88
- pageIndex: 1,
89
- pageSize: 20
90
- });
91
-
92
- case 2:
93
- result = _context3.sent;
94
- return _context3.abrupt("return", result);
95
-
96
- case 4:
97
- case "end":
98
- return _context3.stop();
86
+ while (1) {
87
+ switch (_context3.prev = _context3.next) {
88
+ case 0:
89
+ _context3.next = 2;
90
+ return _componentTopologyUtils.request.post('/mdc/v1/api/cmdb/authority/commonQueryCiData', {
91
+ condition: "type('machine_room') && id('" + id + "')",
92
+ orders: [],
93
+ pageIndex: 1,
94
+ pageSize: 20
95
+ });
96
+
97
+ case 2:
98
+ result = _context3.sent;
99
+ return _context3.abrupt("return", result);
100
+
101
+ case 4:
102
+ case "end":
103
+ return _context3.stop();
104
+ }
99
105
  }
100
106
  }, _callee3);
101
107
  }));
@@ -25,17 +25,19 @@ var _default = {
25
25
  getRiskByIds: function getRiskByIds(params) {
26
26
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
27
27
  return _regenerator["default"].wrap(function _callee$(_context) {
28
- while (1) switch (_context.prev = _context.next) {
29
- case 0:
30
- _context.next = 2;
31
- return _componentTopologyUtils.request.post('/health/v1/api/management/getRiskList', params);
32
-
33
- case 2:
34
- return _context.abrupt("return", _context.sent);
35
-
36
- case 3:
37
- case "end":
38
- return _context.stop();
28
+ while (1) {
29
+ switch (_context.prev = _context.next) {
30
+ case 0:
31
+ _context.next = 2;
32
+ return _componentTopologyUtils.request.post('/health/v1/api/management/getRiskList', params);
33
+
34
+ case 2:
35
+ return _context.abrupt("return", _context.sent);
36
+
37
+ case 3:
38
+ case "end":
39
+ return _context.stop();
40
+ }
39
41
  }
40
42
  }, _callee);
41
43
  }))();
@@ -50,30 +52,32 @@ var _default = {
50
52
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
51
53
  var components;
52
54
  return _regenerator["default"].wrap(function _callee2$(_context2) {
53
- while (1) switch (_context2.prev = _context2.next) {
54
- case 0:
55
- components = ciComponentsMap[id];
56
-
57
- if (components) {
58
- _context2.next = 6;
59
- break;
60
- }
61
-
62
- _context2.next = 4;
63
- return _componentTopologyUtils.request.post('/mdc/v1/api/cmdb/queryAllComponentsByCiId', {
64
- id: id
65
- });
66
-
67
- case 4:
68
- components = _context2.sent;
69
- ciComponentsMap[id] = components;
70
-
71
- case 6:
72
- return _context2.abrupt("return", components);
73
-
74
- case 7:
75
- case "end":
76
- return _context2.stop();
55
+ while (1) {
56
+ switch (_context2.prev = _context2.next) {
57
+ case 0:
58
+ components = ciComponentsMap[id];
59
+
60
+ if (components) {
61
+ _context2.next = 6;
62
+ break;
63
+ }
64
+
65
+ _context2.next = 4;
66
+ return _componentTopologyUtils.request.post('/mdc/v1/api/cmdb/queryAllComponentsByCiId', {
67
+ id: id
68
+ });
69
+
70
+ case 4:
71
+ components = _context2.sent;
72
+ ciComponentsMap[id] = components;
73
+
74
+ case 6:
75
+ return _context2.abrupt("return", components);
76
+
77
+ case 7:
78
+ case "end":
79
+ return _context2.stop();
80
+ }
77
81
  }
78
82
  }, _callee2);
79
83
  }))();
@@ -86,17 +90,19 @@ var _default = {
86
90
  handleAlarm: function handleAlarm(params) {
87
91
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
88
92
  return _regenerator["default"].wrap(function _callee3$(_context3) {
89
- while (1) switch (_context3.prev = _context3.next) {
90
- case 0:
91
- _context3.next = 2;
92
- return _componentTopologyUtils.request.post('/alert/v1/api/alert/handleAlerts', params);
93
-
94
- case 2:
95
- return _context3.abrupt("return", _context3.sent);
96
-
97
- case 3:
98
- case "end":
99
- return _context3.stop();
93
+ while (1) {
94
+ switch (_context3.prev = _context3.next) {
95
+ case 0:
96
+ _context3.next = 2;
97
+ return _componentTopologyUtils.request.post('/alert/v1/api/alert/handleAlerts', params);
98
+
99
+ case 2:
100
+ return _context3.abrupt("return", _context3.sent);
101
+
102
+ case 3:
103
+ case "end":
104
+ return _context3.stop();
105
+ }
100
106
  }
101
107
  }, _callee3);
102
108
  }))();
@@ -108,17 +114,19 @@ var _default = {
108
114
  getUserId: function getUserId() {
109
115
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
110
116
  return _regenerator["default"].wrap(function _callee4$(_context4) {
111
- while (1) switch (_context4.prev = _context4.next) {
112
- case 0:
113
- _context4.next = 2;
114
- return _componentTopologyUtils.request.post('/auth-ui/v1/api/user/token/checkToken');
115
-
116
- case 2:
117
- return _context4.abrupt("return", _context4.sent);
118
-
119
- case 3:
120
- case "end":
121
- return _context4.stop();
117
+ while (1) {
118
+ switch (_context4.prev = _context4.next) {
119
+ case 0:
120
+ _context4.next = 2;
121
+ return _componentTopologyUtils.request.post('/auth-ui/v1/api/user/token/checkToken');
122
+
123
+ case 2:
124
+ return _context4.abrupt("return", _context4.sent);
125
+
126
+ case 3:
127
+ case "end":
128
+ return _context4.stop();
129
+ }
122
130
  }
123
131
  }, _callee4);
124
132
  }))();
@@ -130,17 +138,19 @@ var _default = {
130
138
  getOverviewConfig: function getOverviewConfig(topoId, templateCode) {
131
139
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
132
140
  return _regenerator["default"].wrap(function _callee5$(_context5) {
133
- while (1) switch (_context5.prev = _context5.next) {
134
- case 0:
135
- _context5.next = 2;
136
- return _componentTopologyUtils.request.get("/topo/v1/api/config/overview/" + topoId + "/" + templateCode);
137
-
138
- case 2:
139
- return _context5.abrupt("return", _context5.sent);
140
-
141
- case 3:
142
- case "end":
143
- return _context5.stop();
141
+ while (1) {
142
+ switch (_context5.prev = _context5.next) {
143
+ case 0:
144
+ _context5.next = 2;
145
+ return _componentTopologyUtils.request.get("/topo/v1/api/config/overview/" + topoId + "/" + templateCode);
146
+
147
+ case 2:
148
+ return _context5.abrupt("return", _context5.sent);
149
+
150
+ case 3:
151
+ case "end":
152
+ return _context5.stop();
153
+ }
144
154
  }
145
155
  }, _callee5);
146
156
  }))();
@@ -152,17 +162,19 @@ var _default = {
152
162
  saveOverviewConfig: function saveOverviewConfig(topoId, templateCode, data) {
153
163
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
154
164
  return _regenerator["default"].wrap(function _callee6$(_context6) {
155
- while (1) switch (_context6.prev = _context6.next) {
156
- case 0:
157
- _context6.next = 2;
158
- return _componentTopologyUtils.request.post("/topo/v1/api/config/overview/" + topoId + "/" + templateCode, data);
159
-
160
- case 2:
161
- return _context6.abrupt("return", _context6.sent);
162
-
163
- case 3:
164
- case "end":
165
- return _context6.stop();
165
+ while (1) {
166
+ switch (_context6.prev = _context6.next) {
167
+ case 0:
168
+ _context6.next = 2;
169
+ return _componentTopologyUtils.request.post("/topo/v1/api/config/overview/" + topoId + "/" + templateCode, data);
170
+
171
+ case 2:
172
+ return _context6.abrupt("return", _context6.sent);
173
+
174
+ case 3:
175
+ case "end":
176
+ return _context6.stop();
177
+ }
166
178
  }
167
179
  }, _callee6);
168
180
  }))();
@@ -174,17 +186,19 @@ var _default = {
174
186
  getResMetricList: function getResMetricList(data) {
175
187
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
176
188
  return _regenerator["default"].wrap(function _callee7$(_context7) {
177
- while (1) switch (_context7.prev = _context7.next) {
178
- case 0:
179
- _context7.next = 2;
180
- return _componentTopologyUtils.request.post("/mdc/v1/api/metric/list", data);
181
-
182
- case 2:
183
- return _context7.abrupt("return", _context7.sent);
184
-
185
- case 3:
186
- case "end":
187
- return _context7.stop();
189
+ while (1) {
190
+ switch (_context7.prev = _context7.next) {
191
+ case 0:
192
+ _context7.next = 2;
193
+ return _componentTopologyUtils.request.post("/mdc/v1/api/metric/list", data);
194
+
195
+ case 2:
196
+ return _context7.abrupt("return", _context7.sent);
197
+
198
+ case 3:
199
+ case "end":
200
+ return _context7.stop();
201
+ }
188
202
  }
189
203
  }, _callee7);
190
204
  }))();
@@ -196,25 +210,27 @@ var _default = {
196
210
  getDeviceTypeList: function getDeviceTypeList() {
197
211
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
198
212
  return _regenerator["default"].wrap(function _callee8$(_context8) {
199
- while (1) switch (_context8.prev = _context8.next) {
200
- case 0:
201
- if (roomDeviceTypeList) {
202
- _context8.next = 4;
203
- break;
204
- }
205
-
206
- _context8.next = 3;
207
- return _componentTopologyUtils.request.post("/room/v1/api/device/type/list", {});
208
-
209
- case 3:
210
- roomDeviceTypeList = _context8.sent;
211
-
212
- case 4:
213
- return _context8.abrupt("return", roomDeviceTypeList);
214
-
215
- case 5:
216
- case "end":
217
- return _context8.stop();
213
+ while (1) {
214
+ switch (_context8.prev = _context8.next) {
215
+ case 0:
216
+ if (roomDeviceTypeList) {
217
+ _context8.next = 4;
218
+ break;
219
+ }
220
+
221
+ _context8.next = 3;
222
+ return _componentTopologyUtils.request.post("/room/v1/api/device/type/list", {});
223
+
224
+ case 3:
225
+ roomDeviceTypeList = _context8.sent;
226
+
227
+ case 4:
228
+ return _context8.abrupt("return", roomDeviceTypeList);
229
+
230
+ case 5:
231
+ case "end":
232
+ return _context8.stop();
233
+ }
218
234
  }
219
235
  }, _callee8);
220
236
  }))();
@@ -226,17 +242,19 @@ var _default = {
226
242
  getMetricList: function getMetricList(data) {
227
243
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
228
244
  return _regenerator["default"].wrap(function _callee9$(_context9) {
229
- while (1) switch (_context9.prev = _context9.next) {
230
- case 0:
231
- _context9.next = 2;
232
- return _componentTopologyUtils.request.post("/mdc/v1/api/metric/list", data);
233
-
234
- case 2:
235
- return _context9.abrupt("return", _context9.sent);
236
-
237
- case 3:
238
- case "end":
239
- return _context9.stop();
245
+ while (1) {
246
+ switch (_context9.prev = _context9.next) {
247
+ case 0:
248
+ _context9.next = 2;
249
+ return _componentTopologyUtils.request.post("/mdc/v1/api/metric/list", data);
250
+
251
+ case 2:
252
+ return _context9.abrupt("return", _context9.sent);
253
+
254
+ case 3:
255
+ case "end":
256
+ return _context9.stop();
257
+ }
240
258
  }
241
259
  }, _callee9);
242
260
  }))();
@@ -248,17 +266,19 @@ var _default = {
248
266
  commonQueryCiData: function commonQueryCiData(params) {
249
267
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
250
268
  return _regenerator["default"].wrap(function _callee10$(_context10) {
251
- while (1) switch (_context10.prev = _context10.next) {
252
- case 0:
253
- _context10.next = 2;
254
- return _componentTopologyUtils.request.post("/mdc/v1/api/cmdb/commonQueryCiData", params);
255
-
256
- case 2:
257
- return _context10.abrupt("return", _context10.sent);
258
-
259
- case 3:
260
- case "end":
261
- return _context10.stop();
269
+ while (1) {
270
+ switch (_context10.prev = _context10.next) {
271
+ case 0:
272
+ _context10.next = 2;
273
+ return _componentTopologyUtils.request.post("/mdc/v1/api/cmdb/commonQueryCiData", params);
274
+
275
+ case 2:
276
+ return _context10.abrupt("return", _context10.sent);
277
+
278
+ case 3:
279
+ case "end":
280
+ return _context10.stop();
281
+ }
262
282
  }
263
283
  }, _callee10);
264
284
  }))();
@@ -23,19 +23,21 @@ var _default = {
23
23
  saveSerializeData: function saveSerializeData(id, data) {
24
24
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
25
25
  return _regenerator["default"].wrap(function _callee$(_context) {
26
- while (1) switch (_context.prev = _context.next) {
27
- case 0:
28
- _context.next = 2;
29
- return _componentTopologyUtils.request.post(_constants.TOPO_API_ROOT + "/structure/" + id, {
30
- data: data
31
- });
32
-
33
- case 2:
34
- return _context.abrupt("return", _context.sent);
35
-
36
- case 3:
37
- case "end":
38
- return _context.stop();
26
+ while (1) {
27
+ switch (_context.prev = _context.next) {
28
+ case 0:
29
+ _context.next = 2;
30
+ return _componentTopologyUtils.request.post(_constants.TOPO_API_ROOT + "/structure/" + id, {
31
+ data: data
32
+ });
33
+
34
+ case 2:
35
+ return _context.abrupt("return", _context.sent);
36
+
37
+ case 3:
38
+ case "end":
39
+ return _context.stop();
40
+ }
39
41
  }
40
42
  }, _callee);
41
43
  }))();
@@ -19,18 +19,20 @@ function _getMetricsByMonitorTemplateCodes() {
19
19
  _getMetricsByMonitorTemplateCodes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(mtCodes) {
20
20
  var result;
21
21
  return _regenerator["default"].wrap(function _callee$(_context) {
22
- while (1) switch (_context.prev = _context.next) {
23
- case 0:
24
- _context.next = 2;
25
- return _componentTopologyUtils.request.post('/topo/v1/api/attributes/metricByTemplateCode', mtCodes);
26
-
27
- case 2:
28
- result = _context.sent;
29
- return _context.abrupt("return", result);
30
-
31
- case 4:
32
- case "end":
33
- return _context.stop();
22
+ while (1) {
23
+ switch (_context.prev = _context.next) {
24
+ case 0:
25
+ _context.next = 2;
26
+ return _componentTopologyUtils.request.post('/topo/v1/api/attributes/metricByTemplateCode', mtCodes);
27
+
28
+ case 2:
29
+ result = _context.sent;
30
+ return _context.abrupt("return", result);
31
+
32
+ case 4:
33
+ case "end":
34
+ return _context.stop();
35
+ }
34
36
  }
35
37
  }, _callee);
36
38
  }));