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

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 (193) hide show
  1. package/build/1.js +1 -1
  2. package/build/index.js +14 -14
  3. package/es/components/BatchAttrMetric/setting.js +1 -1
  4. package/es/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +1 -1
  5. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +1 -1
  6. package/es/core/components/AlarmListPanel/index.js +1 -1
  7. package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +1 -1
  8. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
  9. package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +1 -1
  10. package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +1 -1
  11. package/es/core/components/ResourceViewAttributeSetting/Setting.js +1 -1
  12. package/es/core/components/TopoView/topoView.js +6 -2
  13. package/es/core/editor/components/BackgroundView/index.js +1 -1
  14. package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +1 -1
  15. package/es/core/editor/components/EditorPlugin.js +1 -1
  16. package/es/core/editor/components/Sidebar/views/ComponentPanel.js +1 -1
  17. package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
  18. package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
  19. package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +1 -1
  20. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +1 -1
  21. package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +1 -1
  22. package/es/core/editor/components/Sidebar/views/LinkPanel.js +1 -1
  23. package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +1 -1
  24. package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
  25. package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
  26. package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +1 -1
  27. package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +1 -1
  28. package/es/core/editor/hooks/useKeyboardShortcut.js +3 -1
  29. package/es/core/editor/store/background.js +1 -1
  30. package/es/core/editor/store/historyManager.js +1 -1
  31. package/es/core/editor/store/topoEdit.js +1 -1
  32. package/es/core/editor/utils/copyElementUtil.js +24 -9
  33. package/es/core/hooks/__tests__/useCiAttributeChange.test.js +0 -0
  34. package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -1
  35. package/es/core/hooks/useCiAttributeChange.js +35 -16
  36. package/es/core/hooks/useManageStatus.js +1 -1
  37. package/es/core/hooks/usePolling.js +1 -1
  38. package/es/core/hooks/useResourceConfig.js +1 -3
  39. package/es/core/hooks/useTopoEdit.js +48 -52
  40. package/es/core/models/Alarm.js +1 -1
  41. package/es/core/models/AttributeMetricDisplay.js +6 -3
  42. package/es/core/models/HistoryManager.js +1 -1
  43. package/es/core/models/SelectionModel.js +1 -1
  44. package/es/core/models/TopoApp.js +2 -2
  45. package/es/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
  46. package/es/core/models/attributeFormatter/formatter/graphTransform.js +1 -1
  47. package/es/core/models/attributeFormatter/index.js +1 -1
  48. package/es/core/models/cache/CiTypeCache.js +5 -1
  49. package/es/core/models/cache/DictCache.js +1 -1
  50. package/es/core/models/plugins/resourceWebControllUrl.js +1 -1
  51. package/es/core/models/tagstips/ElementTagTipConfig.js +1 -1
  52. package/es/core/models/topoData.js +0 -1
  53. package/es/core/services/alarm.js +1 -1
  54. package/es/core/services/index.js +1 -1
  55. package/es/core/services/topo/basic.js +2 -2
  56. package/es/core/store/models/customIcon.js +1 -1
  57. package/es/core/store/models/displayConfig.js +1 -1
  58. package/es/core/store/models/selection.js +1 -1
  59. package/es/core/store/models/topoBaseInfoOverview.js +1 -1
  60. package/es/core/store/models/topoBizMod.js +1 -1
  61. package/es/core/store/models/topoConfig.js +7 -10
  62. package/es/core/store/models/topoGraphView.js +1 -1
  63. package/es/core/store/models/topoMod.js +1 -1
  64. package/es/core/store/models/viewer/lock.js +1 -1
  65. package/es/core/store/models/viewer/resourceDetail.js +1 -1
  66. package/es/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
  67. package/es/core/utils/edgeUtil.js +2 -1
  68. package/es/core/utils/metricUtil.js +8 -1
  69. package/es/core/utils/showMessage.js +1 -1
  70. package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
  71. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
  72. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
  73. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
  74. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +1 -1
  75. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +1 -1
  76. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
  77. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +1 -1
  78. package/es/networkTopo/components/Link/index.js +1 -1
  79. package/es/networkTopo/hooks/viewer/useRelateTopo.js +1 -1
  80. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +1 -1
  81. package/es/networkTopo/models/LinkTagsTipsBuilder.js +1 -1
  82. package/es/networkTopo/models/TopoCenter.js +1 -1
  83. package/es/networkTopo/services/model.js +1 -1
  84. package/es/networkTopo/services/topo/basic.js +4 -4
  85. package/es/networkTopo/services/topo/ciInfo.js +1 -1
  86. package/es/networkTopo/store/functionAuth.js +1 -1
  87. package/es/networkTopo/store/topoCenter.js +1 -1
  88. package/es/networkTopo/store/topoTreeMod.js +1 -1
  89. package/es/networkTopo/utils/exportData.js +1 -1
  90. package/es/style.js +1 -1
  91. package/es/utils/ResourceConfigUtil.js +4 -37
  92. package/es/utils/ciRefAttributeTranslateUtil.d.ts +12 -0
  93. package/es/utils/ciRefAttributeTranslateUtil.js +156 -0
  94. package/es/utils/clipboardUtil.d.ts +7 -0
  95. package/es/utils/clipboardUtil.js +104 -0
  96. package/es/utils/format.js +1 -1
  97. package/es/utils/topoData.js +4 -2
  98. package/lib/components/BatchAttrMetric/setting.js +2 -2
  99. package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +2 -2
  100. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +2 -2
  101. package/lib/core/components/AlarmListPanel/index.js +1 -1
  102. package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -2
  103. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
  104. package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -3
  105. package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +2 -2
  106. package/lib/core/components/ResourceViewAttributeSetting/Setting.js +2 -2
  107. package/lib/core/components/TopoView/topoView.js +14 -10
  108. package/lib/core/editor/components/BackgroundView/index.js +3 -3
  109. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +2 -2
  110. package/lib/core/editor/components/EditorPlugin.js +3 -3
  111. package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +2 -4
  112. package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
  113. package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
  114. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -2
  115. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +2 -2
  116. package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +2 -4
  117. package/lib/core/editor/components/Sidebar/views/LinkPanel.js +2 -4
  118. package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +5 -5
  119. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
  120. package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
  121. package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +3 -3
  122. package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +2 -2
  123. package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -0
  124. package/lib/core/editor/store/background.js +1 -1
  125. package/lib/core/editor/store/historyManager.js +1 -1
  126. package/lib/core/editor/store/topoEdit.js +1 -1
  127. package/lib/core/editor/utils/copyElementUtil.js +29 -9
  128. package/lib/core/hooks/__tests__/useCiAttributeChange.test.js +1 -0
  129. package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -3
  130. package/lib/core/hooks/useCiAttributeChange.js +34 -15
  131. package/lib/core/hooks/useManageStatus.js +1 -1
  132. package/lib/core/hooks/usePolling.js +3 -3
  133. package/lib/core/hooks/useResourceConfig.js +1 -3
  134. package/lib/core/hooks/useTopoEdit.js +47 -51
  135. package/lib/core/models/Alarm.js +10 -10
  136. package/lib/core/models/AttributeMetricDisplay.js +8 -4
  137. package/lib/core/models/HistoryManager.js +8 -8
  138. package/lib/core/models/SelectionModel.js +5 -5
  139. package/lib/core/models/TopoApp.js +4 -6
  140. package/lib/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
  141. package/lib/core/models/attributeFormatter/formatter/graphTransform.js +2 -4
  142. package/lib/core/models/attributeFormatter/index.js +1 -1
  143. package/lib/core/models/cache/CiTypeCache.js +6 -2
  144. package/lib/core/models/cache/DictCache.js +2 -2
  145. package/lib/core/models/plugins/resourceWebControllUrl.js +2 -2
  146. package/lib/core/models/tagstips/ElementTagTipConfig.js +2 -2
  147. package/lib/core/models/topoData.js +0 -1
  148. package/lib/core/services/alarm.js +2 -2
  149. package/lib/core/services/index.js +1 -1
  150. package/lib/core/services/topo/basic.js +2 -2
  151. package/lib/core/store/models/customIcon.js +3 -3
  152. package/lib/core/store/models/displayConfig.js +1 -1
  153. package/lib/core/store/models/selection.js +1 -1
  154. package/lib/core/store/models/topoBaseInfoOverview.js +1 -1
  155. package/lib/core/store/models/topoBizMod.js +1 -1
  156. package/lib/core/store/models/topoConfig.js +7 -10
  157. package/lib/core/store/models/topoGraphView.js +1 -1
  158. package/lib/core/store/models/topoMod.js +9 -9
  159. package/lib/core/store/models/viewer/lock.js +1 -1
  160. package/lib/core/store/models/viewer/resourceDetail.js +1 -1
  161. package/lib/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
  162. package/lib/core/utils/edgeUtil.js +2 -1
  163. package/lib/core/utils/metricUtil.js +8 -1
  164. package/lib/core/utils/showMessage.js +2 -2
  165. package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
  166. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
  167. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
  168. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
  169. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +6 -6
  170. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +3 -5
  171. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
  172. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +2 -2
  173. package/lib/networkTopo/components/Link/index.js +2 -2
  174. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +4 -4
  175. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +3 -5
  176. package/lib/networkTopo/models/LinkTagsTipsBuilder.js +3 -3
  177. package/lib/networkTopo/models/TopoCenter.js +1 -1
  178. package/lib/networkTopo/services/model.js +1 -3
  179. package/lib/networkTopo/services/topo/basic.js +4 -6
  180. package/lib/networkTopo/services/topo/ciInfo.js +0 -2
  181. package/lib/networkTopo/store/functionAuth.js +1 -1
  182. package/lib/networkTopo/store/topoCenter.js +1 -1
  183. package/lib/networkTopo/store/topoTreeMod.js +5 -5
  184. package/lib/networkTopo/utils/exportData.js +1 -3
  185. package/lib/style.js +1 -1
  186. package/lib/utils/ResourceConfigUtil.js +4 -39
  187. package/lib/utils/ciRefAttributeTranslateUtil.d.ts +12 -0
  188. package/lib/utils/ciRefAttributeTranslateUtil.js +169 -0
  189. package/lib/utils/clipboardUtil.d.ts +7 -0
  190. package/lib/utils/clipboardUtil.js +113 -0
  191. package/lib/utils/format.js +1 -1
  192. package/lib/utils/topoData.js +4 -2
  193. package/package.json +4 -4
