@riil-frontend/component-topology 11.0.35 → 12.0.0-dev.2

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 (147) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.js +45 -29
  4. package/es/components/BatchAttrMetric/setting.js +1 -1
  5. package/es/components/MultiResourceDrawer/index.js +8 -6
  6. package/es/components/ResourceList/ResourceSelect.js +8 -7
  7. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
  8. package/es/components/SingleResourceDrawer/SelectDrawer.js +8 -6
  9. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
  10. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
  11. package/es/core/editor/components/BackgroundView/index.js +73 -54
  12. package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
  13. package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -5
  14. package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
  15. package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
  16. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
  17. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
  18. package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
  19. package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
  20. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
  21. package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
  22. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
  23. package/es/core/editor/hooks/useKeyboardShortcut.js +36 -32
  24. package/es/core/editor/utils/copyElementUtil.js +174 -0
  25. package/es/core/hooks/useCiAttributeChange.js +6 -3
  26. package/es/core/hooks/usePolling.js +21 -13
  27. package/es/core/hooks/useResourceConfig.js +37 -21
  28. package/es/core/hooks/useTopoEdit.js +202 -139
  29. package/es/core/models/Alarm.js +104 -38
  30. package/es/core/models/AttributeMetricDisplay.js +36 -14
  31. package/es/core/models/TopoApp.js +197 -75
  32. package/es/core/models/TopoGraphView.js +20 -10
  33. package/es/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
  34. package/es/core/models/cache/CiCache.js +12 -6
  35. package/es/core/models/cache/CiTypeCache.js +20 -10
  36. package/es/core/models/cache/DictCache.js +10 -6
  37. package/es/core/models/graph/Background.js +9 -6
  38. package/es/core/models/plugins/resourceWebControllUrl.js +21 -8
  39. package/es/core/models/tagstips/ElementTagTipConfig.js +20 -10
  40. package/es/core/models/topoData.js +7 -5
  41. package/es/core/models/utils/linkUtils.js +8 -5
  42. package/es/core/services/cmdb/metric.js +7 -5
  43. package/es/core/services/cmdb.js +9 -5
  44. package/es/core/services/index.js +23 -9
  45. package/es/core/services/topo/tagtip.js +7 -5
  46. package/es/core/store/models/customIcon.js +11 -6
  47. package/es/core/utils/imageUtil.js +7 -5
  48. package/es/core/utils/metricUtil.js +13 -1
  49. package/es/core/utils/saveSerialize.js +7 -5
  50. package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
  51. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +8 -5
  52. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
  53. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +47 -34
  54. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
  55. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +74 -34
  56. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
  57. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
  58. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -26
  59. package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +15 -7
  60. package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
  61. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
  62. package/es/networkTopo/components/Link/hook.js +21 -14
  63. package/es/networkTopo/components/Link/index.js +32 -18
  64. package/es/networkTopo/components/Link/setting.js +8 -6
  65. package/es/networkTopo/getTopoData.js +23 -10
  66. package/es/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
  67. package/es/networkTopo/models/TopoCenter.js +24 -10
  68. package/es/networkTopo/services/cmdb.js +333 -233
  69. package/es/networkTopo/services/mdc.js +24 -15
  70. package/es/networkTopo/services/metric.js +16 -11
  71. package/es/networkTopo/services/model.js +412 -283
  72. package/es/networkTopo/utils/exportData.js +7 -5
  73. package/es/utils/clipboardUtil.d.ts +7 -0
  74. package/es/utils/clipboardUtil.js +104 -0
  75. package/lib/components/BatchAttrMetric/setting.js +1 -1
  76. package/lib/components/MultiResourceDrawer/index.js +8 -6
  77. package/lib/components/ResourceList/ResourceSelect.js +8 -6
  78. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
  79. package/lib/components/SingleResourceDrawer/SelectDrawer.js +8 -6
  80. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
  81. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
  82. package/lib/core/editor/components/BackgroundView/index.js +74 -55
  83. package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
  84. package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -4
  85. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
  86. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
  87. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
  88. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
  89. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
  90. package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
  91. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
  92. package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
  93. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
  94. package/lib/core/editor/hooks/useKeyboardShortcut.js +37 -34
  95. package/lib/core/editor/utils/copyElementUtil.js +187 -0
  96. package/lib/core/hooks/useCiAttributeChange.js +6 -3
  97. package/lib/core/hooks/usePolling.js +21 -13
  98. package/lib/core/hooks/useResourceConfig.js +37 -21
  99. package/lib/core/hooks/useTopoEdit.js +202 -139
  100. package/lib/core/models/Alarm.js +104 -38
  101. package/lib/core/models/AttributeMetricDisplay.js +36 -14
  102. package/lib/core/models/TopoApp.js +197 -75
  103. package/lib/core/models/TopoGraphView.js +20 -10
  104. package/lib/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
  105. package/lib/core/models/cache/CiCache.js +12 -6
  106. package/lib/core/models/cache/CiTypeCache.js +20 -10
  107. package/lib/core/models/cache/DictCache.js +10 -6
  108. package/lib/core/models/graph/Background.js +9 -6
  109. package/lib/core/models/plugins/resourceWebControllUrl.js +21 -8
  110. package/lib/core/models/tagstips/ElementTagTipConfig.js +20 -10
  111. package/lib/core/models/topoData.js +7 -4
  112. package/lib/core/models/utils/linkUtils.js +8 -4
  113. package/lib/core/services/cmdb/metric.js +7 -4
  114. package/lib/core/services/cmdb.js +9 -4
  115. package/lib/core/services/index.js +21 -8
  116. package/lib/core/services/topo/tagtip.js +7 -4
  117. package/lib/core/store/models/customIcon.js +11 -6
  118. package/lib/core/utils/imageUtil.js +7 -4
  119. package/lib/core/utils/metricUtil.js +13 -1
  120. package/lib/core/utils/saveSerialize.js +7 -4
  121. package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
  122. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +9 -6
  123. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
  124. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +49 -36
  125. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
  126. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +73 -35
  127. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
  128. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
  129. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -25
  130. package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +14 -6
  131. package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
  132. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
  133. package/lib/networkTopo/components/Link/hook.js +23 -15
  134. package/lib/networkTopo/components/Link/index.js +32 -18
  135. package/lib/networkTopo/components/Link/setting.js +8 -6
  136. package/lib/networkTopo/getTopoData.js +23 -10
  137. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
  138. package/lib/networkTopo/models/TopoCenter.js +24 -10
  139. package/lib/networkTopo/services/cmdb.js +336 -235
  140. package/lib/networkTopo/services/mdc.js +24 -14
  141. package/lib/networkTopo/services/metric.js +16 -10
  142. package/lib/networkTopo/services/model.js +414 -284
  143. package/lib/networkTopo/utils/exportData.js +7 -4
  144. package/lib/utils/clipboardUtil.d.ts +7 -0
  145. package/lib/utils/clipboardUtil.js +113 -0
  146. package/lib/utils/htElementDataUtil.js +4 -2
  147. package/package.json +3 -2
