@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
@@ -6,11 +6,10 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  */
7
7
  var Background = /*#__PURE__*/function () {
8
8
  function Background(view) {
9
- var _this = this,
10
- _ref2;
9
+ var _this = this;
11
10
 
12
- this.setSize = function (_x) {
13
- return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
11
+ this.setSize = /*#__PURE__*/function () {
12
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
14
13
  var width, height, backgroundNode, backgroundDispatchers;
15
14
  return _regeneratorRuntime.wrap(function _callee$(_context) {
16
15
  while (1) switch (_context.prev = _context.next) {
@@ -31,8 +30,12 @@ var Background = /*#__PURE__*/function () {
31
30
  return _context.stop();
32
31
  }
33
32
  }, _callee);
34
- }))).apply(this, arguments);
35
- };
33
+ }));
34
+
35
+ return function (_x) {
36
+ return _ref2.apply(this, arguments);
37
+ };
38
+ }();
36
39
 
37
40
  this.view = view;
38
41
  }
@@ -4,8 +4,6 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import topoService from '@riil-frontend/component-topology-common/es/services/topo';
5
5
  import rlog from '@riil-frontend/component-topology-utils/es/rlog';
6
6
  export default function (topo) {
7
- var _onTopoDataLoaded, _initData, _saveResourceWebUrl;
8
-
9
7
  var resourceUrlMap = {};
10
8
  var currentId = null;
11
9
  init();
@@ -23,7 +21,11 @@ export default function (topo) {
23
21
  }
24
22
 
25
23
  function onTopoDataLoaded(_x) {
26
- return (_onTopoDataLoaded = _onTopoDataLoaded || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(topoData) {
24
+ return _onTopoDataLoaded.apply(this, arguments);
25
+ }
26
+
27
+ function _onTopoDataLoaded() {
28
+ _onTopoDataLoaded = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(topoData) {
27
29
  return _regeneratorRuntime.wrap(function _callee$(_context) {
28
30
  while (1) switch (_context.prev = _context.next) {
29
31
  case 0:
@@ -34,11 +36,16 @@ export default function (topo) {
34
36
  return _context.stop();
35
37
  }
36
38
  }, _callee);
37
- }))).apply(this, arguments);
39
+ }));
40
+ return _onTopoDataLoaded.apply(this, arguments);
38
41
  }
39
42
 
40
43
  function initData(_x2) {
41
- return (_initData = _initData || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(nodes) {
44
+ return _initData.apply(this, arguments);
45
+ }
46
+
47
+ function _initData() {
48
+ _initData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(nodes) {
42
49
  var ids, list;
43
50
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
44
51
  while (1) switch (_context2.prev = _context2.next) {
@@ -77,7 +84,8 @@ export default function (topo) {
77
84
  return _context2.stop();
78
85
  }
79
86
  }, _callee2, null, [[3, 10]]);
80
- }))).apply(this, arguments);
87
+ }));
88
+ return _initData.apply(this, arguments);
81
89
  }
82
90
 
83
91
  function getModelDispatchers() {
@@ -116,7 +124,11 @@ export default function (topo) {
116
124
  }
117
125
 
118
126
  function saveResourceWebUrl(_x3, _x4) {
119
- return (_saveResourceWebUrl = _saveResourceWebUrl || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id, url) {
127
+ return _saveResourceWebUrl.apply(this, arguments);
128
+ }
129
+
130
+ function _saveResourceWebUrl() {
131
+ _saveResourceWebUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id, url) {
120
132
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
121
133
  while (1) switch (_context3.prev = _context3.next) {
122
134
  case 0:
@@ -161,7 +173,8 @@ export default function (topo) {
161
173
  return _context3.stop();
162
174
  }
163
175
  }, _callee3, null, [[5, 13]]);
164
- }))).apply(this, arguments);
176
+ }));
177
+ return _saveResourceWebUrl.apply(this, arguments);
165
178
  }
166
179
 
