@riil-frontend/component-topology 10.0.38 → 10.0.41
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/components/AlarmListPanel/components/AlarmListItem.js +1 -1
- package/es/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +2 -1
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.js +2 -1
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -0
- 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 +14 -11
- package/es/core/models/Alarm.js +17 -16
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/store/models/topoConfig.js +11 -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 +3 -21
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +1 -1
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +2 -1
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.js +2 -1
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -0
- 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 +14 -11
- package/lib/core/models/Alarm.js +17 -16
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/store/models/topoConfig.js +11 -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 +3 -21
- package/package.json +2 -2
@@ -273,8 +273,8 @@ function _default(topoApp) {
|
|
273
273
|
switch (_context2.prev = _context2.next) {
|
274
274
|
case 0:
|
275
275
|
editState = rootState.topoConfig;
|
276
|
-
resources = editState.resources, _editState$groups = editState.groups, groups = _editState$groups === void 0 ? [] : _editState$groups, _editState$exportLink = editState.exportLinkIdList, exportLinkIdList = _editState$exportLink === void 0 ? [] : _editState$exportLink, _editState$ipNodes = editState.ipNodes, ipNodes = _editState$ipNodes === void 0 ? [] : _editState$ipNodes;
|
277
|
-
|
276
|
+
resources = editState.resources, _editState$groups = editState.groups, groups = _editState$groups === void 0 ? [] : _editState$groups, _editState$exportLink = editState.exportLinkIdList, exportLinkIdList = _editState$exportLink === void 0 ? [] : _editState$exportLink, _editState$ipNodes = editState.ipNodes, ipNodes = _editState$ipNodes === void 0 ? [] : _editState$ipNodes;
|
277
|
+
console.log("editState", editState);
|
278
278
|
query = {
|
279
279
|
id: rootState.topoMod.topoId,
|
280
280
|
resources: resources,
|
@@ -282,10 +282,10 @@ function _default(topoApp) {
|
|
282
282
|
exportLinkIdList: exportLinkIdList,
|
283
283
|
ipNodes: ipNodes
|
284
284
|
};
|
285
|
-
_context2.next =
|
285
|
+
_context2.next = 6;
|
286
286
|
return _this2.getTopoByConditions(query);
|
287
287
|
|
288
|
-
case
|
288
|
+
case 6:
|
289
289
|
data = _context2.sent;
|
290
290
|
|
291
291
|
_rlog["default"].debug("按配置查询拓扑数据", {
|
@@ -298,7 +298,7 @@ function _default(topoApp) {
|
|
298
298
|
|
299
299
|
return _context2.abrupt("return", data);
|
300
300
|
|
301
|
-
case
|
301
|
+
case 9:
|
302
302
|
case "end":
|
303
303
|
return _context2.stop();
|
304
304
|
}
|
@@ -505,16 +505,17 @@ function _default(topoApp) {
|
|
505
505
|
while (1) {
|
506
506
|
switch (_context8.prev = _context8.next) {
|
507
507
|
case 0:
|
508
|
-
ids = data.ids, ip = data.ip;
|
509
|
-
|
510
|
-
_context8.next =
|
508
|
+
ids = data.ids, ip = data.ip;
|
509
|
+
console.log("queryAllLinkByIp", ids, ip);
|
510
|
+
_context8.next = 4;
|
511
511
|
return _networkLink["default"].queryLinksByIp(ids, ip);
|
512
512
|
|
513
|
-
case
|
513
|
+
case 4:
|
514
514
|
result = _context8.sent;
|
515
|
+
console.log("queryAllLinkByIp-result", result);
|
515
516
|
return _context8.abrupt("return", (_result$data = result === null || result === void 0 ? void 0 : result.data) !== null && _result$data !== void 0 ? _result$data : []);
|
516
517
|
|
517
|
-
case
|
518
|
+
case 7:
|
518
519
|
case "end":
|
519
520
|
return _context8.stop();
|
520
521
|
}
|
@@ -206,15 +206,15 @@ function ResourceOverview(props) {
|
|
206
206
|
|
207
207
|
case 3:
|
208
208
|
power = _context.sent;
|
209
|
+
console.log(power);
|
209
210
|
|
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 6:
|
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
|
-
|
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 8:
|
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();
|
41
|
+
console.log("getIpNodeTagsAndTips", config, ipNodes);
|
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,31 +156,13 @@ function parseTopoData(result) {
|
|
156
156
|
|
157
157
|
return (0, _extends2["default"])({}, result, {
|
158
158
|
groups: result.groups || [],
|
159
|
-
nodes:
|
160
|
-
links:
|
159
|
+
nodes: result.nodes || [],
|
160
|
+
links: result.links || [],
|
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
|
-
});
|
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
|
-
}
|
165
|
+
});
|
184
166
|
}
|
185
167
|
|
186
168
|
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.41",
|
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.41/build/index.html",
|
120
120
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
121
|
}
|