@riil-frontend/component-topology 12.0.0-dev.2 → 12.0.0-dev.20
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 +13 -13
- package/es/components/BatchAttrMetric/setting.js +1 -1
- package/es/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +1 -1
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +1 -1
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +56 -3
- package/es/core/components/AlarmListPanel/index.js +1 -1
- package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +1 -1
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
- package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +1 -1
- package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +1 -1
- package/es/core/components/ResourceViewAttributeSetting/Setting.js +1 -1
- package/es/core/components/TopoView/topoView.js +6 -2
- package/es/core/editor/components/BackgroundView/index.js +1 -1
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +1 -1
- package/es/core/editor/components/EditorPlugin.js +1 -1
- package/es/core/editor/components/Sidebar/views/ComponentPanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +1 -1
- package/es/core/editor/components/Sidebar/views/LinkPanel.js +1 -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/components/settings/common/NodeSizeInput/NodeSizeInput.js +1 -1
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +1 -1
- package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +1 -1
- package/es/core/editor/hooks/useKeyboardShortcut.js +3 -1
- package/es/core/editor/store/background.js +1 -1
- package/es/core/editor/store/historyManager.js +1 -1
- package/es/core/editor/store/topoEdit.js +1 -1
- package/es/core/editor/utils/copyElementUtil.js +12 -0
- package/es/core/editor/utils/edgeTypeStyleUtil.js +8 -7
- package/es/core/hooks/__tests__/useCiAttributeChange.test.js +0 -0
- package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -1
- package/es/core/hooks/useCiAttributeChange.js +31 -15
- package/es/core/hooks/useGraphAlarmDisplay.js +62 -40
- package/es/core/hooks/useManageStatus.js +1 -1
- package/es/core/hooks/usePolling.js +1 -1
- package/es/core/hooks/useResourceConfig.js +1 -3
- package/es/core/hooks/useTopoEdit.js +51 -54
- package/es/core/models/Alarm.js +29 -17
- package/es/core/models/AttributeMetricDisplay.js +15 -6
- package/es/core/models/HistoryManager.js +1 -1
- package/es/core/models/SelectionModel.js +1 -1
- package/es/core/models/TopoApp.js +2 -2
- package/es/core/models/attributeFormatter/formatter/graphTransform.js +1 -1
- package/es/core/models/attributeFormatter/index.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/cache/CiTypeCache.js +5 -1
- package/es/core/models/cache/DictCache.js +1 -1
- package/es/core/models/plugins/resourceWebControllUrl.js +1 -1
- package/es/core/models/tagstips/ElementTagTipConfig.js +1 -1
- package/es/core/models/topoData.js +0 -1
- package/es/core/services/alarm.js +1 -1
- package/es/core/services/index.js +1 -1
- package/es/core/services/topo/basic.js +2 -2
- package/es/core/store/models/customIcon.js +1 -1
- package/es/core/store/models/displayConfig.js +1 -1
- package/es/core/store/models/selection.js +1 -1
- package/es/core/store/models/topoBaseInfoOverview.js +1 -1
- package/es/core/store/models/topoBizMod.js +1 -1
- package/es/core/store/models/topoConfig.js +7 -10
- package/es/core/store/models/topoGraphView.js +1 -1
- package/es/core/store/models/topoMod.js +82 -135
- package/es/core/store/models/viewer/lock.js +1 -1
- package/es/core/store/models/viewer/resourceDetail.js +1 -1
- package/es/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
- package/es/core/utils/edgeUtil.js +10 -1
- package/es/core/utils/metricUtil.js +1 -1
- package/es/core/utils/showGraphManageStatusUtil.js +3 -2
- package/es/core/utils/showMessage.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +1 -1
- package/es/core/viewer/components/plugins/ViewerPlugin.js +3 -1
- package/es/networkTopo/components/Link/index.js +1 -1
- package/es/networkTopo/components/TopoView.js +6 -11
- package/es/networkTopo/hooks/useEdgeExpand.js +2 -3
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +1 -1
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +1 -1
- package/es/networkTopo/models/LinkTagsTipsBuilder.js +1 -1
- package/es/networkTopo/models/TopoCenter.js +1 -1
- package/es/networkTopo/services/model.js +1 -1
- package/es/networkTopo/services/topo/basic.js +4 -4
- package/es/networkTopo/services/topo/ciInfo.js +1 -1
- package/es/networkTopo/store/functionAuth.js +1 -1
- package/es/networkTopo/store/topoCenter.js +1 -1
- package/es/networkTopo/store/topoTreeMod.js +1 -1
- package/es/networkTopo/utils/exportData.js +1 -1
- package/es/style.js +1 -1
- package/es/utils/ResourceConfigUtil.js +4 -37
- package/es/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
- package/es/utils/ciRefAttributeTranslateUtil.js +155 -0
- package/es/utils/format.js +1 -1
- package/es/utils/topoData.js +4 -2
- package/lib/components/BatchAttrMetric/setting.js +2 -2
- package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +2 -2
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +2 -2
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +58 -3
- package/lib/core/components/AlarmListPanel/index.js +1 -1
- package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -2
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
- package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -3
- package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +2 -2
- package/lib/core/components/ResourceViewAttributeSetting/Setting.js +2 -2
- package/lib/core/components/TopoView/topoView.js +14 -10
- package/lib/core/editor/components/BackgroundView/index.js +3 -3
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +2 -2
- package/lib/core/editor/components/EditorPlugin.js +3 -3
- package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +2 -4
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -2
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +2 -2
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +2 -4
- package/lib/core/editor/components/Sidebar/views/LinkPanel.js +2 -4
- 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/components/settings/common/NodeSizeInput/NodeSizeInput.js +5 -5
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +3 -3
- package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +2 -2
- package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -0
- package/lib/core/editor/store/background.js +1 -1
- package/lib/core/editor/store/historyManager.js +1 -1
- package/lib/core/editor/store/topoEdit.js +1 -1
- package/lib/core/editor/utils/copyElementUtil.js +15 -0
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +8 -6
- package/lib/core/hooks/__tests__/useCiAttributeChange.test.js +1 -0
- package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -3
- package/lib/core/hooks/useCiAttributeChange.js +30 -14
- package/lib/core/hooks/useGraphAlarmDisplay.js +62 -40
- package/lib/core/hooks/useManageStatus.js +1 -1
- package/lib/core/hooks/usePolling.js +3 -3
- package/lib/core/hooks/useResourceConfig.js +1 -3
- package/lib/core/hooks/useTopoEdit.js +50 -53
- package/lib/core/models/Alarm.js +38 -26
- package/lib/core/models/AttributeMetricDisplay.js +18 -6
- package/lib/core/models/HistoryManager.js +8 -8
- package/lib/core/models/SelectionModel.js +5 -5
- package/lib/core/models/TopoApp.js +4 -6
- package/lib/core/models/attributeFormatter/formatter/graphTransform.js +2 -4
- package/lib/core/models/attributeFormatter/index.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/cache/CiTypeCache.js +6 -2
- package/lib/core/models/cache/DictCache.js +2 -2
- package/lib/core/models/plugins/resourceWebControllUrl.js +2 -2
- package/lib/core/models/tagstips/ElementTagTipConfig.js +2 -2
- package/lib/core/models/topoData.js +0 -1
- package/lib/core/services/alarm.js +2 -2
- package/lib/core/services/index.js +1 -1
- package/lib/core/services/topo/basic.js +2 -2
- package/lib/core/store/models/customIcon.js +3 -3
- package/lib/core/store/models/displayConfig.js +1 -1
- package/lib/core/store/models/selection.js +1 -1
- package/lib/core/store/models/topoBaseInfoOverview.js +1 -1
- package/lib/core/store/models/topoBizMod.js +1 -1
- package/lib/core/store/models/topoConfig.js +7 -10
- package/lib/core/store/models/topoGraphView.js +1 -1
- package/lib/core/store/models/topoMod.js +89 -142
- package/lib/core/store/models/viewer/lock.js +1 -1
- package/lib/core/store/models/viewer/resourceDetail.js +1 -1
- package/lib/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
- package/lib/core/utils/edgeUtil.js +12 -1
- package/lib/core/utils/metricUtil.js +1 -1
- package/lib/core/utils/showGraphManageStatusUtil.js +3 -2
- package/lib/core/utils/showMessage.js +2 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +6 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +3 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +2 -2
- package/lib/core/viewer/components/plugins/ViewerPlugin.js +3 -1
- package/lib/networkTopo/components/Link/index.js +2 -2
- package/lib/networkTopo/components/TopoView.js +5 -14
- package/lib/networkTopo/hooks/useEdgeExpand.js +2 -3
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +4 -4
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +3 -5
- package/lib/networkTopo/models/LinkTagsTipsBuilder.js +3 -3
- package/lib/networkTopo/models/TopoCenter.js +1 -1
- package/lib/networkTopo/services/model.js +1 -3
- package/lib/networkTopo/services/topo/basic.js +4 -6
- package/lib/networkTopo/services/topo/ciInfo.js +0 -2
- package/lib/networkTopo/store/functionAuth.js +1 -1
- package/lib/networkTopo/store/topoCenter.js +1 -1
- package/lib/networkTopo/store/topoTreeMod.js +5 -5
- package/lib/networkTopo/utils/exportData.js +1 -3
- package/lib/style.js +1 -1
- package/lib/utils/ResourceConfigUtil.js +4 -39
- package/lib/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
- package/lib/utils/ciRefAttributeTranslateUtil.js +168 -0
- package/lib/utils/format.js +1 -1
- package/lib/utils/topoData.js +4 -2
- package/package.json +4 -4
@@ -9,6 +9,18 @@ export function handleCopyHotkey(event, options) {
|
|
9
9
|
copy(options.topo);
|
10
10
|
}
|
11
11
|
}
|
12
|
+
export function initPasteEventListener() {
|
13
|
+
document.addEventListener("paste", handlePasteEventListener);
|
14
|
+
}
|
15
|
+
export function destroyPasteEventListener() {
|
16
|
+
document.removeEventListener("paste", handlePasteEventListener);
|
17
|
+
}
|
18
|
+
|
19
|
+
function handlePasteEventListener(e) {
|
20
|
+
var clipdata = e.clipboardData || window.clipboardData;
|
21
|
+
console.log("主动粘贴", clipdata.getData("text/plain"));
|
22
|
+
}
|
23
|
+
|
12
24
|
export function handlePasteHotkey(event, options) {
|
13
25
|
var target = event.target || event.srcElement;
|
14
26
|
var tagName = target.tagName;
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import { getEdges } from "../../../utils/htElementUtils";
|
2
|
-
import { getEdgesBetweenNodes } from "../../../utils/htElementUtils";
|
1
|
+
import { getEdges, getEdgesBetweenNodes } from "../../../utils/htElementUtils";
|
3
2
|
var ht = window.ht;
|
4
3
|
export function getEdgesBySelection(topo) {
|
5
4
|
var getChildrenNodeIds = function getChildrenNodeIds(nodes) {
|
@@ -105,16 +104,18 @@ export function loopEdgesAndChildren(topo, edges, operateEdgeFn) {
|
|
105
104
|
* 设置连线及子连线。带回退事务控制
|
106
105
|
* @param {*} topo
|
107
106
|
* @param {*} edges
|
108
|
-
* @param {*}
|
107
|
+
* @param {*} updateEdgeFn
|
109
108
|
*/
|
110
109
|
|
111
|
-
export function
|
110
|
+
export function updateEdgesData(topo, edges, updateEdgeFn) {
|
112
111
|
topo.historyManager.beginTransaction();
|
113
|
-
|
112
|
+
edges.forEach(function (edge) {
|
113
|
+
updateEdgeFn(edge);
|
114
|
+
});
|
114
115
|
topo.historyManager.endTransaction();
|
115
116
|
}
|
116
117
|
/**
|
117
|
-
*
|
118
|
+
* 批量设置连线线形。带回退事务控制
|
118
119
|
*
|
119
120
|
* @param {*} edges
|
120
121
|
* @param {*} type
|
@@ -123,7 +124,7 @@ export function setEdgesAndChildren(topo, edges, operateEdgeFn) {
|
|
123
124
|
|
124
125
|
export function setEdgesType(edges, type, topo) {
|
125
126
|
var htTopo = topo.getHtTopo();
|
126
|
-
|
127
|
+
updateEdgesData(topo, edges, function (edge) {
|
127
128
|
htTopo.setGraphLinear(edge, {
|
128
129
|
type: type
|
129
130
|
});
|
File without changes
|
@@ -1,11 +1,22 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
|
-
import rlog from '@riil-frontend/component-topology-utils
|
2
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
3
3
|
import CiCache from "../models/cache/CiCache";
|
4
4
|
import useTopoEventListener from "./useTopoEventListener";
|
5
5
|
|
6
|
+
function ciExistTopo(topoData, ciChangeData) {
|
7
|
+
if (!topoData) {
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
|
11
|
+
var ciIds = [].concat(topoData.nodes, topoData.links, topoData.linkGroups).map(function (data) {
|
12
|
+
return data.ciId || data.id;
|
13
|
+
});
|
14
|
+
return ciIds.includes(ciChangeData.id);
|
15
|
+
}
|
16
|
+
|
6
17
|
function mergeData(cis, ciChangeData) {
|
7
18
|
var matchData = function matchData(item) {
|
8
|
-
return item.
|
19
|
+
return (item.ciId || item.id) === ciChangeData.id;
|
9
20
|
};
|
10
21
|
|
11
22
|
if (!cis.find(matchData)) {
|
@@ -13,16 +24,26 @@ function mergeData(cis, ciChangeData) {
|
|
13
24
|
}
|
14
25
|
|
15
26
|
return cis.map(function (ci) {
|
16
|
-
if (matchData(ci)) {
|
17
|
-
return
|
18
|
-
id: ci.id,
|
19
|
-
attributes: _extends({}, ci.attributes, ciChangeData.attributes)
|
20
|
-
});
|
27
|
+
if (!matchData(ci)) {
|
28
|
+
return ci;
|
21
29
|
}
|
22
30
|
|
23
|
-
return ci
|
31
|
+
return _extends({}, ci, {
|
32
|
+
id: ci.id,
|
33
|
+
attributes: _extends({}, ci.attributes, ciChangeData.attributes)
|
34
|
+
});
|
24
35
|
});
|
25
36
|
}
|
37
|
+
|
38
|
+
function mergeTopoData(topoData, ciChangeData) {
|
39
|
+
var newData = _extends({}, topoData, {
|
40
|
+
nodes: mergeData(topoData.nodes, ciChangeData),
|
41
|
+
links: mergeData(topoData.links, ciChangeData),
|
42
|
+
linkGroups: mergeData(topoData.linkGroups, ciChangeData)
|
43
|
+
});
|
44
|
+
|
45
|
+
return newData;
|
46
|
+
}
|
26
47
|
/**
|
27
48
|
* 监听ci属性变更
|
28
49
|
*
|
@@ -38,13 +59,8 @@ export default function useCiAttributeChange(props) {
|
|
38
59
|
// 更新拓扑数据
|
39
60
|
var topoData = topo.store.getModelState('topoMod').data;
|
40
61
|
|
41
|
-
if (topoData) {
|
42
|
-
var newData =
|
43
|
-
nodes: mergeData(topoData.nodes, ciChangeData),
|
44
|
-
links: mergeData(topoData.links, ciChangeData),
|
45
|
-
linkGroups: mergeData(topoData.linkGroups, ciChangeData)
|
46
|
-
});
|
47
|
-
|
62
|
+
if (ciExistTopo(topoData, ciChangeData)) {
|
63
|
+
var newData = mergeTopoData(topoData, ciChangeData);
|
48
64
|
var topoDispatchers = topo.store.getModelDispatchers('topoMod');
|
49
65
|
topoDispatchers.update({
|
50
66
|
data: newData
|
@@ -2,8 +2,14 @@ import { useEffect } from "react";
|
|
2
2
|
import rlog from "@riil-frontend/component-topology-utils/es/rlog";
|
3
3
|
import { getElements } from "../../utils/htElementUtils";
|
4
4
|
import { removeManageStatus, showManageStatus } from "../utils/showGraphManageStatusUtil";
|
5
|
+
/**
|
6
|
+
* 获取ci的最高告警级别
|
7
|
+
* @param {Array} alarmList
|
8
|
+
* @param {*} risks
|
9
|
+
* @returns
|
10
|
+
*/
|
5
11
|
|
6
|
-
function
|
12
|
+
function getCiAlarmLevelMap(alarmList, risks) {
|
7
13
|
var ciIdLevelMap = {};
|
8
14
|
[].concat(alarmList, risks.map(function (item) {
|
9
15
|
var _item$resourceId;
|
@@ -21,13 +27,53 @@ function getCiAlarmLevels(alarmList, risks) {
|
|
21
27
|
|
22
28
|
ciIdLevelMap[item.id] = level;
|
23
29
|
});
|
30
|
+
return ciIdLevelMap;
|
31
|
+
}
|
32
|
+
|
33
|
+
function getGraphCiElementAlarmLevels(resources, alarmList, risks) {
|
34
|
+
var ciIdLevelMap = getCiAlarmLevelMap(alarmList, risks);
|
24
35
|
return Object.keys(ciIdLevelMap).map(function (id) {
|
25
36
|
return {
|
26
37
|
id: id,
|
27
38
|
level: ciIdLevelMap[id]
|
28
39
|
};
|
40
|
+
}).filter(function (alarm) {
|
41
|
+
var resource = resources.find(function (item) {
|
42
|
+
return item.id === alarm.id;
|
43
|
+
});
|
44
|
+
return !!resource;
|
29
45
|
});
|
30
46
|
}
|
47
|
+
/**
|
48
|
+
* 获得关联拓扑节点告警级别
|
49
|
+
* @param {*} topo
|
50
|
+
* @param {*} relateTopoAlarm
|
51
|
+
* @returns
|
52
|
+
*/
|
53
|
+
|
54
|
+
|
55
|
+
function getRelateTopoNodeAlarmLevels(topo, relateTopoAlarm) {
|
56
|
+
return Object.keys(relateTopoAlarm).map(function (topoId) {
|
57
|
+
var level = relateTopoAlarm[topoId];
|
58
|
+
var relateTopoNode = topo.getDataModel().getDatas().toArray().find(function (node) {
|
59
|
+
return "" + node.a('bindTopo') === "" + topoId;
|
60
|
+
});
|
61
|
+
|
62
|
+
if (!level || !relateTopoNode) {
|
63
|
+
return null;
|
64
|
+
}
|
65
|
+
|
66
|
+
return {
|
67
|
+
elementId: relateTopoNode.getId(),
|
68
|
+
level: level
|
69
|
+
};
|
70
|
+
}).filter(function (item) {
|
71
|
+
return !!item;
|
72
|
+
});
|
73
|
+
} // 获取拓扑图元素最高告警级别。包含资源、链路、关联拓扑节点
|
74
|
+
|
75
|
+
|
76
|
+
function getGraphElementAlarmLevels(resources) {}
|
31
77
|
/**
|
32
78
|
* 告警显示到ht拓扑
|
33
79
|
*
|
@@ -38,7 +84,6 @@ function getCiAlarmLevels(alarmList, risks) {
|
|
38
84
|
export default function useGraphAlarmDisplay(options) {
|
39
85
|
var topo = options.topo,
|
40
86
|
alarmSwitch = options.alarmSwitch;
|
41
|
-
var store = topo.store;
|
42
87
|
var topoState = topo.store.useModelState('topoMod');
|
43
88
|
var graphLoaded = topoState.graphLoaded,
|
44
89
|
viewState = topoState.viewState;
|
@@ -52,17 +97,7 @@ export default function useGraphAlarmDisplay(options) {
|
|
52
97
|
var resources = topo.dataModel.useCis();
|
53
98
|
|
54
99
|
function getCisEventLevel() {
|
55
|
-
return
|
56
|
-
var resource = resources.find(function (item) {
|
57
|
-
return item.id === alarm.id;
|
58
|
-
});
|
59
|
-
|
60
|
-
if (!resource) {
|
61
|
-
return false;
|
62
|
-
}
|
63
|
-
|
64
|
-
return true;
|
65
|
-
});
|
100
|
+
return getGraphCiElementAlarmLevels(resources, alarmList || [], risks);
|
66
101
|
}
|
67
102
|
|
68
103
|
useEffect(function () {
|
@@ -72,8 +107,8 @@ export default function useGraphAlarmDisplay(options) {
|
|
72
107
|
resources: resources,
|
73
108
|
isEditMode: isEditMode,
|
74
109
|
graphLoaded: graphLoaded,
|
75
|
-
|
76
|
-
cisEventLevel:
|
110
|
+
alarmSwitch: alarmSwitch,
|
111
|
+
cisEventLevel: getCisEventLevel()
|
77
112
|
});
|
78
113
|
|
79
114
|
function showAlarm() {
|
@@ -87,41 +122,28 @@ export default function useGraphAlarmDisplay(options) {
|
|
87
122
|
return;
|
88
123
|
}
|
89
124
|
|
90
|
-
var finalAlarms = getCisEventLevel(); //
|
125
|
+
var finalAlarms = getCisEventLevel(); // 关联拓扑告警
|
126
|
+
|
127
|
+
var relateTopoAlarms = getRelateTopoNodeAlarmLevels(topo, relateTopoAlarm);
|
128
|
+
var elementsAlarmLevels = [].concat(finalAlarms, relateTopoAlarms); // 将告警级别放入ht元素,便于测试
|
91
129
|
|
92
130
|
getElements(topo.getDataModel()).filter(function (item) {
|
93
131
|
return !!item.getTag();
|
94
132
|
}).forEach(function (element) {
|
95
|
-
var
|
133
|
+
var _elementsAlarmLevels$;
|
96
134
|
|
97
|
-
var alarmLevel = (
|
98
|
-
return item.id === element.getTag();
|
99
|
-
})) === null ||
|
135
|
+
var alarmLevel = (_elementsAlarmLevels$ = elementsAlarmLevels.find(function (item) {
|
136
|
+
return item.id === element.getTag() || item.elementId === element.getId();
|
137
|
+
})) === null || _elementsAlarmLevels$ === void 0 ? void 0 : _elementsAlarmLevels$.level;
|
100
138
|
element.a('alarmLevel', alarmLevel);
|
101
139
|
});
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
return "" + node.a('bindTopo') === "" + topoId;
|
106
|
-
});
|
107
|
-
|
108
|
-
if (!level || !relateTopoNode) {
|
109
|
-
return null;
|
110
|
-
}
|
111
|
-
|
112
|
-
return {
|
113
|
-
elementId: relateTopoNode.getId(),
|
114
|
-
level: level
|
115
|
-
};
|
116
|
-
}).filter(function (item) {
|
117
|
-
return !!item;
|
118
|
-
});
|
119
|
-
rlog.debug('关联拓扑告警:推送ht', {
|
120
|
-
all: relateTopoAlarm,
|
140
|
+
rlog.debug('推送告警 => ht', {
|
141
|
+
alarms: elementsAlarmLevels,
|
142
|
+
relateTopoAlarmMap: relateTopoAlarm,
|
121
143
|
relateTopoAlarms: relateTopoAlarms
|
122
144
|
}); // 更新到ht拓扑
|
123
145
|
|
124
|
-
topo.view.loadAlarm(
|
146
|
+
topo.view.loadAlarm(elementsAlarmLevels);
|
125
147
|
}
|
126
148
|
|
127
149
|
return function () {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import rlog from '@riil-frontend/component-topology-utils
|
1
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
2
2
|
import { useEffect } from 'react';
|
3
3
|
import useTopoEventListener from "./useTopoEventListener";
|
4
4
|
ht.Default.setImage('resource.subIcon.unMoniter', '/img/topo/alarmStatusIcon/未监控.svg');
|
@@ -4,7 +4,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import { useEffect } from 'react';
|
5
5
|
import { useRequest } from 'ahooks';
|
6
6
|
import _ from 'lodash';
|
7
|
-
import rlog from '@riil-frontend/component-topology-utils
|
7
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
8
8
|
import { useCbbEventListener } from '@riil-frontend/component-riil-event-emitter';
|
9
9
|
import DictCache from "../models/cache/DictCache";
|
10
10
|
import useCiAttributeChange from "./useCiAttributeChange";
|
@@ -42,9 +42,7 @@ export default function (props) {
|
|
42
42
|
return {
|
43
43
|
resources: config.resources,
|
44
44
|
groups: config.groups,
|
45
|
-
|
46
|
-
relateTopoIdList: config.relateTopoIdList //linkIps: config.linkIps,
|
47
|
-
|
45
|
+
relateTopoIdList: config.relateTopoIdList
|
48
46
|
};
|
49
47
|
};
|
50
48
|
|
@@ -15,7 +15,7 @@ import useGroupAddResource from "./useGroupAddResource";
|
|
15
15
|
import { findGroupChildren } from "../../utils/topoData";
|
16
16
|
import { isResourceElement } from "../../utils/htElementDataUtil";
|
17
17
|
import { isClusterHtElement, isClusterMemberHtElement } from "../../utils/clusterUtil";
|
18
|
-
import { mergeExportLinkData } from "../models/utils/linkUtils";
|
18
|
+
import { isExitLink, mergeExportLinkData } from "../models/utils/linkUtils";
|
19
19
|
import { isUniqueIp, buildIpNode } from "../../networkTopo/utils/exitLinkUtil";
|
20
20
|
|
21
21
|
var useTopoEdit = function useTopoEdit(params) {
|
@@ -349,33 +349,26 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
349
349
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(node) {
|
350
350
|
var _node$getEdges$toArra, _node$getEdges;
|
351
351
|
|
352
|
-
var
|
352
|
+
var edges;
|
353
353
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
354
354
|
while (1) switch (_context4.prev = _context4.next) {
|
355
355
|
case 0:
|
356
|
-
|
356
|
+
// console.log("删除关联在节点上的出口链路- node, config", node, config);
|
357
|
+
edges = (_node$getEdges$toArra = (_node$getEdges = node.getEdges()) === null || _node$getEdges === void 0 ? void 0 : _node$getEdges.toArray()) !== null && _node$getEdges$toArra !== void 0 ? _node$getEdges$toArra : [];
|
357
358
|
|
358
|
-
|
359
|
+
if (edges.length > 0) {
|
360
|
+
edges.map(function (edge) {
|
361
|
+
if (edge.getTag()) {
|
362
|
+
var link = topo.dataModel.getDataById(edge.getTag());
|
359
363
|
|
360
|
-
|
361
|
-
|
362
|
-
|
364
|
+
if (link && isExitLink(link)) {
|
365
|
+
topo.getGraphView().dm().remove(edge);
|
366
|
+
}
|
367
|
+
}
|
368
|
+
});
|
363
369
|
}
|
364
370
|
|
365
|
-
|
366
|
-
|
367
|
-
edges.map(function (edge) {
|
368
|
-
if (edge.a("dtype") === "link" && exportLinkIdList.indexOf(edge.getTag()) >= 0) {
|
369
|
-
// exLink.push(edge);
|
370
|
-
topo.getGraphView().dm().remove(edge);
|
371
|
-
exportLinkIdList.splice(config.exportLinkIdList.indexOf(edge.getTag()), 1);
|
372
|
-
}
|
373
|
-
});
|
374
|
-
config.exportLinkIdList = exportLinkIdList;
|
375
|
-
_context4.next = 8;
|
376
|
-
return resourceConfig.updateConfig(config);
|
377
|
-
|
378
|
-
case 8:
|
371
|
+
case 2:
|
379
372
|
case "end":
|
380
373
|
return _context4.stop();
|
381
374
|
}
|
@@ -554,7 +547,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
554
547
|
|
555
548
|
function _bindViewResources() {
|
556
549
|
_bindViewResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(data) {
|
557
|
-
var config,
|
550
|
+
var config, result, _elements;
|
558
551
|
|
559
552
|
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
560
553
|
while (1) switch (_context12.prev = _context12.next) {
|
@@ -570,15 +563,19 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
570
563
|
return editDispatchers.fetchDataByConfig();
|
571
564
|
|
572
565
|
case 6:
|
573
|
-
|
574
|
-
|
575
|
-
saveBind(TopoEvent.DATA_TYPE_RESOURCE_COMBO, elements); // 临时放这里,仅拓扑中心有
|
566
|
+
result = _context12.sent;
|
567
|
+
console.log("fetchDataByConfig", result);
|
576
568
|
|
577
|
-
if (
|
578
|
-
|
569
|
+
if (result) {
|
570
|
+
_elements = result.elements;
|
571
|
+
saveBind(TopoEvent.DATA_TYPE_RESOURCE_COMBO, _elements); // 临时放这里,仅拓扑中心有
|
572
|
+
|
573
|
+
if (topo.linkDynamicStyleExecutor) {
|
574
|
+
topo.linkDynamicStyleExecutor.execute();
|
575
|
+
}
|
579
576
|
}
|
580
577
|
|
581
|
-
case
|
578
|
+
case 9:
|
582
579
|
case "end":
|
583
580
|
return _context12.stop();
|
584
581
|
}
|
@@ -593,7 +590,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
593
590
|
|
594
591
|
function _addLayerResources() {
|
595
592
|
_addLayerResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(group, newResourceIds) {
|
596
|
-
var _yield$
|
593
|
+
var _yield$editDispatcher3, elements, newElements;
|
597
594
|
|
598
595
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
599
596
|
while (1) switch (_context13.prev = _context13.next) {
|
@@ -608,8 +605,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
608
605
|
return editDispatchers.fetchDataByConfig();
|
609
606
|
|
610
607
|
case 5:
|
611
|
-
_yield$
|
612
|
-
elements = _yield$
|
608
|
+
_yield$editDispatcher3 = _context13.sent;
|
609
|
+
elements = _yield$editDispatcher3.elements;
|
613
610
|
// 2022-11-10 修复 添加资源后分层重新布局问题,仅布局新增资源。替换api topo.updateElements(data)
|
614
611
|
newElements = findUNExistedElements(elements);
|
615
612
|
rlog.debug("添加分层资源", {
|
@@ -827,7 +824,9 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
827
824
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
828
825
|
while (1) switch (_context8.prev = _context8.next) {
|
829
826
|
case 0:
|
830
|
-
dm = htTopo.getGraphView().dm(); //
|
827
|
+
dm = htTopo.getGraphView().dm(); // 移除旧节点。先删除后创建,解决ip节点替换ping资源后链路丢失问题
|
828
|
+
|
829
|
+
dm.remove(node); // 创建
|
831
830
|
|
832
831
|
newLinkElements = findUNExistedLinkElements(elements);
|
833
832
|
createElementsData = null;
|
@@ -888,22 +887,13 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
888
887
|
|
889
888
|
|
890
889
|
sm = htTopo.getGraphView().sm();
|
891
|
-
sm.setSelection([newElement]); //
|
890
|
+
sm.setSelection([newElement]); // 临时放这里,仅拓扑中心有
|
892
891
|
|
893
|
-
dm.remove(node); // saveBind(TopoEvent.DATA_TYPE_RESOURCE_SINGLE, newDatas);
|
894
|
-
// node.a("customName", null);
|
895
|
-
// 删除关联在节点上的出口链路
|
896
|
-
|
897
|
-
_context8.next = 12;
|
898
|
-
return deleteExLink(node);
|
899
|
-
|
900
|
-
case 12:
|
901
|
-
// 临时放这里,仅拓扑中心有
|
902
892
|
if (topo.linkDynamicStyleExecutor) {
|
903
893
|
topo.linkDynamicStyleExecutor.execute();
|
904
894
|
}
|
905
895
|
|
906
|
-
case
|
896
|
+
case 11:
|
907
897
|
case "end":
|
908
898
|
return _context8.stop();
|
909
899
|
}
|
@@ -966,10 +956,11 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
966
956
|
break;
|
967
957
|
}
|
968
958
|
|
959
|
+
topo.historyManager.endTransaction();
|
960
|
+
|
969
961
|
_Message.error("关联资源失败");
|
970
962
|
|
971
|
-
rlog.
|
972
|
-
topo.historyManager.endTransaction();
|
963
|
+
rlog.error("关联资源失败");
|
973
964
|
return _context9.abrupt("return", false);
|
974
965
|
|
975
966
|
case 23:
|
@@ -1001,7 +992,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1001
992
|
|
1002
993
|
function _relateNodeIp() {
|
1003
994
|
_relateNodeIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(txtValue, nodeElement) {
|
1004
|
-
var dm, isUnique,
|
995
|
+
var dm, isUnique, ipNodeData, configObj, configData, _elements2, newLinkElements, newLink, newLinkGroup, createElementsData, _htTopo;
|
1005
996
|
|
1006
997
|
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
1007
998
|
while (1) switch (_context15.prev = _context15.next) {
|
@@ -1023,16 +1014,16 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1023
1014
|
isUnique = isUniqueIp(dm, txtValue, nodeElement); // 获取关联链路
|
1024
1015
|
|
1025
1016
|
if (!isUnique) {
|
1026
|
-
_context15.next =
|
1017
|
+
_context15.next = 24;
|
1027
1018
|
break;
|
1028
1019
|
}
|
1029
1020
|
|
1030
|
-
|
1021
|
+
ipNodeData = buildIpNode(txtValue);
|
1031
1022
|
_context15.next = 8;
|
1032
1023
|
return deleteExLink(nodeElement);
|
1033
1024
|
|
1034
1025
|
case 8:
|
1035
|
-
nodeElement.a(
|
1026
|
+
nodeElement.a(ipNodeData);
|
1036
1027
|
nodeElement.setName(txtValue);
|
1037
1028
|
nodeElement.setTag("ip:" + txtValue); // 获取配置
|
1038
1029
|
|
@@ -1047,8 +1038,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1047
1038
|
case 16:
|
1048
1039
|
configData = _context15.sent;
|
1049
1040
|
// console.log("configData",configObj, configData);
|
1050
|
-
|
1051
|
-
newLinkElements = findUNExistedLinkElements(
|
1041
|
+
_elements2 = configData.elements;
|
1042
|
+
newLinkElements = findUNExistedLinkElements(_elements2); // console.log("configData", configData, newLinkElements);
|
1052
1043
|
|
1053
1044
|
newLink = newLinkElements.filter(function (item) {
|
1054
1045
|
return item.type === "link";
|
@@ -1063,15 +1054,21 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1063
1054
|
nodes: [],
|
1064
1055
|
links: newLink,
|
1065
1056
|
linkGroups: newLinkGroup
|
1066
|
-
};
|
1057
|
+
};
|
1058
|
+
console.log("createElementsData", createElementsData);
|
1067
1059
|
|
1068
1060
|
if ([].concat(newLink, newLinkGroup).length > 0) {
|
1069
1061
|
_htTopo = topo.getHtTopo();
|
1070
1062
|
|
1071
|
-
_htTopo.createElements(createElementsData);
|
1063
|
+
_htTopo.createElements(createElementsData); // 临时放这里,仅拓扑中心有
|
1064
|
+
|
1065
|
+
|
1066
|
+
if (topo.linkDynamicStyleExecutor) {
|
1067
|
+
topo.linkDynamicStyleExecutor.execute();
|
1068
|
+
}
|
1072
1069
|
}
|
1073
1070
|
|
1074
|
-
case
|
1071
|
+
case 24:
|
1075
1072
|
case "end":
|
1076
1073
|
return _context15.stop();
|
1077
1074
|
}
|
package/es/core/models/Alarm.js
CHANGED
@@ -2,7 +2,7 @@ import _Dialog from "@alifd/next/es/dialog";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
4
4
|
import topoService from '@riil-frontend/component-topology-common/es/services/topo';
|
5
|
-
import rlog from '@riil-frontend/component-topology-utils
|
5
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
6
6
|
import { isAvailableArray } from '@riil-frontend/utils';
|
7
7
|
|
8
8
|
var Alarm = /*#__PURE__*/function () {
|
@@ -533,25 +533,34 @@ var Alarm = /*#__PURE__*/function () {
|
|
533
533
|
resAndMetrics = this.topo.store.getState().topoMod.resAndMetrics;
|
534
534
|
resIdsList = resAndMetrics.resIdsList, nodeIdsList = resAndMetrics.nodeIdsList, linkIdsList = resAndMetrics.linkIdsList;
|
535
535
|
alarmDispatchers = this.topo.store.getModelDispatchers('topoAlarm'); // 添加事件
|
536
|
-
|
536
|
+
|
537
|
+
console.log("handleAlarmEvent-接收到推送的原始告警信息", alertData);
|
537
538
|
|
538
539
|
if (!(isAvailableArray(alertData) && isAvailableArray(resIdsList))) {
|
539
|
-
_context9.next =
|
540
|
+
_context9.next = 27;
|
540
541
|
break;
|
541
542
|
}
|
542
543
|
|
543
544
|
sendAl = [];
|
544
545
|
idsList = [].concat(nodeIdsList, linkIdsList);
|
545
546
|
operations = [];
|
547
|
+
console.log('idsList---------', idsList);
|
546
548
|
idsList.forEach(function (idItem) {
|
547
549
|
if (idItem.operation === null) {
|
548
550
|
operations.push(idItem.ciId);
|
549
551
|
}
|
550
552
|
});
|
551
553
|
alertData.forEach(function (item, index) {
|
552
|
-
var _item$resourceId;
|
554
|
+
var _item$resourceId, _item$alertCode;
|
553
555
|
|
554
556
|
var ciId = (_item$resourceId = item.resourceId) !== null && _item$resourceId !== void 0 ? _item$resourceId : item.ciId;
|
557
|
+
var isSub = false;
|
558
|
+
|
559
|
+
if ((_item$alertCode = item.alertCode) !== null && _item$alertCode !== void 0 && _item$alertCode.startsWith("cmp")) {
|
560
|
+
ciId = "sub:" + item.mainCiId;
|
561
|
+
isSub = true;
|
562
|
+
}
|
563
|
+
|
555
564
|
var obj = {
|
556
565
|
id: ciId,
|
557
566
|
level: item.alertLevel,
|
@@ -560,27 +569,30 @@ var Alarm = /*#__PURE__*/function () {
|
|
560
569
|
obj: item,
|
561
570
|
info: item.alertType,
|
562
571
|
ciCode: item === null || item === void 0 ? void 0 : item.ciCode,
|
563
|
-
ruleId: item === null || item === void 0 ? void 0 : item.ruleId
|
572
|
+
ruleId: item === null || item === void 0 ? void 0 : item.ruleId,
|
573
|
+
isSub: isSub
|
564
574
|
};
|
565
575
|
|
566
576
|
if (resIdsList.indexOf(ciId) >= 0 && operations.indexOf(ciId) < 0) {
|
567
577
|
sendAl.push(obj);
|
568
|
-
}
|
569
|
-
|
578
|
+
} // const ciId = `${isSub}+${item.resourceId ?? item.ciId}`;
|
579
|
+
|
580
|
+
});
|
581
|
+
console.log("before-combAlarmData", sendAl, idsList);
|
570
582
|
|
571
583
|
if (!(sendAl.length > 0)) {
|
572
|
-
_context9.next =
|
584
|
+
_context9.next = 27;
|
573
585
|
break;
|
574
586
|
}
|
575
587
|
|
576
588
|
rlog.debug('过滤掉非本拓扑的告警信息 告警开关-推送告警到ht-alarmIsOpened-sendAl', alarmIsOpened, sendAl);
|
577
|
-
_context9.prev =
|
578
|
-
_context9.next =
|
589
|
+
_context9.prev = 15;
|
590
|
+
_context9.next = 18;
|
579
591
|
return alarmDispatchers.combAlarmData({
|
580
592
|
alarmdata: sendAl
|
581
593
|
});
|
582
594
|
|
583
|
-
case
|
595
|
+
case 18:
|
584
596
|
_yield$alarmDispatche2 = _context9.sent;
|
585
597
|
eqFlag = _yield$alarmDispatche2.eqFlag;
|
586
598
|
alarmlist = _yield$alarmDispatche2.alarmlist;
|
@@ -601,19 +613,19 @@ var Alarm = /*#__PURE__*/function () {
|
|
601
613
|
}
|
602
614
|
}
|
603
615
|
|
604
|
-
_context9.next =
|
616
|
+
_context9.next = 27;
|
605
617
|
break;
|
606
618
|
|
607
|
-
case
|
608
|
-
_context9.prev =
|
609
|
-
_context9.t0 = _context9["catch"](
|
619
|
+
case 24:
|
620
|
+
_context9.prev = 24;
|
621
|
+
_context9.t0 = _context9["catch"](15);
|
610
622
|
rlog.error('告警发送异常', _context9.t0);
|
611
623
|
|
612
|
-
case
|
624
|
+
case 27:
|
613
625
|
case "end":
|
614
626
|
return _context9.stop();
|
615
627
|
}
|
616
|
-
}, _callee9, this, [[
|
628
|
+
}, _callee9, this, [[15, 24]]);
|
617
629
|
}));
|
618
630
|
|
619
631
|
function handleAlarmEvent(_x7) {
|