167
180
  var resourceWebUrl = {
@@ -10,8 +10,6 @@ import { getMetricsByMonitorTemplateCodes } from "../../services/topo/tagtip";
10
10
  */
11
11
 
12
12
  var ElementTagTipConfig = /*#__PURE__*/function () {
13
- var _init, _initNetworkLinkModel;
14
-
15
13
  function ElementTagTipConfig(topo) {
16
14
  this.topoData = void 0;
17
15
  this.modelMap = {};
@@ -23,8 +21,8 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
23
21
 
24
22
  var _proto = ElementTagTipConfig.prototype;
25
23
 
26
- _proto.init = function init(_x) {
27
- return (_init = _init || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(topoData) {
24
+ _proto.init = /*#__PURE__*/function () {
25
+ var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(topoData) {
28
26
  return _regeneratorRuntime.wrap(function _callee$(_context) {
29
27
  while (1) switch (_context.prev = _context.next) {
30
28
  case 0:
@@ -40,11 +38,17 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
40
38
  return _context.stop();
41
39
  }
42
40
  }, _callee, this);
43
- }))).apply(this, arguments);
44
- };
41
+ }));
42
+
43
+ function init(_x) {
44
+ return _init.apply(this, arguments);
45
+ }
46
+
47
+ return init;
48
+ }();
45
49
 
46
- _proto.initNetworkLinkModel = function initNetworkLinkModel() {
47
- return (_initNetworkLinkModel = _initNetworkLinkModel || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
50
+ _proto.initNetworkLinkModel = /*#__PURE__*/function () {
51
+ var _initNetworkLinkModel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
48
52
  var mtCodes;
49
53
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
50
54
  while (1) switch (_context2.prev = _context2.next) {
@@ -77,8 +81,14 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
77
81
  return _context2.stop();
78
82
  }
79
83
  }, _callee2, this, [[0, 8]]);
80
- }))).apply(this, arguments);
81
- };
84
+ }));
85
+
86
+ function initNetworkLinkModel() {
87
+ return _initNetworkLinkModel.apply(this, arguments);
88
+ }
89
+
90
+ return initNetworkLinkModel;
91
+ }();
82
92
 
83
93
  _proto.getModelTypes = function getModelTypes(cis) {
84
94
  var _this = this;
@@ -1,8 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
-
4
- var _saveTopo;
5
-
6
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
4
  import { TOPO_PARENT_ID } from "@riil-frontend/component-topology-common/es/services/topo";
8
5
  import rlog from "@riil-frontend/component-topology-utils/es/rlog";
@@ -39,7 +36,11 @@ export function resToConditions(resources, persist) {
39
36
  return null;
40
37
  }
41
38
  export function saveTopo(_x) {
42
- return (_saveTopo = _saveTopo || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(data) {
39
+ return _saveTopo.apply(this, arguments);
40
+ }
41
+
42
+ function _saveTopo() {
43
+ _saveTopo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(data) {
43
44
  var topoService, topoId, template, layout, backgroundId, globalConfig, serialize, resources, groups, relateTopoIdList, viewGroupId, groupInfo, viewResources, linkIps;
44
45
  return _regeneratorRuntime.wrap(function _callee$(_context) {
45
46
  while (1) switch (_context.prev = _context.next) {
@@ -122,5 +123,6 @@ export function saveTopo(_x) {
122
123
  return _context.stop();
123
124
  }
124
125
  }, _callee);
125
- }))).apply(this, arguments);
126
+ }));
127
+ return _saveTopo.apply(this, arguments);
126
128
  }
@@ -1,8 +1,5 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
-
4
- var _getLinksDetail;
5
-
6
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
4
  import keyBy from "lodash/keyBy";
8
5
  import _ from "lodash";
@@ -77,7 +74,11 @@ export function mergeLinksData(links, linkCis, nodes, interfaceCiMap, interfaceD
77
74
  });
78
75
  }
79
76
  export function getLinksDetail(_x, _x2) {
80
- return (_getLinksDetail = _getLinksDetail || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(links, nodes) {
77
+ return _getLinksDetail.apply(this, arguments);
78
+ }
79
+
80
+ function _getLinksDetail() {
81
+ _getLinksDetail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(links, nodes) {
81
82
  var linkCis, interfaceIds, interfaceTypes, interfaceCiMap, interfaceDoc;
82
83
  return _regeneratorRuntime.wrap(function _callee$(_context) {
83
84
  while (1) switch (_context.prev = _context.next) {
@@ -123,8 +124,10 @@ export function getLinksDetail(_x, _x2) {
123
124
  return _context.stop();
124
125
  }
125
126
  }, _callee);
126
- }))).apply(this, arguments);
127
+ }));
128
+ return _getLinksDetail.apply(this, arguments);
127
129
  }
130
+
128
131
  export function buildTopoLinkData() {}
