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

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 (218) hide show
  1. package/build/1.js +1 -1
  2. package/build/index.css +1 -1
  3. package/build/index.js +13 -13
  4. package/es/components/BatchAttrMetric/setting.js +1 -1
  5. package/es/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +1 -1
  6. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +1 -1
  7. package/es/core/components/AlarmListPanel/components/AlarmListItem.js +58 -3
  8. package/es/core/components/AlarmListPanel/index.js +1 -1
  9. package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +1 -1
  10. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
  11. package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +1 -1
  12. package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +1 -1
  13. package/es/core/components/ResourceViewAttributeSetting/Setting.js +1 -1
  14. package/es/core/components/TopoView/topoView.js +6 -2
  15. package/es/core/editor/components/BackgroundView/index.js +1 -1
  16. package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +1 -1
  17. package/es/core/editor/components/EditorPlugin.js +1 -1
  18. package/es/core/editor/components/Sidebar/views/ComponentPanel.js +1 -1
  19. package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
  20. package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
  21. package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +1 -1
  22. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +1 -1
  23. package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +1 -1
  24. package/es/core/editor/components/Sidebar/views/LinkPanel.js +1 -1
  25. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +5 -12
  26. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -10
  27. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
  28. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +9 -0
  29. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +2 -2
  30. package/es/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
  31. package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +1 -1
  32. package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
  33. package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
  34. package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +1 -1
  35. package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +1 -1
  36. package/es/core/editor/hooks/useKeyboardShortcut.js +3 -1
  37. package/es/core/editor/store/background.js +1 -1
  38. package/es/core/editor/store/historyManager.js +1 -1
  39. package/es/core/editor/store/topoEdit.js +1 -1
  40. package/es/core/editor/utils/copyElementUtil.js +12 -0
  41. package/es/core/editor/utils/edgeTypeStyleUtil.js +8 -7
  42. package/es/core/hooks/__tests__/useCiAttributeChange.test.js +0 -0
  43. package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -1
  44. package/es/core/hooks/useCiAttributeChange.js +31 -15
  45. package/es/core/hooks/useGraphAlarmDisplay.js +62 -40
  46. package/es/core/hooks/useManageStatus.js +1 -1
  47. package/es/core/hooks/usePolling.js +1 -1
  48. package/es/core/hooks/useResourceConfig.js +1 -3
  49. package/es/core/hooks/useTopoEdit.js +51 -54
  50. package/es/core/models/Alarm.js +29 -17
  51. package/es/core/models/AttributeMetricDisplay.js +15 -6
  52. package/es/core/models/HistoryManager.js +1 -1
  53. package/es/core/models/SelectionModel.js +1 -1
  54. package/es/core/models/TopoApp.js +2 -2
  55. package/es/core/models/attributeFormatter/formatter/graphTransform.js +1 -1
  56. package/es/core/models/attributeFormatter/index.js +1 -1
  57. package/es/core/models/cache/CiCache.d.ts +1 -1
  58. package/es/core/models/cache/CiCache.js +3 -3
  59. package/es/core/models/cache/CiTypeCache.js +5 -1
  60. package/es/core/models/cache/DictCache.js +1 -1
  61. package/es/core/models/plugins/resourceWebControllUrl.js +1 -1
  62. package/es/core/models/tagstips/ElementTagTipConfig.js +1 -1
  63. package/es/core/models/topoData.js +0 -1
  64. package/es/core/services/alarm.js +1 -1
  65. package/es/core/services/index.js +1 -1
  66. package/es/core/services/topo/basic.js +2 -2
  67. package/es/core/store/models/customIcon.js +1 -1
  68. package/es/core/store/models/displayConfig.js +1 -1
  69. package/es/core/store/models/selection.js +1 -1
  70. package/es/core/store/models/topoBaseInfoOverview.js +1 -1
  71. package/es/core/store/models/topoBizMod.js +1 -1
  72. package/es/core/store/models/topoConfig.js +7 -10
  73. package/es/core/store/models/topoGraphView.js +1 -1
  74. package/es/core/store/models/topoMod.js +82 -135
  75. package/es/core/store/models/viewer/lock.js +1 -1
  76. package/es/core/store/models/viewer/resourceDetail.js +1 -1
  77. package/es/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
  78. package/es/core/utils/edgeUtil.js +10 -1
  79. package/es/core/utils/metricUtil.js +1 -1
  80. package/es/core/utils/showGraphManageStatusUtil.js +3 -2
  81. package/es/core/utils/showMessage.js +1 -1
  82. package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
  83. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
  84. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
  85. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
  86. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +1 -1
  87. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +1 -1
  88. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
  89. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +1 -1
  90. package/es/core/viewer/components/plugins/ViewerPlugin.js +3 -1
  91. package/es/networkTopo/components/Link/index.js +1 -1
  92. package/es/networkTopo/components/TopoView.js +6 -11
  93. package/es/networkTopo/hooks/useEdgeExpand.js +2 -3
  94. package/es/networkTopo/hooks/viewer/useRelateTopo.js +1 -1
  95. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +1 -1
  96. package/es/networkTopo/models/LinkTagsTipsBuilder.js +1 -1
  97. package/es/networkTopo/models/TopoCenter.js +1 -1
  98. package/es/networkTopo/services/model.js +1 -1
  99. package/es/networkTopo/services/topo/basic.js +4 -4
  100. package/es/networkTopo/services/topo/ciInfo.js +1 -1
  101. package/es/networkTopo/store/functionAuth.js +1 -1
  102. package/es/networkTopo/store/topoCenter.js +1 -1
  103. package/es/networkTopo/store/topoTreeMod.js +1 -1
  104. package/es/networkTopo/utils/exportData.js +1 -1
  105. package/es/style.js +1 -1
  106. package/es/utils/ResourceConfigUtil.js +4 -37
  107. package/es/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
  108. package/es/utils/ciRefAttributeTranslateUtil.js +155 -0
  109. package/es/utils/format.js +1 -1
  110. package/es/utils/topoData.js +4 -2
  111. package/lib/components/BatchAttrMetric/setting.js +2 -2
  112. package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +2 -2
  113. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +2 -2
  114. package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +60 -3
  115. package/lib/core/components/AlarmListPanel/index.js +1 -1
  116. package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -2
  117. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
  118. package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -3
  119. package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +2 -2
  120. package/lib/core/components/ResourceViewAttributeSetting/Setting.js +2 -2
  121. package/lib/core/components/TopoView/topoView.js +14 -10
  122. package/lib/core/editor/components/BackgroundView/index.js +3 -3
  123. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +2 -2
  124. package/lib/core/editor/components/EditorPlugin.js +3 -3
  125. package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +2 -4
  126. package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
  127. package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
  128. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -2
  129. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +2 -2
  130. package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +2 -4
  131. package/lib/core/editor/components/Sidebar/views/LinkPanel.js +2 -4
  132. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +6 -12
  133. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -9
  134. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
  135. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +8 -0
  136. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +1 -1
  137. package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
  138. package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +5 -5
  139. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
  140. package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
  141. package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +3 -3
  142. package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +2 -2
  143. package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -0
  144. package/lib/core/editor/store/background.js +1 -1
  145. package/lib/core/editor/store/historyManager.js +1 -1
  146. package/lib/core/editor/store/topoEdit.js +1 -1
  147. package/lib/core/editor/utils/copyElementUtil.js +15 -0
  148. package/lib/core/editor/utils/edgeTypeStyleUtil.js +8 -6
  149. package/lib/core/hooks/__tests__/useCiAttributeChange.test.js +1 -0
  150. package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -3
  151. package/lib/core/hooks/useCiAttributeChange.js +30 -14
  152. package/lib/core/hooks/useGraphAlarmDisplay.js +62 -40
  153. package/lib/core/hooks/useManageStatus.js +1 -1
  154. package/lib/core/hooks/usePolling.js +3 -3
  155. package/lib/core/hooks/useResourceConfig.js +1 -3
  156. package/lib/core/hooks/useTopoEdit.js +50 -53
  157. package/lib/core/models/Alarm.js +38 -26
  158. package/lib/core/models/AttributeMetricDisplay.js +18 -6
  159. package/lib/core/models/HistoryManager.js +8 -8
  160. package/lib/core/models/SelectionModel.js +5 -5
  161. package/lib/core/models/TopoApp.js +4 -6
  162. package/lib/core/models/attributeFormatter/formatter/graphTransform.js +2 -4
  163. package/lib/core/models/attributeFormatter/index.js +1 -1
  164. package/lib/core/models/cache/CiCache.d.ts +1 -1
  165. package/lib/core/models/cache/CiCache.js +3 -3
  166. package/lib/core/models/cache/CiTypeCache.js +6 -2
  167. package/lib/core/models/cache/DictCache.js +2 -2
  168. package/lib/core/models/plugins/resourceWebControllUrl.js +2 -2
  169. package/lib/core/models/tagstips/ElementTagTipConfig.js +2 -2
  170. package/lib/core/models/topoData.js +0 -1
  171. package/lib/core/services/alarm.js +2 -2
  172. package/lib/core/services/index.js +1 -1
  173. package/lib/core/services/topo/basic.js +2 -2
  174. package/lib/core/store/models/customIcon.js +3 -3
  175. package/lib/core/store/models/displayConfig.js +1 -1
  176. package/lib/core/store/models/selection.js +1 -1
  177. package/lib/core/store/models/topoBaseInfoOverview.js +1 -1
  178. package/lib/core/store/models/topoBizMod.js +1 -1
  179. package/lib/core/store/models/topoConfig.js +7 -10
  180. package/lib/core/store/models/topoGraphView.js +1 -1
  181. package/lib/core/store/models/topoMod.js +89 -142
  182. package/lib/core/store/models/viewer/lock.js +1 -1
  183. package/lib/core/store/models/viewer/resourceDetail.js +1 -1
  184. package/lib/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
  185. package/lib/core/utils/edgeUtil.js +12 -1
  186. package/lib/core/utils/metricUtil.js +1 -1
  187. package/lib/core/utils/showGraphManageStatusUtil.js +3 -2
  188. package/lib/core/utils/showMessage.js +2 -2
  189. package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
  190. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
  191. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
  192. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
  193. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +6 -6
  194. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +3 -5
  195. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
  196. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +2 -2
  197. package/lib/core/viewer/components/plugins/ViewerPlugin.js +3 -1
  198. package/lib/networkTopo/components/Link/index.js +2 -2
  199. package/lib/networkTopo/components/TopoView.js +5 -14
  200. package/lib/networkTopo/hooks/useEdgeExpand.js +2 -3
  201. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +4 -4
  202. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +3 -5
  203. package/lib/networkTopo/models/LinkTagsTipsBuilder.js +3 -3
  204. package/lib/networkTopo/models/TopoCenter.js +1 -1
  205. package/lib/networkTopo/services/model.js +1 -3
  206. package/lib/networkTopo/services/topo/basic.js +4 -6
  207. package/lib/networkTopo/services/topo/ciInfo.js +0 -2
  208. package/lib/networkTopo/store/functionAuth.js +1 -1
  209. package/lib/networkTopo/store/topoCenter.js +1 -1
  210. package/lib/networkTopo/store/topoTreeMod.js +5 -5
  211. package/lib/networkTopo/utils/exportData.js +1 -3
  212. package/lib/style.js +1 -1
  213. package/lib/utils/ResourceConfigUtil.js +4 -39
  214. package/lib/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
  215. package/lib/utils/ciRefAttributeTranslateUtil.js +168 -0
  216. package/lib/utils/format.js +1 -1
  217. package/lib/utils/topoData.js +4 -2
  218. package/package.json +4 -4
