@riil-frontend/component-topology 12.0.0-dev.3 → 12.0.0-dev.31

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 (228) 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/components/TemplateButton/index.module.scss +1 -1
  8. package/es/core/components/AlarmListPanel/components/AlarmListItem.js +58 -3
  9. package/es/core/components/AlarmListPanel/index.js +1 -1
  10. package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +1 -1
  11. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
  12. package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +1 -1
  13. package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +1 -1
  14. package/es/core/components/ResourceViewAttributeSetting/Setting.js +1 -1
  15. package/es/core/components/TopoView/topoView.js +6 -2
  16. package/es/core/editor/components/BackgroundView/index.js +1 -1
  17. package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +1 -1
  18. package/es/core/editor/components/EditorPlugin.js +1 -1
  19. package/es/core/editor/components/Sidebar/views/ComponentPanel.js +1 -1
  20. package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
  21. package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
  22. package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +1 -1
  23. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +1 -1
  24. package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +1 -1
  25. package/es/core/editor/components/Sidebar/views/LinkPanel.js +1 -1
  26. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +5 -12
  27. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -10
  28. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
  29. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +9 -0
  30. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +2 -2
  31. package/es/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
  32. package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +1 -1
  33. package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
  34. package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
  35. package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +1 -1
  36. package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +1 -1
  37. package/es/core/editor/hooks/useKeyboardShortcut.js +3 -1
  38. package/es/core/editor/store/background.js +1 -1
  39. package/es/core/editor/store/historyManager.js +1 -1
  40. package/es/core/editor/store/topoEdit.js +1 -1
  41. package/es/core/editor/utils/copyElementUtil.js +12 -0
  42. package/es/core/editor/utils/edgeTypeStyleUtil.js +8 -7
  43. package/es/core/hooks/__tests__/useCiAttributeChange.test.js +0 -0
  44. package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -1
  45. package/es/core/hooks/useAlarm.js +119 -82
  46. package/es/core/hooks/useCiAttributeChange.js +31 -15
  47. package/es/core/hooks/useCmpLinkAlarm.js +153 -0
  48. package/es/core/hooks/useEventData.js +1 -2
  49. package/es/core/hooks/useGraphAlarmDisplay.js +91 -56
  50. package/es/core/hooks/useManageStatus.js +1 -1
  51. package/es/core/hooks/usePolling.js +1 -1
  52. package/es/core/hooks/useResourceConfig.js +1 -3
  53. package/es/core/hooks/useTopoEdit.js +51 -54
  54. package/es/core/models/Alarm.js +70 -143
  55. package/es/core/models/AttributeMetricDisplay.js +15 -6
  56. package/es/core/models/HistoryManager.js +1 -1
  57. package/es/core/models/SelectionModel.js +1 -1
  58. package/es/core/models/TopoApp.js +2 -2
  59. package/es/core/models/attributeFormatter/formatter/graphTransform.js +1 -1
  60. package/es/core/models/attributeFormatter/index.js +1 -1
  61. package/es/core/models/cache/CiCache.d.ts +1 -1
  62. package/es/core/models/cache/CiCache.js +3 -3
  63. package/es/core/models/cache/CiTypeCache.js +5 -1
  64. package/es/core/models/cache/DictCache.js +1 -1
  65. package/es/core/models/plugins/resourceWebControllUrl.js +1 -1
  66. package/es/core/models/tagstips/ElementTagTipConfig.js +1 -1
  67. package/es/core/models/topoData.js +0 -1
  68. package/es/core/services/alarm.js +1 -1
  69. package/es/core/services/index.js +1 -1
  70. package/es/core/services/topo/basic.js +2 -2
  71. package/es/core/store/models/customIcon.js +1 -1
  72. package/es/core/store/models/displayConfig.js +1 -1
  73. package/es/core/store/models/selection.js +1 -1
  74. package/es/core/store/models/topoBaseInfoOverview.js +1 -1
  75. package/es/core/store/models/topoBizMod.js +1 -1
  76. package/es/core/store/models/topoConfig.js +7 -10
  77. package/es/core/store/models/topoGraphView.js +1 -1
  78. package/es/core/store/models/topoMod.js +82 -135
  79. package/es/core/store/models/viewer/lock.js +1 -1
  80. package/es/core/store/models/viewer/resourceDetail.js +1 -1
  81. package/es/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
  82. package/es/core/utils/edgeUtil.js +10 -1
  83. package/es/core/utils/metricUtil.js +8 -4
  84. package/es/core/utils/showGraphManageStatusUtil.js +3 -2
  85. package/es/core/utils/showMessage.js +1 -1
  86. package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
  87. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
  88. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
  89. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
  90. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +1 -1
  91. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +1 -1
  92. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
  93. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +1 -1
  94. package/es/core/viewer/components/plugins/ViewerPlugin.js +3 -1
  95. package/es/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
  96. package/es/networkTopo/components/Link/index.js +1 -1
  97. package/es/networkTopo/components/TopoView.js +6 -11
  98. package/es/networkTopo/hooks/useEdgeExpand.js +2 -3
  99. package/es/networkTopo/hooks/viewer/useRelateTopo.js +1 -1
  100. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +1 -1
  101. package/es/networkTopo/models/LinkTagsTipsBuilder.js +1 -1
  102. package/es/networkTopo/models/TopoCenter.js +1 -1
  103. package/es/networkTopo/services/model.js +1 -1
  104. package/es/networkTopo/services/topo/basic.js +4 -4
  105. package/es/networkTopo/services/topo/ciInfo.js +1 -1
  106. package/es/networkTopo/store/functionAuth.js +1 -1
  107. package/es/networkTopo/store/topoCenter.js +261 -224
  108. package/es/networkTopo/store/topoTreeMod.js +1 -1
  109. package/es/networkTopo/utils/exportData.js +1 -1
  110. package/es/style.js +2 -2
  111. package/es/utils/ResourceConfigUtil.js +4 -37
  112. package/es/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
  113. package/es/utils/ciRefAttributeTranslateUtil.js +155 -0
  114. package/es/utils/format.js +1 -1
  115. package/es/utils/topoData.js +4 -2
  116. package/lib/components/BatchAttrMetric/setting.js +2 -2
  117. package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +2 -2
  118. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +2 -2
  119. package/lib/components/TemplateButton/index.module.scss +1 -1
  120. package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +60 -3
  121. package/lib/core/components/AlarmListPanel/index.js +1 -1
  122. package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -2
  123. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
  124. package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -3
  125. package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +2 -2
  126. package/lib/core/components/ResourceViewAttributeSetting/Setting.js +2 -2
  127. package/lib/core/components/TopoView/topoView.js +14 -10
  128. package/lib/core/editor/components/BackgroundView/index.js +3 -3
  129. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +2 -2
  130. package/lib/core/editor/components/EditorPlugin.js +3 -3
  131. package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +2 -4
  132. package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
  133. package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
  134. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -2
  135. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +2 -2
  136. package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +2 -4
  137. package/lib/core/editor/components/Sidebar/views/LinkPanel.js +2 -4
  138. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +6 -12
  139. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -9
  140. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
  141. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +8 -0
  142. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +1 -1
  143. package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
  144. package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +5 -5
  145. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
  146. package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
  147. package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +3 -3
  148. package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +2 -2
  149. package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -0
  150. package/lib/core/editor/store/background.js +1 -1
  151. package/lib/core/editor/store/historyManager.js +1 -1
  152. package/lib/core/editor/store/topoEdit.js +1 -1
  153. package/lib/core/editor/utils/copyElementUtil.js +15 -0
  154. package/lib/core/editor/utils/edgeTypeStyleUtil.js +8 -6
  155. package/lib/core/hooks/__tests__/useCiAttributeChange.test.js +1 -0
  156. package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -3
  157. package/lib/core/hooks/useAlarm.js +118 -80
  158. package/lib/core/hooks/useCiAttributeChange.js +30 -14
  159. package/lib/core/hooks/useCmpLinkAlarm.js +166 -0
  160. package/lib/core/hooks/useEventData.js +1 -2
  161. package/lib/core/hooks/useGraphAlarmDisplay.js +91 -55
  162. package/lib/core/hooks/useManageStatus.js +1 -1
  163. package/lib/core/hooks/usePolling.js +3 -3
  164. package/lib/core/hooks/useResourceConfig.js +1 -3
  165. package/lib/core/hooks/useTopoEdit.js +50 -53
  166. package/lib/core/models/Alarm.js +77 -152
  167. package/lib/core/models/AttributeMetricDisplay.js +18 -6
  168. package/lib/core/models/HistoryManager.js +8 -8
  169. package/lib/core/models/SelectionModel.js +5 -5
  170. package/lib/core/models/TopoApp.js +4 -6
  171. package/lib/core/models/attributeFormatter/formatter/graphTransform.js +2 -4
  172. package/lib/core/models/attributeFormatter/index.js +1 -1
  173. package/lib/core/models/cache/CiCache.d.ts +1 -1
  174. package/lib/core/models/cache/CiCache.js +3 -3
  175. package/lib/core/models/cache/CiTypeCache.js +6 -2
  176. package/lib/core/models/cache/DictCache.js +2 -2
  177. package/lib/core/models/plugins/resourceWebControllUrl.js +2 -2
  178. package/lib/core/models/tagstips/ElementTagTipConfig.js +2 -2
  179. package/lib/core/models/topoData.js +0 -1
  180. package/lib/core/services/alarm.js +2 -2
  181. package/lib/core/services/index.js +1 -1
  182. package/lib/core/services/topo/basic.js +2 -2
  183. package/lib/core/store/models/customIcon.js +3 -3
  184. package/lib/core/store/models/displayConfig.js +1 -1
  185. package/lib/core/store/models/selection.js +1 -1
  186. package/lib/core/store/models/topoBaseInfoOverview.js +1 -1
  187. package/lib/core/store/models/topoBizMod.js +1 -1
  188. package/lib/core/store/models/topoConfig.js +7 -10
  189. package/lib/core/store/models/topoGraphView.js +1 -1
  190. package/lib/core/store/models/topoMod.js +89 -142
  191. package/lib/core/store/models/viewer/lock.js +1 -1
  192. package/lib/core/store/models/viewer/resourceDetail.js +1 -1
  193. package/lib/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
  194. package/lib/core/utils/edgeUtil.js +12 -1
  195. package/lib/core/utils/metricUtil.js +8 -4
  196. package/lib/core/utils/showGraphManageStatusUtil.js +3 -2
  197. package/lib/core/utils/showMessage.js +2 -2
  198. package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
  199. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
  200. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
  201. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
  202. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +6 -6
  203. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +3 -5
  204. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
  205. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +2 -2
  206. package/lib/core/viewer/components/plugins/ViewerPlugin.js +3 -1
  207. package/lib/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
  208. package/lib/networkTopo/components/Link/index.js +2 -2
  209. package/lib/networkTopo/components/TopoView.js +5 -14
  210. package/lib/networkTopo/hooks/useEdgeExpand.js +2 -3
  211. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +4 -4
  212. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +3 -5
  213. package/lib/networkTopo/models/LinkTagsTipsBuilder.js +3 -3
  214. package/lib/networkTopo/models/TopoCenter.js +1 -1
  215. package/lib/networkTopo/services/model.js +1 -3
  216. package/lib/networkTopo/services/topo/basic.js +4 -6
  217. package/lib/networkTopo/services/topo/ciInfo.js +0 -2
  218. package/lib/networkTopo/store/functionAuth.js +1 -1
  219. package/lib/networkTopo/store/topoCenter.js +263 -226
  220. package/lib/networkTopo/store/topoTreeMod.js +5 -5
  221. package/lib/networkTopo/utils/exportData.js +1 -3
  222. package/lib/style.js +2 -2
  223. package/lib/utils/ResourceConfigUtil.js +4 -39
  224. package/lib/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
  225. package/lib/utils/ciRefAttributeTranslateUtil.js +168 -0
  226. package/lib/utils/format.js +1 -1
  227. package/lib/utils/topoData.js +4 -2
  228. package/package.json +4 -4
