@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
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import { metricValueFormat } from '@riil-frontend/utils';
2
3
  import DictCache from "../models/cache/DictCache";
3
4
  /**
@@ -15,16 +16,19 @@ export function formatMetric(val, metricModel) {
15
16
  if (metricModel) {
16
17
  var _result$value;
17
18
 
18
- // 分级字典特殊处理
19
- if (metricModel.dict && !DictCache.getDictObject()[metricModel.code]) {
20
- val = metricModel.dict[val];
19
+ var dictObject = _extends({}, DictCache.getDictObject()); // 分级字典特殊处理
20
+
21
+
22
+ if (metricModel.dict) {
23
+ // val = metricModel.dict[val]
24
+ dictObject[metricModel.code] = metricModel.dict;
21
25
  }
22
26
 
23
27
  var result = metricValueFormat({
24
28
  value: val,
25
29
  dataType: metricModel.dataType,
26
30
  changeValue: metricModel.changeValue,
27
- dict: DictCache.getDictObject(),
31
+ dict: dictObject,
28
32
  unit: metricModel.unit,
29
33
  code: metricModel.code
30
34
  });
@@ -4,6 +4,7 @@ export function showManageStatus(options) {
4
4
  var topo = options.topo,
5
5
  resources = options.resources,
6
6
  graphLoaded = options.graphLoaded,
7
+ alarmSwitch = options.alarmSwitch,
7
8
  cisEventLevel = options.cisEventLevel;
8
9
 
9
10
  var hasAlarm = function hasAlarm(id) {
@@ -20,9 +21,9 @@ export function showManageStatus(options) {
20
21
  manageStatus = resource.manageStatus,
21
22
  permission = resource.permission;
22
23
  var isNotMonite = manageStatus === 0;
23
- var readable = !!(permission !== null && permission !== void 0 && permission.readable); // 没有告警且有查看权限,才显示未监控状态
24
+ var readable = !!(permission !== null && permission !== void 0 && permission.readable); // 未监控 && 有查看权限 && (告警静默 || 没有告警),才显示未监控状态
24
25
 
25
- var showUnMoniteStatus = !hasAlarm(id) && isNotMonite && readable;
26
+ var showUnMoniteStatus = isNotMonite && readable && (alarmSwitch === false || !hasAlarm(id));
26
27
  var element = topo.getDataModel().getDataByTag(id);
27
28
  if (!element) return; // ht元素设置是否显示监控状态,是否展示,用于缩小色块时显示未监控颜色
28
29
 
@@ -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',
@@ -20,32 +20,31 @@ function EventsCard(props) {
20
20
  onHandleAlarm = props.onHandleAlarm; // 告警table列配置
21
21
 
22
22
  var columns = [{
23
- title: '描述',
24
- dataIndex: 'title',
25
- key: 'title',
23
+ title: "描述",
24
+ dataIndex: "title",
25
+ key: "title",
26
26
  cell: function cell(value, index, record) {
27
27
  return /*#__PURE__*/React.createElement("div", {
28
- className: styles['alarm-title'],
28
+ className: styles["alarm-title"],
29
29
  title: value,
30
30
  onClick: closeDetailDrawer
31
31
  }, /*#__PURE__*/React.createElement(_Icon, {
32
32
  type: record.icon,
33
33
  size: "xs",
34
- className: styles['alarm-color-icon'] + " " + record.className
35
- }), /*#__PURE__*/React.createElement("a", {
36
- className: styles.link,
37
- href: formatUrl(record.link)
34
+ className: styles["alarm-color-icon"] + " " + record.className
35
+ }), /*#__PURE__*/React.createElement(Link, {
36
+ to: formatUrl(record.link)
38
37
  }, value));
39
38
  }
40
39
  }, {
41
- title: '时间',
42
- dataIndex: 'time',
43
- key: 'time',
40
+ title: "时间",
41
+ dataIndex: "time",
42
+ key: "time",
44
43
  width: 144,
45
44
  cell: function cell(value, index, record) {
46
45
  return /*#__PURE__*/React.createElement("div", {
47
- title: moment(value).format('YYYY-MM-DD HH:mm:ss')
48
- }, moment(value).format('YYYY-MM-DD HH:mm:ss'));
46
+ title: moment(value).format("YYYY-MM-DD HH:mm:ss")
47
+ }, moment(value).format("YYYY-MM-DD HH:mm:ss"));
49
48
  }
