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

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 (139) 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 +171 -0
  25. package/es/core/hooks/usePolling.js +21 -13
  26. package/es/core/hooks/useResourceConfig.js +37 -21
  27. package/es/core/hooks/useTopoEdit.js +202 -139
  28. package/es/core/models/Alarm.js +104 -38
  29. package/es/core/models/AttributeMetricDisplay.js +36 -14
  30. package/es/core/models/TopoApp.js +197 -75
  31. package/es/core/models/TopoGraphView.js +20 -10
  32. package/es/core/models/cache/CiCache.js +12 -6
  33. package/es/core/models/cache/CiTypeCache.js +20 -10
  34. package/es/core/models/cache/DictCache.js +10 -6
  35. package/es/core/models/graph/Background.js +9 -6
  36. package/es/core/models/plugins/resourceWebControllUrl.js +21 -8
  37. package/es/core/models/tagstips/ElementTagTipConfig.js +20 -10
  38. package/es/core/models/topoData.js +7 -5
  39. package/es/core/models/utils/linkUtils.js +8 -5
  40. package/es/core/services/cmdb/metric.js +7 -5
  41. package/es/core/services/cmdb.js +9 -5
  42. package/es/core/services/index.js +23 -9
  43. package/es/core/services/topo/tagtip.js +7 -5
  44. package/es/core/store/models/customIcon.js +11 -6
  45. package/es/core/utils/imageUtil.js +7 -5
  46. package/es/core/utils/metricUtil.js +5 -0
  47. package/es/core/utils/saveSerialize.js +7 -5
  48. package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
  49. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +8 -5
  50. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
  51. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +47 -34
  52. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
  53. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +74 -34
  54. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
  55. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
  56. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -26
  57. package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +15 -7
  58. package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
  59. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
  60. package/es/networkTopo/components/Link/hook.js +21 -14
  61. package/es/networkTopo/components/Link/index.js +32 -18
  62. package/es/networkTopo/components/Link/setting.js +8 -6
  63. package/es/networkTopo/getTopoData.js +23 -10
  64. package/es/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
  65. package/es/networkTopo/models/TopoCenter.js +24 -10
  66. package/es/networkTopo/services/cmdb.js +333 -233
  67. package/es/networkTopo/services/mdc.js +24 -15
  68. package/es/networkTopo/services/metric.js +16 -11
  69. package/es/networkTopo/services/model.js +412 -283
  70. package/es/networkTopo/utils/exportData.js +7 -5
  71. package/lib/components/BatchAttrMetric/setting.js +1 -1
  72. package/lib/components/MultiResourceDrawer/index.js +8 -6
  73. package/lib/components/ResourceList/ResourceSelect.js +8 -6
  74. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
  75. package/lib/components/SingleResourceDrawer/SelectDrawer.js +8 -6
  76. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
  77. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
  78. package/lib/core/editor/components/BackgroundView/index.js +74 -55
  79. package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
  80. package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -4
  81. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
  82. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
  83. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
  84. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
  85. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
  86. package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
  87. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
  88. package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
  89. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
  90. package/lib/core/editor/hooks/useKeyboardShortcut.js +37 -34
  91. package/lib/core/editor/utils/copyElementUtil.js +182 -0
  92. package/lib/core/hooks/usePolling.js +21 -13
  93. package/lib/core/hooks/useResourceConfig.js +37 -21
  94. package/lib/core/hooks/useTopoEdit.js +202 -139
  95. package/lib/core/models/Alarm.js +104 -38
  96. package/lib/core/models/AttributeMetricDisplay.js +36 -14
  97. package/lib/core/models/TopoApp.js +197 -75
  98. package/lib/core/models/TopoGraphView.js +20 -10
  99. package/lib/core/models/cache/CiCache.js +12 -6
  100. package/lib/core/models/cache/CiTypeCache.js +20 -10
  101. package/lib/core/models/cache/DictCache.js +10 -6
  102. package/lib/core/models/graph/Background.js +9 -6
  103. package/lib/core/models/plugins/resourceWebControllUrl.js +21 -8
  104. package/lib/core/models/tagstips/ElementTagTipConfig.js +20 -10
  105. package/lib/core/models/topoData.js +7 -4
  106. package/lib/core/models/utils/linkUtils.js +8 -4
  107. package/lib/core/services/cmdb/metric.js +7 -4
  108. package/lib/core/services/cmdb.js +9 -4
  109. package/lib/core/services/index.js +21 -8
  110. package/lib/core/services/topo/tagtip.js +7 -4
  111. package/lib/core/store/models/customIcon.js +11 -6
  112. package/lib/core/utils/imageUtil.js +7 -4
  113. package/lib/core/utils/metricUtil.js +5 -0
  114. package/lib/core/utils/saveSerialize.js +7 -4
  115. package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
  116. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +9 -6
  117. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
  118. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +49 -36
  119. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
  120. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +73 -35
  121. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
  122. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
  123. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -25
  124. package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +14 -6
  125. package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
  126. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
  127. package/lib/networkTopo/components/Link/hook.js +23 -15
  128. package/lib/networkTopo/components/Link/index.js +32 -18
  129. package/lib/networkTopo/components/Link/setting.js +8 -6
  130. package/lib/networkTopo/getTopoData.js +23 -10
  131. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
  132. package/lib/networkTopo/models/TopoCenter.js +24 -10
  133. package/lib/networkTopo/services/cmdb.js +336 -235
  134. package/lib/networkTopo/services/mdc.js +24 -14
  135. package/lib/networkTopo/services/metric.js +16 -10
  136. package/lib/networkTopo/services/model.js +414 -284
  137. package/lib/networkTopo/utils/exportData.js +7 -4
  138. package/lib/utils/htElementDataUtil.js +4 -2
  139. package/package.json +3 -2