@@ -48,7 +48,7 @@ function formatUrl(url) {
48
48
 
49
49
 
50
50
  export default function ResourceOverview(props) {
51
- var _data$attributes, _ref, _getAddressFormat, _alarmRiskOperation, _baseInfoColChange, _getAttribute, _metricColChange;
51
+ var _data$attributes;
52
52
 
53
53
  var topo = props.topo,
54
54
  id = props.id,
@@ -159,8 +159,8 @@ export default function ResourceOverview(props) {
159
159
  isAppTopo && resourceOverviewProps.onClose && resourceOverviewProps.onClose();
160
160
  }
161
161
 
162
- var jump = function jump(_x, _x2) {
163
- return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(roomLink, id) {
162
+ var jump = /*#__PURE__*/function () {
163
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(roomLink, id) {
164
164
  var power;
165
165
  return _regeneratorRuntime.wrap(function _callee$(_context) {
166
166
  while (1) switch (_context.prev = _context.next) {
@@ -184,8 +184,12 @@ export default function ResourceOverview(props) {
184
184
  return _context.stop();
185
185
  }
186
186
  }, _callee);
187
- }))).apply(this, arguments);
188
- }; // 基本信息可选项
187
+ }));
188
+
189
+ return function jump(_x, _x2) {
190
+ return _ref.apply(this, arguments);
191
+ };
192
+ }(); // 基本信息可选项
189
193
 
