@riil-frontend/component-topology 2.15.21 → 2.15.24
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/index.css +1 -1
- package/build/index.js +14 -14
- package/es/core/common/icons/defaultIcons.js +3 -9
- package/es/core/common/icons/icon.js +1 -22
- package/es/core/components/AlarmListPanel/index.js +17 -35
- package/es/core/components/TopoView/topoView.js +2 -0
- package/es/core/components/titlebar/TitleBar.js +3 -3
- package/es/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +2 -2
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +3 -3
- package/es/core/models/Alarm.js +30 -51
- package/es/core/models/AttributeMetricDisplay.js +22 -13
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/models/utils/linkUtils.js +3 -0
- package/es/core/viewer/components/plugins/BaseInfo/components/ResourceOverview/index.js +1 -1
- package/es/core/viewer/components/plugins/BaseInfo/index.js +58 -79
- package/es/core/viewer/components/titlebar/widgets/AlarmListShowButton.js +31 -29
- package/es/index.js +3 -1
- package/es/style.js +1 -0
- package/es/topoCenter/components/TopoView.js +7 -6
- package/es/topoCenter/components/editor/propertyViews/LayerRelatedResourceList.js +2 -3
- package/es/topoCenter/hooks/editor/useDeleteEdges.js +19 -11
- package/lib/core/common/icons/defaultIcons.js +4 -13
- package/lib/core/common/icons/icon.js +1 -30
- package/lib/core/components/AlarmListPanel/index.js +19 -36
- package/lib/core/components/TopoView/topoView.js +2 -0
- package/lib/core/components/titlebar/TitleBar.js +2 -2
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +3 -3
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +4 -8
- package/lib/core/models/Alarm.js +30 -51
- package/lib/core/models/AttributeMetricDisplay.js +22 -13
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/models/utils/linkUtils.js +5 -0
- package/lib/core/viewer/components/plugins/BaseInfo/components/ResourceOverview/index.js +1 -1
- package/lib/core/viewer/components/plugins/BaseInfo/index.js +58 -79
- package/lib/core/viewer/components/titlebar/widgets/AlarmListShowButton.js +33 -28
- package/lib/index.js +17 -2
- package/lib/style.js +1 -0
- package/lib/topoCenter/components/TopoView.js +5 -4
- package/lib/topoCenter/components/editor/propertyViews/LayerRelatedResourceList.js +2 -4
- package/lib/topoCenter/hooks/editor/useDeleteEdges.js +20 -11
- package/package.json +4 -4
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
function getIconImgUrlById(id) {
|
|
5
|
-
return getIconMap()[id];
|
|
6
|
-
}
|
|
2
|
+
import { iconFactory } from '@riil-frontend/component-topology-graph';
|
|
7
3
|
/**
|
|
8
4
|
* 资源面板图片-默认节点图标
|
|
9
5
|
*
|
|
10
6
|
* @type {(*|{url: *})[]}
|
|
11
7
|
*/
|
|
12
8
|
|
|
13
|
-
|
|
14
9
|
export var DEFAULT_NODE_ICONS = [{
|
|
15
10
|
id: 'ciType.switch',
|
|
16
11
|
name: '交换机'
|
|
@@ -44,7 +39,6 @@ export var DEFAULT_NODE_ICONS = [{
|
|
|
44
39
|
name: '互联网'
|
|
45
40
|
}].map(function (item) {
|
|
46
41
|
return _extends({}, item, {
|
|
47
|
-
url:
|
|
42
|
+
url: iconFactory.getIconImageUrl(item.id)
|
|
48
43
|
});
|
|
49
|
-
});
|
|
50
|
-
export default _extends({}, getIconMap());
|
|
44
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
2
|
+
import { DEFAULT_NODE_ICONS } from "./defaultIcons";
|
|
3
3
|
import getNetworkTopoCiTypeIcons from "./networkTopoCiTypeIcons";
|
|
4
4
|
var groupDefaultIcons = [{
|
|
5
5
|
id: 'editor.icon.cloud.medium',
|
|
@@ -69,13 +69,6 @@ export function transformCustomIcons2HtIcons(icons) {
|
|
|
69
69
|
export function getUserCustomIcons(topo) {
|
|
70
70
|
var uploadIcons = topo.store.getModelState('iconManage').icons;
|
|
71
71
|
return [].concat(transformCustomIcons2HtIcons(uploadIcons.node));
|
|
72
|
-
}
|
|
73
|
-
export function getIconMap(topo) {
|
|
74
|
-
var bizIconMap = {};
|
|
75
|
-
[].concat(groupDefaultIcons, getNodeDefaultIcons(topo), getUserCustomIcons(topo)).forEach(function (icon) {
|
|
76
|
-
bizIconMap[icon.id] = icon;
|
|
77
|
-
});
|
|
78
|
-
return _extends({}, defaultIcons, bizIconMap);
|
|
79
72
|
} // 获得节点图标列表
|
|
80
73
|
|
|
81
74
|
export function getNodeIconGroups(topo) {
|
|
@@ -95,18 +88,4 @@ export function getGroupIconGroups(topo) {
|
|
|
95
88
|
name: '自定义',
|
|
96
89
|
icons: getUserCustomIcons(topo)
|
|
97
90
|
}];
|
|
98
|
-
}
|
|
99
|
-
export function getIconById(id, topo) {
|
|
100
|
-
var iconMap = getIconMap(topo);
|
|
101
|
-
var icon = iconMap[id];
|
|
102
|
-
|
|
103
|
-
if (typeof icon === 'string') {
|
|
104
|
-
return icon.replace('.json', '.png');
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (!icon) {
|
|
108
|
-
console.warn('图标不存在', id, iconMap);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return icon === null || icon === void 0 ? void 0 : icon.url;
|
|
112
91
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _Dialog from "@alifd/next/es/dialog";
|
|
2
1
|
import _List from "@alifd/next/es/list";
|
|
3
2
|
import React, { useState, useEffect } from "react";
|
|
4
3
|
import AlarmListItem from "./components/AlarmListItem";
|
|
@@ -6,23 +5,22 @@ import { Link } from "react-router-dom";
|
|
|
6
5
|
import NoDataPage from "@riil-frontend/component-no-data-page";
|
|
7
6
|
import styles from "./index.module.scss";
|
|
8
7
|
import { alarmListDemo } from "./mocks";
|
|
8
|
+
import rlog from "@riil-frontend/component-topology-utils/es/rlog";
|
|
9
9
|
|
|
10
10
|
function AlarmListPanel(props, ref) {
|
|
11
11
|
// 传入参数
|
|
12
12
|
var topo = props.topo,
|
|
13
13
|
target = props.toolBarRef,
|
|
14
|
+
titleBarRef = props.titleBarRef,
|
|
14
15
|
visible = props.visible;
|
|
15
|
-
var alarm = topo.alarm;
|
|
16
16
|
|
|
17
17
|
var _useState = useState([]),
|
|
18
18
|
alarmList = _useState[0],
|
|
19
19
|
setAlarmList = _useState[1];
|
|
20
20
|
|
|
21
|
-
var _topo$store$useModel = topo.store.useModel(
|
|
21
|
+
var _topo$store$useModel = topo.store.useModel("topoAlarm"),
|
|
22
22
|
alarmState = _topo$store$useModel[0],
|
|
23
|
-
alarmDispatchers = _topo$store$useModel[1];
|
|
24
|
-
// const{ alarmPanelIsOpen } = store.getState().topoMod;
|
|
25
|
-
|
|
23
|
+
alarmDispatchers = _topo$store$useModel[1];
|
|
26
24
|
|
|
27
25
|
var alarmData = alarmState.alarmData,
|
|
28
26
|
alarmPanelIsOpen = alarmState.alarmPanelIsOpen,
|
|
@@ -34,42 +32,19 @@ function AlarmListPanel(props, ref) {
|
|
|
34
32
|
};
|
|
35
33
|
|
|
36
34
|
useEffect(function () {
|
|
37
|
-
// console.log(
|
|
38
|
-
// "AlarmListPanel-useEffect",
|
|
39
|
-
// topo,
|
|
40
|
-
// alarmPanelIsOpen,
|
|
41
|
-
// alarmIsOpened,
|
|
42
|
-
// alarmData,
|
|
43
|
-
// alarmList
|
|
44
|
-
// );
|
|
45
35
|
if (alarmData) {
|
|
46
36
|
var _alarmData$slice;
|
|
47
37
|
|
|
48
|
-
topo.alarm.switchAlarmPopPanel(alarmIsOpened &&
|
|
49
|
-
|
|
38
|
+
rlog.debug("AlarmListPanel-useEffect", alarmIsOpened); // topo.alarm.switchAlarmPopPanel(alarmIsOpened && alarmData?.length > 0);
|
|
39
|
+
|
|
40
|
+
setAlarmList((_alarmData$slice = alarmData === null || alarmData === void 0 ? void 0 : alarmData.slice(0, 10)) !== null && _alarmData$slice !== void 0 ? _alarmData$slice : []);
|
|
50
41
|
} else {
|
|
51
42
|
setAlarmList([]);
|
|
52
43
|
}
|
|
53
44
|
}, [alarmData]);
|
|
54
|
-
return /*#__PURE__*/React.createElement(
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
55
46
|
className: styles.AlarmListPanel,
|
|
56
|
-
id: "AlarmListPanel"
|
|
57
|
-
align: false,
|
|
58
|
-
top: 100,
|
|
59
|
-
overlayProps: {
|
|
60
|
-
style: {
|
|
61
|
-
right: 15,
|
|
62
|
-
top: 100
|
|
63
|
-
},
|
|
64
|
-
target: {
|
|
65
|
-
target: target
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
onClose: onClose,
|
|
69
|
-
hasMask: false,
|
|
70
|
-
closeMode: "close",
|
|
71
|
-
visible: alarmPanelIsOpen,
|
|
72
|
-
footer: false
|
|
47
|
+
id: "AlarmListPanel"
|
|
73
48
|
}, /*#__PURE__*/React.createElement(_List, {
|
|
74
49
|
header: /*#__PURE__*/React.createElement("div", {
|
|
75
50
|
style: {
|
|
@@ -80,7 +55,14 @@ function AlarmListPanel(props, ref) {
|
|
|
80
55
|
}, "\u5173\u8054\u544A\u8B66\u4FE1\u606F"), /*#__PURE__*/React.createElement(Link, {
|
|
81
56
|
className: styles.listTitleLink,
|
|
82
57
|
to: "/default/alarmCenter/alarmList"
|
|
83
|
-
}, "\u67E5\u770B\u6240\u6709\u544A\u8B66")
|
|
58
|
+
}, "\u67E5\u770B\u6240\u6709\u544A\u8B66"), /*#__PURE__*/React.createElement("a", {
|
|
59
|
+
role: "button",
|
|
60
|
+
"aria-label": "\u5173\u95ED",
|
|
61
|
+
className: "next-dialog-close",
|
|
62
|
+
onClick: onClose
|
|
63
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
64
|
+
className: "next-icon next-icon-close next-medium next-dialog-close-icon"
|
|
65
|
+
}))),
|
|
84
66
|
dataSource: alarmList,
|
|
85
67
|
emptyContent: /*#__PURE__*/React.createElement(NoDataPage, {
|
|
86
68
|
className: styles.emptyContent,
|
|
@@ -64,6 +64,7 @@ var TopoView = function TopoView(props) {
|
|
|
64
64
|
tData = _useState[0],
|
|
65
65
|
setTData = _useState[1];
|
|
66
66
|
|
|
67
|
+
var titleBarRef = useRef();
|
|
67
68
|
var topoEdit = useTopoEdit({
|
|
68
69
|
topo: topo,
|
|
69
70
|
topoId: topoId,
|
|
@@ -264,6 +265,7 @@ var TopoView = function TopoView(props) {
|
|
|
264
265
|
}), isEditMode && /*#__PURE__*/React.createElement(EditorPlugin, {
|
|
265
266
|
topo: topo,
|
|
266
267
|
topoEdit: topoEdit,
|
|
268
|
+
titleBarRef: titleBarRef,
|
|
267
269
|
topoContext: {
|
|
268
270
|
urlParams: urlParams
|
|
269
271
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
var _excluded = ["topo", "render", "viewerProps"];
|
|
4
|
-
import React, { useState, useEffect, useRef, useCallback } from
|
|
4
|
+
import React, { useState, useEffect, useRef, useCallback } from "react";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
6
|
import TopoViewerTitleBar from "../../viewer/components/titlebar/TopoViewerTitleBar";
|
|
7
7
|
import TopoEditorTitleBar from "../../editor/components/titlebar/TopoEditorTitleBar";
|
|
@@ -14,11 +14,11 @@ function TitleBar(props) {
|
|
|
14
14
|
|
|
15
15
|
var store = topo.store;
|
|
16
16
|
|
|
17
|
-
var _store$useModel = store.useModel(
|
|
17
|
+
var _store$useModel = store.useModel("topoMod"),
|
|
18
18
|
topoState = _store$useModel[0];
|
|
19
19
|
|
|
20
20
|
var viewState = topoState.viewState;
|
|
21
|
-
var isEditMode = viewState ===
|
|
21
|
+
var isEditMode = viewState === "edit";
|
|
22
22
|
|
|
23
23
|
if (render) {
|
|
24
24
|
return render({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import rlog from "@riil-frontend/component-topology-utils/es/rlog";
|
|
4
|
+
import { iconFactory } from "@riil-frontend/component-topology-graph";
|
|
4
5
|
import sortBy from 'lodash/sortBy';
|
|
5
6
|
import { getGroupChildrenNodes, getNodeData } from "../../../../../../../../utils/htElementUtils";
|
|
6
|
-
import { getIconById } from "../../../../../../../common/icons/icon";
|
|
7
7
|
|
|
8
8
|
function sortResourcesByName(resources) {
|
|
9
9
|
return sortBy(resources, 'name');
|
|
@@ -29,7 +29,7 @@ export default function useGroupRelateResource(props) {
|
|
|
29
29
|
})).map(function (item) {
|
|
30
30
|
return {
|
|
31
31
|
title: item.name,
|
|
32
|
-
img:
|
|
32
|
+
img: iconFactory.getIconImageUrl(item.image),
|
|
33
33
|
data: item,
|
|
34
34
|
node: item.node
|
|
35
35
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { iconFactory } from '@riil-frontend/component-topology-graph';
|
|
2
3
|
import ResourceList from "../../../common/GroupNodeList/ResourceList";
|
|
3
4
|
import { getLayerChildrenNodes } from "../../../../../../../utils/htElementUtils";
|
|
4
|
-
import { getIconById } from "../../../../../../common/icons/icon";
|
|
5
5
|
/**
|
|
6
6
|
* 分层关联资源列表
|
|
7
7
|
*/
|
|
@@ -16,7 +16,7 @@ export default function LayerResourceList(props) {
|
|
|
16
16
|
var data = relateDataNodes.map(function (node) {
|
|
17
17
|
return {
|
|
18
18
|
title: node.a('name'),
|
|
19
|
-
img:
|
|
19
|
+
img: iconFactory.getIconImageUrl(node.getImage())
|
|
20
20
|
};
|
|
21
21
|
});
|
|
22
22
|
return /*#__PURE__*/React.createElement(ResourceList, {
|
package/es/core/models/Alarm.js
CHANGED
|
@@ -216,12 +216,13 @@ var Alarm = /*#__PURE__*/function () {
|
|
|
216
216
|
while (1) {
|
|
217
217
|
switch (_context3.prev = _context3.next) {
|
|
218
218
|
case 0:
|
|
219
|
-
|
|
219
|
+
console.log("switchAlarmPopPanel", flag);
|
|
220
|
+
topoDispatchers = this.topo.store.getModelDispatchers("topoAlarm");
|
|
220
221
|
topoDispatchers.update({
|
|
221
222
|
alarmPanelIsOpen: flag
|
|
222
223
|
});
|
|
223
224
|
|
|
224
|
-
case
|
|
225
|
+
case 3:
|
|
225
226
|
case "end":
|
|
226
227
|
return _context3.stop();
|
|
227
228
|
}
|
|
@@ -360,35 +361,13 @@ var Alarm = /*#__PURE__*/function () {
|
|
|
360
361
|
* 打开\关闭告警列表弹窗
|
|
361
362
|
*
|
|
362
363
|
*/
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
370
|
-
while (1) {
|
|
371
|
-
switch (_context6.prev = _context6.next) {
|
|
372
|
-
case 0:
|
|
373
|
-
console.log("switchAlarmPopPanel", flag);
|
|
374
|
-
this.updateState({
|
|
375
|
-
alarmPanelIsOpen: flag
|
|
376
|
-
});
|
|
377
|
-
|
|
378
|
-
case 2:
|
|
379
|
-
case "end":
|
|
380
|
-
return _context6.stop();
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}, _callee6, this);
|
|
384
|
-
}));
|
|
364
|
+
// async switchAlarmPopPanel(flag) {
|
|
365
|
+
// console.log("switchAlarmPopPanel", flag);
|
|
366
|
+
// this.updateState({
|
|
367
|
+
// alarmPanelIsOpen: flag,
|
|
368
|
+
// });
|
|
369
|
+
// }
|
|
385
370
|
|
|
386
|
-
function switchAlarmPopPanel(_x5) {
|
|
387
|
-
return _switchAlarmPopPanel2.apply(this, arguments);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
return switchAlarmPopPanel;
|
|
391
|
-
}()
|
|
392
371
|
/**
|
|
393
372
|
* 当资源变化时,需要刷新。
|
|
394
373
|
*/
|
|
@@ -397,22 +376,22 @@ var Alarm = /*#__PURE__*/function () {
|
|
|
397
376
|
_proto.restart =
|
|
398
377
|
/*#__PURE__*/
|
|
399
378
|
function () {
|
|
400
|
-
var _restart = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
379
|
+
var _restart = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
401
380
|
var id;
|
|
402
|
-
return _regeneratorRuntime.wrap(function
|
|
381
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
403
382
|
while (1) {
|
|
404
|
-
switch (
|
|
383
|
+
switch (_context6.prev = _context6.next) {
|
|
405
384
|
case 0:
|
|
406
385
|
id = this.currentTopoId;
|
|
407
|
-
|
|
386
|
+
_context6.next = 3;
|
|
408
387
|
return this.openTopoAlarm(id);
|
|
409
388
|
|
|
410
389
|
case 3:
|
|
411
390
|
case "end":
|
|
412
|
-
return
|
|
391
|
+
return _context6.stop();
|
|
413
392
|
}
|
|
414
393
|
}
|
|
415
|
-
},
|
|
394
|
+
}, _callee6, this);
|
|
416
395
|
}));
|
|
417
396
|
|
|
418
397
|
function restart() {
|
|
@@ -430,12 +409,12 @@ var Alarm = /*#__PURE__*/function () {
|
|
|
430
409
|
_proto.getAlarmByEE =
|
|
431
410
|
/*#__PURE__*/
|
|
432
411
|
function () {
|
|
433
|
-
var _getAlarmByEE = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
412
|
+
var _getAlarmByEE = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(alertData) {
|
|
434
413
|
var _this$getState4, alarmIsOpened, resAndMetrics, resIdsList, nodeIdsList, linkIdsList, alarmDispatchers, sendAl, idsList, operations, _yield$alarmDispatche, eqFlag, alarmlist;
|
|
435
414
|
|
|
436
|
-
return _regeneratorRuntime.wrap(function
|
|
415
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
437
416
|
while (1) {
|
|
438
|
-
switch (
|
|
417
|
+
switch (_context7.prev = _context7.next) {
|
|
439
418
|
case 0:
|
|
440
419
|
_this$getState4 = this.getState(), alarmIsOpened = _this$getState4.alarmIsOpened;
|
|
441
420
|
resAndMetrics = this.topo.store.getState().topoMod.resAndMetrics;
|
|
@@ -445,7 +424,7 @@ var Alarm = /*#__PURE__*/function () {
|
|
|
445
424
|
console.log("getAlarmByEE-接收到推送的原始告警信息", alertData);
|
|
446
425
|
|
|
447
426
|
if (!(isAvailableArray(alertData) && isAvailableArray(resIdsList))) {
|
|
448
|
-
|
|
427
|
+
_context7.next = 25;
|
|
449
428
|
break;
|
|
450
429
|
}
|
|
451
430
|
|
|
@@ -478,19 +457,19 @@ var Alarm = /*#__PURE__*/function () {
|
|
|
478
457
|
}); // rlog.debug("before-combAlarmData", al, bizState);
|
|
479
458
|
|
|
480
459
|
if (!(sendAl.length > 0)) {
|
|
481
|
-
|
|
460
|
+
_context7.next = 25;
|
|
482
461
|
break;
|
|
483
462
|
}
|
|
484
463
|
|
|
485
464
|
rlog.debug("过滤掉非本拓扑的告警信息 告警开关-推送告警到ht-alarmIsOpened-sendAl", alarmIsOpened, sendAl);
|
|
486
|
-
|
|
487
|
-
|
|
465
|
+
_context7.prev = 13;
|
|
466
|
+
_context7.next = 16;
|
|
488
467
|
return alarmDispatchers.combAlarmData({
|
|
489
468
|
alarmdata: sendAl
|
|
490
469
|
});
|
|
491
470
|
|
|
492
471
|
case 16:
|
|
493
|
-
_yield$alarmDispatche =
|
|
472
|
+
_yield$alarmDispatche = _context7.sent;
|
|
494
473
|
eqFlag = _yield$alarmDispatche.eqFlag;
|
|
495
474
|
alarmlist = _yield$alarmDispatche.alarmlist;
|
|
496
475
|
|
|
@@ -499,23 +478,23 @@ var Alarm = /*#__PURE__*/function () {
|
|
|
499
478
|
this.hmGetTopoAlarm();
|
|
500
479
|
}
|
|
501
480
|
|
|
502
|
-
|
|
481
|
+
_context7.next = 25;
|
|
503
482
|
break;
|
|
504
483
|
|
|
505
484
|
case 22:
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
rlog.error("告警发送异常",
|
|
485
|
+
_context7.prev = 22;
|
|
486
|
+
_context7.t0 = _context7["catch"](13);
|
|
487
|
+
rlog.error("告警发送异常", _context7.t0);
|
|
509
488
|
|
|
510
489
|
case 25:
|
|
511
490
|
case "end":
|
|
512
|
-
return
|
|
491
|
+
return _context7.stop();
|
|
513
492
|
}
|
|
514
493
|
}
|
|
515
|
-
},
|
|
494
|
+
}, _callee7, this, [[13, 22]]);
|
|
516
495
|
}));
|
|
517
496
|
|
|
518
|
-
function getAlarmByEE(
|
|
497
|
+
function getAlarmByEE(_x5) {
|
|
519
498
|
return _getAlarmByEE.apply(this, arguments);
|
|
520
499
|
}
|
|
521
500
|
|
|
@@ -511,20 +511,29 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
|
|
|
511
511
|
attributeMap = ciData.attributeMap;
|
|
512
512
|
ciRefAttributeMap[id] = [];
|
|
513
513
|
|
|
514
|
-
_this5.topo.ciTyeCache.getCiType(ciType)
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
514
|
+
var ciTypeMeta = _this5.topo.ciTyeCache.getCiType(ciType);
|
|
515
|
+
|
|
516
|
+
if (ciTypeMeta) {
|
|
517
|
+
ciTypeMeta.attributes.filter(function (attributeMeta) {
|
|
518
|
+
return !!attributeMeta.refCi;
|
|
519
|
+
}).forEach(function (attributeMeta) {
|
|
520
|
+
var refId = attributeMap[attributeMeta.code];
|
|
521
|
+
|
|
522
|
+
if (refId && !refIdMap[refId]) {
|
|
523
|
+
refIdMap[refId] = true;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
ciRefAttributeMap[id].push({
|
|
527
|
+
attrCode: attributeMeta.code,
|
|
528
|
+
id: refId
|
|
529
|
+
});
|
|
526
530
|
});
|
|
527
|
-
}
|
|
531
|
+
} else {
|
|
532
|
+
rlog.warn('推送属性指标数据:未查询到ciType', {
|
|
533
|
+
ciData: ciData,
|
|
534
|
+
ciType: ciType
|
|
535
|
+
});
|
|
536
|
+
}
|
|
528
537
|
});
|
|
529
538
|
refIds = Object.keys(refIdMap);
|
|
530
539
|
|
|
@@ -20,7 +20,7 @@ import { updateEdgeExpanded } from "../utils/edgeUtil";
|
|
|
20
20
|
import PluginManager from "./PluginManager";
|
|
21
21
|
import topoFactory from "./topoFactory"; // eslint-disable-next-line no-undef
|
|
22
22
|
|
|
23
|
-
var version = typeof "2.15.
|
|
23
|
+
var version = typeof "2.15.24" === 'string' ? "2.15.24" : null;
|
|
24
24
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
25
25
|
/**
|
|
26
26
|
* 拓扑显示和编辑
|
|
@@ -12,6 +12,9 @@ var interfaceTypeMap = {
|
|
|
12
12
|
displayName: '聚合接口'
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
+
export function isAggLink(link) {
|
|
16
|
+
return link.attributes['network_link.connect_type'] === 'agg';
|
|
17
|
+
}
|
|
15
18
|
export function mergeLinksData(links, linkCis, nodes, interfaceCis) {
|
|
16
19
|
var linkCiMap = keyBy(linkCis, 'id');
|
|
17
20
|
return links.map(function (link) {
|