@@ -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 () {
@@ -533,25 +533,34 @@ var Alarm = /*#__PURE__*/function () {
533
533
  resAndMetrics = this.topo.store.getState().topoMod.resAndMetrics;
534
534
  resIdsList = resAndMetrics.resIdsList, nodeIdsList = resAndMetrics.nodeIdsList, linkIdsList = resAndMetrics.linkIdsList;
535
535
  alarmDispatchers = this.topo.store.getModelDispatchers('topoAlarm'); // 添加事件
536
- // console.log("handleAlarmEvent-接收到推送的原始告警信息", alertData);
536
+
537
+ console.log("handleAlarmEvent-接收到推送的原始告警信息", alertData);
537
538
 
538
539
  if (!(isAvailableArray(alertData) && isAvailableArray(resIdsList))) {
539
- _context9.next = 24;
540
+ _context9.next = 27;
540
541
  break;
541
542
  }
542
543
 
543
544
  sendAl = [];
544
545
  idsList = [].concat(nodeIdsList, linkIdsList);
545
546
  operations = [];
547
+ console.log('idsList---------', idsList);
546
548
  idsList.forEach(function (idItem) {
547
549
  if (idItem.operation === null) {
548
550
  operations.push(idItem.ciId);
549
551
  }
550
552
  });
551
553
  alertData.forEach(function (item, index) {
552
- var _item$resourceId;
554
+ var _item$resourceId, _item$alertCode;
553
555
 
554
556
  var ciId = (_item$resourceId = item.resourceId) !== null && _item$resourceId !== void 0 ? _item$resourceId : item.ciId;
557
+ var isSub = false;
558
+
559
+ if ((_item$alertCode = item.alertCode) !== null && _item$alertCode !== void 0 && _item$alertCode.startsWith("cmp")) {
560
+ ciId = "sub:" + item.mainCiId;
561
+ isSub = true;
562
+ }
563
+
555
564
  var obj = {
556
565
  id: ciId,
557
566
  level: item.alertLevel,
@@ -560,27 +569,30 @@ var Alarm = /*#__PURE__*/function () {
560
569
  obj: item,
561
570
  info: item.alertType,
562
571
  ciCode: item === null || item === void 0 ? void 0 : item.ciCode,
563
- ruleId: item === null || item === void 0 ? void 0 : item.ruleId
572
+ ruleId: item === null || item === void 0 ? void 0 : item.ruleId,
573
+ isSub: isSub
564
574
  };
565
575
 
566
576
  if (resIdsList.indexOf(ciId) >= 0 && operations.indexOf(ciId) < 0) {
567
577
  sendAl.push(obj);
568
- }
569
- }); // console.log("before-combAlarmData", sendAl, idsList);
578
+ } // const ciId = `${isSub}+${item.resourceId ?? item.ciId}`;
579
+
580
+ });
581
+ console.log("before-combAlarmData", sendAl, idsList);
570
582
 