190
194
 
191
195
  var baseInfoCol = useMemo(function () {
@@ -239,11 +243,13 @@ export default function ResourceOverview(props) {
239
243
  })) || [];
240
244
  }, [id, monitorMetricModels, initFlag]);
241
245
  useEffect(function () {
242
- var _getDevice;
243
-
244
246
  // 获取上架设备类型,判断资源是否是上架设备
245
247
  function getDevice() {
246
- return (_getDevice = _getDevice || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
248
+ return _getDevice.apply(this, arguments);
249
+ }
250
+
251
+ function _getDevice() {
252
+ _getDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
247
253
  var list;
248
254
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
249
255
  while (1) switch (_context2.prev = _context2.next) {
@@ -262,14 +268,20 @@ export default function ResourceOverview(props) {
262
268
  return _context2.stop();
263
269
  }
264
270
  }, _callee2);
265
- }))).apply(this, arguments);
271
+ }));
272
+ return _getDevice.apply(this, arguments);
266
273
  }
267
274
 
268
275
  getDevice();
269
276
  }, [ciType]); // 获取地址信息:机房 机柜 起始U-结束U
270
277
 
271
278
  function getAddressFormat(_x3) {
272
- return (_getAddressFormat = _getAddressFormat || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref2) {
279
+ return _getAddressFormat.apply(this, arguments);
280
+ } // 告警table列配置
281
+
282
+
283
+ function _getAddressFormat() {
284
+ _getAddressFormat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref2) {
273
285
  var owned_computer_room, owned_cabinet, start_u_location, end_u_location, address, _res$find, _res$find$attributes, _res$find2, _res$find2$attributes, res, u;
274
286
 
275
287
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -308,9 +320,9 @@ export default function ResourceOverview(props) {
308
320
  return _context3.stop();
309
321
  }
310
322
  }, _callee3);
311
- }))).apply(this, arguments);
312
- } // 告警table列配置
313
-
323
+ }));
324
+ return _getAddressFormat.apply(this, arguments);
325
+ }
314
326
 
315
327
  var columns = [{
316
328
  title: '描述',
@@ -366,7 +378,11 @@ export default function ResourceOverview(props) {
366
378
  }]; // 告警/风险 操作 (受理)
367
379
 
368
380
  function alarmRiskOperation(_x4, _x5) {
369
- return (_alarmRiskOperation = _alarmRiskOperation || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(type, params) {
381
+ return _alarmRiskOperation.apply(this, arguments);
382
+ }
383
+
384
+ function _alarmRiskOperation() {
385
+ _alarmRiskOperation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(type, params) {
370
386
  var res;
371
387
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
372
388
  while (1) switch (_context4.prev = _context4.next) {
@@ -400,7 +416,8 @@ export default function ResourceOverview(props) {
400
416
  return _context4.stop();
401
417
  }
402
418
  }, _callee4);
403
- }))).apply(this, arguments);
419
+ }));
420
+ return _alarmRiskOperation.apply(this, arguments);
404
421
  }
405
422
 
