@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
@@ -7,7 +7,7 @@ import Link from "../../../../components/Link";
|
|
7
7
|
|
8
8
|
var alarmLink = function alarmLink(alarmInfo) {
|
9
9
|
// console.log('alarmLink', alarmInfo);
|
10
|
-
return "/default/pagecenter/" + PAGE_TYPE.ALERT_DETAIL + "/view/" + alarmInfo.alertId + "?alertId=" + alarmInfo.alertId + "&resId=" + alarmInfo.ciId + "&title
|
10
|
+
return "/default/pagecenter/" + PAGE_TYPE.ALERT_DETAIL + "/view/" + alarmInfo.alertId + "?alertId=" + alarmInfo.alertId + "&resId=" + alarmInfo.ciId + "&title=&ruleId=" + alarmInfo.ruleId + "&ciCode=" + alarmInfo.ciTypeCode + "&ciType=" + alarmInfo.ciType;
|
11
11
|
};
|
12
12
|
|
13
13
|
var getNode = function getNode(topo, alarmInfo) {
|
@@ -48,7 +48,8 @@ var TopoIconSelect = function TopoIconSelect(props, ref) {
|
|
48
48
|
});
|
49
49
|
|
50
50
|
var handleChange = function handleChange(v) {
|
51
|
-
|
51
|
+
console.log('handleChange: ', v);
|
52
|
+
|
52
53
|
if (typeof onChange === 'function') {
|
53
54
|
onChange(v.id);
|
54
55
|
}
|
@@ -47,7 +47,8 @@ var TopoIconSelect = function TopoIconSelect(props, ref) {
|
|
47
47
|
});
|
48
48
|
|
49
49
|
var handleChange = function handleChange(v) {
|
50
|
-
|
50
|
+
console.log('handleChange: ', v);
|
51
|
+
|
51
52
|
if (typeof onChange === 'function') {
|
52
53
|
onChange(v.id);
|
53
54
|
}
|
@@ -47,12 +47,12 @@ function NodeImageButton(props) {
|
|
47
47
|
}, [selection]);
|
48
48
|
|
49
49
|
var onChange = function onChange(prop) {
|
50
|
-
|
51
|
-
//const { name, value } = prop;
|
50
|
+
console.log("onChange-prop", prop, selection); //const { name, value } = prop;
|
52
51
|
// const gv = topo.view.topoClient.getGraphView();
|
53
52
|
//const element = topo.getSelectionModel().getFirstData();
|
54
|
-
var elements = selection; // console.log("onChange-elements", elements);
|
55
53
|
|
54
|
+
var elements = selection;
|
55
|
+
console.log("onChange-elements", elements);
|
56
56
|
elements.forEach(function (element) {
|
57
57
|
if (isElementSetImageEnabled(element)) {
|
58
58
|
element.setImage(prop);
|
@@ -116,9 +116,9 @@ export default function useGraphAlarmDisplay(options) {
|
|
116
116
|
}).filter(function (item) {
|
117
117
|
return !!item;
|
118
118
|
});
|
119
|
-
rlog.debug(
|
119
|
+
rlog.debug("\u5173\u8054\u62D3\u6251\u544A\u8B66\uFF1A\u63A8\u9001ht " + Object.keys(relateTopoAlarms).length, {
|
120
120
|
all: relateTopoAlarm,
|
121
|
-
|
121
|
+
graphAlarm: relateTopoAlarms
|
122
122
|
}); // 更新到ht拓扑
|
123
123
|
|
124
124
|
topo.view.loadAlarm([].concat(finalAlarms, relateTopoAlarms));
|
@@ -979,14 +979,16 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
979
979
|
while (1) {
|
980
980
|
switch (_context16.prev = _context16.next) {
|
981
981
|
case 0:
|
982
|
+
console.log("bindIPtoNode", txtValue, nodeElement);
|
983
|
+
|
982
984
|
if (txtValue) {
|
983
|
-
_context16.next =
|
985
|
+
_context16.next = 3;
|
984
986
|
break;
|
985
987
|
}
|
986
988
|
|
987
989
|
return _context16.abrupt("return");
|
988
990
|
|
989
|
-
case
|
991
|
+
case 3:
|
990
992
|
// if (txtValue === nodeElement.a('bindIp')) {
|
991
993
|
// return;
|
992
994
|
// }
|
@@ -996,28 +998,28 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
996
998
|
isUnique = isUniqueIp(dm, txtValue, nodeElement); // 获取关联链路
|
997
999
|
|
998
1000
|
if (!isUnique) {
|
999
|
-
_context16.next =
|
1001
|
+
_context16.next = 25;
|
1000
1002
|
break;
|
1001
1003
|
}
|
1002
1004
|
|
1003
1005
|
ip = buildIpNode(txtValue);
|
1004
|
-
_context16.next =
|
1006
|
+
_context16.next = 9;
|
1005
1007
|
return deleteExLink(nodeElement);
|
1006
1008
|
|
1007
|
-
case
|
1009
|
+
case 9:
|
1008
1010
|
nodeElement.a(ip);
|
1009
1011
|
nodeElement.setName(txtValue);
|
1010
1012
|
nodeElement.setTag("ip:" + txtValue); // 获取配置
|
1011
1013
|
|
1012
1014
|
configObj = topo.resourceConfig.getConfig();
|
1013
|
-
_context16.next =
|
1015
|
+
_context16.next = 15;
|
1014
1016
|
return resourceConfig.updateConfig(configObj);
|
1015
1017
|
|
1016
|
-
case
|
1017
|
-
_context16.next =
|
1018
|
+
case 15:
|
1019
|
+
_context16.next = 17;
|
1018
1020
|
return editDispatchers.fetchDataByConfig();
|
1019
1021
|
|
1020
|
-
case
|
1022
|
+
case 17:
|
1021
1023
|
configData = _context16.sent;
|
1022
1024
|
// console.log("configData",configObj, configData);
|
1023
1025
|
_elements = configData.elements;
|
@@ -1036,7 +1038,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1036
1038
|
nodes: [],
|
1037
1039
|
links: newLink,
|
1038
1040
|
linkGroups: newLinkGroup
|
1039
|
-
};
|
1041
|
+
};
|
1042
|
+
console.log("createElementsData", createElementsData);
|
1040
1043
|
|
1041
1044
|
if ([].concat(newLink, newLinkGroup).length > 0) {
|
1042
1045
|
_htTopo = topo.getHtTopo();
|
@@ -1044,7 +1047,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1044
1047
|
_htTopo.createElements(createElementsData);
|
1045
1048
|
}
|
1046
1049
|
|
1047
|
-
case
|
1050
|
+
case 25:
|
1048
1051
|
case "end":
|
1049
1052
|
return _context16.stop();
|
1050
1053
|
}
|
package/es/core/models/Alarm.js
CHANGED
@@ -165,8 +165,8 @@ var Alarm = /*#__PURE__*/function () {
|
|
165
165
|
return a.obj.createTime - b.obj.createTime;
|
166
166
|
}).sort(function (a, b) {
|
167
167
|
return a.level > b.level ? 1 : -1;
|
168
|
-
});
|
169
|
-
|
168
|
+
});
|
169
|
+
console.log("getAlarms-sb", alarms);
|
170
170
|
return alarms;
|
171
171
|
};
|
172
172
|
|
@@ -543,7 +543,7 @@ var Alarm = /*#__PURE__*/function () {
|
|
543
543
|
// console.log("handleAlarmEvent-接收到推送的原始告警信息", alertData);
|
544
544
|
|
545
545
|
if (!(isAvailableArray(alertData) && isAvailableArray(resIdsList))) {
|
546
|
-
_context9.next =
|
546
|
+
_context9.next = 27;
|
547
547
|
break;
|
548
548
|
}
|
549
549
|
|
@@ -575,27 +575,28 @@ var Alarm = /*#__PURE__*/function () {
|
|
575
575
|
}
|
576
576
|
|
577
577
|
return obj;
|
578
|
-
});
|
578
|
+
});
|
579
|
+
console.log("before-combAlarmData", sendAl, idsList);
|
579
580
|
|
580
581
|
if (!(sendAl.length > 0)) {
|
581
|
-
_context9.next =
|
582
|
+
_context9.next = 27;
|
582
583
|
break;
|
583
584
|
}
|
584
585
|
|
585
586
|
rlog.debug("过滤掉非本拓扑的告警信息 告警开关-推送告警到ht-alarmIsOpened-sendAl", alarmIsOpened, sendAl);
|
586
|
-
_context9.prev =
|
587
|
-
_context9.next =
|
587
|
+
_context9.prev = 13;
|
588
|
+
_context9.next = 16;
|
588
589
|
return alarmDispatchers.combAlarmData({
|
589
590
|
alarmdata: sendAl
|
590
591
|
});
|
591
592
|
|
592
|
-
case
|
593
|
+
case 16:
|
593
594
|
_yield$alarmDispatche = _context9.sent;
|
594
595
|
eqFlag = _yield$alarmDispatche.eqFlag;
|
595
596
|
alarmlist = _yield$alarmDispatche.alarmlist;
|
597
|
+
console.log("handleAlarmEvent", alarmIsOpened, eqFlag);
|
598
|
+
console.log("handleAlarmEvent-topo.viewProps", this.topo.viewProps);
|
596
599
|
|
597
|
-
// console.log("handleAlarmEvent", alarmIsOpened,eqFlag);
|
598
|
-
// console.log("handleAlarmEvent-topo.viewProps", this.topo.viewProps);
|
599
600
|
if (alarmIsOpened) {
|
600
601
|
this.hmGetTopoAlarmByDoc(); // 通知所有告警
|
601
602
|
|
@@ -610,20 +611,20 @@ var Alarm = /*#__PURE__*/function () {
|
|
610
611
|
}
|
611
612
|
}
|
612
613
|
|
613
|
-
_context9.next =
|
614
|
+
_context9.next = 27;
|
614
615
|
break;
|
615
616
|
|
616
|
-
case
|
617
|
-
_context9.prev =
|
618
|
-
_context9.t0 = _context9["catch"](
|
617
|
+
case 24:
|
618
|
+
_context9.prev = 24;
|
619
|
+
_context9.t0 = _context9["catch"](13);
|
619
620
|
rlog.error("告警发送异常", _context9.t0);
|
620
621
|
|
621
|
-
case
|
622
|
+
case 27:
|
622
623
|
case "end":
|
623
624
|
return _context9.stop();
|
624
625
|
}
|
625
626
|
}
|
626
|
-
}, _callee9, this, [[
|
627
|
+
}, _callee9, this, [[13, 24]]);
|
627
628
|
}));
|
628
629
|
|
629
630
|
function handleAlarmEvent(_x7) {
|
@@ -24,7 +24,7 @@ import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
|
|
24
24
|
import SelectionModel from "./SelectionModel";
|
25
25
|
import CiCache from "./cache/CiCache"; // eslint-disable-next-line no-undef
|
26
26
|
|
27
|
-
var version = typeof "10.0.
|
27
|
+
var version = typeof "10.0.41" === 'string' ? "10.0.41" : null;
|
28
28
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
29
29
|
/**
|
30
30
|
* 拓扑显示和编辑
|
@@ -252,8 +252,8 @@ export default function (topoApp) {
|
|
252
252
|
switch (_context2.prev = _context2.next) {
|
253
253
|
case 0:
|
254
254
|
editState = rootState.topoConfig;
|
255
|
-
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;
|
256
|
-
|
255
|
+
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;
|
256
|
+
console.log("editState", editState);
|
257
257
|
query = {
|
258
258
|
id: rootState.topoMod.topoId,
|
259
259
|
resources: resources,
|
@@ -261,10 +261,10 @@ export default function (topoApp) {
|
|
261
261
|
exportLinkIdList: exportLinkIdList,
|
262
262
|
ipNodes: ipNodes
|
263
263
|
};
|
264
|
-
_context2.next =
|
264
|
+
_context2.next = 6;
|
265
265
|
return _this2.getTopoByConditions(query);
|
266
266
|
|
267
|
-
case
|
267
|
+
case 6:
|
268
268
|
data = _context2.sent;
|
269
269
|
rlog.debug("按配置查询拓扑数据", {
|
270
270
|
config: {
|
@@ -275,7 +275,7 @@ export default function (topoApp) {
|
|
275
275
|
});
|
276
276
|
return _context2.abrupt("return", data);
|
277
277
|
|
278
|
-
case
|
278
|
+
case 9:
|
279
279
|
case "end":
|
280
280
|
return _context2.stop();
|
281
281
|
}
|
@@ -475,16 +475,17 @@ export default function (topoApp) {
|
|
475
475
|
while (1) {
|
476
476
|
switch (_context8.prev = _context8.next) {
|
477
477
|
case 0:
|
478
|
-
ids = data.ids, ip = data.ip;
|
479
|
-
|
480
|
-
_context8.next =
|
478
|
+
ids = data.ids, ip = data.ip;
|
479
|
+
console.log("queryAllLinkByIp", ids, ip);
|
480
|
+
_context8.next = 4;
|
481
481
|
return networkLinkServer.queryLinksByIp(ids, ip);
|
482
482
|
|
483
|
-
case
|
483
|
+
case 4:
|
484
484
|
result = _context8.sent;
|
485
|
+
console.log("queryAllLinkByIp-result", result);
|
485
486
|
return _context8.abrupt("return", (_result$data = result === null || result === void 0 ? void 0 : result.data) !== null && _result$data !== void 0 ? _result$data : []);
|
486
487
|
|
487
|
-
case
|
488
|
+
case 7:
|
488
489
|
case "end":
|
489
490
|
return _context8.stop();
|
490
491
|
}
|
@@ -172,15 +172,15 @@ export default function ResourceOverview(props) {
|
|
172
172
|
|
173
173
|
case 3:
|
174
174
|
power = _context.sent;
|
175
|
+
console.log(power);
|
175
176
|
|
176
|
-
// console.log(power)
|
177
177
|
if (power.data.length) {
|
178
178
|
window.open("" + window.location.origin + roomLink);
|
179
179
|
} else {
|
180
180
|
_Message.error('无访问权限,请联系管理员');
|
181
181
|
}
|
182
182
|
|
183
|
-
case
|
183
|
+
case 6:
|
184
184
|
case "end":
|
185
185
|
return _context.stop();
|
186
186
|
}
|
@@ -77,7 +77,7 @@ function _addLinkData() {
|
|
77
77
|
|
78
78
|
case 4:
|
79
79
|
networkLinks = _context.sent;
|
80
|
-
|
80
|
+
console.log("如果是网络链路,补充详情信息", networkLinks);
|
81
81
|
otherLinks = links.filter(function (link) {
|
82
82
|
return link.ciType !== 'network_link';
|
83
83
|
});
|
@@ -86,7 +86,7 @@ function _addLinkData() {
|
|
86
86
|
linkGroups: []
|
87
87
|
}));
|
88
88
|
|
89
|
-
case
|
89
|
+
case 8:
|
90
90
|
case "end":
|
91
91
|
return _context.stop();
|
92
92
|
}
|
@@ -28,8 +28,8 @@ var IpNodeTagsTipsBuilder = /*#__PURE__*/function () {
|
|
28
28
|
});
|
29
29
|
var topo = this.topo;
|
30
30
|
var dm = this.topo.getDataModel();
|
31
|
-
var config = topo.attributeMetricDisplay.getConfig();
|
32
|
-
|
31
|
+
var config = topo.attributeMetricDisplay.getConfig();
|
32
|
+
console.log("getIpNodeTagsAndTips", config, ipNodes);
|
33
33
|
var tagDatas = config.nodeTag && !config.nodeTag.isCustom ? config.nodeTag.data : [];
|
34
34
|
var tipDatas = config.nodeTip && !config.nodeTip.isCustom ? config.nodeTip.data : [];
|
35
35
|
var tagHasIpv4 = tagDatas.filter(function (item) {
|
package/es/utils/topoData.js
CHANGED
@@ -116,31 +116,13 @@ export function parseTopoData(result) {
|
|
116
116
|
|
117
117
|
return _extends({}, result, {
|
118
118
|
groups: result.groups || [],
|
119
|
-
nodes:
|
120
|
-
links:
|
119
|
+
nodes: result.nodes || [],
|
120
|
+
links: result.links || [],
|
121
121
|
linkGroups: result.linkGroups || [],
|
122
122
|
global: _extends({}, otherGlobal, {
|
123
123
|
extraConfig: JSON.parse(((_result$global = result.global) === null || _result$global === void 0 ? void 0 : _result$global.extraConfig) || "{}")
|
124
124
|
})
|
125
|
-
});
|
126
|
-
|
127
|
-
function parsePermission(data) {
|
128
|
-
if (data.permission) {
|
129
|
-
return data;
|
130
|
-
}
|
131
|
-
|
132
|
-
return _extends({}, data, {
|
133
|
-
permission: parseBasicPermission(data === null || data === void 0 ? void 0 : data.operation)
|
134
|
-
});
|
135
|
-
}
|
136
|
-
|
137
|
-
function parseBasicPermission(operation) {
|
138
|
-
return {
|
139
|
-
readable: !!operation,
|
140
|
-
writeable: ['write', 'delete'].includes(operation),
|
141
|
-
deleteable: ['delete'].includes(operation)
|
142
|
-
};
|
143
|
-
}
|
125
|
+
});
|
144
126
|
}
|
145
127
|
export function buildTopoGraphData() {// TODO 构造拓扑图数据移到这里
|
146
128
|
}
|
@@ -23,7 +23,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
23
23
|
|
24
24
|
var alarmLink = function alarmLink(alarmInfo) {
|
25
25
|
// console.log('alarmLink', alarmInfo);
|
26
|
-
return "/default/pagecenter/" + _uicbb.PAGE_TYPE.ALERT_DETAIL + "/view/" + alarmInfo.alertId + "?alertId=" + alarmInfo.alertId + "&resId=" + alarmInfo.ciId + "&title
|
26
|
+
return "/default/pagecenter/" + _uicbb.PAGE_TYPE.ALERT_DETAIL + "/view/" + alarmInfo.alertId + "?alertId=" + alarmInfo.alertId + "&resId=" + alarmInfo.ciId + "&title=&ruleId=" + alarmInfo.ruleId + "&ciCode=" + alarmInfo.ciTypeCode + "&ciType=" + alarmInfo.ciType;
|
27
27
|
};
|
28
28
|
|
29
29
|
var getNode = function getNode(topo, alarmInfo) {
|
@@ -62,7 +62,8 @@ var TopoIconSelect = function TopoIconSelect(props, ref) {
|
|
62
62
|
});
|
63
63
|
|
64
64
|
var handleChange = function handleChange(v) {
|
65
|
-
|
65
|
+
console.log('handleChange: ', v);
|
66
|
+
|
66
67
|
if (typeof onChange === 'function') {
|
67
68
|
onChange(v.id);
|
68
69
|
}
|
@@ -60,7 +60,8 @@ var TopoIconSelect = function TopoIconSelect(props, ref) {
|
|
60
60
|
});
|
61
61
|
|
62
62
|
var handleChange = function handleChange(v) {
|
63
|
-
|
63
|
+
console.log('handleChange: ', v);
|
64
|
+
|
64
65
|
if (typeof onChange === 'function') {
|
65
66
|
onChange(v.id);
|
66
67
|
}
|
@@ -64,12 +64,12 @@ function NodeImageButton(props) {
|
|
64
64
|
}, [selection]);
|
65
65
|
|
66
66
|
var onChange = function onChange(prop) {
|
67
|
-
|
68
|
-
//const { name, value } = prop;
|
67
|
+
console.log("onChange-prop", prop, selection); //const { name, value } = prop;
|
69
68
|
// const gv = topo.view.topoClient.getGraphView();
|
70
69
|
//const element = topo.getSelectionModel().getFirstData();
|
71
|
-
var elements = selection; // console.log("onChange-elements", elements);
|
72
70
|
|
71
|
+
var elements = selection;
|
72
|
+
console.log("onChange-elements", elements);
|
73
73
|
elements.forEach(function (element) {
|
74
74
|
if (isElementSetImageEnabled(element)) {
|
75
75
|
element.setImage(prop);
|
@@ -127,9 +127,9 @@ function useGraphAlarmDisplay(options) {
|
|
127
127
|
return !!item;
|
128
128
|
});
|
129
129
|
|
130
|
-
_rlog["default"].debug(
|
130
|
+
_rlog["default"].debug("\u5173\u8054\u62D3\u6251\u544A\u8B66\uFF1A\u63A8\u9001ht " + Object.keys(relateTopoAlarms).length, {
|
131
131
|
all: relateTopoAlarm,
|
132
|
-
|
132
|
+
graphAlarm: relateTopoAlarms
|
133
133
|
}); // 更新到ht拓扑
|
134
134
|
|
135
135
|
|
@@ -1020,14 +1020,16 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1020
1020
|
while (1) {
|
1021
1021
|
switch (_context16.prev = _context16.next) {
|
1022
1022
|
case 0:
|
1023
|
+
console.log("bindIPtoNode", txtValue, nodeElement);
|
1024
|
+
|
1023
1025
|
if (txtValue) {
|
1024
|
-
_context16.next =
|
1026
|
+
_context16.next = 3;
|
1025
1027
|
break;
|
1026
1028
|
}
|
1027
1029
|
|
1028
1030
|
return _context16.abrupt("return");
|
1029
1031
|
|
1030
|
-
case
|
1032
|
+
case 3:
|
1031
1033
|
// if (txtValue === nodeElement.a('bindIp')) {
|
1032
1034
|
// return;
|
1033
1035
|
// }
|
@@ -1037,28 +1039,28 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1037
1039
|
isUnique = (0, _exitLinkUtil.isUniqueIp)(dm, txtValue, nodeElement); // 获取关联链路
|
1038
1040
|
|
1039
1041
|
if (!isUnique) {
|
1040
|
-
_context16.next =
|
1042
|
+
_context16.next = 25;
|
1041
1043
|
break;
|
1042
1044
|
}
|
1043
1045
|
|
1044
1046
|
ip = (0, _exitLinkUtil.buildIpNode)(txtValue);
|
1045
|
-
_context16.next =
|
1047
|
+
_context16.next = 9;
|
1046
1048
|
return deleteExLink(nodeElement);
|
1047
1049
|
|
1048
|
-
case
|
1050
|
+
case 9:
|
1049
1051
|
nodeElement.a(ip);
|
1050
1052
|
nodeElement.setName(txtValue);
|
1051
1053
|
nodeElement.setTag("ip:" + txtValue); // 获取配置
|
1052
1054
|
|
1053
1055
|
configObj = topo.resourceConfig.getConfig();
|
1054
|
-
_context16.next =
|
1056
|
+
_context16.next = 15;
|
1055
1057
|
return resourceConfig.updateConfig(configObj);
|
1056
1058
|
|
1057
|
-
case
|
1058
|
-
_context16.next =
|
1059
|
+
case 15:
|
1060
|
+
_context16.next = 17;
|
1059
1061
|
return editDispatchers.fetchDataByConfig();
|
1060
1062
|
|
1061
|
-
case
|
1063
|
+
case 17:
|
1062
1064
|
configData = _context16.sent;
|
1063
1065
|
// console.log("configData",configObj, configData);
|
1064
1066
|
_elements = configData.elements;
|
@@ -1077,7 +1079,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1077
1079
|
nodes: [],
|
1078
1080
|
links: newLink,
|
1079
1081
|
linkGroups: newLinkGroup
|
1080
|
-
};
|
1082
|
+
};
|
1083
|
+
console.log("createElementsData", createElementsData);
|
1081
1084
|
|
1082
1085
|
if ([].concat(newLink, newLinkGroup).length > 0) {
|
1083
1086
|
_htTopo = topo.getHtTopo();
|
@@ -1085,7 +1088,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1085
1088
|
_htTopo.createElements(createElementsData);
|
1086
1089
|
}
|
1087
1090
|
|
1088
|
-
case
|
1091
|
+
case 25:
|
1089
1092
|
case "end":
|
1090
1093
|
return _context16.stop();
|
1091
1094
|
}
|
package/lib/core/models/Alarm.js
CHANGED
@@ -181,8 +181,8 @@ var Alarm = /*#__PURE__*/function () {
|
|
181
181
|
return a.obj.createTime - b.obj.createTime;
|
182
182
|
}).sort(function (a, b) {
|
183
183
|
return a.level > b.level ? 1 : -1;
|
184
|
-
});
|
185
|
-
|
184
|
+
});
|
185
|
+
console.log("getAlarms-sb", alarms);
|
186
186
|
return alarms;
|
187
187
|
};
|
188
188
|
|
@@ -565,7 +565,7 @@ var Alarm = /*#__PURE__*/function () {
|
|
565
565
|
// console.log("handleAlarmEvent-接收到推送的原始告警信息", alertData);
|
566
566
|
|
567
567
|
if (!((0, _utils.isAvailableArray)(alertData) && (0, _utils.isAvailableArray)(resIdsList))) {
|
568
|
-
_context9.next =
|
568
|
+
_context9.next = 27;
|
569
569
|
break;
|
570
570
|
}
|
571
571
|
|
@@ -597,28 +597,29 @@ var Alarm = /*#__PURE__*/function () {
|
|
597
597
|
}
|
598
598
|
|
599
599
|
return obj;
|
600
|
-
});
|
600
|
+
});
|
601
|
+
console.log("before-combAlarmData", sendAl, idsList);
|
601
602
|
|
602
603
|
if (!(sendAl.length > 0)) {
|
603
|
-
_context9.next =
|
604
|
+
_context9.next = 27;
|
604
605
|
break;
|
605
606
|
}
|
606
607
|
|
607
608
|
_rlog["default"].debug("过滤掉非本拓扑的告警信息 告警开关-推送告警到ht-alarmIsOpened-sendAl", alarmIsOpened, sendAl);
|
608
609
|
|
609
|
-
_context9.prev =
|
610
|
-
_context9.next =
|
610
|
+
_context9.prev = 13;
|
611
|
+
_context9.next = 16;
|
611
612
|
return alarmDispatchers.combAlarmData({
|
612
613
|
alarmdata: sendAl
|
613
614
|
});
|
614
615
|
|
615
|
-
case
|
616
|
+
case 16:
|
616
617
|
_yield$alarmDispatche = _context9.sent;
|
617
618
|
eqFlag = _yield$alarmDispatche.eqFlag;
|
618
619
|
alarmlist = _yield$alarmDispatche.alarmlist;
|
620
|
+
console.log("handleAlarmEvent", alarmIsOpened, eqFlag);
|
621
|
+
console.log("handleAlarmEvent-topo.viewProps", this.topo.viewProps);
|
619
622
|
|
620
|
-
// console.log("handleAlarmEvent", alarmIsOpened,eqFlag);
|
621
|
-
// console.log("handleAlarmEvent-topo.viewProps", this.topo.viewProps);
|
622
623
|
if (alarmIsOpened) {
|
623
624
|
this.hmGetTopoAlarmByDoc(); // 通知所有告警
|
624
625
|
|
@@ -633,21 +634,21 @@ var Alarm = /*#__PURE__*/function () {
|
|
633
634
|
}
|
634
635
|
}
|
635
636
|
|
636
|
-
_context9.next =
|
637
|
+
_context9.next = 27;
|
637
638
|
break;
|
638
639
|
|
639
|
-
case
|
640
|
-
_context9.prev =
|
641
|
-
_context9.t0 = _context9["catch"](
|
640
|
+
case 24:
|
641
|
+
_context9.prev = 24;
|
642
|
+
_context9.t0 = _context9["catch"](13);
|
642
643
|
|
643
644
|
_rlog["default"].error("告警发送异常", _context9.t0);
|
644
645
|
|
645
|
-
case
|
646
|
+
case 27:
|
646
647
|
case "end":
|
647
648
|
return _context9.stop();
|
648
649
|
}
|
649
650
|
}
|
650
|
-
}, _callee9, this, [[
|
651
|
+
}, _callee9, this, [[13, 24]]);
|
651
652
|
}));
|
652
653
|
|
653
654
|
function handleAlarmEvent(_x7) {
|
@@ -56,7 +56,7 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
|
|
56
56
|
var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
|
57
57
|
|
58
58
|
// eslint-disable-next-line no-undef
|
59
|
-
var version = typeof "10.0.
|
59
|
+
var version = typeof "10.0.41" === 'string' ? "10.0.41" : null;
|
60
60
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
61
61
|
/**
|
62
62
|
* 拓扑显示和编辑
|