571
583
  if (!(sendAl.length > 0)) {
572
- _context9.next = 24;
584
+ _context9.next = 27;
573
585
  break;
574
586
  }
575
587
 
576
588
  rlog.debug('过滤掉非本拓扑的告警信息 告警开关-推送告警到ht-alarmIsOpened-sendAl', alarmIsOpened, sendAl);
577
- _context9.prev = 12;
578
- _context9.next = 15;
589
+ _context9.prev = 15;
590
+ _context9.next = 18;
579
591
  return alarmDispatchers.combAlarmData({
580
592
  alarmdata: sendAl
581
593
  });
582
594
 
583
- case 15:
595
+ case 18:
584
596
  _yield$alarmDispatche2 = _context9.sent;
585
597
  eqFlag = _yield$alarmDispatche2.eqFlag;
586
598
  alarmlist = _yield$alarmDispatche2.alarmlist;
@@ -601,19 +613,19 @@ var Alarm = /*#__PURE__*/function () {
601
613
  }
602
614
  }
603
615
 
604
- _context9.next = 24;
616
+ _context9.next = 27;
605
617
  break;
606
618
 
607
- case 21:
608
- _context9.prev = 21;
609
- _context9.t0 = _context9["catch"](12);
619
+ case 24:
620
+ _context9.prev = 24;
621
+ _context9.t0 = _context9["catch"](15);
610
622
  rlog.error('告警发送异常', _context9.t0);