406
423
  var elementData = {
@@ -411,7 +428,12 @@ export default function ResourceOverview(props) {
411
428
  }; // 基本信息设置改变
412
429
 
413
430
  function baseInfoColChange(_x6) {
414
- return (_baseInfoColChange = _baseInfoColChange || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(col) {
431
+ return _baseInfoColChange.apply(this, arguments);
432
+ } // 获取属性信息
433
+
434
+
435
+ function _baseInfoColChange() {
436
+ _baseInfoColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(col) {
415
437
  var _col;
416
438
 
417
439
  var infoData, attributeMap, _loop, _iterator, _step;
@@ -577,12 +599,17 @@ export default function ResourceOverview(props) {
577
599
  return _context6.stop();
578
600
  }
579
601
  }, _callee5);
580
- }))).apply(this, arguments);
581
- } // 获取属性信息
582
-
602
+ }));
603
+ return _baseInfoColChange.apply(this, arguments);
604
+ }
583
605
 
584
606
  function getAttribute(_x7) {
585
- return (_getAttribute = _getAttribute || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id) {
607
+ return _getAttribute.apply(this, arguments);
608
+ } // 指标设置改变
609
+
610
+
611
+ function _getAttribute() {
612
+ _getAttribute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id) {
586
613
  var _yield$resourceOvervi2, baseInfos, res, _ref4, attributes;
587
614
 
588
615
  return _regeneratorRuntime.wrap(function _callee6$(_context7) {
@@ -640,12 +667,16 @@ export default function ResourceOverview(props) {
640
667
  return _context7.stop();
641
668
  }
642
669
  }, _callee6);
643
- }))).apply(this, arguments);
644
- } // 指标设置改变
645
-
670
+ }));
671
+ return _getAttribute.apply(this, arguments);
672
+ }
646
673
 
647
674
  function metricColChange(_x8) {
648
- return (_metricColChange = _metricColChange || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(col) {
675
+ return _metricColChange.apply(this, arguments);
676
+ }
677
+
678
+ function _metricColChange() {
679
+ _metricColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(col) {
649
680
  var _col2, _col3;
650
681
 
651
682
  var codes, endTime, params, _ref6, times, metricList, metricLists;
@@ -726,7 +757,8 @@ export default function ResourceOverview(props) {
726
757
  return _context8.stop();
727
758
  }
728
759
  }, _callee7);
729
- }))).apply(this, arguments);
760
+ }));
761
+ return _metricColChange.apply(this, arguments);
730
762
  }
731
763
 
732
764
  var getNewMetricList = function getNewMetricList() {
@@ -20,7 +20,7 @@ import "./index.scss";
20
20
  */
21
21
 
22
22
  function Configurator(props) {
23
- var _init, _ref, _ref2, _React$createElement;
23
+ var _React$createElement;
24
24
 
25
25
  var columns = props.columns,
26
26
  _props$defaultCol = props.defaultCol,
@@ -62,25 +62,35 @@ function Configurator(props) {
62
62
  }, [columns, topoId, templateCode, type]);
63
63
 
64
64
  function init() {
65
- return (_init = _init || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
65
+ return _init.apply(this, arguments);
66
+ }
67
+ /**
68
+ * 隐藏列操作回调
69
+ * @param {string} key 列唯一标识符
70
+ * @param {boolean} status 勾选状态
71
+ */
72
+
73
+
74
+ function _init() {
75
+ _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
66
76
  var _overviewConfig;
67
77
 
68
78
  var overviewConfig, newPrevCols, newNextCols, oldCols, newCols;
69
- return _regeneratorRuntime.wrap(function _callee$(_context) {
70
- while (1) switch (_context.prev = _context.next) {
79
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
80
+ while (1) switch (_context3.prev = _context3.next) {
71
81
  case 0:
72
82
  overviewConfig = {};
73
83
 
74
84
  if (!(topoId && templateCode)) {
75
- _context.next = 5;
85
+ _context3.next = 5;
76
86
  break;
77
87
  }
78
88
 
79
- _context.next = 4;
89
+ _context3.next = 4;
80
90
  return (getOverviewConfig || service.getOverviewConfig)(topoId, templateCode);
81
91
 
82
92
  case 4:
83
- overviewConfig = _context.sent;
93
+ overviewConfig = _context3.sent;
84
94
 
85
95
  case 5:
86
96
  // console.log('overviewConfig', overviewConfig);
@@ -140,17 +150,12 @@ function Configurator(props) {
140
150
 
141
151
  case 12:
142
152
  case "end":
143
- return _context.stop();
153
+ return _context3.stop();
144
154
  }
145
- }, _callee);
146
- }))).apply(this, arguments);
155
+ }, _callee3);
156
+ }));
157
+ return _init.apply(this, arguments);
147
158
  }
