@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
@@ -11,14 +11,12 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
11
11
 
12
12
  var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
13
13
 
14
- var _ref, _ref2, _ref3;
15
-
16
14
  /**
17
15
  * 查询单个CI模型
18
16
  * @param {*} code
19
17
  */
20
- var getModelAssert = function getModelAssert(_x) {
21
- return (_ref = _ref || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(code) {
18
+ var getModelAssert = /*#__PURE__*/function () {
19
+ var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(code) {
22
20
  return _regenerator["default"].wrap(function _callee$(_context) {
23
21
  while (1) switch (_context.prev = _context.next) {
24
22
  case 0:
@@ -29,14 +27,18 @@ var getModelAssert = function getModelAssert(_x) {
29
27
  return _context.stop();
30
28
  }
31
29
  }, _callee);
32
- }))).apply(this, arguments);
33
- }; // 查询模型树
30
+ }));
31
+
32
+ return function getModelAssert(_x) {
33
+ return _ref.apply(this, arguments);
34
+ };
35
+ }(); // 查询模型树
34
36
 
35
37
 
36
38
  exports.getModelAssert = getModelAssert;
37
39
 
38
- var modelAssertTree = function modelAssertTree() {
39
- return (_ref2 = _ref2 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
40
+ var modelAssertTree = /*#__PURE__*/function () {
41
+ var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
40
42
  return _regenerator["default"].wrap(function _callee2$(_context2) {
41
43
  while (1) switch (_context2.prev = _context2.next) {
42
44
  case 0:
@@ -47,8 +49,12 @@ var modelAssertTree = function modelAssertTree() {
47
49
  return _context2.stop();
48
50
  }
49
51
  }, _callee2);
50
- }))).apply(this, arguments);
51
- };
52
+ }));
53
+
54
+ return function modelAssertTree() {
55
+ return _ref2.apply(this, arguments);
56
+ };
57
+ }();
52
58
  /**
53
59
  * 批量查询字典定义
54
60
  * @param {*?} dictCodes null:查所有
@@ -57,8 +63,8 @@ var modelAssertTree = function modelAssertTree() {
57
63
 
58
64
  exports.modelAssertTree = modelAssertTree;
59
65
 
60
- var modelDictList = function modelDictList(_x2) {
61
- return (_ref3 = _ref3 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(dictCodes) {
66
+ var modelDictList = /*#__PURE__*/function () {
67
+ var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(dictCodes) {
62
68
  return _regenerator["default"].wrap(function _callee3$(_context3) {
63
69
  while (1) switch (_context3.prev = _context3.next) {
64
70
  case 0:
@@ -69,7 +75,11 @@ var modelDictList = function modelDictList(_x2) {
69
75
  return _context3.stop();
70
76
  }
71
77
  }, _callee3);
72
- }))).apply(this, arguments);
73
- };
78
+ }));
79
+
80
+ return function modelDictList(_x2) {
81
+ return _ref3.apply(this, arguments);
82
+ };
83
+ }();
74
84
 
75
85
  exports.modelDictList = modelDictList;
@@ -11,8 +11,6 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
11
11
 
12
12
  var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
13
13
 
14
- var _ref, _ref2;
15
-
16
14
  /**
17
15
  * 获得指标数据
18
16
  * @param {array} ciId 实例id
@@ -20,8 +18,8 @@ var _ref, _ref2;
20
18
  * @param {array} code 指标code
21
19
  * @returns {array} 对象数组
22
20
  */
23
- var getLatestMetrics = function getLatestMetrics(_x, _x2) {
24
- return (_ref = _ref || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ciId, code) {
21
+ var getLatestMetrics = /*#__PURE__*/function () {
22
+ var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ciId, code) {
25
23
  return _regenerator["default"].wrap(function _callee$(_context) {
26
24
  while (1) switch (_context.prev = _context.next) {
27
25
  case 0:
@@ -39,8 +37,12 @@ var getLatestMetrics = function getLatestMetrics(_x, _x2) {
39
37
  return _context.stop();
40
38
  }
41
39
  }, _callee);
42
- }))).apply(this, arguments);
43
- };
40
+ }));
41
+
42
+ return function getLatestMetrics(_x, _x2) {
43
+ return _ref.apply(this, arguments);
44
+ };
45
+ }();
44
46
  /**
45
47
  * 获得CI指标
46
48
  */
@@ -48,8 +50,8 @@ var getLatestMetrics = function getLatestMetrics(_x, _x2) {
48
50
 
49
51
  exports.getLatestMetrics = getLatestMetrics;
50
52
 
51
- var getCiMetric = function getCiMetric(_x3) {
52
- return (_ref2 = _ref2 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(ciCode) {
53
+ var getCiMetric = /*#__PURE__*/function () {
54
+ var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(ciCode) {
53
55
  return _regenerator["default"].wrap(function _callee2$(_context2) {
54
56
  while (1) switch (_context2.prev = _context2.next) {
55
57
  case 0:
@@ -66,7 +68,11 @@ var getCiMetric = function getCiMetric(_x3) {
66
68
  return _context2.stop();
67
69
  }
68
70
  }, _callee2);
69
- }))).apply(this, arguments);
70
- };
71
+ }));
72
+
73
+ return function getCiMetric(_x3) {
74
+ return _ref2.apply(this, arguments);
75
+ };
76
+ }();
71
77
 
72
78
  exports.getCiMetric = getCiMetric;