@@ -14,11 +14,10 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
14
14
  */
15
15
  var Background = /*#__PURE__*/function () {
16
16
  function Background(view) {
17
- var _this = this,
18
- _ref2;
17
+ var _this = this;
19
18
 
20
- this.setSize = function (_x) {
21
- return (_ref2 = _ref2 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(_ref) {
19
+ this.setSize = /*#__PURE__*/function () {
20
+ var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(_ref) {
22
21
  var width, height, backgroundNode, backgroundDispatchers;
23
22
  return _regenerator["default"].wrap(function _callee$(_context) {
24
23
  while (1) switch (_context.prev = _context.next) {
@@ -39,8 +38,12 @@ var Background = /*#__PURE__*/function () {
39
38
  return _context.stop();
40
39
  }
41
40
  }, _callee);
42
- }))).apply(this, arguments);
43
- };
41
+ }));
42
+
43
+ return function (_x) {
44
+ return _ref2.apply(this, arguments);
45
+ };
46
+ }();
44
47
 
45
48
  this.view = view;
46
49
  }
@@ -16,8 +16,6 @@ var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-co
16
16
  var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
17
17
 
18
18
  function _default(topo) {
19
- var _onTopoDataLoaded, _initData, _saveResourceWebUrl;
20
-
21
19
  var resourceUrlMap = {};
22
20
  var currentId = null;
23
21
  init();
@@ -35,7 +33,11 @@ function _default(topo) {
35
33
  }
36
34
 
37
35
  function onTopoDataLoaded(_x) {
38
- return (_onTopoDataLoaded = _onTopoDataLoaded || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(topoData) {
36
+ return _onTopoDataLoaded.apply(this, arguments);
37
+ }
38
+
39
+ function _onTopoDataLoaded() {
40
+ _onTopoDataLoaded = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(topoData) {
39
41
  return _regenerator["default"].wrap(function _callee$(_context) {
40
42
  while (1) switch (_context.prev = _context.next) {
41
43
  case 0:
@@ -46,11 +48,16 @@ function _default(topo) {
46
48
  return _context.stop();
47
49
  }
48
50
  }, _callee);
49
- }))).apply(this, arguments);
51
+ }));
52
+ return _onTopoDataLoaded.apply(this, arguments);
50
53
  }
51
54
 