148
- /**
149
- * 隐藏列操作回调
150
- * @param {string} key 列唯一标识符
151
- * @param {boolean} status 勾选状态
152
- */
153
-
154
159
 
155
160
  var onHiddenChange = function onHiddenChange(key, status) {
156
161
  var columnsHiddenChange = function columnsHiddenChange(items) {
@@ -194,17 +199,21 @@ function Configurator(props) {
194
199
  */
195
200
 
196
201
 
197
- var onOpen = function onOpen() {
198
- return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
199
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
200
- while (1) switch (_context2.prev = _context2.next) {
202
+ var onOpen = /*#__PURE__*/function () {
203
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
204
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
205
+ while (1) switch (_context.prev = _context.next) {
201
206
  case 0:
202
207
  case "end":
203
- return _context2.stop();
208
+ return _context.stop();
204
209
  }
205
- }, _callee2);
206
- }))).apply(this, arguments);
207
- };
210
+ }, _callee);
211
+ }));
212
+
213
+ return function onOpen() {
214
+ return _ref.apply(this, arguments);
215
+ };
216
+ }();
208
217
  /**
209
218
  * 确认按钮回调
210
219
  * 将配置完毕的列数据传出
@@ -212,31 +221,35 @@ function Configurator(props) {
212
221
  */
213
222
 
214
223
 
215
- var onOk = function onOk() {
216
- return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
224
+ var onOk = /*#__PURE__*/function () {
225
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
217
226
  var _ref3;
218
227
 
219
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
220
- while (1) switch (_context3.prev = _context3.next) {
228
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
229
+ while (1) switch (_context2.prev = _context2.next) {
221
230
  case 0:
222
231
  onChange(columnsState);
223
232
  setVisible(false);
224
233
 
225
234
  if (!(topoId && templateCode)) {
226
- _context3.next = 5;
235
+ _context2.next = 5;
227
236
  break;
228
237
  }
229
238
 
230
- _context3.next = 5;
239
+ _context2.next = 5;
231
240
  return (saveOverviewConfig || service.saveOverviewConfig)(topoId, templateCode, (_ref3 = {}, _ref3[type] = JSON.stringify(columnsState), _ref3));
232
241
 
233
242
  case 5:
234
243
  case "end":
235
- return _context3.stop();
244
+ return _context2.stop();
236
245
  }
237
- }, _callee3);
238
- }))).apply(this, arguments);
239
- };
246
+ }, _callee2);
247
+ }));
248
+
249
+ return function onOk() {
250
+ return _ref2.apply(this, arguments);
251
+ };
252
+ }();
240
253
  /**
241
254
  * 取消按钮回调
242
255
  * 将列数据以及视图恢复到初始状态
@@ -6,7 +6,7 @@ import Configurator from "../Configurator";
6
6
  import LinkTopo from "./LinkTopo";
7
7
  import { isOpenFlow, checkMenu } from "./services";
8
8
  export default function LinkTopoCard(props) {
9
- var _data$attributes, _ref;
9
+ var _data$attributes;
10
10
 
11
11
  var topoId = props.topoId,
12
12
  data = props.data,
@@ -26,8 +26,8 @@ export default function LinkTopoCard(props) {
26
26
  var analysisUrl = "../../default/trafficControl/linkConfigure?id=" + data.attributes.name + "&num=0";
27
27
  var linkDetailsUrl = "/default/pagecenter/linkDetail/view/" + data.id + "?resId=" + data.id + "&domainCode=network&title=" + data.attributes.name + "&ciCode=network_link&tabByComType=uicbb-res-crucial-link-flow";
28
28
 
29
- var isOpenFlows = function isOpenFlows() {
30
- return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
29
+ var isOpenFlows = /*#__PURE__*/function () {
30
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
31
31
  var checkMenus, isOpen;
32
32
  return _regeneratorRuntime.wrap(function _callee$(_context) {
33
33
  while (1) switch (_context.prev = _context.next) {
@@ -75,8 +75,12 @@ export default function LinkTopoCard(props) {
75
75
  return _context.stop();
76
76
  }
77
77
  }, _callee);
78
- }))).apply(this, arguments);
79
- };
78
+ }));
79
+
80
+ return function isOpenFlows() {
81
+ return _ref.apply(this, arguments);
82
+ };
83
+ }();
80
84
 