611
623
 
612
- case 24:
624
+ case 27:
613
625
  case "end":
614
626
  return _context9.stop();
615
627
  }
616
- }, _callee9, this, [[12, 21]]);
628
+ }, _callee9, this, [[15, 24]]);
617
629
  }));
618
630
 
619
631
  function handleAlarmEvent(_x7) {
@@ -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
  });
@@ -522,15 +525,21 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
522
525
  return _extends({}, item, {
523
526
  tags: tags
524
527
  });
525
- }); // rlog.debug(`AttributeMetricDisplay.updateTagsTips ${new Date().toLocaleString()}`, elementTagsAndTips);
526
-
528
+ });
529
+ rlog.debug('推送标注 => ht 失败', elementTagsAndTips);
527
530
  var htTopo = topo.getHtTopo();
528
531
 
529
532
  if (htTopo) {
530
533
  var _topo$historyManager, _topo$historyManager2;
531
534
 
532
535
  (_topo$historyManager = topo.historyManager) === null || _topo$historyManager === void 0 ? void 0 : _topo$historyManager.setDisabled(true, '加载标注');
533
- htTopo.loadTagAndTip(JSON.parse(JSON.stringify(elementTagsAndTips)));
536
+
537
+ try {
538
+ htTopo.loadTagAndTip(JSON.parse(JSON.stringify(elementTagsAndTips)));
539
+ } catch (error) {
540
+ rlog.error('推送标注 => ht 失败', error);
541
+ }
542
+
534
543
  (_topo$historyManager2 = topo.historyManager) === null || _topo$historyManager2 === void 0 ? void 0 : _topo$historyManager2.setDisabled(false, '加载标注');
535
544
  }
