@riil-frontend/component-topology 7.0.0-dev.1 → 7.0.0-dev.3
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/core/components/TopoView/topoView.js +14 -8
- package/es/core/components/titlebar/index.js +2 -1
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/store/coreModels.js +2 -0
- package/es/core/store/models/selection.js +3 -1
- package/es/core/store/models/viewer/resourceDetail.js +31 -0
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +2 -5
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +72 -43
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +136 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +9 -16
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +119 -117
- package/es/networkTopo/store/topoCenter.js +27 -4
- package/es/style.js +22 -22
- package/lib/core/components/TopoView/topoView.js +14 -9
- package/lib/core/components/titlebar/index.js +5 -1
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/store/coreModels.js +3 -0
- package/lib/core/store/models/selection.js +3 -1
- package/lib/core/store/models/viewer/resourceDetail.js +40 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +2 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +71 -46
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +156 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +9 -16
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +1 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +119 -117
- package/lib/networkTopo/store/topoCenter.js +27 -4
- package/lib/style.js +22 -22
- package/package.json +2 -2
@@ -7,7 +7,6 @@ import TopoGraph, { TopoEvent } from '@riil-frontend/component-topology-graph';
|
|
7
7
|
import rlog from '@riil-frontend/component-topology-utils/es/rlog'; // 通用
|
8
8
|
|
9
9
|
import showMessage from "../../utils/showMessage";
|
10
|
-
import TitleBar from "../titlebar/TitleBar";
|
11
10
|
import { TPL_TREE } from "../../../utils/template";
|
12
11
|
import { updateEdgeExpanded } from "../../utils/edgeUtil";
|
13
12
|
import useRouterAdapter from "../../hooks/useRouterAdapter";
|
@@ -149,7 +148,19 @@ var Topology = function Topology(props) {
|
|
149
148
|
topo.selectionModel.init();
|
150
149
|
topoDispatchers.update({
|
151
150
|
graphLoaded: true
|
152
|
-
});
|
151
|
+
}); // url选中元素
|
152
|
+
|
153
|
+
var _topo$store$getModelS = topo.store.getModelState('selection'),
|
154
|
+
initSelectionId = _topo$store$getModelS.initSelectionId;
|
155
|
+
|
156
|
+
if (initSelectionId) {
|
157
|
+
var ele = topo.getHtTopo().getGraphView().dm().getDataByTag(initSelectionId);
|
158
|
+
topo.getHtTopo().getGraphView().sm().setSelection([ele]);
|
159
|
+
var selectionDispatchers = topo.store.getModelDispatchers('selection');
|
160
|
+
selectionDispatchers.update({
|
161
|
+
initSelectionId: null
|
162
|
+
});
|
163
|
+
}
|
153
164
|
|
154
165
|
if (onLoaded) {
|
155
166
|
onLoaded(topoData);
|
@@ -252,12 +263,7 @@ var Topology = function Topology(props) {
|
|
252
263
|
return /*#__PURE__*/React.createElement("div", {
|
253
264
|
className: styles.topoView,
|
254
265
|
"data-version": topo.version
|
255
|
-
}, titleBar !== false &&
|
256
|
-
topo: topo,
|
257
|
-
viewerProps: viewerProps,
|
258
|
-
onEnterEdit: onEnterEdit,
|
259
|
-
topoEditApi: topoEdit
|
260
|
-
})), isEditMode && /*#__PURE__*/React.createElement(EditorToolbar, {
|
266
|
+
}, titleBar !== false && titleBar, isEditMode && /*#__PURE__*/React.createElement(EditorToolbar, {
|
261
267
|
topo: topo,
|
262
268
|
topoEdit: topoEdit,
|
263
269
|
topoContext: {
|
@@ -5,4 +5,5 @@ import NodesDragSwitch from "../../viewer/components/titlebar/widgets/NodesDragS
|
|
5
5
|
import AlarmListShowButton from "../../viewer/components/titlebar/widgets/AlarmListShowButton";
|
6
6
|
import TitleWidget from "./widgets/TitleWidget";
|
7
7
|
import ViewerTools from "../../viewer/components/titlebar/ViewerTools";
|
8
|
-
|
8
|
+
import DebugTools from "../../editor/components/titlebar/widgets/DebugTools";
|
9
|
+
export { TitleBar, SearchWidget, NodesDragSwitch, DisplaySettingButton, AlarmListShowButton, TitleWidget, ViewerTools, DebugTools };
|
@@ -23,7 +23,7 @@ import topoFactory from "./topoFactory";
|
|
23
23
|
import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
|
24
24
|
import SelectionModel from "./SelectionModel"; // eslint-disable-next-line no-undef
|
25
25
|
|
26
|
-
var version = typeof "7.0.0-dev.
|
26
|
+
var version = typeof "7.0.0-dev.3" === 'string' ? "7.0.0-dev.3" : null;
|
27
27
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
28
28
|
/**
|
29
29
|
* 拓扑显示和编辑
|
@@ -11,6 +11,7 @@ import selection from "./models/selection"; // 显示模式
|
|
11
11
|
|
12
12
|
import topoAlarm from "./models/topoAlarm";
|
13
13
|
import displayConfig from "./models/displayConfig";
|
14
|
+
import resourceDetail from "./models/viewer/resourceDetail";
|
14
15
|
import topoBaseInfoOverview from "./models/topoBaseInfoOverview";
|
15
16
|
import lock from "./models/viewer/lock";
|
16
17
|
export default {
|
@@ -26,6 +27,7 @@ export default {
|
|
26
27
|
// 显示模式
|
27
28
|
topoAlarm: topoAlarm,
|
28
29
|
displayConfig: displayConfig,
|
30
|
+
resourceDetail: resourceDetail,
|
29
31
|
topoBaseInfoOverview: topoBaseInfoOverview,
|
30
32
|
lock: lock
|
31
33
|
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* 资源概览
|
5
|
+
*/
|
6
|
+
import rlog from '@riil-frontend/component-topology-utils/es/rlog';
|
7
|
+
export default {
|
8
|
+
// 定义 model 的初始 state
|
9
|
+
state: {
|
10
|
+
visible: false,
|
11
|
+
id: null // 资源id
|
12
|
+
|
13
|
+
},
|
14
|
+
// 定义改变该模型状态的纯函数
|
15
|
+
reducers: {
|
16
|
+
update: function update(prevState, payload) {
|
17
|
+
return _extends({}, prevState, payload);
|
18
|
+
},
|
19
|
+
reset: function reset(prevState, payload) {
|
20
|
+
return {
|
21
|
+
visible: false,
|
22
|
+
id: null // 资源id
|
23
|
+
|
24
|
+
};
|
25
|
+
}
|
26
|
+
},
|
27
|
+
// 定义处理该模型副作用的函数
|
28
|
+
effects: function effects(dispatch) {
|
29
|
+
return {};
|
30
|
+
}
|
31
|
+
};
|
@@ -11,10 +11,7 @@ export default function ResourceDetail(props) {
|
|
11
11
|
var topo = props.topo,
|
12
12
|
userId = props.userId,
|
13
13
|
activeData = props.activeData,
|
14
|
-
resourceData = props.resourceData;
|
15
|
-
// <Tab.Item title="网络信息表" key="3">网络信息表</Tab.Item>
|
16
|
-
// <Tab.Item title="Web工作台" key="4">Web工作台</Tab.Item> */}
|
17
|
-
|
14
|
+
resourceData = props.resourceData;
|
18
15
|
var tabBodys = [{
|
19
16
|
title: '资源概览',
|
20
17
|
content: /*#__PURE__*/React.createElement(ResourceOverview, _extends({}, props, activeData, {
|
@@ -33,7 +30,7 @@ export default function ResourceDetail(props) {
|
|
33
30
|
data: resourceData,
|
34
31
|
topo: topo
|
35
32
|
}),
|
36
|
-
visible:
|
33
|
+
visible: resourceData.type === 'node' && !!((_topo$viewProps = topo.viewProps) !== null && _topo$viewProps !== void 0 && (_topo$viewProps$topoC = _topo$viewProps.topoContext) !== null && _topo$viewProps$topoC !== void 0 && _topo$viewProps$topoC.isNetworkTopo)
|
37
34
|
}].filter(function (item) {
|
38
35
|
return item.visible !== false;
|
39
36
|
});
|
@@ -4,19 +4,16 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
5
5
|
import { TopoEvent } from '@riil-frontend/component-topology-graph';
|
6
6
|
import PropTypes from 'prop-types';
|
7
|
-
import React, { useEffect,
|
8
|
-
import Tab from "../../../../../components/FullheightTab";
|
7
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
9
8
|
import service from "../../../../services/overview";
|
10
|
-
import ClusterMemberTable from "./components/ClusterMemberTable";
|
11
9
|
import Title from "./components/DrawerTitle";
|
12
|
-
import ResourceOverview from "./components/ResourceOverview";
|
13
|
-
import WebConsole from "./components/WebConsole/WebConsoleContainer";
|
14
10
|
import styles from "./index.module.scss";
|
15
11
|
import ResourceDetail from "./ResourceDetail"; // 基本信息
|
16
12
|
|
17
13
|
function ResourceDetailDrawer(props) {
|
18
14
|
var topo = props.topo,
|
19
|
-
canShow = props.canShow
|
15
|
+
canShow = props.canShow,
|
16
|
+
viewerProps = props.viewerProps;
|
20
17
|
|
21
18
|
var _topo$store$useModel = topo.store.useModel('topoBaseInfoOverview'),
|
22
19
|
topoState = _topo$store$useModel[0],
|
@@ -29,26 +26,35 @@ function ResourceDetailDrawer(props) {
|
|
29
26
|
var _topo$store$useModelS2 = topo.store.useModelState("lock"),
|
30
27
|
lock = _topo$store$useModelS2.lock;
|
31
28
|
|
32
|
-
var
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
var
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
29
|
+
var _topo$store$useModel2 = topo.store.useModel('resourceDetail'),
|
30
|
+
resourceDetailState = _topo$store$useModel2[0],
|
31
|
+
resourceDetailDispatchers = _topo$store$useModel2[1];
|
32
|
+
|
33
|
+
var visible = resourceDetailState.visible,
|
34
|
+
id = resourceDetailState.id;
|
35
|
+
var resourceData = topo.dataModel.useDataById(id);
|
36
|
+
var activeData = useMemo(function () {
|
37
|
+
return resourceData ? {
|
38
|
+
id: resourceData.id,
|
39
|
+
name: resourceData.name,
|
40
|
+
type: resourceData.type === 'node' ? 'node' : 'link',
|
41
|
+
// 类型: node、link
|
42
|
+
ciType: resourceData.ciType,
|
43
|
+
ciName: resourceData.ciName
|
44
|
+
} : {
|
45
|
+
id: '',
|
46
|
+
name: '',
|
47
|
+
type: '',
|
48
|
+
// 类型: node、link
|
49
|
+
ciType: '',
|
50
|
+
ciName: ''
|
51
|
+
};
|
52
|
+
}, [resourceData]);
|
53
|
+
|
54
|
+
var _useState = useState(''),
|
55
|
+
userId = _useState[0],
|
56
|
+
setUserId = _useState[1];
|
57
|
+
|
52
58
|
useEffect(function () {
|
53
59
|
var notifier = topo.view.topoClient.notifier;
|
54
60
|
notifier.on(TopoEvent.EVENT_DOUBLE_CLICK, openOverview);
|
@@ -62,10 +68,17 @@ function ResourceDetailDrawer(props) {
|
|
62
68
|
metricCodes: []
|
63
69
|
});
|
64
70
|
};
|
65
|
-
}, [lock]);
|
71
|
+
}, [lock]);
|
72
|
+
useEffect(function () {
|
73
|
+
return function () {
|
74
|
+
resourceDetailDispatchers.reset();
|
75
|
+
};
|
76
|
+
}, []); // 解决切换拓扑图隐藏概览
|
66
77
|
|
67
78
|
useEffect(function () {
|
68
|
-
|
79
|
+
resourceDetailDispatchers.update({
|
80
|
+
visible: false
|
81
|
+
}); // TODO 其他数据重置
|
69
82
|
}, [topoId]);
|
70
83
|
|
71
84
|
function getUser() {
|
@@ -164,28 +177,42 @@ function ResourceDetailDrawer(props) {
|
|
164
177
|
|
165
178
|
if (!canShow(htElement)) {
|
166
179
|
return;
|
167
|
-
}
|
180
|
+
} // 显示隐藏
|
168
181
|
|
169
|
-
setActiveData({
|
170
|
-
id: id,
|
171
|
-
name: name,
|
172
|
-
type: {
|
173
|
-
linkGroup: 'link',
|
174
|
-
group: 'node'
|
175
|
-
}[type] || type,
|
176
|
-
ciType: ciType,
|
177
|
-
ciName: ciName
|
178
|
-
}); // 显示隐藏
|
179
182
|
|
180
|
-
targetType === 'doubleClick'
|
183
|
+
if (targetType === 'doubleClick') {
|
184
|
+
resourceDetailDispatchers.update({
|
185
|
+
visible: true,
|
186
|
+
id: id
|
187
|
+
});
|
188
|
+
} else {
|
189
|
+
resourceDetailDispatchers.update({
|
190
|
+
id: id
|
191
|
+
});
|
192
|
+
} // userId
|
193
|
+
|
181
194
|
|
182
195
|
getUser();
|
183
196
|
}
|
184
197
|
|
185
198
|
var renderContent = function renderContent() {
|
186
|
-
|
199
|
+
// 支持自定义概览
|
200
|
+
var _ref = (viewerProps === null || viewerProps === void 0 ? void 0 : viewerProps.resourceDetailProps) || {},
|
201
|
+
getResourceDetail = _ref.getResourceDetail;
|
202
|
+
|
203
|
+
var ResourceDetailWidget;
|
204
|
+
|
205
|
+
if (getResourceDetail) {
|
206
|
+
ResourceDetailWidget = getResourceDetail(resourceData);
|
207
|
+
}
|
208
|
+
|
209
|
+
if (!ResourceDetailWidget) {
|
210
|
+
ResourceDetailWidget = ResourceDetail;
|
211
|
+
}
|
212
|
+
|
213
|
+
return /*#__PURE__*/React.createElement(ResourceDetailWidget, _extends({}, props, {
|
187
214
|
topo: topo,
|
188
|
-
userId:
|
215
|
+
userId: userId,
|
189
216
|
activeData: activeData,
|
190
217
|
resourceData: resourceData
|
191
218
|
}));
|
@@ -202,7 +229,9 @@ function ResourceDetailDrawer(props) {
|
|
202
229
|
width: 580,
|
203
230
|
hasMask: false,
|
204
231
|
onClose: function onClose() {
|
205
|
-
return
|
232
|
+
return resourceDetailDispatchers.update({
|
233
|
+
visible: false
|
234
|
+
});
|
206
235
|
}
|
207
236
|
}, visible && resourceData && renderContent()));
|
208
237
|
}
|
package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
import _Message from "@alifd/next/es/message";
|
2
|
+
import _Table from "@alifd/next/es/table";
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
4
|
+
import _Button from "@alifd/next/es/button";
|
5
|
+
import _Icon from "@alifd/next/es/icon";
|
6
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
7
|
+
import React from 'react';
|
8
|
+
import moment from 'moment';
|
9
|
+
import BlockBox from "./BlockBox";
|
10
|
+
import Link from "../../../../../../../components/Link";
|
11
|
+
import service from "../../../../../../services/overview";
|
12
|
+
import styles from "./index.module.scss"; // url 处理,UICBB 的地址需截取前缀
|
13
|
+
|
14
|
+
function formatUrl(url) {
|
15
|
+
var _window, _window$location;
|
16
|
+
|
17
|
+
var prefix = '/default/pagecenter';
|
18
|
+
|
19
|
+
if (((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.pathname.indexOf(prefix)) === 0 && (url === null || url === void 0 ? void 0 : url.indexOf(prefix)) === 0) {
|
20
|
+
return url.split(prefix)[1];
|
21
|
+
} else {
|
22
|
+
return url;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
function EventsCard(props) {
|
27
|
+
var alarmRiskList = props.alarmRiskList,
|
28
|
+
closeDetailDrawer = props.closeDetailDrawer,
|
29
|
+
onHandleAlarm = props.onHandleAlarm; // 告警table列配置
|
30
|
+
|
31
|
+
var columns = [{
|
32
|
+
title: '描述',
|
33
|
+
dataIndex: 'title',
|
34
|
+
key: 'title',
|
35
|
+
cell: function cell(value, index, record) {
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
37
|
+
className: styles['alarm-title'],
|
38
|
+
title: value,
|
39
|
+
onClick: closeDetailDrawer
|
40
|
+
}, /*#__PURE__*/React.createElement(_Icon, {
|
41
|
+
type: record.icon,
|
42
|
+
size: "xs",
|
43
|
+
className: styles['alarm-color-icon'] + " " + record.className
|
44
|
+
}), /*#__PURE__*/React.createElement(Link, {
|
45
|
+
className: styles.link,
|
46
|
+
to: formatUrl(record.link)
|
47
|
+
}, value));
|
48
|
+
}
|
49
|
+
}, {
|
50
|
+
title: '时间',
|
51
|
+
dataIndex: 'time',
|
52
|
+
key: 'time',
|
53
|
+
width: 144,
|
54
|
+
cell: function cell(value, index, record) {
|
55
|
+
return /*#__PURE__*/React.createElement("div", {
|
56
|
+
title: moment(value).format('YYYY-MM-DD HH:mm:ss')
|
57
|
+
}, moment(value).format('YYYY-MM-DD HH:mm:ss'));
|
58
|
+
}
|
59
|
+
}, {
|
60
|
+
title: '操作',
|
61
|
+
dataIndex: 'status',
|
62
|
+
key: 'status',
|
63
|
+
width: 64,
|
64
|
+
cell: function cell(status, index, record) {
|
65
|
+
if (record.type === 'alarm') {
|
66
|
+
return status === 'toDeal' ? /*#__PURE__*/React.createElement(_Button, {
|
67
|
+
text: true,
|
68
|
+
type: "primary",
|
69
|
+
onClick: function onClick() {
|
70
|
+
return alarmRiskOperation(record.type, record.params);
|
71
|
+
}
|
72
|
+
}, "\u53D7\u7406") : /*#__PURE__*/React.createElement(_Button, {
|
73
|
+
disabled: true,
|
74
|
+
text: true,
|
75
|
+
type: "primary"
|
76
|
+
}, "\u5DF2\u53D7\u7406");
|
77
|
+
} else {
|
78
|
+
// return <Button text type="primary" onClick={() => alarmRiskOperation(record.type, record)}>受理</Button>
|
79
|
+
return '';
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}]; // 告警/风险 操作 (受理)
|
83
|
+
|
84
|
+
function alarmRiskOperation(_x, _x2) {
|
85
|
+
return _alarmRiskOperation.apply(this, arguments);
|
86
|
+
}
|
87
|
+
|
88
|
+
function _alarmRiskOperation() {
|
89
|
+
_alarmRiskOperation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(type, params) {
|
90
|
+
var res;
|
91
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
92
|
+
while (1) {
|
93
|
+
switch (_context.prev = _context.next) {
|
94
|
+
case 0:
|
95
|
+
if (!(type === 'alarm')) {
|
96
|
+
_context.next = 6;
|
97
|
+
break;
|
98
|
+
}
|
99
|
+
|
100
|
+
_context.next = 3;
|
101
|
+
return service.handleAlarm(params);
|
102
|
+
|
103
|
+
case 3:
|
104
|
+
res = _context.sent;
|
105
|
+
|
106
|
+
_Message.success('受理成功');
|
107
|
+
|
108
|
+
onHandleAlarm();
|
109
|
+
|
110
|
+
case 6:
|
111
|
+
case "end":
|
112
|
+
return _context.stop();
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}, _callee);
|
116
|
+
}));
|
117
|
+
return _alarmRiskOperation.apply(this, arguments);
|
118
|
+
}
|
119
|
+
|
120
|
+
return /*#__PURE__*/React.createElement(BlockBox, {
|
121
|
+
headerTitle: "\u6700\u8FD1\u7684\u544A\u8B66\u548C\u98CE\u9669"
|
122
|
+
}, /*#__PURE__*/React.createElement("div", {
|
123
|
+
className: styles.alarm
|
124
|
+
}, /*#__PURE__*/React.createElement(_Table, {
|
125
|
+
hasBorder: false,
|
126
|
+
fixedHeader: true,
|
127
|
+
columns: columns,
|
128
|
+
maxBodyHeight: "auto",
|
129
|
+
dataSource: alarmRiskList,
|
130
|
+
emptyContent: /*#__PURE__*/React.createElement("div", {
|
131
|
+
className: styles['no-data']
|
132
|
+
}, "\u6682\u65E0\u6570\u636E")
|
133
|
+
})));
|
134
|
+
}
|
135
|
+
|
136
|
+
export default EventsCard;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import _Message from "@alifd/next/es/message";
|
2
|
-
import _Table from "@alifd/next/es/table";
|
3
2
|
import _extends from "@babel/runtime/helpers/extends";
|
4
3
|
import _Button from "@alifd/next/es/button";
|
5
4
|
import _Icon from "@alifd/next/es/icon";
|
@@ -28,7 +27,8 @@ import useCiAttrAndMetricData from "./useCiAttrAndMetricData";
|
|
28
27
|
import Configurator from "./components/Configurator";
|
29
28
|
import { formatMetric } from "../../../../../../models/attributeFormatter";
|
30
29
|
import LinkTopoCard from "./components/LinkTopo/LinkTopoCard";
|
31
|
-
import { rlog } from '@riil-frontend/component-topology-utils/lib/rlog';
|
30
|
+
import { rlog } from '@riil-frontend/component-topology-utils/lib/rlog';
|
31
|
+
import EventsCard from "./EventsCard"; // url 处理,UICBB 的地址需截取前缀
|
32
32
|
|
33
33
|
function formatUrl(url) {
|
34
34
|
var _window, _window$location;
|
@@ -943,18 +943,11 @@ export default function ResourceOverview(props) {
|
|
943
943
|
},
|
944
944
|
data: metric,
|
945
945
|
loading: metricInitLoading
|
946
|
-
})), /*#__PURE__*/React.createElement(
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
columns: columns,
|
954
|
-
maxBodyHeight: "auto",
|
955
|
-
dataSource: alarmRiskList,
|
956
|
-
emptyContent: /*#__PURE__*/React.createElement("div", {
|
957
|
-
className: styles['no-data']
|
958
|
-
}, "\u6682\u65E0\u6570\u636E")
|
959
|
-
}))));
|
946
|
+
})), /*#__PURE__*/React.createElement(EventsCard, {
|
947
|
+
alarmRiskList: alarmRiskList,
|
948
|
+
closeDetailDrawer: onClose,
|
949
|
+
onHandleAlarm: function onHandleAlarm() {
|
950
|
+
getAlarmRiskData(id);
|
951
|
+
}
|
952
|
+
}));
|
960
953
|
}
|
@@ -120,7 +120,7 @@ export default function ResourceOverviewMetric(props) {
|
|
120
120
|
padding: 0,
|
121
121
|
appendPadding: [2, 0],
|
122
122
|
smooth: true,
|
123
|
-
tooltip:
|
123
|
+
tooltip: true,
|
124
124
|
line: {
|
125
125
|
color: "l(0) 0:" + hexToRgb(rgbToHex(color).hex, 0.05).rgba + " 0.5:" + color + " 1:" + color,
|
126
126
|
size: 2
|