81
85
  useEffect(function () {
82
86
  isOpenFlows();
@@ -1,7 +1,4 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
-
3
- var _queryAssetModel, _queryLatestMetrics, _queryLinkLatestMetrics, _queryLinkInterfacesLatestMetrics, _checkMenu, _isOpenFlow, _queryLastestValue, _queryRetansRatioNetDelayRatio;
4
-
5
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
3
  import { request } from '@riil-frontend/component-topology-utils';
7
4
  import rlog from '@riil-frontend/component-topology-utils/es/rlog';
@@ -9,7 +6,11 @@ import ciTypeCache from "../../../../../../../../../models/cache/CiTypeCache";
9
6
  import { INTERFACE_METRIC_CODES } from "../constants";
10
7
  import { formatMetric } from "../../../../../../../../../utils/metricUtil";
11
8
  export function queryAssetModel(_x) {
12
- return (_queryAssetModel = _queryAssetModel || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
9
+ return _queryAssetModel.apply(this, arguments);
10
+ }
11
+
12
+ function _queryAssetModel() {
13
+ _queryAssetModel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
13
14
  var result;
14
15
  return _regeneratorRuntime.wrap(function _callee$(_context) {
15
16
  while (1) switch (_context.prev = _context.next) {
@@ -26,10 +27,23 @@ export function queryAssetModel(_x) {
26
27
  return _context.stop();
27
28
  }
28
29
  }, _callee);
29
- }))).apply(this, arguments);
30
+ }));
31
+ return _queryAssetModel.apply(this, arguments);
30
32
  }
33
+
31
34
  export function queryLatestMetrics(_x2) {
32
- return (_queryLatestMetrics = _queryLatestMetrics || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(params) {
35
+ return _queryLatestMetrics.apply(this, arguments);
36
+ }
37
+ /**
38
+ * 查询链路及两端接口指标数据
39
+ *
40
+ * @param {*} linkCi
41
+ * @param {*} linkMetricCodes
42
+ * @returns
43
+ */
44
+
45
+ function _queryLatestMetrics() {
46
+ _queryLatestMetrics = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(params) {
33
47
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
34
48
  while (1) switch (_context2.prev = _context2.next) {
35
49
  case 0:
@@ -40,18 +54,16 @@ export function queryLatestMetrics(_x2) {
40
54
  return _context2.stop();
41
55
  }
42
56
  }, _callee2);
43
- }))).apply(this, arguments);
57
+ }));
58
+ return _queryLatestMetrics.apply(this, arguments);
44
59
  }
45
- /**
46
- * 查询链路及两端接口指标数据
47
- *
48
- * @param {*} linkCi
49
- * @param {*} linkMetricCodes
50
- * @returns
51
- */
52
60
 
53
61
  export function queryLinkLatestMetrics(_x3, _x4) {
54
- return (_queryLinkLatestMetrics = _queryLinkLatestMetrics || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(linkCi, linkMetricCodes) {
62
+ return _queryLinkLatestMetrics.apply(this, arguments);
63
+ }
64
+
65
+ function _queryLinkLatestMetrics() {
66
+ _queryLinkLatestMetrics = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(linkCi, linkMetricCodes) {
55
67
  var _linkMetrics$;
56
68
 
57
69
  var linkMetrics, resultData;
@@ -107,10 +119,20 @@ export function queryLinkLatestMetrics(_x3, _x4) {
107
119
  return _context3.stop();
108
120
  }
109
121
  }, _callee3);
110
- }))).apply(this, arguments);
122
+ }));
123
+ return _queryLinkLatestMetrics.apply(this, arguments);
111
124
  }
