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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/build/1.js +1 -1
  2. package/build/index.css +1 -1
  3. package/build/index.js +14 -14
  4. package/es/components/TemplateButton/index.module.scss +1 -1
  5. package/es/core/components/AlarmListPanel/components/AlarmListItem.js +58 -3
  6. package/es/core/components/TopoView/topoView.js +5 -1
  7. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +5 -12
  8. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -10
  9. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
  10. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +9 -0
  11. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +2 -2
  12. package/es/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
  13. package/es/core/editor/hooks/useKeyboardShortcut.js +3 -1
  14. package/es/core/editor/utils/copyElementUtil.js +12 -0
  15. package/es/core/editor/utils/edgeTypeStyleUtil.js +8 -30
  16. package/es/core/hooks/useAlarm.js +131 -81
  17. package/es/core/hooks/useCmpLinkAlarm.js +153 -0
  18. package/es/core/hooks/useEventData.js +1 -2
  19. package/es/core/hooks/useGraphAlarmDisplay.js +91 -56
  20. package/es/core/hooks/useResourceConfig.js +1 -3
  21. package/es/core/hooks/useTopoEdit.js +31 -43
  22. package/es/core/models/Alarm.js +69 -142
  23. package/es/core/models/AttributeMetricDisplay.js +9 -3
  24. package/es/core/models/TopoApp.js +1 -1
  25. package/es/core/models/cache/CiCache.d.ts +1 -1
  26. package/es/core/models/cache/CiCache.js +3 -3
  27. package/es/core/models/topoData.js +0 -1
  28. package/es/core/models/utils/linkUtils.js +20 -13
  29. package/es/core/services/topo/basic.js +2 -2
  30. package/es/core/store/models/topoConfig.js +7 -10
  31. package/es/core/store/models/topoMod.js +81 -134
  32. package/es/core/utils/edgeUtil.js +8 -0
  33. package/es/core/utils/metricUtil.js +8 -4
  34. package/es/core/utils/showGraphManageStatusUtil.js +3 -2
  35. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +2 -2
  36. package/es/core/viewer/components/plugins/ViewerPlugin.js +3 -1
  37. package/es/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
  38. package/es/networkTopo/components/TopoView.js +6 -11
  39. package/es/networkTopo/hooks/useEdgeExpand.js +2 -3
  40. package/es/networkTopo/services/topo/basic.js +3 -3
  41. package/es/networkTopo/store/topoCenter.js +260 -223
  42. package/es/style.js +1 -1
  43. package/es/utils/ResourceConfigUtil.js +3 -36
  44. package/es/utils/ciRefAttributeTranslateUtil.d.ts +9 -2
  45. package/es/utils/ciRefAttributeTranslateUtil.js +8 -9
  46. package/es/utils/topoData.js +1 -1
  47. package/lib/components/TemplateButton/index.module.scss +1 -1
  48. package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +60 -3
  49. package/lib/core/components/TopoView/topoView.js +5 -1
  50. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +6 -12
  51. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -9
  52. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
  53. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +8 -0
  54. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +1 -1
  55. package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
  56. package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -0
  57. package/lib/core/editor/utils/copyElementUtil.js +15 -0
  58. package/lib/core/editor/utils/edgeTypeStyleUtil.js +8 -31
  59. package/lib/core/hooks/useAlarm.js +130 -79
  60. package/lib/core/hooks/useCmpLinkAlarm.js +166 -0
  61. package/lib/core/hooks/useEventData.js +1 -2
  62. package/lib/core/hooks/useGraphAlarmDisplay.js +91 -55
  63. package/lib/core/hooks/useResourceConfig.js +1 -3
  64. package/lib/core/hooks/useTopoEdit.js +30 -42
  65. package/lib/core/models/Alarm.js +69 -144
  66. package/lib/core/models/AttributeMetricDisplay.js +10 -2
  67. package/lib/core/models/TopoApp.js +1 -1
  68. package/lib/core/models/cache/CiCache.d.ts +1 -1
  69. package/lib/core/models/cache/CiCache.js +3 -3
  70. package/lib/core/models/topoData.js +0 -1
  71. package/lib/core/models/utils/linkUtils.js +21 -13
  72. package/lib/core/services/topo/basic.js +2 -2
  73. package/lib/core/store/models/topoConfig.js +7 -10
  74. package/lib/core/store/models/topoMod.js +81 -134
  75. package/lib/core/utils/edgeUtil.js +10 -0
  76. package/lib/core/utils/metricUtil.js +8 -4
  77. package/lib/core/utils/showGraphManageStatusUtil.js +3 -2
  78. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +2 -2
  79. package/lib/core/viewer/components/plugins/ViewerPlugin.js +3 -1
  80. package/lib/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
  81. package/lib/networkTopo/components/TopoView.js +5 -14
  82. package/lib/networkTopo/hooks/useEdgeExpand.js +2 -3
  83. package/lib/networkTopo/services/topo/basic.js +3 -3
  84. package/lib/networkTopo/store/topoCenter.js +262 -225
  85. package/lib/style.js +1 -1
  86. package/lib/utils/ResourceConfigUtil.js +3 -38
  87. package/lib/utils/ciRefAttributeTranslateUtil.d.ts +9 -2
  88. package/lib/utils/ciRefAttributeTranslateUtil.js +8 -9
  89. package/lib/utils/topoData.js +1 -1
  90. package/package.json +2 -2