129
132
  export var compatibleWith = function compatibleWith(value) {
130
133
  // console.log("compatibleWith",value);
@@ -1,11 +1,12 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
-
3
- var _queryLatestMetrics;
4
-
5
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
3
  import { request } from '@riil-frontend/component-topology-utils';
7
4
  export function queryLatestMetrics(_x, _x2) {
8
- return (_queryLatestMetrics = _queryLatestMetrics || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ids, codes) {
5
+ return _queryLatestMetrics.apply(this, arguments);
6
+ }
7
+
8
+ function _queryLatestMetrics() {
9
+ _queryLatestMetrics = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ids, codes) {
9
10
  return _regeneratorRuntime.wrap(function _callee$(_context) {
10
11
  while (1) switch (_context.prev = _context.next) {
11
12
  case 0:
@@ -19,5 +20,6 @@ export function queryLatestMetrics(_x, _x2) {
19
20
  return _context.stop();
20
21
  }
21
22
  }, _callee);
22
- }))).apply(this, arguments);
23
+ }));
24
+ return _queryLatestMetrics.apply(this, arguments);
23
25
  }
@@ -1,12 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
-
4
- var _commonQueryCiDataByIds;
5
-
6
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
4
  import { request } from '@riil-frontend/component-topology-utils';
8
5
  export function commonQueryCiDataByIds(_x, _x2) {
9
- return (_commonQueryCiDataByIds = _commonQueryCiDataByIds || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ids, options) {
6
+ return _commonQueryCiDataByIds.apply(this, arguments);
7
+ }
8
+
9
+ function _commonQueryCiDataByIds() {
10
+ _commonQueryCiDataByIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ids, options) {
10
11
  var result;
11
12
  return _regeneratorRuntime.wrap(function _callee$(_context) {
12
13
  while (1) switch (_context.prev = _context.next) {
@@ -18,6 +19,8 @@ export function commonQueryCiDataByIds(_x, _x2) {
18
19
  name: 'display_name',
19
20
  type: 'asc'
20
21
  }],
22
+ level: null,
23
+ // 本级+下级
21
24
  pageIndex: 1,
22
25
  pageSize: 20
23
26
  }, options));
@@ -31,5 +34,6 @@ export function commonQueryCiDataByIds(_x, _x2) {
31
34
  return _context.stop();
32
35
  }
33
36
  }, _callee);
34
- }))).apply(this, arguments);
37
+ }));
38
+ return _commonQueryCiDataByIds.apply(this, arguments);
35
39
  }
@@ -1,12 +1,13 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
-
3
- var _queryCisByIds, _queryModelAsset, _commonQueryCiData;
4
-
5
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
3
  import { request } from '@riil-frontend/component-topology-utils';
7
4
  import { commonQueryCiDataByIds } from "./cmdb";
8
5
  export function queryCisByIds(_x) {
9
- return (_queryCisByIds = _queryCisByIds || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ids) {
6
+ return _queryCisByIds.apply(this, arguments);
7
+ }
8
+
9
+ function _queryCisByIds() {
10
+ _queryCisByIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ids) {
10
11
  var result;
11
12
  return _regeneratorRuntime.wrap(function _callee$(_context) {
12
13
  while (1) switch (_context.prev = _context.next) {
@@ -27,10 +28,16 @@ export function queryCisByIds(_x) {
27
28
  return _context.stop();
28
29
  }
29
30
  }, _callee);
30
- }))).apply(this, arguments);
31
+ }));
32
+ return _queryCisByIds.apply(this, arguments);
31
33
  }
34
+
32
35
  export function queryModelAsset(_x2) {
33
- return (_queryModelAsset = _queryModelAsset || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(code) {
36
+ return _queryModelAsset.apply(this, arguments);
37
+ }
38
+
39
+ function _queryModelAsset() {
40
+ _queryModelAsset = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(code) {
34
41
  var result;
35
42
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
36
43
  while (1) switch (_context2.prev = _context2.next) {
@@ -47,10 +54,16 @@ export function queryModelAsset(_x2) {
47
54
  return _context2.stop();
48
55
  }
49
56
  }, _callee2);
50
- }))).apply(this, arguments);
57
+ }));
58
+ return _queryModelAsset.apply(this, arguments);
51
59
  }