536
545
  }
@@ -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.2" === 'string' ? "12.0.0-dev.2" : null;
27
+ var version = typeof "12.0.0-dev.21" === 'string' ? "12.0.0-dev.21" : null;
28
28
  console.info("\u62D3\u6251\u7248\u672C: " + version);
29
29
  /**
30
30
  * 拓扑显示和编辑
@@ -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";
@@ -11,7 +11,7 @@ declare class CiCache {
11
11
  * @param ids {string[]}
12
12
  * @returns {Promise<Object>}
13
13
  */
14
- load(ids: string[]): Promise<Object>;
14
+ load(ids: string[], refreshCiCache?: boolean): Promise<Object>;
15
15
  getCi(id: string): Object;
16
16
  }
17
17
  declare const _default: CiCache;
@@ -23,14 +23,14 @@ var CiCache = /*#__PURE__*/function () {
23
23
  _proto.load =
24
24
  /*#__PURE__*/
25
25
  function () {
26
- var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ids) {
26
+ var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ids, refreshCiCache) {
27
27
  var _this = this;
28
28
 
29
29
  var unloadCiIds, cis, map;
30
30
  return _regeneratorRuntime.wrap(function _callee$(_context) {
31
31
  while (1) switch (_context.prev = _context.next) {
32
32
  case 0:
33
- unloadCiIds = ids.filter(function (id) {
33
+ unloadCiIds = refreshCiCache === true ? ids : ids.filter(function (id) {
34
34
  return !_this.ciMap[id];
35
35
  });
36
36
 
@@ -62,7 +62,7 @@ var CiCache = /*#__PURE__*/function () {
62
62
  }, _callee, this);
63
63
  }));
64
64
 
65
- function load(_x) {
65
+ function load(_x, _x2) {
66
66
  return _load.apply(this, arguments);
67
67
  }
68
68
 
@@ -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