52
55
  function initData(_x2) {
53
- return (_initData = _initData || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(nodes) {
56
+ return _initData.apply(this, arguments);
57
+ }
58
+
59
+ function _initData() {
60
+ _initData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(nodes) {
54
61
  var ids, list;
55
62
  return _regenerator["default"].wrap(function _callee2$(_context2) {
56
63
  while (1) switch (_context2.prev = _context2.next) {
@@ -90,7 +97,8 @@ function _default(topo) {
90
97
  return _context2.stop();
91
98
  }
92
99
  }, _callee2, null, [[3, 10]]);
93
- }))).apply(this, arguments);
100
+ }));
101
+ return _initData.apply(this, arguments);
94
102
  }
95
103
 
96
104
  function getModelDispatchers() {
@@ -129,7 +137,11 @@ function _default(topo) {
129
137
  }
130
138
 
131
139
  function saveResourceWebUrl(_x3, _x4) {
132
- return (_saveResourceWebUrl = _saveResourceWebUrl || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(id, url) {
140
+ return _saveResourceWebUrl.apply(this, arguments);
141
+ }
142
+
143
+ function _saveResourceWebUrl() {
144
+ _saveResourceWebUrl = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(id, url) {
133
145
  return _regenerator["default"].wrap(function _callee3$(_context3) {
134
146
  while (1) switch (_context3.prev = _context3.next) {
135
147
  case 0:
@@ -174,7 +186,8 @@ function _default(topo) {
174
186
  return _context3.stop();
175
187
  }
176
188
  }, _callee3, null, [[5, 13]]);
177
- }))).apply(this, arguments);
189
+ }));
190
+ return _saveResourceWebUrl.apply(this, arguments);
178
191
  }
179
192
 
180
193
  var resourceWebUrl = {
@@ -23,8 +23,6 @@ var _tagtip = require("../../services/topo/tagtip");
23
23
  * 标注、悬浮框字段模型
24
24
  */
25
25
  var ElementTagTipConfig = /*#__PURE__*/function () {
26
- var _init, _initNetworkLinkModel;
27
-
28
26
  function ElementTagTipConfig(topo) {
29
27
  this.topoData = void 0;
30
28
  this.modelMap = {};
@@ -36,8 +34,8 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
36
34
 
37
35
  var _proto = ElementTagTipConfig.prototype;
38
36
 
39
- _proto.init = function init(_x) {
40
- return (_init = _init || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(topoData) {
37
+ _proto.init = /*#__PURE__*/function () {
38
+ var _init = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(topoData) {
41
39
  return _regenerator["default"].wrap(function _callee$(_context) {
42
40
  while (1) switch (_context.prev = _context.next) {
43
41
  case 0:
@@ -53,11 +51,17 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
53
51
  return _context.stop();
54
52
  }
55
53
  }, _callee, this);
56
- }))).apply(this, arguments);
57
- };
54
+ }));
55
+
56
+ function init(_x) {
57
+ return _init.apply(this, arguments);
58
+ }
59
+
60
+ return init;
61
+ }();
58
62
 
59
- _proto.initNetworkLinkModel = function initNetworkLinkModel() {
60
- return (_initNetworkLinkModel = _initNetworkLinkModel || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
63
+ _proto.initNetworkLinkModel = /*#__PURE__*/function () {
64
+ var _initNetworkLinkModel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
61
65
  var mtCodes;
62
66
  return _regenerator["default"].wrap(function _callee2$(_context2) {
63
67
  while (1) switch (_context2.prev = _context2.next) {
@@ -91,8 +95,14 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
91
95
  return _context2.stop();
92
96
  }
93
97
  }, _callee2, this, [[0, 8]]);
94
- }))).apply(this, arguments);
95
- };
98
+ }));
99
+
100
+ function initNetworkLinkModel() {
101
+ return _initNetworkLinkModel.apply(this, arguments);
102
+ }
103
+
104
+ return initNetworkLinkModel;
105
+ }();
96
106
 