125
+
112
126
  export function queryLinkInterfacesLatestMetrics(_x5) {
113
- return (_queryLinkInterfacesLatestMetrics = _queryLinkInterfacesLatestMetrics || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(linkCi) {
127
+ return _queryLinkInterfacesLatestMetrics.apply(this, arguments);
128
+ }
129
+ /**
130
+ * @name checkMenu 判断当前流量监控权限
131
+ * @returns
132
+ */
133
+
134
+ function _queryLinkInterfacesLatestMetrics() {
135
+ _queryLinkInterfacesLatestMetrics = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(linkCi) {
114
136
  var _linkCi$attributes, sourceType, sourceId, destinationId, destinationType, typeCodes, queryInterfaceMetricsParam, interfaceMetrics, resultData, findMetricsBySubCiId, parseInterfaceMetrics;
115
137
 
116
138
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
@@ -179,15 +201,20 @@ export function queryLinkInterfacesLatestMetrics(_x5) {
179
201
  return _context4.stop();
180
202
  }
181
203
  }, _callee4);
182
- }))).apply(this, arguments);
204
+ }));
205
+ return _queryLinkInterfacesLatestMetrics.apply(this, arguments);
206
+ }
207
+
208
+ export function checkMenu() {
209
+ return _checkMenu.apply(this, arguments);
183
210
  }
184
211
  /**
185
- * @name checkMenu 判断当前流量监控权限
212
+ * @name isOpenFlow 是否配置流量分析
186
213
  * @returns
187
214
  */
188
215
 
189
- export function checkMenu() {
190
- return (_checkMenu = _checkMenu || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
216
+ function _checkMenu() {
217
+ _checkMenu = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
191
218
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
192
219
  while (1) switch (_context5.prev = _context5.next) {
193
220
  case 0:
@@ -200,15 +227,20 @@ export function checkMenu() {
200
227
  return _context5.stop();
201
228
  }
202
229
  }, _callee5);
203
- }))).apply(this, arguments);
230
+ }));
231
+ return _checkMenu.apply(this, arguments);
232
+ }
233
+
234
+ export function isOpenFlow(_x6) {
235
+ return _isOpenFlow.apply(this, arguments);
204
236
  }
205
237
  /**
206
- * @name isOpenFlow 是否配置流量分析
238
+ * @name queryLastestValue 查指标值
207
239
  * @returns
208
240
  */
209
241
 
210
- export function isOpenFlow(_x6) {
211
- return (_isOpenFlow = _isOpenFlow || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(params) {
242
+ function _isOpenFlow() {
243
+ _isOpenFlow = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(params) {
212
244
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
213
245
  while (1) switch (_context6.prev = _context6.next) {
214
246
  case 0:
@@ -219,15 +251,16 @@ export function isOpenFlow(_x6) {
219
251
  return _context6.stop();
220
252
  }
221
253
  }, _callee6);
222
- }))).apply(this, arguments);
254
+ }));
255
+ return _isOpenFlow.apply(this, arguments);
223
256
  }
224
- /**
225
- * @name queryLastestValue 查指标值
226
- * @returns
227
- */
228
257
 
229
258
  export function queryLastestValue(_x7) {
230
- return (_queryLastestValue = _queryLastestValue || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(params) {
259
+ return _queryLastestValue.apply(this, arguments);
260
+ }
261
+
262
+ function _queryLastestValue() {
263
+ _queryLastestValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(params) {
231
264
  return _regeneratorRuntime.wrap(function _callee7$(_context7) {
232
265
  while (1) switch (_context7.prev = _context7.next) {
233
266
  case 0:
@@ -238,10 +271,16 @@ export function queryLastestValue(_x7) {
238
271
  return _context7.stop();
239
272
  }
240
273
  }, _callee7);
241
- }))).apply(this, arguments);
274
+ }));
275
+ return _queryLastestValue.apply(this, arguments);
242
276
  }