@@ -30,7 +30,7 @@ function getCiRefAttributesMap(ciDatas, ciTypeMap) {
30
30
  var id = ciData.id;
31
31
  var attributeMap = ciData.attributeMap || ciData.attributes;
32
32
  ciRefAttributeMap[id] = [];
33
- var typeCode = ciData.typeCode || ciData.ciType;
33
+ var typeCode = ciData.ciType || ciData.typeCode;
34
34
  var ciTypeMeta = ciTypeMap[typeCode];
35
35
 
36
36
  if (ciTypeMeta) {
@@ -89,14 +89,13 @@ function addRefCiNameToCiDatas(ciDatas, ciRefAttributesMap, refCiMap) {
89
89
  });
90
90
  });
91
91
  }
92
+
92
93
  /**
93
94
  * 翻译ci列表引用属性名称
94
95
  * @param ciDatas
95
96
  * @returns
96
97
  */
97
-
98
-
99
- function translateCisRefAttributeName(_x) {
98
+ function translateCisRefAttributeName(_x, _x2) {
100
99
  return _translateCisRefAttributeName.apply(this, arguments);
101
100
  }
102
101
  /**
@@ -107,7 +106,7 @@ function translateCisRefAttributeName(_x) {
107
106
 
108
107
 
109
108
  function _translateCisRefAttributeName() {
110
- _translateCisRefAttributeName = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ciDatas) {
109
+ _translateCisRefAttributeName = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ciDatas, options) {
111
110
  var ciTypeMap, ciRefAttributesMap, refIds, refCiMap;
112
111
  return _regenerator["default"].wrap(function _callee$(_context) {
113
112
  while (1) switch (_context.prev = _context.next) {
@@ -131,7 +130,7 @@ function _translateCisRefAttributeName() {
131
130
 
132
131
  case 7:
133
132
  _context.next = 9;
134
- return _CiCache["default"].load(refIds);
133
+ return _CiCache["default"].load(refIds, options === null || options === void 0 ? void 0 : options.refreshCiCache);
135
134
 
136
135
  case 9:
137
136
  refCiMap = _context.sent;
@@ -146,17 +145,17 @@ function _translateCisRefAttributeName() {
146
145
  return _translateCisRefAttributeName.apply(this, arguments);
147
146
  }
148
147
 
149
- function translateCiRefAttributeName(_x2) {
148
+ function translateCiRefAttributeName(_x3, _x4) {
150
149
  return _translateCiRefAttributeName.apply(this, arguments);
151
150
  }
152
151
 
153
152
  function _translateCiRefAttributeName() {
154
- _translateCiRefAttributeName = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(ciData) {
153
+ _translateCiRefAttributeName = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(ciData, options) {
155
154
  var result;
156
155
  return _regenerator["default"].wrap(function _callee2$(_context2) {
157
156
  while (1) switch (_context2.prev = _context2.next) {
158
157
  case 0:
159
- result = translateCisRefAttributeName([]);
158
+ result = translateCisRefAttributeName([ciData], options);
160
159
  return _context2.abrupt("return", result[0]);
161
160
 
162
161
  case 2:
@@ -135,7 +135,7 @@ var tfLink = function tfLink(engine, link) {
135
135
  function getCiTypesFromCiElements(allCi) {
136
136
  var ciTypes = [];
137
137
  allCi.forEach(function (element) {
138
- var typeCode = element.typeCode || element.ciType;
138
+ var typeCode = element.ciType || element.typeCode;
139
139
 
140
140
  if (typeCode && ciTypes.indexOf(typeCode) < 0) {
141
141
  ciTypes.push(typeCode);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "12.0.0-dev.9",
3
+ "version": "12.1.0-dev.1",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -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.9/build/index.html",
126
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@12.1.0-dev.1/build/index.html",
127
127
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
128
128
  }