97
107
  _proto.getModelTypes = function getModelTypes(cis) {
98
108
  var _this = this;
@@ -17,8 +17,6 @@ var _topo = require("@riil-frontend/component-topology-common/es/services/topo")
17
17
 
18
18
  var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
19
19
 
20
- var _saveTopo;
21
-
22
20
  function getLayoutId(layout) {
23
21
  if (!layout) {
24
22
  return layout;
@@ -54,7 +52,11 @@ function resToConditions(resources, persist) {
54
52
  }
55
53
 
56
54
  function saveTopo(_x) {
57
- return (_saveTopo = _saveTopo || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(data) {
55
+ return _saveTopo.apply(this, arguments);
56
+ }
57
+
58
+ function _saveTopo() {
59
+ _saveTopo = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(data) {
58
60
  var topoService, topoId, template, layout, backgroundId, globalConfig, serialize, resources, groups, relateTopoIdList, viewGroupId, groupInfo, viewResources, linkIps;
59
61
  return _regenerator["default"].wrap(function _callee$(_context) {
60
62
  while (1) switch (_context.prev = _context.next) {
@@ -140,5 +142,6 @@ function saveTopo(_x) {
140
142
  return _context.stop();
141
143
  }
142
144
  }, _callee);
143
- }))).apply(this, arguments);
145
+ }));
146
+ return _saveTopo.apply(this, arguments);
144
147
  }
@@ -30,8 +30,7 @@ var _CiTypeCache = _interopRequireDefault(require("../cache/CiTypeCache"));
30
30
 
31
31
  var _CiCache = _interopRequireDefault(require("../cache/CiCache"));
32
32
 
33
- var _getLinksDetail;
34
-
33
+ // 查询所有连线
35
34
  // const interfaceTypeMap = {
36
35
  // "network.interface": {
37
36
  // displayName: "网络接口",
@@ -99,7 +98,11 @@ function mergeLinksData(links, linkCis, nodes, interfaceCiMap, interfaceDoc) {
99
98
  }
100
99
 
101
100
  function getLinksDetail(_x, _x2) {
102
- return (_getLinksDetail = _getLinksDetail || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(links, nodes) {
101
+ return _getLinksDetail.apply(this, arguments);
102
+ }
103
+
104
+ function _getLinksDetail() {
105
+ _getLinksDetail = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(links, nodes) {
103
106
  var linkCis, interfaceIds, interfaceTypes, interfaceCiMap, interfaceDoc;
104
107
  return _regenerator["default"].wrap(function _callee$(_context) {
105
108
  while (1) switch (_context.prev = _context.next) {
@@ -145,7 +148,8 @@ function getLinksDetail(_x, _x2) {
145
148
  return _context.stop();
146
149
  }
147
150
  }, _callee);
148
- }))).apply(this, arguments);
151
+ }));
152
+ return _getLinksDetail.apply(this, arguments);
149
153
  }
150
154
 
151
155
  function buildTopoLinkData() {}
@@ -11,10 +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 _queryLatestMetrics;
15
-
16
14
  function queryLatestMetrics(_x, _x2) {
17
- return (_queryLatestMetrics = _queryLatestMetrics || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids, codes) {
15
+ return _queryLatestMetrics.apply(this, arguments);
16
+ }
17
+
18
+ function _queryLatestMetrics() {
19
+ _queryLatestMetrics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids, codes) {
18
20
  return _regenerator["default"].wrap(function _callee$(_context) {
19
21
  while (1) switch (_context.prev = _context.next) {
20
22
  case 0:
@@ -28,5 +30,6 @@ function queryLatestMetrics(_x, _x2) {
28
30
  return _context.stop();
29
31
  }
30
32
  }, _callee);
31
- }))).apply(this, arguments);
33
+ }));
34
+ return _queryLatestMetrics.apply(this, arguments);
32
35
  }
@@ -13,10 +13,12 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
13
13
 
14
14
  var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
15
15
 