50
49
  } // 临时屏蔽告警操作列,后续版本按权限显示 2023-3-6 20:23:45
51
50
  // {
@@ -881,7 +881,9 @@ export default function ResourceOverview(props) {
881
881
  metricColChange: metricColChange,
882
882
  metricCodes: metric.map(function (item) {
883
883
  return item.code;
884
- })
884
+ }),
885
+ getOverviewConfig: resourceOverviewProps.getOverviewConfig,
886
+ saveOverviewConfig: resourceOverviewProps.saveOverviewConfig
885
887
  }) : /*#__PURE__*/React.createElement(BlockBox, {
886
888
  headerTitle: "\u5173\u952E\u6307\u6807",
887
889
  headerExtra: /*#__PURE__*/React.createElement(Configurator, {
@@ -23,8 +23,8 @@ export default function LinkTopoCard(props) {
23
23
  openFlow = _useState[0],
24
24
  setOpenFlow = _useState[1];
25
25
 
26
- var analysisUrl = "../../default/trafficControl/linkConfigure?id=" + data.attributes.name + "&num=0";
27
- var linkDetailsUrl = "/default/pagecenter/linkDetail/view/" + data.id + "?resId=" + data.id + "&domainCode=network&title=" + data.attributes.name + "&ciCode=network_link&tabByComType=uicbb-res-crucial-link-flow";
26
+ var analysisUrl = "../../default/trafficControl/linkConfigure?id=" + encodeURIComponent(data.attributes.display_name) + "&num=0";
27
+ var linkDetailsUrl = "/default/pagecenter/linkDetail/view/" + data.id + "?resId=" + data.id + "&domainCode=network&title=" + encodeURIComponent(data.attributes.display_name) + "&ciCode=network_link&tabByComType=uicbb-res-crucial-link-flow";
28
28
 
29
29
  var isOpenFlows = /*#__PURE__*/function () {
30
30
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
@@ -95,6 +95,8 @@ export default function LinkTopoCard(props) {
95
95
  defaultCol: isCrucial ? ['remote_ping_delayed', 'remote_ping_discards_rate'] : [],
96
96
  max: 5,
97
97
  columns: metricCol,
98
+ getOverviewConfig: props.getOverviewConfig,
99
+ saveOverviewConfig: props.saveOverviewConfig,
98
100
  onChange: metricColChange
99
101
  })
100
102
  }, /*#__PURE__*/React.createElement(LinkTopo, {
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useEffect, useState } from 'react';
3
3
  import { useRequest } from 'ahooks';
4
4
  import { queryLinkInterfacesLatestMetrics, queryLinkLatestMetrics, queryRetansRatioNetDelayRatio } from "../services";
5
- import rlog from '@riil-frontend/component-topology-utils/es/rlog'; // 资源节点上方色块展示资源的发送速率发送带宽利用率、接收速率发送接收利用率、总错包数
5
+ import { rlog } from '@riil-frontend/component-topology-utils'; // 资源节点上方色块展示资源的发送速率发送带宽利用率、接收速率发送接收利用率、总错包数
6
6
 
7
7
  export default function useMetricPolling(_ref) {
8
8
  var linkCi = _ref.linkCi,
@@ -1,7 +1,7 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { request } from '@riil-frontend/component-topology-utils';
4
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
4
+ import { rlog } from '@riil-frontend/component-topology-utils';
5
5
  import ciTypeCache from "../../../../../../../../../models/cache/CiTypeCache";
6
6
  import { INTERFACE_METRIC_CODES } from "../constants";
7
7
  import { formatMetric } from "../../../../../../../../../utils/metricUtil";
@@ -34,7 +34,7 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
34
34
  while (1) switch (_context.prev = _context.next) {
35
35
  case 0:
36
36
  if (!isAppTopo) {
37
- _context.next = 9;
37
+ _context.next = 10;
38
38
  break;
39
39
  }
40
40
 
@@ -49,27 +49,29 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
49
49
  alarmList = _yield$resourceOvervi2.alarms;
50
50
  alarmList = ((_alarmList = alarmList) === null || _alarmList === void 0 ? void 0 : _alarmList.map(function (item) {
51
51
  return {
52
- type: 'alarm',
53
- icon: 'gaojing-3',
52
+ alarmInfo: item,
53
+ type: "alarm",
54
+ icon: "gaojing-3",
54
55
  className: "alarm-color-icon-lv" + item.alertLevel,
55
56
  title: "[" + item.alertObject + "] " + item.alertTitle,
56
- link: "/default/pagecenter/alertDetail/view/" + item.alertId + "?alertId=" + item.alertId + "&resId=" + item.ciId + "&title=" + item.alertObject + "&ruleId=" + item.ruleId,
57
+ link: "/default/pagecenter/alertDetail/view/" + item.alertId + "?alertId=" + item.alertId + "&resId=" + item.ciId + "&title=" + encodeURI(encodeURI(item.alertObject)) + "&ruleId=" + item.ruleId,
57
58
  time: item.createTime,
58
59
  status: item.status,
59
60
  params: [{
60
61
  alertId: item.alertId,
61
- status: 'dealing',
62
+ status: "dealing",
62
63
  userId: userId,
63
64
  isBaseAlert: false
64
65
  }]
65
66
  };
66
67
  })) || [];
68
+ console.log("setAlarmRiskList", alarmList);
67
69
  setAlarmRiskList(alarmList);
68
- _context.next = 24;
70
+ _context.next = 25;
69
71
  break;
70
72
 
71
- case 9:
72
- _context.next = 11;
73
+ case 10:
74
+ _context.next = 12;
73
75
  return alarmService.getAlarmByIds([id].concat(childrenIds), {
74
76
  alertStatusList: ['toDeal', 'woDealing', 'dealing'],
75
77
  // toDeal: 待处理, dealing:处理中
@@ -79,7 +81,7 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
79
81
  sortOrder: 'asc'
80
82
  });
81
83
 
82
- case 11:
84
+ case 12:
83
85
  _yield$alarmService$g2 = _context.sent;
84
86
  _alarmList2 = _yield$alarmService$g2.datas;
85
87
  // 2022-07-16 后端不支持多列排序,暂通过前端实现,按创建时间倒序
@@ -88,28 +90,28 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
88
90
  });
89
91
  _alarmList2 = _alarmList2.map(function (item) {
90
92
  return {
91
- type: 'alarm',
92
- icon: 'gaojing-3',
93
+ type: "alarm",
94
+ icon: "gaojing-3",
93
95
  className: "alarm-color-icon-lv" + item.alertLevel,
94
96
  title: "" + item.alertObject + item.alertTitle,
95
- link: "/default/pagecenter/alertDetail/view/" + item.alertId + "?alertId=" + item.alertId + "&resId=" + item.ciId + "&title=" + item.alertObject + "&ruleId=" + item.ruleId,
97
+ link: "/default/pagecenter/alertDetail/view/" + item.alertId + "?alertId=" + item.alertId + "&resId=" + item.ciId + "&title=" + encodeURI(encodeURI(item.alertObject)) + "&ruleId=" + item.ruleId,
96
98
  time: item.createTime,
97
99
  status: item.status,
98
100
  params: [{
99
101
  alertId: item.alertId,
100
- status: 'dealing',
102
+ status: "dealing",
101
103
  userId: userId,
102
104
  isBaseAlert: false
103
105
  }]
104
106
  };
105
107
  }); // fix NEWITOM-33635【南昌大学】网络拓扑上双击设备拉开的抽屉中无法看到风险
106
108
 
107
- _context.next = 17;
109
+ _context.next = 18;
108
110
  return service.queryAllComponentsByCiId(id);
109
111
 
110
- case 17:
112
+ case 18:
111
113
  AllComponentsByCiId = _context.sent;
112
- _context.next = 20;
114
+ _context.next = 21;
113
115
  return service.getRiskByIds({
114
116
  ciIdList: [id].concat(childrenIds, AllComponentsByCiId.map(function (item) {
115
117
  return item.id;
@@ -119,7 +121,7 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
119
121
  pageSize: 10000
120
122
  });
121
123
 
122
- case 20:
124
+ case 21:
123
125
  _yield$service$getRis2 = _context.sent;
124
126
  riskList = _yield$service$getRis2.content;
125
127
  riskList = riskList.map(function (item) {
@@ -135,7 +137,7 @@ var useAlarmAndRiskData = function useAlarmAndRiskData(props) {
135
137
 
136
138
  setAlarmRiskList([].concat(_alarmList2, riskList));
137
139
 
138
- case 24:
140
+ case 25:
139
141
  case "end":
140
142
  return _context.stop();
141
143
  }
@@ -3,7 +3,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import { useRequest } from 'ahooks';
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 { useEffect, useState } from 'react';
8
8
 
9
9
  function queryWebConsoleUrlById(_x) {
@@ -8,8 +8,10 @@ export default function ViewerPlugin(props) {
8
8
  var topo = props.topo,
9
9
  viewerProps = props.viewerProps;
10
10
  var store = topo.store;
11
+ var alarmInfoDoc = viewerProps.alarmInfoDoc;
11
12
  useAlarm({
12
- topo: topo
13
+ topo: topo,
14
+ alarmInfoDoc: alarmInfoDoc
13
15
  });
14
16
  useManageStatus({
15
17
  topo: topo
@@ -5,11 +5,7 @@ import useEventData from "../../../../hooks/useEventData";
5
5
 
6
6
  function AlarmButton(props) {
7
7
  var topo = props.topo;
8
-
9
- var _topo$store$useModel = topo.store.useModel("topoAlarm"),
10
- alarmState = _topo$store$useModel[0],
11
- alarmDispatchers = _topo$store$useModel[1];
12
-
8
+ var alarmState = topo.store.useModelState("topoAlarm");
13
9
  var alarmPanelIsOpen = alarmState.alarmPanelIsOpen;
14
10
  var alarmData = useEventData({
15
11
  topo: topo
@@ -4,7 +4,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
4
  import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useState } from 'react';
6
6
  import { useBoolean } from 'ahooks';
7
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
7
+ import { rlog } from '@riil-frontend/component-topology-utils';
8
8
  import { TopoEvent } from '@riil-frontend/component-topology-graph';
9
9
  import styles from "./index.module.scss";
10
10
  import LinkSetting from "./setting";
@@ -2,7 +2,7 @@ import _Loading from "@alifd/next/es/loading";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
4
4
  var _excluded = ["topo", "viewerProps", "titleBar", "nodataPage", "notfoundPageProps", "noPermissionPageProps"];
5
- import React, { useState, useEffect, useRef, useCallback } from "react";
5
+ import React from "react";
6
6
  import NodataPage from "@riil-frontend/component-topology-common/es/components/NoDataPage/index";
7
7
  import BasicTopoView from "../../core/components/TopoView";
8
8
  import topoPermissonUtil from "../../utils/topoPermissionUtil";
@@ -11,8 +11,8 @@ import TopoNoPermission from "./TopoNoPermission";
11
11
  import styles from "../../components/index.module.scss";
12
12
  import useLinkDynamicStyle from "../hooks/useLinkDynamicStyle";
13
13
  import useRelateTopo from "../hooks/viewer/useRelateTopo";
14
- import useEdgeFlow from "../hooks/viewer/useEdgeFlow";
15
- import useEdgeExpand from "../hooks/useEdgeExpand";
14
+ import useEdgeFlow from "../hooks/viewer/useEdgeFlow"; // import useEdgeExpand from "../hooks/useEdgeExpand";
15
+
16
16
  /**
17
17
  * 拓扑组件。变化无权限、无数据显示
18
18
  */
@@ -36,10 +36,8 @@ function NetworkTopologyCore(props) {
36
36
  });
37
37
  useEdgeFlow({
38
38
  topo: topo
39
- });
40
- useEdgeExpand({
41
- topo: topo
42
- });
39
+ }); // useEdgeExpand({ topo })
40
+
43
41
  var relateTopo = useRelateTopo({
44
42
  topo: topo
45
43
  });
@@ -68,10 +66,7 @@ function NetworkTopologyCore(props) {
68
66
  });
69
67
  } else if (!topoId) {
70
68
  return null;
71
- } // if (loading) {
72
- // return null;
73
- // }
74
-
69
+ }
75
70
 
76
71
  if (!loading) {
77
72
  // 加载完成后
@@ -15,9 +15,8 @@ export default function useEdgeExpand(props) {
15
15
  data = e.data;
16
16
 
17
17
  if (data instanceof ht.Group && property === 'expanded') {
18
- updateEdgeExpanded(topo);
19
- setTimeout(function () {
20
- updateEdgeExpanded(topo);
18
+ // updateEdgeExpanded(topo)
19
+ setTimeout(function () {// updateEdgeExpanded(topo)
21
20
  }, 100);
22
21
  }
23
22
  }
@@ -1,7 +1,7 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { TopoEvent } from '@riil-frontend/component-topology-graph';
4
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
4
+ import { rlog } from '@riil-frontend/component-topology-utils';
5
5
  import { loopTreeFun } from "../../../utils/tree";
6
6
  /**
7
7
  * 关联拓扑
@@ -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 { isClusterHtElement } from "../../utils/clusterUtil";
3
3
  import { getEdgeGroupByNodeTags, getEdges, isNode } from "../../utils/htElementUtils";
4
4
  import { getLinksBetweenNodes } from "../utils/linkUtil"; // network_link.actual_bandwidth
@@ -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
  import { getEdgeGroups } from "../../utils/htElementUtils";
8
8
  import AttributeFormatter from "../../core/models/attributeFormatter"; // 参与计算的链路指标
9
9
 
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
4
  import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
5
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
6
+ import { rlog } from '@riil-frontend/component-topology-utils';
7
7
  import TopoApp from "../../core/models/TopoApp";
8
8
  import createMenuCommands from "../../contextmenu/createMenuCommands";
9
9
  import getTopoData from "../getTopoData";
@@ -3,7 +3,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import { request } from '@riil-frontend/component-topology-utils';
5
5
  import { isNull } from '@riil-frontend/utils';
6
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
6
+ import { rlog } from '@riil-frontend/component-topology-utils';
7
7
  import { DICT } from "../utils/storage";
8
8
  import { modelDictList } from "./mdc";
9
9
  /**
@@ -1,10 +1,10 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _extends from "@babel/runtime/helpers/extends";
4
- var _excluded = ["groups", "resources", "exportLinkIdList"];
4
+ var _excluded = ["groups", "resources"];
5
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  import { request } from '@riil-frontend/component-topology-utils';
7
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
7
+ import { rlog } from '@riil-frontend/component-topology-utils';
8
8
  import blackList from "./blacklist";
9
9
  import { TOPO_API_ROOT } from "./constants";
10
10
  import { getBatchCi as _getBatchCi, getBatchCiMetric as _getBatchCiMetric } from "../model";
@@ -463,11 +463,11 @@ export default _extends({
463
463
  */
464
464
  bindResourceToTopo: function bindResourceToTopo(id, config) {
465
465
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
466
- var groups, resources, exportLinkIdList, otherConfig, newGroups, obj;
466
+ var groups, resources, otherConfig, newGroups, obj;
467
467
  return _regeneratorRuntime.wrap(function _callee14$(_context14) {
468
468
  while (1) switch (_context14.prev = _context14.next) {
469
469
  case 0:
470
- groups = config.groups, resources = config.resources, exportLinkIdList = config.exportLinkIdList, otherConfig = _objectWithoutPropertiesLoose(config, _excluded);
470
+ groups = config.groups, resources = config.resources, otherConfig = _objectWithoutPropertiesLoose(config, _excluded);
471
471
  newGroups = Array.isArray(groups) ? groups : [];
472
472
 
473
473
  if (resources) {
@@ -1,6 +1,6 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
3
+ import { rlog } from '@riil-frontend/component-topology-utils';
4
4
  import { request } from '@riil-frontend/component-topology-utils';
5
5
  import { TOPO_API_ROOT } from "./constants";
6
6
  export default {
@@ -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 function (topo) {
10
10
  return {
11
11
  // 定义 model 的初始 state