60
+
52
61
  export function commonQueryCiData(_x3) {
53
- return (_commonQueryCiData = _commonQueryCiData || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id) {
62
+ return _commonQueryCiData.apply(this, arguments);
63
+ }
64
+
65
+ function _commonQueryCiData() {
66
+ _commonQueryCiData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id) {
54
67
  var result;
55
68
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
56
69
  while (1) switch (_context3.prev = _context3.next) {
@@ -72,5 +85,6 @@ export function commonQueryCiData(_x3) {
72
85
  return _context3.stop();
73
86
  }
74
87
  }, _callee3);
75
- }))).apply(this, arguments);
88
+ }));
89
+ return _commonQueryCiData.apply(this, arguments);
76
90
  }
@@ -1,11 +1,12 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
-
3
- var _getMetricsByMonitorTemplateCodes;
4
-
5
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
3
  import { request } from '@riil-frontend/component-topology-utils';
7
4
  export function getMetricsByMonitorTemplateCodes(_x) {
8
- return (_getMetricsByMonitorTemplateCodes = _getMetricsByMonitorTemplateCodes || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(mtCodes) {
5
+ return _getMetricsByMonitorTemplateCodes.apply(this, arguments);
6
+ }
7
+
8
+ function _getMetricsByMonitorTemplateCodes() {
9
+ _getMetricsByMonitorTemplateCodes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(mtCodes) {
9
10
  var result;
10
11
  return _regeneratorRuntime.wrap(function _callee$(_context) {
11
12
  while (1) switch (_context.prev = _context.next) {
@@ -22,5 +23,6 @@ export function getMetricsByMonitorTemplateCodes(_x) {
22
23
  return _context.stop();
23
24
  }
24
25
  }, _callee);
25
- }))).apply(this, arguments);
26
+ }));
27
+ return _getMetricsByMonitorTemplateCodes.apply(this, arguments);
26
28
  }
@@ -183,8 +183,7 @@ export default function (engine) {
183
183
  }))();
184
184
  },
185
185
  deleteIcon: function deleteIcon(htIconId, rootState) {
186
- var _this4 = this,
187
- _onOk;
186
+ var _this4 = this;
188
187
 
189
188
  var id = getCustomIconIdFromHtId(htIconId);
190
189
  rlog.debug("\u5220\u9664\u56FE\u6807: " + id);
@@ -198,8 +197,8 @@ export default function (engine) {
198
197
  type: 'warning'
199
198
  },
200
199
  content: '若执行相关操作,此图片将会从图片库删除,确定删除吗?',
201
- onOk: function onOk() {
202
- return (_onOk = _onOk || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
200
+ onOk: function () {
201
+ var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
203
202
  var success;
204
203
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
205
204
  while (1) switch (_context5.prev = _context5.next) {
@@ -236,8 +235,14 @@ export default function (engine) {
236
235
  return _context5.stop();
237
236
  }
238
237
  }, _callee5, null, [[0, 9]]);
239
- }))).apply(this, arguments);
240
- }
238
+ }));
239
+
240
+ function onOk() {
241
+ return _onOk.apply(this, arguments);
242
+ }
243
+
244
+ return onOk;
245
+ }()
241
246
  });
242
247
  },
243
248
  openRenameDialog: function openRenameDialog(icon, rootState) {
@@ -1,7 +1,4 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
-
3
- var _getImageSize;
4
-
5
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
3
 
7
4
  /**
@@ -9,7 +6,11 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
9
6
  * @param {*} url
10
7
  */
11
8
  export function getImageSize(_x) {
12
- return (_getImageSize = _getImageSize || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(url) {
9
+ return _getImageSize.apply(this, arguments);
10
+ }
11
+
12
+ function _getImageSize() {
13
+ _getImageSize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(url) {
13
14
  return _regeneratorRuntime.wrap(function _callee$(_context) {
14
15
  while (1) switch (_context.prev = _context.next) {
15
16
  case 0:
@@ -35,5 +36,6 @@ export function getImageSize(_x) {
35
36
  return _context.stop();
36
37
  }
37
38
  }, _callee);
38
- }))).apply(this, arguments);
39
+ }));
40
+ return _getImageSize.apply(this, arguments);
39
41
  }
@@ -8,10 +8,15 @@ import DictCache from "../models/cache/DictCache";
8
8
  */
9
9
 