16
- var _commonQueryCiDataByIds;
17
-
18
16
  function commonQueryCiDataByIds(_x, _x2) {
19
- return (_commonQueryCiDataByIds = _commonQueryCiDataByIds || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids, options) {
17
+ return _commonQueryCiDataByIds.apply(this, arguments);
18
+ }
19
+
20
+ function _commonQueryCiDataByIds() {
21
+ _commonQueryCiDataByIds = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids, options) {
20
22
  var result;
21
23
  return _regenerator["default"].wrap(function _callee$(_context) {
22
24
  while (1) switch (_context.prev = _context.next) {
@@ -28,6 +30,8 @@ function commonQueryCiDataByIds(_x, _x2) {
28
30
  name: 'display_name',
29
31
  type: 'asc'
30
32
  }],
33
+ level: null,
34
+ // 本级+下级
31
35
  pageIndex: 1,
32
36
  pageSize: 20
33
37
  }, options));
@@ -41,5 +45,6 @@ function commonQueryCiDataByIds(_x, _x2) {
41
45
  return _context.stop();
42
46
  }
43
47
  }, _callee);
44
- }))).apply(this, arguments);
48
+ }));
49
+ return _commonQueryCiDataByIds.apply(this, arguments);
45
50
  }
@@ -15,10 +15,12 @@ var _componentTopologyUtils = require("@riil-frontend/component-topology-utils")
15
15
 
16
16
  var _cmdb = require("./cmdb");
17
17
 
18
- var _queryCisByIds, _queryModelAsset, _commonQueryCiData;
19
-
20
18
  function queryCisByIds(_x) {
21
- return (_queryCisByIds = _queryCisByIds || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids) {
19
+ return _queryCisByIds.apply(this, arguments);
20
+ }
21
+
22
+ function _queryCisByIds() {
23
+ _queryCisByIds = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids) {
22
24
  var result;
23
25
  return _regenerator["default"].wrap(function _callee$(_context) {
24
26
  while (1) switch (_context.prev = _context.next) {
@@ -39,11 +41,16 @@ function queryCisByIds(_x) {
39
41
  return _context.stop();
40
42
  }
41
43
  }, _callee);
42
- }))).apply(this, arguments);
44
+ }));
45
+ return _queryCisByIds.apply(this, arguments);
43
46
  }
44
47
 
45
48
  function queryModelAsset(_x2) {
46
- return (_queryModelAsset = _queryModelAsset || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(code) {
49
+ return _queryModelAsset.apply(this, arguments);
50
+ }
51
+
52
+ function _queryModelAsset() {
53
+ _queryModelAsset = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(code) {
47
54
  var result;
48
55
  return _regenerator["default"].wrap(function _callee2$(_context2) {
49
56
  while (1) switch (_context2.prev = _context2.next) {
@@ -60,11 +67,16 @@ function queryModelAsset(_x2) {
60
67
  return _context2.stop();
61
68
  }
62
69
  }, _callee2);
63
- }))).apply(this, arguments);
70
+ }));
71
+ return _queryModelAsset.apply(this, arguments);
64
72
  }
65
73
 
66
74
  function commonQueryCiData(_x3) {
67
- return (_commonQueryCiData = _commonQueryCiData || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(id) {
75
+ return _commonQueryCiData.apply(this, arguments);
76
+ }
77
+
78
+ function _commonQueryCiData() {
79
+ _commonQueryCiData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(id) {
68
80
  var result;
69
81
  return _regenerator["default"].wrap(function _callee3$(_context3) {
70
82
  while (1) switch (_context3.prev = _context3.next) {
@@ -86,5 +98,6 @@ function commonQueryCiData(_x3) {
86
98
  return _context3.stop();
87
99
  }
88
100
  }, _callee3);
89
- }))).apply(this, arguments);
101
+ }));
102
+ return _commonQueryCiData.apply(this, arguments);
90
103
  }