@@ -0,0 +1,19 @@
1
+ interface Options {
2
+ /**
3
+ * 是否属性缓存重新请求数据
4
+ */
5
+ refreshCiCache: boolean;
6
+ }
7
+ /**
8
+ * 翻译ci列表引用属性名称
9
+ * @param ciDatas
10
+ * @returns
11
+ */
12
+ export declare function translateCisRefAttributeName(ciDatas: Array<any>, options?: Options): Promise<Array<any>>;
13
+ /**
14
+ * 翻译ci引用属性名称
15
+ * @param ciData
16
+ * @returns
17
+ */
18
+ export declare function translateCiRefAttributeName(ciData: any, options?: Options): Promise<any>;
19
+ export {};
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ exports.__esModule = true;
6
+ exports.translateCiRefAttributeName = translateCiRefAttributeName;
7
+ exports.translateCisRefAttributeName = translateCisRefAttributeName;
8
+
9
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
10
+
11
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
12
+
13
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
14
+
15
+ var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
16
+
17
+ var _CiTypeCache = _interopRequireDefault(require("../core/models/cache/CiTypeCache"));
18
+
19
+ var _CiCache = _interopRequireDefault(require("../core/models/cache/CiCache"));
20
+
21
+ var _topoData = require("./topoData");
22
+
23
+ /**
24
+ * 获取ci列表的引用字段列表
25
+ */
26
+ function getCiRefAttributesMap(ciDatas, ciTypeMap) {
27
+ // ci引用字段列表
28
+ var ciRefAttributeMap = {};
29
+ ciDatas.forEach(function (ciData) {
30
+ var id = ciData.id;
31
+ var attributeMap = ciData.attributeMap || ciData.attributes;
32
+ ciRefAttributeMap[id] = [];
33
+ var typeCode = ciData.ciType || ciData.typeCode;
34
+ var ciTypeMeta = ciTypeMap[typeCode];
35
+
36
+ if (ciTypeMeta) {
37
+ ciTypeMeta.attributes.filter(function (attributeMeta) {
38
+ return !!attributeMeta.refCi;
39
+ }).forEach(function (attributeMeta) {
40
+ var refId = attributeMap[attributeMeta.code];
41
+
42
+ if (refId) {
43
+ var ciRefAttributeData = {
44
+ attrCode: attributeMeta.code,
45
+ id: refId
46
+ };
47
+ ciRefAttributeMap[ciData.id].push(ciRefAttributeData);
48
+ }
49
+ });
50
+ } else {
51
+ _componentTopologyUtils.rlog.warn("\u7FFB\u8BD1\u5F15\u7528\u5B57\u6BB5\u540D\u79F0\uFF1A\u672A\u67E5\u8BE2\u5230ciType " + typeCode, ciData);
52
+ }
53
+ });
54
+ return ciRefAttributeMap;
55
+ }
56
+
57
+ function getRefIds(ciRefAttributesMap) {
58
+ var refIds = [];
59
+ Object.keys(ciRefAttributesMap).forEach(function (ciId) {
60
+ var ciRefAttributeDatas = ciRefAttributesMap[ciId];
61
+ ciRefAttributeDatas.forEach(function (ciRefAttributeData) {
62
+ var refId = ciRefAttributeData.id;
63
+
64
+ if (!refIds.includes(refId)) {
65
+ refIds.push(refId);
66
+ }
67
+ });
68
+ });
69
+ return refIds;
70
+ }
71
+
72
+ function addRefCiNameToCiDatas(ciDatas, ciRefAttributesMap, refCiMap) {
73
+ return ciDatas.map(function (ciData) {
74
+ var id = ciData.id;
75
+ var attributeMap = (0, _extends2["default"])({}, ciData.attributeMap || ciData.attributes);
76
+ ciRefAttributesMap[id].forEach(function (refAttrs) {
77
+ var refCi = refCiMap[refAttrs.id];
78
+
79
+ if (refCi) {
80
+ // 引用ci名称获取规则:如果ci是树形结构(例如区域),取 tree_name_path;非树形,取display_name
81
+ var displayName = refCi.attributes.tree_name_path || refCi.attributes.display_name;
82
+ attributeMap[refAttrs.attrCode + "_object"] = {
83
+ displayName: displayName
84
+ };
85
+ }
86
+ });
87
+ return (0, _extends2["default"])({}, ciData, {
88
+ attributeMap: attributeMap
89
+ });
90
+ });
91
+ }
92
+
93
+ /**
94
+ * 翻译ci列表引用属性名称
95
+ * @param ciDatas
96
+ * @returns
97
+ */
98
+ function translateCisRefAttributeName(_x, _x2) {
99
+ return _translateCisRefAttributeName.apply(this, arguments);
100
+ }
101
+ /**
102
+ * 翻译ci引用属性名称
103
+ * @param ciData
104
+ * @returns
105
+ */
106
+
107
+
108
+ function _translateCisRefAttributeName() {
109
+ _translateCisRefAttributeName = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ciDatas, options) {
110
+ var ciTypeMap, ciRefAttributesMap, refIds, refCiMap;
111
+ return _regenerator["default"].wrap(function _callee$(_context) {
112
+ while (1) switch (_context.prev = _context.next) {
113
+ case 0:
114
+ _context.next = 2;
115
+ return _CiTypeCache["default"].load((0, _topoData.getCiTypesFromCiElements)(ciDatas));
116
+
117
+ case 2:
118
+ ciTypeMap = _context.sent;
119
+ // 2. 查找引用字段及值
120
+ ciRefAttributesMap = getCiRefAttributesMap(ciDatas, ciTypeMap); // 3. 引用id列表
121
+
122
+ refIds = getRefIds(ciRefAttributesMap);
123
+
124
+ if (refIds.length) {
125
+ _context.next = 7;
126
+ break;
127
+ }
128
+
129
+ return _context.abrupt("return", ciDatas);
130
+
131
+ case 7:
132
+ _context.next = 9;
133
+ return _CiCache["default"].load(refIds, options === null || options === void 0 ? void 0 : options.refreshCiCache);
134
+
135
+ case 9:
136
+ refCiMap = _context.sent;
137
+ return _context.abrupt("return", addRefCiNameToCiDatas(ciDatas, ciRefAttributesMap, refCiMap));
138
+
139
+ case 11:
140
+ case "end":
141
+ return _context.stop();
142
+ }
143
+ }, _callee);
144
+ }));
145
+ return _translateCisRefAttributeName.apply(this, arguments);
146
+ }
147
+
148
+ function translateCiRefAttributeName(_x3, _x4) {
149
+ return _translateCiRefAttributeName.apply(this, arguments);
150
+ }
151
+
152
+ function _translateCiRefAttributeName() {
153
+ _translateCiRefAttributeName = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(ciData, options) {
154
+ var result;
155
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
156
+ while (1) switch (_context2.prev = _context2.next) {
157
+ case 0:
158
+ result = translateCisRefAttributeName([ciData], options);
159
+ return _context2.abrupt("return", result[0]);
160
+
161
+ case 2:
162
+ case "end":
163
+ return _context2.stop();
164
+ }
165
+ }, _callee2);
166
+ }));
167
+ return _translateCiRefAttributeName.apply(this, arguments);
168
+ }
@@ -15,7 +15,7 @@ exports.sortData = sortData;
15
15
 
