@riil-frontend/component-topology 11.0.30 → 11.0.31
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 +2 -4
- package/build/index.js +34 -49
- package/es/components/MultiResourceDrawer/index.js +18 -16
- package/es/components/ResourceList/ResourceSelect.js +50 -48
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +26 -24
- package/es/components/SingleResourceDrawer/SelectDrawer.js +20 -18
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +25 -23
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
- package/es/core/components/titlebar/widgets/TitleWidget.js +3 -5
- package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
- package/es/core/editor/components/BackgroundView/index.js +129 -119
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +22 -20
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +17 -15
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +9 -7
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +13 -11
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +23 -21
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +12 -10
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +27 -21
- package/es/core/editor/hooks/useKeyboardShortcut.js +2 -2
- package/es/core/editor/hooks/useNewElementTheme.js +2 -2
- package/es/core/editor/store/background.js +10 -8
- package/es/core/editor/store/topoEdit.js +6 -4
- package/es/core/editor/utils/edgeTypeStyleUtil.js +4 -2
- package/es/core/hooks/usePolling.js +121 -117
- package/es/core/hooks/useResourceConfig.js +66 -58
- package/es/core/hooks/useTopoEdit.js +511 -476
- package/es/core/models/Alarm.js +298 -281
- package/es/core/models/AttributeMetricDisplay.js +107 -101
- package/es/core/models/PluginManager.js +3 -4
- package/es/core/models/SelectionModel.js +5 -4
- package/es/core/models/TopoApp.js +240 -205
- package/es/core/models/TopoGraphView.js +21 -18
- package/es/core/models/cache/CiCache.js +27 -28
- package/es/core/models/cache/CiTypeCache.js +41 -37
- package/es/core/models/cache/DictCache.js +35 -33
- package/es/core/models/graph/Background.js +17 -15
- package/es/core/models/plugins/resourceWebControllUrl.js +82 -76
- package/es/core/models/tagstips/ElementTagTipConfig.js +38 -34
- package/es/core/models/topoData.js +70 -68
- package/es/core/models/utils/linkUtils.js +43 -41
- package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/es/core/services/alarm.js +16 -14
- package/es/core/services/background.js +67 -59
- package/es/core/services/cmdb/metric.js +11 -9
- package/es/core/services/cmdb.js +20 -18
- package/es/core/services/index.js +45 -39
- package/es/core/services/overview.js +151 -131
- package/es/core/services/topo/basic.js +13 -11
- package/es/core/services/topo/tagtip.js +12 -10
- package/es/core/store/models/ciModel.js +62 -58
- package/es/core/store/models/customIcon.js +134 -120
- package/es/core/store/models/displayConfig.js +19 -15
- package/es/core/store/models/selection.js +6 -4
- package/es/core/store/models/topoAlarm.js +145 -162
- package/es/core/store/models/topoBaseInfoOverview.js +6 -4
- package/es/core/store/models/topoBizMod.js +32 -28
- package/es/core/store/models/topoConfig.js +231 -215
- package/es/core/store/models/topoGraphView.js +6 -4
- package/es/core/store/models/topoMod.js +395 -373
- package/es/core/utils/imageUtil.js +20 -18
- package/es/core/utils/saveSerialize.js +11 -9
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -15
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +357 -343
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +205 -189
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +109 -107
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +37 -33
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +19 -17
- package/es/networkTopo/components/Link/hook.js +77 -73
- package/es/networkTopo/components/Link/index.js +94 -86
- package/es/networkTopo/components/Link/setting.js +44 -42
- package/es/networkTopo/getTopoData.js +69 -63
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +32 -30
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/es/networkTopo/models/TopoCenter.js +22 -18
- package/es/networkTopo/services/alert.js +22 -18
- package/es/networkTopo/services/authorization.js +55 -45
- package/es/networkTopo/services/cmdb.js +470 -422
- package/es/networkTopo/services/funcAuth.js +24 -22
- package/es/networkTopo/services/link.js +117 -107
- package/es/networkTopo/services/mdc.js +24 -18
- package/es/networkTopo/services/metric.js +27 -23
- package/es/networkTopo/services/model.js +509 -445
- package/es/networkTopo/services/risk.js +11 -9
- package/es/networkTopo/services/topo/auth.js +33 -27
- package/es/networkTopo/services/topo/basic.js +314 -274
- package/es/networkTopo/services/topo/blacklist.js +24 -20
- package/es/networkTopo/services/topo/ciInfo.js +31 -27
- package/es/networkTopo/services/topo/icon.js +59 -49
- package/es/networkTopo/services/topo/networkLink.js +36 -32
- package/es/networkTopo/services/topo/relation.js +11 -9
- package/es/networkTopo/services/topo/resourceWebUrl.js +42 -36
- package/es/networkTopo/store/functionAuth.js +37 -31
- package/es/networkTopo/store/topoCenter.js +152 -142
- package/es/networkTopo/store/topoLinkMod.js +6 -4
- package/es/networkTopo/store/topoTreeMod.js +182 -170
- package/es/networkTopo/utils/exportData.js +54 -52
- package/lib/components/MultiResourceDrawer/index.js +18 -16
- package/lib/components/ResourceList/ResourceSelect.js +50 -48
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +29 -27
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +20 -18
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +32 -30
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
- package/lib/core/components/titlebar/widgets/TitleWidget.js +3 -5
- package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
- package/lib/core/editor/components/BackgroundView/index.js +128 -118
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +24 -22
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +21 -19
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +10 -8
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +14 -12
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +28 -26
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +14 -12
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +31 -25
- package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -2
- package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
- package/lib/core/editor/store/background.js +10 -8
- package/lib/core/editor/store/topoEdit.js +6 -4
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +4 -2
- package/lib/core/hooks/usePolling.js +120 -116
- package/lib/core/hooks/useResourceConfig.js +66 -58
- package/lib/core/hooks/useTopoEdit.js +503 -468
- package/lib/core/models/Alarm.js +292 -275
- package/lib/core/models/AttributeMetricDisplay.js +110 -104
- package/lib/core/models/PluginManager.js +3 -4
- package/lib/core/models/SelectionModel.js +5 -4
- package/lib/core/models/TopoApp.js +240 -205
- package/lib/core/models/TopoGraphView.js +21 -18
- package/lib/core/models/cache/CiCache.js +32 -33
- package/lib/core/models/cache/CiTypeCache.js +42 -38
- package/lib/core/models/cache/DictCache.js +35 -33
- package/lib/core/models/graph/Background.js +18 -16
- package/lib/core/models/plugins/resourceWebControllUrl.js +80 -74
- package/lib/core/models/tagstips/ElementTagTipConfig.js +38 -34
- package/lib/core/models/topoData.js +71 -69
- package/lib/core/models/utils/linkUtils.js +43 -41
- package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/lib/core/services/alarm.js +20 -18
- package/lib/core/services/background.js +78 -70
- package/lib/core/services/cmdb/metric.js +12 -10
- package/lib/core/services/cmdb.js +22 -20
- package/lib/core/services/index.js +51 -45
- package/lib/core/services/overview.js +151 -131
- package/lib/core/services/topo/basic.js +15 -13
- package/lib/core/services/topo/tagtip.js +14 -12
- package/lib/core/store/models/ciModel.js +70 -66
- package/lib/core/store/models/customIcon.js +134 -120
- package/lib/core/store/models/displayConfig.js +19 -15
- package/lib/core/store/models/selection.js +6 -4
- package/lib/core/store/models/topoAlarm.js +145 -163
- package/lib/core/store/models/topoBaseInfoOverview.js +6 -4
- package/lib/core/store/models/topoBizMod.js +38 -34
- package/lib/core/store/models/topoConfig.js +238 -222
- package/lib/core/store/models/topoGraphView.js +6 -4
- package/lib/core/store/models/topoMod.js +397 -375
- package/lib/core/utils/imageUtil.js +24 -22
- package/lib/core/utils/saveSerialize.js +11 -9
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -15
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +358 -344
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +206 -190
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +109 -107
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -29
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +20 -18
- package/lib/networkTopo/components/Link/hook.js +77 -73
- package/lib/networkTopo/components/Link/index.js +95 -87
- package/lib/networkTopo/components/Link/setting.js +44 -42
- package/lib/networkTopo/getTopoData.js +69 -63
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +33 -31
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/lib/networkTopo/models/TopoCenter.js +22 -18
- package/lib/networkTopo/services/alert.js +22 -18
- package/lib/networkTopo/services/authorization.js +65 -55
- package/lib/networkTopo/services/cmdb.js +470 -422
- package/lib/networkTopo/services/funcAuth.js +26 -24
- package/lib/networkTopo/services/link.js +118 -108
- package/lib/networkTopo/services/mdc.js +27 -21
- package/lib/networkTopo/services/metric.js +31 -27
- package/lib/networkTopo/services/model.js +509 -445
- package/lib/networkTopo/services/risk.js +13 -11
- package/lib/networkTopo/services/topo/auth.js +33 -27
- package/lib/networkTopo/services/topo/basic.js +317 -277
- package/lib/networkTopo/services/topo/blacklist.js +24 -20
- package/lib/networkTopo/services/topo/ciInfo.js +38 -34
- package/lib/networkTopo/services/topo/icon.js +69 -59
- package/lib/networkTopo/services/topo/networkLink.js +36 -32
- package/lib/networkTopo/services/topo/relation.js +13 -11
- package/lib/networkTopo/services/topo/resourceWebUrl.js +50 -44
- package/lib/networkTopo/store/functionAuth.js +37 -31
- package/lib/networkTopo/store/topoCenter.js +152 -142
- package/lib/networkTopo/store/topoLinkMod.js +6 -4
- package/lib/networkTopo/store/topoTreeMod.js +178 -166
- package/lib/networkTopo/utils/exportData.js +61 -59
- package/package.json +3 -3
@@ -59,21 +59,23 @@ function _default(topo) {
|
|
59
59
|
|
60
60
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
61
61
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
62
|
-
while (1)
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
62
|
+
while (1) {
|
63
|
+
switch (_context.prev = _context.next) {
|
64
|
+
case 0:
|
65
|
+
_this.update({
|
66
|
+
alarmDoc: {},
|
67
|
+
alarmList: [],
|
68
|
+
alarmRecord: [],
|
69
|
+
risks: [],
|
70
|
+
relateTopoAlarm: {}
|
71
|
+
});
|
72
|
+
|
73
|
+
return _context.abrupt("return", "resetAlarmDoc Over");
|
74
|
+
|
75
|
+
case 2:
|
76
|
+
case "end":
|
77
|
+
return _context.stop();
|
78
|
+
}
|
77
79
|
}
|
78
80
|
}, _callee);
|
79
81
|
}))();
|
@@ -85,165 +87,145 @@ function _default(topo) {
|
|
85
87
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
86
88
|
var alarmdata, _state$topoAlarm, alarmDoc, alarmRecord, currentAlarmList, _state$topoMod, resAndMetrics, topoData, resIdsList, doc, record, _loop, i, alarmlist, eqFlag;
|
87
89
|
|
88
|
-
return _regenerator["default"].wrap(function _callee2$(
|
89
|
-
while (1)
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
}) < 0) {
|
133
|
-
newArr = [].concat(doc[rid]);
|
134
|
-
newArr.push(item);
|
135
|
-
doc[rid] = newArr.sort(sortList);
|
136
|
-
}
|
137
|
-
} else {
|
138
|
-
doc[rid] = [item];
|
139
|
-
}
|
140
|
-
} else {
|
141
|
-
_rlog["default"].warn("接收到异常或已关闭的告警", item);
|
90
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
91
|
+
while (1) {
|
92
|
+
switch (_context2.prev = _context2.next) {
|
93
|
+
case 0:
|
94
|
+
alarmdata = conditions.alarmdata;
|
95
|
+
_state$topoAlarm = state.topoAlarm, alarmDoc = _state$topoAlarm.alarmDoc, alarmRecord = _state$topoAlarm.alarmRecord, currentAlarmList = _state$topoAlarm.alarmList;
|
96
|
+
_state$topoMod = state.topoMod, resAndMetrics = _state$topoMod.resAndMetrics, topoData = _state$topoMod.topoData;
|
97
|
+
resIdsList = resAndMetrics.resIdsList;
|
98
|
+
doc = (0, _extends2["default"])({}, alarmDoc); // rlog.debug(
|
99
|
+
// " 归档处理告警信息.doc, alarmdata,resIdsList,alarmRecord",
|
100
|
+
// doc,
|
101
|
+
// alarmdata,
|
102
|
+
// resIdsList,
|
103
|
+
// alarmRecord
|
104
|
+
// );
|
105
|
+
// rlog.debug("topoAlarmMod.combAlarmData-alarmDoc, alarmRecord ", alarmDoc, alarmRecord );
|
106
|
+
|
107
|
+
record = _lodash["default"].uniq(alarmRecord); // rlog.debug("告警归档-doc, record, alarmRecord", doc, record, alarmRecord);
|
108
|
+
|
109
|
+
_loop = function _loop(i) {
|
110
|
+
var item = (0, _extends2["default"])({}, alarmdata[i]); // demo mock
|
111
|
+
// if (item.alertId === 9144) {
|
112
|
+
// item.level = Math.floor(Math.random() * 4) + 1;
|
113
|
+
// if (item.level === 4) {
|
114
|
+
// item.status = "reset";
|
115
|
+
// }
|
116
|
+
// }
|
117
|
+
// over
|
118
|
+
|
119
|
+
var rid = item.id; // rlog.debug("处理一条告警", item, rid, item.status, record);
|
120
|
+
|
121
|
+
if ((resIdsList || []).indexOf(rid) >= 0) {
|
122
|
+
if (record.indexOf(item.alertId) < 0) {
|
123
|
+
if (showAlarmStatus.indexOf(item.status) >= 0) {
|
124
|
+
// rlog.debug("这是一条新告警", item);
|
125
|
+
record.push(item.alertId);
|
126
|
+
|
127
|
+
if (doc.hasOwnProperty(rid)) {
|
128
|
+
if (doc[rid].findIndex(function (x) {
|
129
|
+
return x.alertId === item.alertId;
|
130
|
+
}) < 0) {
|
131
|
+
var newArr = [].concat(doc[rid]);
|
132
|
+
newArr.push(item);
|
133
|
+
doc[rid] = newArr.sort(sortList);
|
142
134
|
}
|
143
135
|
} else {
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
136
|
+
doc[rid] = [item];
|
137
|
+
}
|
138
|
+
} else {
|
139
|
+
_rlog["default"].warn("接收到异常或已关闭的告警", item);
|
140
|
+
}
|
141
|
+
} else {
|
142
|
+
var sliceTag = doc[rid].findIndex(function (x) {
|
143
|
+
return x.alertId === item.alertId;
|
144
|
+
}); // rlog.debug(
|
145
|
+
// "已有资源告警-doc-rid-record-sliceTag-item",
|
146
|
+
// doc,
|
147
|
+
// rid,
|
148
|
+
// record,
|
149
|
+
// sliceTag,
|
150
|
+
// item
|
151
|
+
// );
|
152
|
+
|
153
|
+
if (showAlarmStatus.indexOf(item.status) >= 0) {
|
154
|
+
if (item.status === "change") {
|
155
|
+
var old = doc[rid][sliceTag];
|
156
|
+
|
157
|
+
if (old.level !== item.level) {
|
158
|
+
var _newArr = [].concat(doc[rid]);
|
159
|
+
|
160
|
+
_newArr.splice(sliceTag, 1, (0, _extends2["default"])({}, item, {
|
161
|
+
status: old.status
|
162
|
+
}));
|
163
|
+
|
164
|
+
doc[rid] = _newArr.sort(sortList);
|
165
|
+
|
166
|
+
_rlog["default"].debug("告警级别变更", doc[rid], item);
|
174
167
|
} else {
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
168
|
+
_rlog["default"].debug("接收到异常的重复告警", item);
|
169
|
+
}
|
170
|
+
} else {// rlog.debug("重复告警", item);
|
171
|
+
}
|
172
|
+
} else {
|
173
|
+
if (sliceTag >= 0) {
|
174
|
+
var _newArr2 = [].concat(doc[rid]);
|
179
175
|
|
180
|
-
|
181
|
-
}
|
176
|
+
_newArr2.splice(sliceTag, 1);
|
182
177
|
|
183
|
-
|
178
|
+
doc[rid] = _newArr2;
|
179
|
+
}
|
184
180
|
|
185
|
-
|
186
|
-
delete doc[rid];
|
187
|
-
}
|
181
|
+
_rlog["default"].debug("该告警移除状态-status", item.status, doc[rid], doc);
|
188
182
|
|
189
|
-
|
190
|
-
|
183
|
+
if (doc[rid].length === 0) {
|
184
|
+
delete doc[rid];
|
191
185
|
}
|
186
|
+
|
187
|
+
record.splice(record.indexOf(item.alertId), 1);
|
192
188
|
}
|
189
|
+
}
|
190
|
+
}
|
191
|
+
};
|
192
|
+
|
193
|
+
for (i = 0; i < alarmdata.length; i++) {
|
194
|
+
_loop(i);
|
195
|
+
} // rlog.debug("准备发送的告警", doc, record);
|
196
|
+
|
197
|
+
|
198
|
+
alarmlist = _lodash["default"].compact(Object.keys(doc).map(function (id) {
|
199
|
+
if (doc[id].length > 0) {
|
200
|
+
var alarmObj = (0, _extends2["default"])({}, doc[id][0], {
|
201
|
+
id: id
|
202
|
+
}); // 传递给HT时,链路要用r开头的id
|
203
|
+
// rlog.debug('xxxxxxxxxxxxxxxxxxxx', doc[id][0], alarmObj.status);
|
193
204
|
|
194
|
-
|
195
|
-
|
196
|
-
|
205
|
+
return showAlarmStatus.indexOf(alarmObj.status) >= 0 ? alarmObj : null;
|
206
|
+
} else {
|
207
|
+
return null;
|
197
208
|
}
|
198
|
-
}
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
if (doc[id].length > 0) {
|
219
|
-
var alarmObj = (0, _extends2["default"])({}, doc[id][0], {
|
220
|
-
id: id
|
221
|
-
}); // 传递给HT时,链路要用r开头的id
|
222
|
-
// rlog.debug('xxxxxxxxxxxxxxxxxxxx', doc[id][0], alarmObj.status);
|
223
|
-
|
224
|
-
return showAlarmStatus.indexOf(alarmObj.status) >= 0 ? alarmObj : null;
|
225
|
-
} else {
|
226
|
-
return null;
|
227
|
-
}
|
228
|
-
}));
|
229
|
-
eqFlag = _lodash["default"].isEqual(_lodash["default"].sortBy(alarmlist), _lodash["default"].sortBy(currentAlarmList));
|
230
|
-
|
231
|
-
_rlog["default"].debug("告警归档结束", eqFlag, currentAlarmList, alarmlist, doc, record);
|
232
|
-
|
233
|
-
_this2.update({
|
234
|
-
alarmDoc: doc,
|
235
|
-
alarmRecord: record,
|
236
|
-
alarmList: eqFlag ? currentAlarmList : alarmlist
|
237
|
-
});
|
238
|
-
|
239
|
-
return _context3.abrupt("return", {
|
240
|
-
eqFlag: eqFlag,
|
241
|
-
alarmlist: alarmlist
|
242
|
-
});
|
243
|
-
|
244
|
-
case 18:
|
245
|
-
case "end":
|
246
|
-
return _context3.stop();
|
209
|
+
}));
|
210
|
+
eqFlag = _lodash["default"].isEqual(_lodash["default"].sortBy(alarmlist), _lodash["default"].sortBy(currentAlarmList));
|
211
|
+
|
212
|
+
_rlog["default"].debug("告警归档结束", eqFlag, currentAlarmList, alarmlist, doc, record);
|
213
|
+
|
214
|
+
_this2.update({
|
215
|
+
alarmDoc: doc,
|
216
|
+
alarmRecord: record,
|
217
|
+
alarmList: eqFlag ? currentAlarmList : alarmlist
|
218
|
+
});
|
219
|
+
|
220
|
+
return _context2.abrupt("return", {
|
221
|
+
eqFlag: eqFlag,
|
222
|
+
alarmlist: alarmlist
|
223
|
+
});
|
224
|
+
|
225
|
+
case 13:
|
226
|
+
case "end":
|
227
|
+
return _context2.stop();
|
228
|
+
}
|
247
229
|
}
|
248
230
|
}, _callee2);
|
249
231
|
}))();
|
@@ -39,10 +39,12 @@ var _default = {
|
|
39
39
|
init: function init(payload, rootState) {
|
40
40
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
41
41
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
42
|
-
while (1)
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
while (1) {
|
43
|
+
switch (_context.prev = _context.next) {
|
44
|
+
case 0:
|
45
|
+
case "end":
|
46
|
+
return _context.stop();
|
47
|
+
}
|
46
48
|
}
|
47
49
|
}, _callee);
|
48
50
|
}))();
|
@@ -48,17 +48,19 @@ function _default(engine) {
|
|
48
48
|
|
49
49
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
50
50
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
51
|
-
while (1)
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
51
|
+
while (1) {
|
52
|
+
switch (_context.prev = _context.next) {
|
53
|
+
case 0:
|
54
|
+
_this.update({
|
55
|
+
resAndMetrics: conditions
|
56
|
+
});
|
57
|
+
|
58
|
+
return _context.abrupt("return", {});
|
59
|
+
|
60
|
+
case 2:
|
61
|
+
case "end":
|
62
|
+
return _context.stop();
|
63
|
+
}
|
62
64
|
}
|
63
65
|
}, _callee);
|
64
66
|
}))();
|
@@ -68,29 +70,31 @@ function _default(engine) {
|
|
68
70
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
69
71
|
var resIdsList, result;
|
70
72
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
71
|
-
while (1)
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
73
|
+
while (1) {
|
74
|
+
switch (_context2.prev = _context2.next) {
|
75
|
+
case 0:
|
76
|
+
resIdsList = state.topoBizMod.resAndMetrics.resIdsList; // rlog.debug('根据ci的id获取属性的值-getCiArrByIds', resIdsList);
|
77
|
+
// const ciIds = encodeURIComponent(resIdsList);
|
78
|
+
|
79
|
+
_context2.prev = 1;
|
80
|
+
_context2.next = 4;
|
81
|
+
return _topo["default"].getBatchCiArr({
|
82
|
+
ids: resIdsList
|
83
|
+
});
|
84
|
+
|
85
|
+
case 4:
|
86
|
+
result = _context2.sent;
|
87
|
+
return _context2.abrupt("return", result.content);
|
88
|
+
|
89
|
+
case 8:
|
90
|
+
_context2.prev = 8;
|
91
|
+
_context2.t0 = _context2["catch"](1);
|
92
|
+
return _context2.abrupt("return", null);
|
93
|
+
|
94
|
+
case 11:
|
95
|
+
case "end":
|
96
|
+
return _context2.stop();
|
97
|
+
}
|
94
98
|
}
|
95
99
|
}, _callee2, null, [[1, 8]]);
|
96
100
|
}))();
|