@@ -11,10 +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 _getMetricsByMonitorTemplateCodes;
15
-
16
14
  function getMetricsByMonitorTemplateCodes(_x) {
17
- return (_getMetricsByMonitorTemplateCodes = _getMetricsByMonitorTemplateCodes || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(mtCodes) {
15
+ return _getMetricsByMonitorTemplateCodes.apply(this, arguments);
16
+ }
17
+
18
+ function _getMetricsByMonitorTemplateCodes() {
19
+ _getMetricsByMonitorTemplateCodes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(mtCodes) {
18
20
  var result;
19
21
  return _regenerator["default"].wrap(function _callee$(_context) {
20
22
  while (1) switch (_context.prev = _context.next) {
@@ -31,5 +33,6 @@ function getMetricsByMonitorTemplateCodes(_x) {
31
33
  return _context.stop();
32
34
  }
33
35
  }, _callee);
34
- }))).apply(this, arguments);
36
+ }));
37
+ return _getMetricsByMonitorTemplateCodes.apply(this, arguments);
35
38
  }
@@ -198,8 +198,7 @@ function _default(engine) {
198
198
  }))();
199
199
  },
200
200
  deleteIcon: function deleteIcon(htIconId, rootState) {
201
- var _this4 = this,
202
- _onOk;
201
+ var _this4 = this;
203
202
 
204
203
  var id = (0, _icon.getCustomIconIdFromHtId)(htIconId);
205
204
 
@@ -214,8 +213,8 @@ function _default(engine) {
214
213
  type: 'warning'
215
214
  },
216
215
  content: '若执行相关操作,此图片将会从图片库删除,确定删除吗?',
217
- onOk: function onOk() {
218
- return (_onOk = _onOk || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
216
+ onOk: function () {
217
+ var _onOk = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
219
218
  var success;
220
219
  return _regenerator["default"].wrap(function _callee5$(_context5) {
221
220
  while (1) switch (_context5.prev = _context5.next) {
@@ -254,8 +253,14 @@ function _default(engine) {
254
253
  return _context5.stop();
255
254
  }
256
255
  }, _callee5, null, [[0, 9]]);
257
- }))).apply(this, arguments);
258
- }
256
+ }));
257
+
258
+ function onOk() {
259
+ return _onOk.apply(this, arguments);
260
+ }
261
+
262
+ return onOk;
263
+ }()
259
264
  });
260
265
  },
261
266
  openRenameDialog: function openRenameDialog(icon, rootState) {
@@ -9,14 +9,16 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
 
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
11
 
12
- var _getImageSize;
13
-
14
12
  /**
15
13
  * 获取图片大小
16
14
  * @param {*} url
17
15
  */
18
16
  function getImageSize(_x) {
19
- return (_getImageSize = _getImageSize || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(url) {
17
+ return _getImageSize.apply(this, arguments);
18
+ }
19
+
20
+ function _getImageSize() {
21
+ _getImageSize = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(url) {
20
22
  return _regenerator["default"].wrap(function _callee$(_context) {
21
23
  while (1) switch (_context.prev = _context.next) {
22
24
  case 0:
@@ -42,5 +44,6 @@ function getImageSize(_x) {
42
44
  return _context.stop();
43
45
  }
44
46
  }, _callee);
45
- }))).apply(this, arguments);
47
+ }));
48
+ return _getImageSize.apply(this, arguments);
46
49
  }
@@ -16,10 +16,15 @@ var _DictCache = _interopRequireDefault(require("../models/cache/DictCache"));
16
16
  * @returns
17
17
  */
