@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.
- package/build/1.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +14 -14
- package/es/components/TemplateButton/index.module.scss +1 -1
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +58 -3
- package/es/core/components/TopoView/topoView.js +5 -1
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +5 -12
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -10
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +9 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +2 -2
- package/es/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
- package/es/core/editor/hooks/useKeyboardShortcut.js +3 -1
- package/es/core/editor/utils/copyElementUtil.js +12 -0
- package/es/core/editor/utils/edgeTypeStyleUtil.js +8 -30
- package/es/core/hooks/useAlarm.js +131 -81
- package/es/core/hooks/useCmpLinkAlarm.js +153 -0
- package/es/core/hooks/useEventData.js +1 -2
- package/es/core/hooks/useGraphAlarmDisplay.js +91 -56
- package/es/core/hooks/useResourceConfig.js +1 -3
- package/es/core/hooks/useTopoEdit.js +31 -43
- package/es/core/models/Alarm.js +69 -142
- package/es/core/models/AttributeMetricDisplay.js +9 -3
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/models/cache/CiCache.d.ts +1 -1
- package/es/core/models/cache/CiCache.js +3 -3
- package/es/core/models/topoData.js +0 -1
- package/es/core/models/utils/linkUtils.js +20 -13
- package/es/core/services/topo/basic.js +2 -2
- package/es/core/store/models/topoConfig.js +7 -10
- package/es/core/store/models/topoMod.js +81 -134
- package/es/core/utils/edgeUtil.js +8 -0
- package/es/core/utils/metricUtil.js +8 -4
- package/es/core/utils/showGraphManageStatusUtil.js +3 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +2 -2
- package/es/core/viewer/components/plugins/ViewerPlugin.js +3 -1
- package/es/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
- package/es/networkTopo/components/TopoView.js +6 -11
- package/es/networkTopo/hooks/useEdgeExpand.js +2 -3
- package/es/networkTopo/services/topo/basic.js +3 -3
- package/es/networkTopo/store/topoCenter.js +260 -223
- package/es/style.js +1 -1
- package/es/utils/ResourceConfigUtil.js +3 -36
- package/es/utils/ciRefAttributeTranslateUtil.d.ts +9 -2
- package/es/utils/ciRefAttributeTranslateUtil.js +8 -9
- package/es/utils/topoData.js +1 -1
- package/lib/components/TemplateButton/index.module.scss +1 -1
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +60 -3
- package/lib/core/components/TopoView/topoView.js +5 -1
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +6 -12
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -9
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +8 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +1 -1
- package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
- package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -0
- package/lib/core/editor/utils/copyElementUtil.js +15 -0
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +8 -31
- package/lib/core/hooks/useAlarm.js +130 -79
- package/lib/core/hooks/useCmpLinkAlarm.js +166 -0
- package/lib/core/hooks/useEventData.js +1 -2
- package/lib/core/hooks/useGraphAlarmDisplay.js +91 -55
- package/lib/core/hooks/useResourceConfig.js +1 -3
- package/lib/core/hooks/useTopoEdit.js +30 -42
- package/lib/core/models/Alarm.js +69 -144
- package/lib/core/models/AttributeMetricDisplay.js +10 -2
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/models/cache/CiCache.d.ts +1 -1
- package/lib/core/models/cache/CiCache.js +3 -3
- package/lib/core/models/topoData.js +0 -1
- package/lib/core/models/utils/linkUtils.js +21 -13
- package/lib/core/services/topo/basic.js +2 -2
- package/lib/core/store/models/topoConfig.js +7 -10
- package/lib/core/store/models/topoMod.js +81 -134
- package/lib/core/utils/edgeUtil.js +10 -0
- package/lib/core/utils/metricUtil.js +8 -4
- package/lib/core/utils/showGraphManageStatusUtil.js +3 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +2 -2
- package/lib/core/viewer/components/plugins/ViewerPlugin.js +3 -1
- package/lib/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
- package/lib/networkTopo/components/TopoView.js +5 -14
- package/lib/networkTopo/hooks/useEdgeExpand.js +2 -3
- package/lib/networkTopo/services/topo/basic.js +3 -3
- package/lib/networkTopo/store/topoCenter.js +262 -225
- package/lib/style.js +1 -1
- package/lib/utils/ResourceConfigUtil.js +3 -38
- package/lib/utils/ciRefAttributeTranslateUtil.d.ts +9 -2
- package/lib/utils/ciRefAttributeTranslateUtil.js +8 -9
- package/lib/utils/topoData.js +1 -1
- 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.
|
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(
|
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:
|
package/lib/utils/topoData.js
CHANGED
@@ -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.
|
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.
|
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.
|
126
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@12.1.0-dev.1/build/index.html",
|
127
127
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
128
128
|
}
|