277
+
243
278
  export function queryRetansRatioNetDelayRatio(_x8, _x9) {
244
- return (_queryRetansRatioNetDelayRatio = _queryRetansRatioNetDelayRatio || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(params, retansRatioNetDelayRatioCodes) {
279
+ return _queryRetansRatioNetDelayRatio.apply(this, arguments);
280
+ }
281
+
282
+ function _queryRetansRatioNetDelayRatio() {
283
+ _queryRetansRatioNetDelayRatio = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(params, retansRatioNetDelayRatioCodes) {
245
284
  var result, linkOther;
246
285
  return _regeneratorRuntime.wrap(function _callee8$(_context8) {
247
286
  while (1) switch (_context8.prev = _context8.next) {
@@ -286,5 +325,6 @@ export function queryRetansRatioNetDelayRatio(_x8, _x9) {
286
325
  return _context8.stop();
287
326
  }
288
327
  }, _callee8);
289
- }))).apply(this, arguments);
328
+ }));
329
+ return _queryRetansRatioNetDelayRatio.apply(this, arguments);
290
330
  }
@@ -10,8 +10,6 @@ import service from "../../../../../../../services/overview";
10
10
  */
11
11
 
12
12
  var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
13
- var _getAlarmRiskData;
14
-
15
13
  var id = props.id,
16
14
  isAppTopo = props.isAppTopo,
17
15
  resourceOverviewProps = props.resourceOverviewProps,
@@ -24,7 +22,12 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
24
22
 
25
23
 
26
24
  function getAlarmRiskData(_x) {
27
- return (_getAlarmRiskData = _getAlarmRiskData || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(id) {
25
+ return _getAlarmRiskData.apply(this, arguments);
26
+ } // 轮询hooks
27
+
28
+
29
+ function _getAlarmRiskData() {
30
+ _getAlarmRiskData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(id) {
28
31
  var _alarmList, _yield$resourceOvervi2, alarmList, _yield$alarmService$g2, _alarmList2, AllComponentsByCiId, _yield$service$getRis2, riskList;
29
32
 
30
33
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -137,9 +140,9 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
137
140
  return _context.stop();
138
141
  }
139
142
  }, _callee);
140
- }))).apply(this, arguments);
141
- } // 轮询hooks
142
-
143
+ }));
144
+ return _getAlarmRiskData.apply(this, arguments);
145
+ }
143
146
 
144
147
  var request = useRequest(getAlarmRiskData, {
145
148
  pollingInterval: 1000 * 15,
@@ -9,8 +9,6 @@ import { queryCiMonitorMetricCodes } from "../../../getCiDisplayMetricModels";
9
9
  */
10
10
 
11
11
  var useMetricModels = function useMetricModels(props) {
12
- var _fetchData;
13
-
14
12
  var _props$data = props.data,
15
13
  type = _props$data.type,
16
14
  id = _props$data.id,
@@ -30,7 +28,12 @@ var useMetricModels = function useMetricModels(props) {
30
28
  setInitLoading = _useState2[1];
31
29
 
32
30
  function fetchData() {
33
- return (_fetchData = _fetchData || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
31
+ return _fetchData.apply(this, arguments);
32
+ } // 轮询hooks
33
+
34
+
35
+ function _fetchData() {
36
+ _fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
34
37
  var monitorMetrics, ciMonitorMetricModels, displayMetricModels, _metricCodes;
35
38
 
36
39
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -105,9 +108,9 @@ var useMetricModels = function useMetricModels(props) {
105
108
  return _context.stop();
106
109
  }
107
110
  }, _callee);
108
- }))).apply(this, arguments);
109
- } // 轮询hooks
110
-
111
+ }));
112
+ return _fetchData.apply(this, arguments);
113
+ }
111
114
 
112
115
  var request = useRequest(fetchData, {
113
116
  pollingInterval: 1000 * 60,