18
18
  function formatMetric(val, metricModel) {
19
+ if (val === undefined) {
20
+ return '-';
21
+ }
22
+
19
23
  if (metricModel) {
20
24
  var result = (0, _utils.metricValueFormat)({
21
25
  value: val,
22
26
  dataType: metricModel.dataType,
27
+ changeValue: metricModel.changeValue,
23
28
  dict: _DictCache["default"].getDictObject(),
24
29
  unit: metricModel.unit,
25
30
  code: metricModel.code
@@ -9,15 +9,17 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
 
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
11
 
12
- var _saveSerialize;
13
-
14
12
  /**
15
13
  * 增加保存拓扑序列化数据方法,以便于拓扑中心和业务拓扑使用
16
14
  *
17
15
  * @param {*} topo
18
16
  */
19
17
  function saveSerialize(_x) {
20
- return (_saveSerialize = _saveSerialize || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(topo) {
18
+ return _saveSerialize.apply(this, arguments);
19
+ }
20
+
21
+ function _saveSerialize() {
22
+ _saveSerialize = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(topo) {
21
23
  var topoId, serialize;
22
24
  return _regenerator["default"].wrap(function _callee$(_context) {
23
25
  while (1) switch (_context.prev = _context.next) {
@@ -32,5 +34,6 @@ function saveSerialize(_x) {
32
34
  return _context.stop();
33
35
  }
34
36
  }, _callee);
35
- }))).apply(this, arguments);
37
+ }));
38
+ return _saveSerialize.apply(this, arguments);
36
39
  }
@@ -104,8 +104,6 @@ function ClusterMemberTable(props) {
104
104
  }
105
105
 
106
106
  function ClusterMemberTableContainer(props) {
107
- var _ref;
108
-
109
107
  var data = props.data,
110
108
  topo = props.topo;
111
109
  var datas = topo.dataModel.useDatas();
@@ -115,8 +113,8 @@ function ClusterMemberTableContainer(props) {
115
113
  return item.id;
116
114
  });
117
115
 
118
- var getTableData = function getTableData(_x) {
119
- return (_ref = _ref || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(params) {
116
+ var getTableData = /*#__PURE__*/function () {
117
+ var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(params) {
120
118
  var _params$current, current, _params$pageSize, pageSize, _params$sortBy, sortBy, _params$sortOrder, sortOrder, _yield$Promise$all, ciDataResult, memberRoleMetrics, ciTypeMap;
121
119
 
122
120
  return _regenerator["default"].wrap(function _callee$(_context) {
@@ -180,8 +178,12 @@ function ClusterMemberTableContainer(props) {
180
178
  return _context.stop();
181
179
  }
182
180
  }, _callee);
183
- }))).apply(this, arguments);
184
- };
181
+ }));
182
+
183
+ return function getTableData(_x) {
184
+ return _ref.apply(this, arguments);
185
+ };
186
+ }();
185
187
 
186
188
  var plugins = [(0, _useSortablePlugin["default"])({
187
189
  resetWhenQuery: false,
@@ -7,10 +7,10 @@ exports["default"] = void 0;
7
7
 
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
 
10
- var _table = _interopRequireDefault(require("@alifd/next/lib/table"));
11
-
12
10
  var _message = _interopRequireDefault(require("@alifd/next/lib/message"));
13
11
 
12
+ var _table = _interopRequireDefault(require("@alifd/next/lib/table"));
13
+
14
14
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
15
15
 
16
16
  var _icon = _interopRequireDefault(require("@alifd/next/lib/icon"));
@@ -32,8 +32,6 @@ function formatUrl(url) {
32
32
  }
33
33
 
34
34
  function EventsCard(props) {
35
- var _alarmRiskOperation;
36
-
37
35
  var alarmRiskList = props.alarmRiskList,
38
36
  closeDetailDrawer = props.closeDetailDrawer,
39
37
  onHandleAlarm = props.onHandleAlarm; // 告警table列配置
@@ -96,7 +94,11 @@ function EventsCard(props) {
96
94
  ]; // 告警/风险 操作 (受理)
97
95
 
98
96
  function alarmRiskOperation(_x, _x2) {
99
- return (_alarmRiskOperation = _alarmRiskOperation || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(type, params) {
97
+ return _alarmRiskOperation.apply(this, arguments);
98
+ }
99
+
100
+ function _alarmRiskOperation() {
101
+ _alarmRiskOperation = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(type, params) {
100
102
  var res;
101
103
  return _regenerator["default"].wrap(function _callee$(_context) {
102
104
  while (1) switch (_context.prev = _context.next) {
@@ -121,7 +123,8 @@ function EventsCard(props) {
121
123
  return _context.stop();
122
124
  }
123
125
  }, _callee);
124
- }))).apply(this, arguments);
126
+ }));
127
+ return _alarmRiskOperation.apply(this, arguments);
125
128
  }
126
129
 
127
130
  return /*#__PURE__*/_react["default"].createElement(_BlockBox["default"], {