@riil-frontend/component-topology 10.0.41 → 10.0.42
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 +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +17 -17
- package/es/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +1 -2
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.js +1 -2
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +3 -3
- package/es/core/hooks/useGraphAlarmDisplay.js +2 -2
- package/es/core/hooks/useTopoEdit.js +11 -14
- package/es/core/models/Alarm.js +16 -17
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/store/models/topoConfig.js +10 -11
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +2 -10
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +2 -2
- package/es/networkTopo/getTopoData.js +2 -2
- package/es/networkTopo/models/IpNodeTagsTipsBuilder.js +2 -2
- package/es/utils/topoData.js +21 -3
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +1 -2
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.js +1 -2
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +3 -3
- package/lib/core/hooks/useGraphAlarmDisplay.js +2 -2
- package/lib/core/hooks/useTopoEdit.js +11 -14
- package/lib/core/models/Alarm.js +16 -17
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/store/models/topoConfig.js +10 -11
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +1 -10
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +2 -2
- package/lib/networkTopo/getTopoData.js +2 -2
- package/lib/networkTopo/models/IpNodeTagsTipsBuilder.js +2 -2
- package/lib/utils/topoData.js +21 -3
- package/package.json +2 -2
package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js
CHANGED
@@ -27,17 +27,8 @@ var _overview = _interopRequireDefault(require("../../../../../../services/overv
|
|
27
27
|
|
28
28
|
var _indexModule = _interopRequireDefault(require("./index.module.scss"));
|
29
29
|
|
30
|
-
// url 处理,UICBB 的地址需截取前缀
|
31
30
|
function formatUrl(url) {
|
32
|
-
|
33
|
-
|
34
|
-
var prefix = '/default/pagecenter';
|
35
|
-
|
36
|
-
if (((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.pathname.indexOf(prefix)) === 0 && (url === null || url === void 0 ? void 0 : url.indexOf(prefix)) === 0) {
|
37
|
-
return url.split(prefix)[1];
|
38
|
-
} else {
|
39
|
-
return url;
|
40
|
-
}
|
31
|
+
return url;
|
41
32
|
}
|
42
33
|
|
43
34
|
function EventsCard(props) {
|
@@ -206,15 +206,15 @@ function ResourceOverview(props) {
|
|
206
206
|
|
207
207
|
case 3:
|
208
208
|
power = _context.sent;
|
209
|
-
console.log(power);
|
210
209
|
|
210
|
+
// console.log(power)
|
211
211
|
if (power.data.length) {
|
212
212
|
window.open("" + window.location.origin + roomLink);
|
213
213
|
} else {
|
214
214
|
_message["default"].error('无访问权限,请联系管理员');
|
215
215
|
}
|
216
216
|
|
217
|
-
case
|
217
|
+
case 5:
|
218
218
|
case "end":
|
219
219
|
return _context.stop();
|
220
220
|
}
|
@@ -92,7 +92,7 @@ function _addLinkData() {
|
|
92
92
|
|
93
93
|
case 4:
|
94
94
|
networkLinks = _context.sent;
|
95
|
-
console.log("如果是网络链路,补充详情信息", networkLinks);
|
95
|
+
// console.log("如果是网络链路,补充详情信息", networkLinks);
|
96
96
|
otherLinks = links.filter(function (link) {
|
97
97
|
return link.ciType !== 'network_link';
|
98
98
|
});
|
@@ -101,7 +101,7 @@ function _addLinkData() {
|
|
101
101
|
linkGroups: []
|
102
102
|
}));
|
103
103
|
|
104
|
-
case
|
104
|
+
case 7:
|
105
105
|
case "end":
|
106
106
|
return _context.stop();
|
107
107
|
}
|
@@ -37,8 +37,8 @@ var IpNodeTagsTipsBuilder = /*#__PURE__*/function () {
|
|
37
37
|
});
|
38
38
|
var topo = this.topo;
|
39
39
|
var dm = this.topo.getDataModel();
|
40
|
-
var config = topo.attributeMetricDisplay.getConfig();
|
41
|
-
|
40
|
+
var config = topo.attributeMetricDisplay.getConfig(); // console.log("getIpNodeTagsAndTips", config, ipNodes);
|
41
|
+
|
42
42
|
var tagDatas = config.nodeTag && !config.nodeTag.isCustom ? config.nodeTag.data : [];
|
43
43
|
var tipDatas = config.nodeTip && !config.nodeTip.isCustom ? config.nodeTip.data : [];
|
44
44
|
var tagHasIpv4 = tagDatas.filter(function (item) {
|
package/lib/utils/topoData.js
CHANGED
@@ -156,13 +156,31 @@ function parseTopoData(result) {
|
|
156
156
|
|
157
157
|
return (0, _extends2["default"])({}, result, {
|
158
158
|
groups: result.groups || [],
|
159
|
-
nodes: result.nodes || [],
|
160
|
-
links: result.links || [],
|
159
|
+
nodes: (result.nodes || []).map(parsePermission),
|
160
|
+
links: (result.links || []).map(parsePermission),
|
161
161
|
linkGroups: result.linkGroups || [],
|
162
162
|
global: (0, _extends2["default"])({}, otherGlobal, {
|
163
163
|
extraConfig: JSON.parse(((_result$global = result.global) === null || _result$global === void 0 ? void 0 : _result$global.extraConfig) || "{}")
|
164
164
|
})
|
165
|
-
});
|
165
|
+
}); // 如果没有权限字段,则增加
|
166
|
+
|
167
|
+
function parsePermission(data) {
|
168
|
+
if (data.permission) {
|
169
|
+
return data;
|
170
|
+
}
|
171
|
+
|
172
|
+
return (0, _extends2["default"])({}, data, {
|
173
|
+
permission: parseBasicPermission(data === null || data === void 0 ? void 0 : data.operation)
|
174
|
+
});
|
175
|
+
}
|
176
|
+
|
177
|
+
function parseBasicPermission(operation) {
|
178
|
+
return {
|
179
|
+
readable: !!operation,
|
180
|
+
writeable: ['write', 'delete'].includes(operation),
|
181
|
+
deleteable: ['delete'].includes(operation)
|
182
|
+
};
|
183
|
+
}
|
166
184
|
}
|
167
185
|
|
168
186
|
function buildTopoGraphData() {// TODO 构造拓扑图数据移到这里
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "10.0.
|
3
|
+
"version": "10.0.42",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -116,6 +116,6 @@
|
|
116
116
|
"access": "public"
|
117
117
|
},
|
118
118
|
"license": "MIT",
|
119
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@10.0.
|
119
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@10.0.42/build/index.html",
|
120
120
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
121
|
}
|