16
16
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
17
17
 
18
- var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
18
+ var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
19
19
 
20
20
  var _utils = require("@riil-frontend/utils");
21
21
 
@@ -135,8 +135,10 @@ var tfLink = function tfLink(engine, link) {
135
135
  function getCiTypesFromCiElements(allCi) {
136
136
  var ciTypes = [];
137
137
  allCi.forEach(function (element) {
138
- if (element.ciType && ciTypes.indexOf(element.ciType) < 0) {
139
- ciTypes.push(element.ciType);
138
+ var typeCode = element.ciType || element.typeCode;
139
+
140
+ if (typeCode && ciTypes.indexOf(typeCode) < 0) {
141
+ ciTypes.push(typeCode);
140
142
  }
141
143
  });
142
144
  return ciTypes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "12.0.0-dev.3",
3
+ "version": "12.0.0-dev.31",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -64,7 +64,7 @@
64
64
  "@riil-frontend/component-action-tree": "^1.0.13",
65
65
  "@riil-frontend/component-common-res-list": "^1.0.26",
66
66
  "@riil-frontend/component-condition-res-list": "^1.0.18",
67
- "@riil-frontend/component-crucial-link-topo": "0.1.0",
67
+ "@riil-frontend/component-crucial-link-topo": "*",
68
68
  "@riil-frontend/component-extra-title": "^1.0.3",
69
69
  "@riil-frontend/component-more-buttons-menu": "^2.0.1",
70
70
  "@riil-frontend/component-no-data-page": "^3.0.4",
@@ -80,7 +80,7 @@
80
80
  "@riil-frontend/css": "^2.0.2",
81
81
  "@riil-frontend/hooks": "latest",
82
82
  "@riil-frontend/next-collapse": "^1.0.1-a.0",
83
- "@riil-frontend/utils": "^1.0.44",
83
+ "@riil-frontend/utils": "^1.0.45",
84
84
  "@types/jest": "^29.5.4",
85
85
  "axios": "^0.21.1",
86
86
  "build-plugin-component": "^1.12.1",
@@ -123,6 +123,6 @@
123
123
  "access": "public"
124
124
  },
125
125
  "license": "MIT",
126
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@12.0.0-dev.3/build/index.html",
126
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@12.0.0-dev.31/build/index.html",
127
127
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
128
128
  }