10
10
  export function formatMetric(val, metricModel) {
11
+ if (val === undefined) {
12
+ return '-';
13
+ }
14
+
11
15
  if (metricModel) {
12
16
  var result = metricValueFormat({
13
17
  value: val,
14
18
  dataType: metricModel.dataType,
19
+ changeValue: metricModel.changeValue,
15
20
  dict: DictCache.getDictObject(),
16
21
  unit: metricModel.unit,
17
22
  code: metricModel.code
@@ -1,7 +1,4 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
-
3
- var _saveSerialize;
4
-
5
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
3
 
7
4
  /**
@@ -10,7 +7,11 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
7
  * @param {*} topo
11
8
  */
12
9
  export default function saveSerialize(_x) {
13
- return (_saveSerialize = _saveSerialize || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(topo) {
10
+ return _saveSerialize.apply(this, arguments);
11
+ }
12
+
13
+ function _saveSerialize() {
14
+ _saveSerialize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(topo) {
14
15
  var topoId, serialize;
15
16
  return _regeneratorRuntime.wrap(function _callee$(_context) {
16
17
  while (1) switch (_context.prev = _context.next) {
@@ -25,5 +26,6 @@ export default function saveSerialize(_x) {
25
26
  return _context.stop();
26
27
  }
27
28
  }, _callee);
28
- }))).apply(this, arguments);
29
+ }));
30
+ return _saveSerialize.apply(this, arguments);
29
31
  }
@@ -85,8 +85,6 @@ function ClusterMemberTable(props) {
85
85
  }
86
86
 
87
87
  export default function ClusterMemberTableContainer(props) {
88
- var _ref;
89
-
90
88
  var data = props.data,
91
89
  topo = props.topo;
92
90
  var datas = topo.dataModel.useDatas();
@@ -96,8 +94,8 @@ export default function ClusterMemberTableContainer(props) {
96
94
  return item.id;
97
95
  });
98
96
 
99
- var getTableData = function getTableData(_x) {
100
- return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
97
+ var getTableData = /*#__PURE__*/function () {
98
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
101
99
  var _params$current, current, _params$pageSize, pageSize, _params$sortBy, sortBy, _params$sortOrder, sortOrder, _yield$Promise$all, ciDataResult, memberRoleMetrics, ciTypeMap;
102
100
 
103
101
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -161,8 +159,12 @@ export default function ClusterMemberTableContainer(props) {
161
159
  return _context.stop();
162
160
  }
163
161
  }, _callee);
164
- }))).apply(this, arguments);
165
- };
162
+ }));
163
+
164
+ return function getTableData(_x) {
165
+ return _ref.apply(this, arguments);
166
+ };
167
+ }();
166
168
 
167
169
  var plugins = [useSortablePlugin({
168
170
  resetWhenQuery: false,
@@ -1,5 +1,5 @@
1
- import _Table from "@alifd/next/es/table";
2
1
  import _Message from "@alifd/next/es/message";
2
+ import _Table from "@alifd/next/es/table";
3
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
4
  import _Icon from "@alifd/next/es/icon";
5
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
@@ -15,8 +15,6 @@ function formatUrl(url) {
15
15
  }
16
16
 
17
17
  function EventsCard(props) {
18
- var _alarmRiskOperation;
19
-
20
18
  var alarmRiskList = props.alarmRiskList,
21
19
  closeDetailDrawer = props.closeDetailDrawer,
22
20
  onHandleAlarm = props.onHandleAlarm; // 告警table列配置
@@ -79,7 +77,11 @@ function EventsCard(props) {
79
77
  ]; // 告警/风险 操作 (受理)
80
78
 
81
79
  function alarmRiskOperation(_x, _x2) {
82
- return (_alarmRiskOperation = _alarmRiskOperation || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(type, params) {
80
+ return _alarmRiskOperation.apply(this, arguments);
81
+ }
82
+
83
+ function _alarmRiskOperation() {
84
+ _alarmRiskOperation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(type, params) {
83
85
  var res;
84
86
  return _regeneratorRuntime.wrap(function _callee$(_context) {
85
87
  while (1) switch (_context.prev = _context.next) {
@@ -104,7 +106,8 @@ function EventsCard(props) {
104
106
  return _context.stop();
105
107
  }
106
108
  }, _callee);
107
- }))).apply(this, arguments);
109
+ }));
110
+ return _alarmRiskOperation.apply(this, arguments);
108
111
  }
109
112
 
110
113
  return /*#__PURE__*/React.createElement(BlockBox, {