@@ -15,7 +15,7 @@ import useGroupAddResource from "./useGroupAddResource";
15
15
  import { findGroupChildren } from "../../utils/topoData";
16
16
  import { isResourceElement } from "../../utils/htElementDataUtil";
17
17
  import { isClusterHtElement, isClusterMemberHtElement } from "../../utils/clusterUtil";
18
- import { mergeExportLinkData } from "../models/utils/linkUtils";
18
+ import { isExitLink, mergeExportLinkData } from "../models/utils/linkUtils";
19
19
  import { isUniqueIp, buildIpNode } from "../../networkTopo/utils/exitLinkUtil";
20
20
 
21
21
  var useTopoEdit = function useTopoEdit(params) {
@@ -349,33 +349,26 @@ var useTopoEdit = function useTopoEdit(params) {
349
349
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(node) {
350
350
  var _node$getEdges$toArra, _node$getEdges;
351
351
 
352
- var config, edges, exportLinkIdList;
352
+ var edges;
353
353
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
354
354
  while (1) switch (_context4.prev = _context4.next) {
355
355
  case 0:
356
- config = resourceConfig.getConfig(); // console.log("删除关联在节点上的出口链路- node, config", node, config);
356
+ // console.log("删除关联在节点上的出口链路- node, config", node, config);
357
+ edges = (_node$getEdges$toArra = (_node$getEdges = node.getEdges()) === null || _node$getEdges === void 0 ? void 0 : _node$getEdges.toArray()) !== null && _node$getEdges$toArra !== void 0 ? _node$getEdges$toArra : [];
357
358
 
358
- edges = (_node$getEdges$toArra = (_node$getEdges = node.getEdges()) === null || _node$getEdges === void 0 ? void 0 : _node$getEdges.toArray()) !== null && _node$getEdges$toArra !== void 0 ? _node$getEdges$toArra : []; // const exLink = [];
359
+ if (edges.length > 0) {
360
+ edges.map(function (edge) {
361
+ if (edge.getTag()) {
362
+ var link = topo.dataModel.getDataById(edge.getTag());
359
363
 
360
- if (!(edges.length > 0)) {
361
- _context4.next = 8;
362
- break;
364
+ if (link && isExitLink(link)) {
365
+ topo.getGraphView().dm().remove(edge);
366
+ }
367
+ }
368
+ });
363
369
  }
364
370
 
365
- exportLinkIdList = [].concat(config.exportLinkIdList); //console.log("删除关联在节点上的出口链路- edges", edges,exportLinkIdList);
366
-
367
- edges.map(function (edge) {
368
- if (edge.a("dtype") === "link" && exportLinkIdList.indexOf(edge.getTag()) >= 0) {
369
- // exLink.push(edge);
370
- topo.getGraphView().dm().remove(edge);
371
- exportLinkIdList.splice(config.exportLinkIdList.indexOf(edge.getTag()), 1);
372
- }
373
- });
374
- config.exportLinkIdList = exportLinkIdList;
375
- _context4.next = 8;
376
- return resourceConfig.updateConfig(config);
377
-
378
- case 8:
371
+ case 2:
379
372
  case "end":
380
373
  return _context4.stop();
381
374
  }
@@ -554,7 +547,7 @@ var useTopoEdit = function useTopoEdit(params) {
554
547
 
555
548
  function _bindViewResources() {
556
549
  _bindViewResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(data) {
557
- var config, _yield$editDispatcher3, elements;
550
+ var config, result, _elements;
558
551
 
559
552
  return _regeneratorRuntime.wrap(function _callee12$(_context12) {
560
553
  while (1) switch (_context12.prev = _context12.next) {
@@ -570,15 +563,19 @@ var useTopoEdit = function useTopoEdit(params) {
570
563
  return editDispatchers.fetchDataByConfig();
571
564
 
572
565
  case 6:
573
- _yield$editDispatcher3 = _context12.sent;
574
- elements = _yield$editDispatcher3.elements;
575
- saveBind(TopoEvent.DATA_TYPE_RESOURCE_COMBO, elements); // 临时放这里,仅拓扑中心有
566
+ result = _context12.sent;
567
+ console.log("fetchDataByConfig", result);
576
568
 
577
- if (topo.linkDynamicStyleExecutor) {
578
- topo.linkDynamicStyleExecutor.execute();
569
+ if (result) {
570
+ _elements = result.elements;
571
+ saveBind(TopoEvent.DATA_TYPE_RESOURCE_COMBO, _elements); // 临时放这里,仅拓扑中心有
572
+
573
+ if (topo.linkDynamicStyleExecutor) {
574
+ topo.linkDynamicStyleExecutor.execute();
575
+ }
579
576
  }
580
577
 
581
- case 10:
578
+ case 9:
582
579
  case "end":
583
580
  return _context12.stop();
584
581
  }
@@ -593,7 +590,7 @@ var useTopoEdit = function useTopoEdit(params) {
593
590
 
594
591
  function _addLayerResources() {
595
592
  _addLayerResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(group, newResourceIds) {
596
- var _yield$editDispatcher4, elements, newElements;
593
+ var _yield$editDispatcher3, elements, newElements;
597
594
 
598
595
  return _regeneratorRuntime.wrap(function _callee13$(_context13) {
599
596
  while (1) switch (_context13.prev = _context13.next) {
@@ -608,8 +605,8 @@ var useTopoEdit = function useTopoEdit(params) {
608
605
  return editDispatchers.fetchDataByConfig();
609
606
 
610
607
  case 5:
611
- _yield$editDispatcher4 = _context13.sent;
612
- elements = _yield$editDispatcher4.elements;
608
+ _yield$editDispatcher3 = _context13.sent;
609
+ elements = _yield$editDispatcher3.elements;
613
610
  // 2022-11-10 修复 添加资源后分层重新布局问题,仅布局新增资源。替换api topo.updateElements(data)
614
611
  newElements = findUNExistedElements(elements);
615
612
  rlog.debug("添加分层资源", {
@@ -827,7 +824,9 @@ var useTopoEdit = function useTopoEdit(params) {
827
824
  return _regeneratorRuntime.wrap(function _callee8$(_context8) {
828
825
  while (1) switch (_context8.prev = _context8.next) {
829
826
  case 0:
830
- dm = htTopo.getGraphView().dm(); // 创建
827
+ dm = htTopo.getGraphView().dm(); // 移除旧节点。先删除后创建,解决ip节点替换ping资源后链路丢失问题
828
+
829
+ dm.remove(node); // 创建
831
830
 
832
831
  newLinkElements = findUNExistedLinkElements(elements);
833
832
  createElementsData = null;
@@ -888,22 +887,13 @@ var useTopoEdit = function useTopoEdit(params) {
888
887
 
889
888
 
890
889
  sm = htTopo.getGraphView().sm();
891
- sm.setSelection([newElement]); // 移除旧节点
892
-
893
- dm.remove(node); // saveBind(TopoEvent.DATA_TYPE_RESOURCE_SINGLE, newDatas);
894
- // node.a("customName", null);
895
- // 删除关联在节点上的出口链路
896
-
897
- _context8.next = 12;
898
- return deleteExLink(node);
890
+ sm.setSelection([newElement]); // 临时放这里,仅拓扑中心有
899
891
 
900
- case 12:
901
- // 临时放这里,仅拓扑中心有
902
892
  if (topo.linkDynamicStyleExecutor) {
903
893
  topo.linkDynamicStyleExecutor.execute();
904
894
  }
905
895
 
906
- case 13:
896
+ case 11:
907
897
  case "end":
908
898
  return _context8.stop();
909
899
  }
@@ -1001,7 +991,7 @@ var useTopoEdit = function useTopoEdit(params) {
1001
991
 
1002
992
  function _relateNodeIp() {
1003
993
  _relateNodeIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(txtValue, nodeElement) {
1004
- var dm, isUnique, ip, configObj, configData, _elements, newLinkElements, newLink, newLinkGroup, createElementsData, _htTopo;
994
+ var dm, isUnique, ipNodeData, configObj, configData, _elements2, newLinkElements, newLink, newLinkGroup, createElementsData, _htTopo;
1005
995
 
1006
996
  return _regeneratorRuntime.wrap(function _callee15$(_context15) {
1007
997
  while (1) switch (_context15.prev = _context15.next) {
@@ -1023,16 +1013,16 @@ var useTopoEdit = function useTopoEdit(params) {
1023
1013
  isUnique = isUniqueIp(dm, txtValue, nodeElement); // 获取关联链路
1024
1014
 
1025
1015
  if (!isUnique) {
1026
- _context15.next = 23;
1016
+ _context15.next = 24;
1027
1017
  break;
1028
1018
  }
1029
1019
 
1030
- ip = buildIpNode(txtValue);
1020
+ ipNodeData = buildIpNode(txtValue);
1031
1021
  _context15.next = 8;
1032
1022
  return deleteExLink(nodeElement);
1033
1023
 
1034
1024
  case 8:
1035
- nodeElement.a(ip);
1025
+ nodeElement.a(ipNodeData);
1036
1026
  nodeElement.setName(txtValue);
1037
1027
  nodeElement.setTag("ip:" + txtValue); // 获取配置
1038
1028
 
@@ -1047,8 +1037,8 @@ var useTopoEdit = function useTopoEdit(params) {
1047
1037
  case 16:
1048
1038
  configData = _context15.sent;
1049
1039
  // console.log("configData",configObj, configData);
1050
- _elements = configData.elements;
1051
- newLinkElements = findUNExistedLinkElements(_elements); // console.log("configData", configData, newLinkElements);
1040
+ _elements2 = configData.elements;
1041
+ newLinkElements = findUNExistedLinkElements(_elements2); // console.log("configData", configData, newLinkElements);
1052
1042
 
1053
1043
  newLink = newLinkElements.filter(function (item) {
1054
1044
  return item.type === "link";
@@ -1063,15 +1053,21 @@ var useTopoEdit = function useTopoEdit(params) {
1063
1053
  nodes: [],
1064
1054
  links: newLink,
1065
1055
  linkGroups: newLinkGroup
1066
- }; // console.log("createElementsData", createElementsData);
1056
+ };
1057
+ console.log("createElementsData", createElementsData);
1067
1058
 
1068
1059
  if ([].concat(newLink, newLinkGroup).length > 0) {
1069
1060
  _htTopo = topo.getHtTopo();
1070
1061
 
1071
- _htTopo.createElements(createElementsData);
1062
+ _htTopo.createElements(createElementsData); // 临时放这里,仅拓扑中心有
1063
+
1064
+
1065
+ if (topo.linkDynamicStyleExecutor) {
1066
+ topo.linkDynamicStyleExecutor.execute();
1067
+ }
1072
1068
  }
1073
1069
 
1074
- case 23:
1070
+ case 24:
1075
1071
  case "end":
1076
1072
  return _context15.stop();
1077
1073
  }
@@ -2,7 +2,7 @@ import _Dialog from "@alifd/next/es/dialog";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import topoService from '@riil-frontend/component-topology-common/es/services/topo';
5
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
5
+ import { rlog } from '@riil-frontend/component-topology-utils';
6
6
  import { isAvailableArray } from '@riil-frontend/utils';
7
7
 
8
8
  var Alarm = /*#__PURE__*/function () {
@@ -1,12 +1,13 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
4
+ import { rlog } from '@riil-frontend/component-topology-utils';
5
5
  import { DEFAULT_NODE_TAG_COMMON_CONFIG, DEFAULT_TIP_COMMON_CONFIG } from "../../constants/ResourceInfoDisplay";
6
6
  import { isMonitoring } from "../utils/manageStatusUtil";
7
7
  import AttributeFormatter from "./attributeFormatter";
8
8
  import DictCache from "./cache/DictCache";
9
9
  import { getNodesNameVisible as _getNodesNameVisible, updateNodesNameVisible as _updateNodesNameVisible } from "./utils/nodeNameVisibleUtil";
10
+ import { translateCisRefAttributeName } from "../../utils/ciRefAttributeTranslateUtil";
10
11
 
11
12
  function isGraphField(item) {
12
13
  return item.type === 'graph';
@@ -331,7 +332,7 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
331
332
  }); // 翻译引用属性
332
333
 
333
334
  _context.next = 4;
334
- return this.translateRefAttribute(ciDatas);
335
+ return translateCisRefAttributeName(ciDatas);
335
336
 
336
337
  case 4:
337
338
  ciDatas = _context.sent;
@@ -461,8 +462,10 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
461
462
  var refCi = refCiMap[refAttrs.id];
462
463
 
463
464
  if (refCi) {
465
+ // 引用ci名称获取规则:如果ci是树形结构(例如区域),取 tree_name_path;非树形,取display_name
466
+ var displayName = refCi.attributes.tree_name_path || refCi.attributes.display_name;
464
467
  attributeMap[refAttrs.attrCode + "_object"] = {
465
- displayName: refCi.attributes.display_name
468
+ displayName: displayName
466
469
  };
467
470
  }
468
471
  });
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
2
+ import { rlog } from '@riil-frontend/component-topology-utils';
3
3
  var ht = window.ht;
4
4
 
5
5
  var HistoryManager = /*#__PURE__*/function () {
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
2
+ import { rlog } from '@riil-frontend/component-topology-utils';
3
3
  import useHtElements from "../common/hooks/useHtElements";
4
4
  import ignoreList from "./selection/ignoreList";
5
5
 
@@ -2,7 +2,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import { setRequest } from '@riil-frontend/component-topology-utils';
5
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
5
+ import { rlog } from '@riil-frontend/component-topology-utils';
6
6
  import { cloneDeep } from 'lodash';
7
7
  import topoService from "../services/topo";
8
8
  import CiTypeCache from "./cache/CiTypeCache";
@@ -24,7 +24,7 @@ import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
24
24
  import SelectionModel from "./SelectionModel";
25
25
  import CiCache from "./cache/CiCache"; // eslint-disable-next-line no-undef
26
26
 
27
- var version = typeof "12.0.0-dev.1" === 'string' ? "12.0.0-dev.1" : null;
27
+ var version = typeof "12.0.0-dev.10" === 'string' ? "12.0.0-dev.10" : null;
28
28
  console.info("\u62D3\u6251\u7248\u672C: " + version);
29
29
  /**
30
30
  * 拓扑显示和编辑
@@ -13,11 +13,6 @@ export default function commonTransform(options) {
13
13
  if (ciData[attrType + "Map"][fieldCode + "_object"]) {
14
14
  fieldValue = ciData[attrType + "Map"][fieldCode + "_object"].displayName;
15
15
  }
16
- } // 分级字典特殊处理
17
-
18
-
19
- if (fieldMeta.dict) {
20
- fieldValue = fieldMeta.dict[fieldValue];
21
16
  }
22
17
 
23
18
  return {
@@ -1,4 +1,4 @@
1
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
1
+ import { rlog } from '@riil-frontend/component-topology-utils';
2
2
  export default function graphTransform(options) {
3
3
  var item = options.item,
4
4
  ciData = options.ciData,
@@ -1,4 +1,4 @@
1
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
1
+ import { rlog } from '@riil-frontend/component-topology-utils';
2
2
  import attributeTransform from "./formatter/attributeTransform";
3
3
  import metricTransform from "./formatter/metricTransform";
4
4
  import ciTypeAttrTransform from "./formatter/ciTypeAttrTransform";
@@ -3,7 +3,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
4
  import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  import topoService from '@riil-frontend/component-topology-common/es/services/topo';
6
- import rlog from '@riil-frontend/component-topology-utils/lib/rlog';
6
+ import { rlog } from '@riil-frontend/component-topology-utils';
7
7
  import keyBy from 'lodash/keyBy';
8
8
  /**
9
9
  * Ci类型属性、指标缓存
@@ -106,6 +106,10 @@ var CiTypeCache = /*#__PURE__*/function () {
106
106
  this.ciTypeMap = cache;
107
107
  };
108
108
 
109
+ _proto.getCiTypeMap = function getCiTypeMap() {
110
+ return this.ciTypeMap;
111
+ };
112
+
109
113
  _proto.getCiType = function getCiType(typeCode) {
110
114
  return this.ciTypeMap[typeCode];
111
115
  };
@@ -2,7 +2,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { dictFormat } from '@riil-frontend/utils';
4
4
  import * as modelService from '@riil-frontend/component-topology-common/es/services/model';
5
- import rlog from '@riil-frontend/component-topology-utils/lib/rlog';
5
+ import { rlog } from '@riil-frontend/component-topology-utils';
6
6
  /**
7
7
  * 数据字典缓存
8
8
  */
@@ -2,7 +2,7 @@ import _Message from "@alifd/next/es/message";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import topoService from '@riil-frontend/component-topology-common/es/services/topo';
5
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
5
+ import { rlog } from '@riil-frontend/component-topology-utils';
6
6
  export default function (topo) {
7
7
  var resourceUrlMap = {};
8
8
  var currentId = null;
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import keyBy from 'lodash/keyBy';
5
- import rlog from '@riil-frontend/component-topology-utils/lib/rlog';
5
+ import { rlog } from '@riil-frontend/component-topology-utils';
6
6
  import { getLinkMtCodes, getMtCodeCiTypeMap, getNodeMtCodes } from "./utils";
7
7
  import { getMetricsByMonitorTemplateCodes } from "../../services/topo/tagtip";
8
8
  /**
@@ -105,7 +105,6 @@ function _saveTopo() {
105
105
  return topoService.bindResourceToTopo(topoId, {
106
106
  groups: groupInfo,
107
107
  linkIps: linkIps,
108
- // exportLinkIdList,
109
108
  relateTopoIdList: relateTopoIdList
110
109
  });
111
110
 
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import topoService from '@riil-frontend/component-topology-common/es/services/topo';
5
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
5
+ import { rlog } from '@riil-frontend/component-topology-utils';
6
6
  export default {
7
7
  /**
8
8
  * 查询告警列表,包含主资源和子组件告警
@@ -16,7 +16,7 @@ function _queryCisByIds() {
16
16
  return commonQueryCiDataByIds(ids, {
17
17
  orders: [],
18
18
  pageIndex: 1,
19
- pageSize: 100000
19
+ pageSize: 10000
20
20
  });
21
21
 
22
22
  case 2:
@@ -104,7 +104,7 @@ export default {
104
104
  * @param {Array} groups
105
105
  * @returns
106
106
  */
107
- getTopoDataByResource: function getTopoDataByResource(id, resources, groups, exportLinkIdList) {
107
+ getTopoDataByResource: function getTopoDataByResource(id, resources, groups) {
108
108
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
109
109
  var data, obj;
110
110
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -123,7 +123,7 @@ export default {
123
123
  obj = prepareGroupParams(data);
124
124
  _context.next = 5;
125
125
  return request.post(API_ROOT + "/structure/byCondition/" + id, _extends({}, obj, {
126
- exportLinkIdList: exportLinkIdList
126
+ exportLinkIdList: []
127
127
  }));
128
128
 
129
129
  case 5:
@@ -7,7 +7,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
7
7
  /**
8
8
  * 图标管理 Model
9
9
  */
10
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
10
+ import { rlog } from '@riil-frontend/component-topology-utils';
11
11
  import topoService from '@riil-frontend/component-topology-common/es/services/topo';
12
12
  import { iconFactory } from '@riil-frontend/component-topology-graph';
13
13
  import { getCustomIconHtId, getCustomIconIdFromHtId, getEditorIcons, transformCustomIcon2HtIcon, transformCustomIcons2HtIcons } from "../../common/icons/icon";
@@ -6,7 +6,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  * 动态设置链路样式 Model
7
7
  */
8
8
  // import _ from 'lodash';
9
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
9
+ import { rlog } from '@riil-frontend/component-topology-utils';
10
10
  export default function (topo) {
11
11
  return {
12
12
  // 定义 model 的初始 state
@@ -5,7 +5,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  /**
6
6
  * 拓扑图 Model
7
7
  */
8
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
8
+ import { rlog } from '@riil-frontend/component-topology-utils';
9
9
  export default {
10
10
  // 定义 model 的初始 state
11
11
  state: {
@@ -5,7 +5,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  /**
6
6
  * 拓扑图 基本信息-概览
7
7
  */
8
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
8
+ import { rlog } from '@riil-frontend/component-topology-utils';
9
9
  import topoService from '@riil-frontend/component-topology-common/es/services/topo';
10
10
  export default {
11
11
  // 定义 model 的初始 state
@@ -2,7 +2,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import topoServer from '@riil-frontend/component-topology-common/es/services/topo';
5
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
5
+ import { rlog } from '@riil-frontend/component-topology-utils';
6
6
  export default function (engine) {
7
7
  return {
8
8
  state: {
@@ -35,7 +35,6 @@ var initialState = {
35
35
  "static": []
36
36
  },
37
37
  groups: [],
38
- exportLinkIdList: [],
39
38
  // config: {
40
39
  // view: null,
41
40
  // groups: [],
@@ -243,18 +242,17 @@ export default function (topoApp) {
243
242
  var _this2 = this;
244
243
 
245
244
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
246
- var editState, resources, _editState$groups, groups, _editState$ipNodes, ipNodes, query, data;
245
+ var editState, resources, _editState$groups, groups, query, data;
247
246
 
248
247
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
249
248
  while (1) switch (_context2.prev = _context2.next) {
250
249
  case 0:
251
250
  editState = rootState.topoConfig;
252
- resources = editState.resources, _editState$groups = editState.groups, groups = _editState$groups === void 0 ? [] : _editState$groups, _editState$ipNodes = editState.ipNodes, ipNodes = _editState$ipNodes === void 0 ? [] : _editState$ipNodes;
251
+ resources = editState.resources, _editState$groups = editState.groups, groups = _editState$groups === void 0 ? [] : _editState$groups;
253
252
  query = {
254
253
  id: rootState.topoMod.topoId,
255
254
  resources: resources,
256
- groups: groups,
257
- ipNodes: ipNodes
255
+ groups: groups
258
256
  };
259
257
  _context2.next = 5;
260
258
  return _this2.getTopoByConditions(query);
@@ -303,13 +301,13 @@ export default function (topoApp) {
303
301
  var _this4 = this;
304
302
 
305
303
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
306
- var topoId, resources, groups, exportLinkIdList, ipNodes, viewConditions, groupInfo, data, _yield$Promise$all, dataWithLinkDetail, _combTopoData, topoData, resAndMetrics, topoDataTrans;
304
+ var topoId, resources, groups, viewConditions, groupInfo, data, _yield$Promise$all, dataWithLinkDetail, _combTopoData, topoData, resAndMetrics, topoDataTrans;
307
305
 
308
306
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
309
307
  while (1) switch (_context4.prev = _context4.next) {
310
308
  case 0:
311
309
  rlog.debug("getTopoByConditions--------", params);
312
- topoId = params.id, resources = params.resources, groups = params.groups, exportLinkIdList = params.exportLinkIdList, ipNodes = params.ipNodes;
310
+ topoId = params.id, resources = params.resources, groups = params.groups;
313
311
  viewConditions = resToConditions(resources);
314
312
  groupInfo = isAvailableArray(groups) && groups.map(function (group) {
315
313
  return _extends({}, group, {
@@ -319,7 +317,7 @@ export default function (topoApp) {
319
317
  });
320
318
  rlog.debug("getTopoByConditions--------", viewConditions, groupInfo);
321
319
  _context4.next = 7;
322
- return topoApp.serverApi.getTopoDataByResource(topoId, viewConditions, groupInfo, exportLinkIdList, ipNodes);
320
+ return topoApp.serverApi.getTopoDataByResource(topoId, viewConditions, groupInfo);
323
321
 
324
322
  case 7:
325
323
  data = _context4.sent;
@@ -458,8 +456,7 @@ export default function (topoApp) {
458
456
  return _regeneratorRuntime.wrap(function _callee8$(_context8) {
459
457
  while (1) switch (_context8.prev = _context8.next) {
460
458
  case 0:
461
- ids = data.ids, ip = data.ip; // console.log("queryAllLinkByIp", ids, ip);
462
-
459
+ ids = data.ids, ip = data.ip;
463
460
  _context8.next = 3;
464
461
  return networkLinkServer.queryLinksByIp(ids, ip);
465
462
 
@@ -5,7 +5,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  /**
6
6
  * 拓扑图 Model
7
7
  */
8
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
8
+ import { rlog } from '@riil-frontend/component-topology-utils';
9
9
  import topoService from '@riil-frontend/component-topology-common/es/services/topo';
10
10
  export default {
11
11
  // 定义 model 的初始 state
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import moment from 'moment';
5
5
  import topoService from '@riil-frontend/component-topology-common/es/services/topo';
6
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
6
+ import { rlog } from '@riil-frontend/component-topology-utils';
7
7
  import { combTopoData, getCiTypes, parseTopoData } from "../../../utils/topoData";
8
8
  import { loopTreeByKey } from "../../../utils/tree";
9
9
  import topoPermissonUtil from "../../../utils/topoPermissionUtil";
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  /**
4
4
  * 锁定
5
5
  */
6
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
6
+ import { rlog } from '@riil-frontend/component-topology-utils';
7
7
  export default {
8
8
  // 定义 model 的初始 state
9
9
  state: {
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  /**
4
4
  * 资源概览
5
5
  */
6
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
6
+ import { rlog } from '@riil-frontend/component-topology-utils';
7
7
  export default {
8
8
  // 定义 model 的初始 state
9
9
  state: {
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  /**
4
4
  * 资源web控制台url配置 Model
5
5
  */
6
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
6
+ import { rlog } from '@riil-frontend/component-topology-utils';
7
7
  import topoService from '@riil-frontend/component-topology-common/es/services/topo';
8
8
  export default {
9
9
  // 定义 model 的初始 state
@@ -36,7 +36,8 @@ export var updateEdgeExpanded = function updateEdgeExpanded(topo) {
36
36
  htTopo.expandAllEdgeGroups();
37
37
  showLinkByConfig({
38
38
  topo: topo,
39
- showType: isEditMode ? 4 : expandAllEdges
39
+ showType: expandAllEdges,
40
+ isEditMode: isEditMode
40
41
  });
41
42
  rlog.debug("updateEdgeExpanded 展开-isEditMode", isEditMode);
42
43
  }
@@ -13,6 +13,13 @@ export function formatMetric(val, metricModel) {
13
13
  }
14
14
 
15
15
  if (metricModel) {
16
+ var _result$value;
17
+
18
+ // 分级字典特殊处理
19
+ if (metricModel.dict && !DictCache.getDictObject()[metricModel.code]) {
20
+ val = metricModel.dict[val];
21
+ }
22
+
16
23
  var result = metricValueFormat({
17
24
  value: val,
18
25
  dataType: metricModel.dataType,
@@ -21,7 +28,7 @@ export function formatMetric(val, metricModel) {
21
28
  unit: metricModel.unit,
22
29
  code: metricModel.code
23
30
  });
24
- return result.value + " " + (result.value === '-' ? '' : result.unit);
31
+ return ((_result$value = result.value) !== null && _result$value !== void 0 ? _result$value : '') + " " + (result.value === '-' ? '' : result.unit);
25
32
  } else {
26
33
  return "" + val;
27
34
  }
@@ -1,5 +1,5 @@
1
1
  import _Message from "@alifd/next/es/message";
2
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
2
+ import { rlog } from '@riil-frontend/component-topology-utils';
3
3
  var MSG_TYPES = {
4
4
  info: 'notice',
5
5
  success: 'success',
@@ -46,6 +46,7 @@ export default function ResourceDetail(props) {
46
46
 
47
47
  if (tabBodys.length === 1) {
48
48
  return /*#__PURE__*/React.createElement(ResourceOverview, _extends({}, props, activeData, {
49
+ resourceDetailProps: viewerProps === null || viewerProps === void 0 ? void 0 : viewerProps.resourceDetailProps,
49
50
  userId: userId,
50
51
  style: {
51
52
  overflowY: 'auto',