@riil-frontend/component-topology 3.1.7 → 3.1.8
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/CHANGELOG.md +4 -15
- package/build/index.css +1 -1
- package/build/index.js +7 -7
- package/demo/1/345/237/272/346/234/254//345/256/232/345/210/266/345/214/226/350/265/204/346/272/220/346/246/202/350/247/210.md +11 -0
- package/demo/1/345/237/272/346/234/254//350/207/252/345/256/232/344/271/211/346/240/207/346/263/250/345/222/214/346/202/254/346/265/256/346/241/206.md +11 -0
- package/demo//346/240/207/346/263/250/345/222/214/346/202/254/346/265/256/346/241/206//350/207/252/345/256/232/344/271/211/345/261/236/346/200/247/345/222/214/346/214/207/346/240/207.md +1 -1
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/ResourceDetail.js +0 -0
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/ResourceDetailPlugin.js +0 -0
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/BaseInfo.js +10 -8
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +31 -0
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/BlockBox.js +0 -0
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/BlockBox.module.scss +0 -0
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/ResourceOverviewMetric.js +0 -0
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/SingleResourceStrategyLink.js +4 -2
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/index.js +15 -17
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/index.module.scss +0 -0
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/useCiAttrAndMetricData.js +0 -0
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/index.js +0 -0
- package/es/core/viewer/components/plugins/ResourceDetail/index.module.scss +39 -30
- package/es/core/viewer/components/plugins/ViewerPlugin.js +2 -2
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/ResourceDetail.js +0 -0
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/ResourceDetailPlugin.js +0 -0
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/BaseInfo.js +10 -8
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +42 -0
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/BlockBox.js +0 -0
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/BlockBox.module.scss +0 -0
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/ResourceOverviewMetric.js +0 -0
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/SingleResourceStrategyLink.js +4 -2
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/index.js +16 -17
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/index.module.scss +0 -0
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/useCiAttrAndMetricData.js +0 -0
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/index.js +0 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/index.module.scss +39 -30
- package/lib/core/viewer/components/plugins/ViewerPlugin.js +2 -2
- package/package.json +2 -2
- package/demo/1/345/237/272/346/234/254//350/207/252/345/256/232/344/271/211/345/261/236/346/200/247/345/222/214/346/214/207/346/240/207.md +0 -11
- package/es/core/viewer/components/plugins/BaseInfo/index.module.scss +0 -49
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawerPlugin.js +0 -37
- package/es/core/viewer/components/plugins/ResourceDetail/topoDrawer.js +0 -147
- package/lib/core/viewer/components/plugins/BaseInfo/index.module.scss +0 -49
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawerPlugin.js +0 -50
- package/lib/core/viewer/components/plugins/ResourceDetail/topoDrawer.js +0 -167
|
@@ -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 "3.1.
|
|
23
|
+
var version = typeof "3.1.8" === 'string' ? "3.1.8" : null;
|
|
24
24
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
25
25
|
/**
|
|
26
26
|
* 拓扑显示和编辑
|
|
File without changes
|
package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/ResourceDetailPlugin.js
RENAMED
|
File without changes
|
|
@@ -110,17 +110,19 @@ export default function BaseInfo(props) {
|
|
|
110
110
|
var topo = props.topo,
|
|
111
111
|
type = props.type,
|
|
112
112
|
data = props.data,
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
baseInfo = props.baseInfo,
|
|
114
|
+
renderContent = props.renderContent;
|
|
115
|
+
var content = renderContent ? renderContent({
|
|
116
|
+
type: type,
|
|
117
|
+
data: data,
|
|
118
|
+
AttributeItem: AttributeItem
|
|
119
|
+
}) : null;
|
|
115
120
|
|
|
116
|
-
if (
|
|
117
|
-
content =
|
|
121
|
+
if (!content) {
|
|
122
|
+
content = /*#__PURE__*/React.createElement(BaseInfoContent, {
|
|
118
123
|
type: type,
|
|
119
|
-
|
|
120
|
-
AttributeItem: AttributeItem
|
|
124
|
+
data: baseInfo
|
|
121
125
|
});
|
|
122
|
-
} else {
|
|
123
|
-
content = /*#__PURE__*/React.createElement(BaseInfoContent, props);
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import BaseInfo from "./BaseInfo";
|
|
3
|
+
import BlockBox from "./BlockBox";
|
|
4
|
+
import SingleResourceStrategyLink from "./SingleResourceStrategyLink";
|
|
5
|
+
export default function BaseInfoBlock(props) {
|
|
6
|
+
var topo = props.topo,
|
|
7
|
+
data = props.data,
|
|
8
|
+
ciTypeMeta = props.ciTypeMeta,
|
|
9
|
+
headerExtra = props.headerExtra,
|
|
10
|
+
renderContent = props.renderContent,
|
|
11
|
+
baseInfo = props.baseInfo;
|
|
12
|
+
var id = data.id,
|
|
13
|
+
ciType = data.ciType,
|
|
14
|
+
type = data.type,
|
|
15
|
+
name = data.name;
|
|
16
|
+
return /*#__PURE__*/React.createElement(BlockBox, {
|
|
17
|
+
headerTitle: "\u57FA\u672C\u4FE1\u606F",
|
|
18
|
+
headerExtra: headerExtra ? headerExtra(props) : ciType === 'network_link' && /*#__PURE__*/React.createElement(SingleResourceStrategyLink, {
|
|
19
|
+
id: id,
|
|
20
|
+
ciType: ciType,
|
|
21
|
+
name: name
|
|
22
|
+
})
|
|
23
|
+
}, /*#__PURE__*/React.createElement(BaseInfo, {
|
|
24
|
+
topo: topo,
|
|
25
|
+
type: type,
|
|
26
|
+
data: data,
|
|
27
|
+
ciTypeMeta: ciTypeMeta,
|
|
28
|
+
renderContent: renderContent,
|
|
29
|
+
baseInfo: baseInfo
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,9 +3,11 @@ import { Link } from 'react-router-dom';
|
|
|
3
3
|
export default function SingleResourceStrategyLink(props) {
|
|
4
4
|
var id = props.id,
|
|
5
5
|
ciType = props.ciType,
|
|
6
|
-
name = props.name
|
|
6
|
+
name = props.name,
|
|
7
|
+
_props$label = props.label,
|
|
8
|
+
label = _props$label === void 0 ? '监控策略' : _props$label;
|
|
7
9
|
var url = "/default/singleResourceStrategy/" + id + "?title=" + encodeURIComponent(name) + "-\u76D1\u63A7\u914D\u7F6E&ciId=" + id + "&ciType=" + ciType + "&ciName=" + encodeURIComponent(name);
|
|
8
10
|
return /*#__PURE__*/React.createElement(Link, {
|
|
9
11
|
to: url
|
|
10
|
-
},
|
|
12
|
+
}, label);
|
|
11
13
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _Message from "@alifd/next/es/message";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _Table from "@alifd/next/es/table";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import _Button from "@alifd/next/es/button";
|
|
5
5
|
import _Icon from "@alifd/next/es/icon";
|
|
6
6
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
@@ -18,7 +18,8 @@ import SingleResourceStrategyLink from "./SingleResourceStrategyLink";
|
|
|
18
18
|
import BlockBox from "./BlockBox";
|
|
19
19
|
import useCiAttrAndMetricData from "./useCiAttrAndMetricData";
|
|
20
20
|
import ResourceOverviewMetric from "./ResourceOverviewMetric";
|
|
21
|
-
import BaseInfo from "./BaseInfo";
|
|
21
|
+
import BaseInfo from "./BaseInfo";
|
|
22
|
+
import BaseInfoBlock from "./BaseInfoBlock"; // url 处理,UICBB 的地址需截取前缀
|
|
22
23
|
|
|
23
24
|
function formatUrl(url) {
|
|
24
25
|
var _window, _window$location;
|
|
@@ -37,7 +38,7 @@ function formatUrl(url) {
|
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
export default function ResourceOverview(props) {
|
|
40
|
-
var _viewerProps$resource;
|
|
41
|
+
var _viewerProps$resource, _baseInfo$resource;
|
|
41
42
|
|
|
42
43
|
var topo = props.topo,
|
|
43
44
|
id = props.id,
|
|
@@ -45,7 +46,7 @@ export default function ResourceOverview(props) {
|
|
|
45
46
|
ciType = props.ciType,
|
|
46
47
|
userId = props.userId,
|
|
47
48
|
viewerProps = props.viewerProps;
|
|
48
|
-
var resourceOverviewProps = viewerProps === null || viewerProps === void 0 ? void 0 : (_viewerProps$resource = viewerProps.resourceDetailProps) === null || _viewerProps$resource === void 0 ? void 0 : _viewerProps$resource.resourceOverviewProps;
|
|
49
|
+
var resourceOverviewProps = (viewerProps === null || viewerProps === void 0 ? void 0 : (_viewerProps$resource = viewerProps.resourceDetailProps) === null || _viewerProps$resource === void 0 ? void 0 : _viewerProps$resource.resourceOverviewProps) || {};
|
|
49
50
|
var ciAttrAndMetricData = useCiAttrAndMetricData({
|
|
50
51
|
topo: topo,
|
|
51
52
|
id: id
|
|
@@ -601,22 +602,19 @@ export default function ResourceOverview(props) {
|
|
|
601
602
|
return _alarmRiskOperation.apply(this, arguments);
|
|
602
603
|
}
|
|
603
604
|
|
|
605
|
+
var elementData = {
|
|
606
|
+
id: id,
|
|
607
|
+
ciType: ciType,
|
|
608
|
+
type: type,
|
|
609
|
+
name: baseInfo === null || baseInfo === void 0 ? void 0 : (_baseInfo$resource = baseInfo.resource) === null || _baseInfo$resource === void 0 ? void 0 : _baseInfo$resource.display_name
|
|
610
|
+
};
|
|
604
611
|
return /*#__PURE__*/React.createElement("div", {
|
|
605
612
|
className: styles['resource-overview']
|
|
606
|
-
}, /*#__PURE__*/React.createElement(
|
|
607
|
-
|
|
608
|
-
headerExtra: ciType === 'network_link' && /*#__PURE__*/React.createElement(SingleResourceStrategyLink, {
|
|
609
|
-
id: id,
|
|
610
|
-
ciType: ciType,
|
|
611
|
-
name: baseInfo.resource.display_name
|
|
612
|
-
})
|
|
613
|
-
}, /*#__PURE__*/React.createElement(BaseInfo, {
|
|
614
|
-
topo: topo,
|
|
615
|
-
type: type,
|
|
616
|
-
data: baseInfo,
|
|
613
|
+
}, /*#__PURE__*/React.createElement(BaseInfoBlock, _extends({
|
|
614
|
+
data: elementData,
|
|
617
615
|
ciTypeMeta: ciTypeMeta,
|
|
618
|
-
|
|
619
|
-
})), /*#__PURE__*/React.createElement(BlockBox, {
|
|
616
|
+
baseInfo: baseInfo
|
|
617
|
+
}, resourceOverviewProps === null || resourceOverviewProps === void 0 ? void 0 : resourceOverviewProps.baseInfoProps)), /*#__PURE__*/React.createElement(BlockBox, {
|
|
620
618
|
headerTitle: "\u5173\u952E\u6307\u6807"
|
|
621
619
|
}, /*#__PURE__*/React.createElement(ResourceOverviewMetric, {
|
|
622
620
|
topo: topo,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,40 +1,49 @@
|
|
|
1
|
-
.
|
|
2
|
-
width: 832px;
|
|
1
|
+
@import '~@alifd/next/variables.scss';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
.title-popup{
|
|
4
|
+
width: 240px;
|
|
5
|
+
.search{
|
|
6
|
+
width: 100%;
|
|
7
|
+
padding: 4px 16px 12px;
|
|
6
8
|
}
|
|
9
|
+
.not-data{
|
|
10
|
+
color: var(--color-text1-4);
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
line-height: 200px;
|
|
13
|
+
text-align: center;
|
|
14
|
+
}
|
|
15
|
+
:global {
|
|
16
|
+
.#{$css-prefix}menu-content{
|
|
17
|
+
height: 200px;
|
|
18
|
+
overflow-y: auto;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
7
22
|
|
|
8
|
-
|
|
23
|
+
.baseInfo {
|
|
24
|
+
box-shadow: 0px 0px 6px 1px #F2F7FD;
|
|
25
|
+
.drawer-title{
|
|
9
26
|
font-size: 16px;
|
|
10
|
-
color: #333333;
|
|
11
|
-
line-height: 22px;
|
|
12
27
|
font-weight: 500;
|
|
28
|
+
color: #4D6277;
|
|
13
29
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.topo-drawer-alarm-banner {
|
|
24
|
-
padding-bottom: 8px;
|
|
25
|
-
margin-top: -10px;
|
|
26
|
-
|
|
27
|
-
.topo-drawer-alarm-txt {
|
|
28
|
-
font-size: 12px;
|
|
29
|
-
color: #333333;
|
|
30
|
-
line-height: 20px;
|
|
30
|
+
:global {
|
|
31
|
+
.#{$css-prefix}drawer-body {
|
|
32
|
+
height: calc(100% - 49px);
|
|
33
|
+
padding: 16px 24px;
|
|
34
|
+
.#{$css-prefix}tabs-content{
|
|
35
|
+
height: calc(100% - 31px);
|
|
36
|
+
overflow: auto;
|
|
37
|
+
}
|
|
31
38
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
}
|
|
40
|
+
.tab{
|
|
41
|
+
height: 100%;
|
|
42
|
+
:global {
|
|
43
|
+
.#{$css-prefix}tabs-content{
|
|
44
|
+
height: calc(100% - 31px);
|
|
45
|
+
overflow: auto;
|
|
46
|
+
}
|
|
38
47
|
}
|
|
39
48
|
}
|
|
40
49
|
}
|
|
@@ -2,12 +2,12 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import ResourceWebControllUrlSettingDialog from "./ResourceWebControllUrlSettingDialog";
|
|
4
4
|
import MetricPollingPlugin from "./MetricPollingPlugin";
|
|
5
|
-
import
|
|
5
|
+
import ResourceDetail from "./ResourceDetail";
|
|
6
6
|
export default function ViewerPlugin(props) {
|
|
7
7
|
var topo = props.topo,
|
|
8
8
|
viewerProps = props.viewerProps;
|
|
9
9
|
var store = topo.store;
|
|
10
|
-
var plugins = [MetricPollingPlugin, ResourceWebControllUrlSettingDialog,
|
|
10
|
+
var plugins = [MetricPollingPlugin, ResourceWebControllUrlSettingDialog, ResourceDetail].concat((viewerProps === null || viewerProps === void 0 ? void 0 : viewerProps.plugins) || []);
|
|
11
11
|
return /*#__PURE__*/React.createElement(React.Fragment, null, plugins.map(function (Plugin, index) {
|
|
12
12
|
return /*#__PURE__*/React.createElement(Plugin, _extends({
|
|
13
13
|
key: index,
|
|
@@ -48,7 +48,7 @@ var _PluginManager = _interopRequireDefault(require("./PluginManager"));
|
|
|
48
48
|
var _topoFactory = _interopRequireDefault(require("./topoFactory"));
|
|
49
49
|
|
|
50
50
|
// eslint-disable-next-line no-undef
|
|
51
|
-
var version = typeof "3.1.
|
|
51
|
+
var version = typeof "3.1.8" === 'string' ? "3.1.8" : null;
|
|
52
52
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
53
53
|
/**
|
|
54
54
|
* 拓扑显示和编辑
|
|
File without changes
|
package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/ResourceDetailPlugin.js
RENAMED
|
File without changes
|
|
@@ -120,17 +120,19 @@ function BaseInfo(props) {
|
|
|
120
120
|
var topo = props.topo,
|
|
121
121
|
type = props.type,
|
|
122
122
|
data = props.data,
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
baseInfo = props.baseInfo,
|
|
124
|
+
renderContent = props.renderContent;
|
|
125
|
+
var content = renderContent ? renderContent({
|
|
126
|
+
type: type,
|
|
127
|
+
data: data,
|
|
128
|
+
AttributeItem: AttributeItem
|
|
129
|
+
}) : null;
|
|
125
130
|
|
|
126
|
-
if (
|
|
127
|
-
content =
|
|
131
|
+
if (!content) {
|
|
132
|
+
content = /*#__PURE__*/_react["default"].createElement(BaseInfoContent, {
|
|
128
133
|
type: type,
|
|
129
|
-
|
|
130
|
-
AttributeItem: AttributeItem
|
|
134
|
+
data: baseInfo
|
|
131
135
|
});
|
|
132
|
-
} else {
|
|
133
|
-
content = /*#__PURE__*/_react["default"].createElement(BaseInfoContent, props);
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports["default"] = BaseInfoBlock;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _BaseInfo = _interopRequireDefault(require("./BaseInfo"));
|
|
11
|
+
|
|
12
|
+
var _BlockBox = _interopRequireDefault(require("./BlockBox"));
|
|
13
|
+
|
|
14
|
+
var _SingleResourceStrategyLink = _interopRequireDefault(require("./SingleResourceStrategyLink"));
|
|
15
|
+
|
|
16
|
+
function BaseInfoBlock(props) {
|
|
17
|
+
var topo = props.topo,
|
|
18
|
+
data = props.data,
|
|
19
|
+
ciTypeMeta = props.ciTypeMeta,
|
|
20
|
+
headerExtra = props.headerExtra,
|
|
21
|
+
renderContent = props.renderContent,
|
|
22
|
+
baseInfo = props.baseInfo;
|
|
23
|
+
var id = data.id,
|
|
24
|
+
ciType = data.ciType,
|
|
25
|
+
type = data.type,
|
|
26
|
+
name = data.name;
|
|
27
|
+
return /*#__PURE__*/_react["default"].createElement(_BlockBox["default"], {
|
|
28
|
+
headerTitle: "\u57FA\u672C\u4FE1\u606F",
|
|
29
|
+
headerExtra: headerExtra ? headerExtra(props) : ciType === 'network_link' && /*#__PURE__*/_react["default"].createElement(_SingleResourceStrategyLink["default"], {
|
|
30
|
+
id: id,
|
|
31
|
+
ciType: ciType,
|
|
32
|
+
name: name
|
|
33
|
+
})
|
|
34
|
+
}, /*#__PURE__*/_react["default"].createElement(_BaseInfo["default"], {
|
|
35
|
+
topo: topo,
|
|
36
|
+
type: type,
|
|
37
|
+
data: data,
|
|
38
|
+
ciTypeMeta: ciTypeMeta,
|
|
39
|
+
renderContent: renderContent,
|
|
40
|
+
baseInfo: baseInfo
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -12,9 +12,11 @@ var _reactRouterDom = require("react-router-dom");
|
|
|
12
12
|
function SingleResourceStrategyLink(props) {
|
|
13
13
|
var id = props.id,
|
|
14
14
|
ciType = props.ciType,
|
|
15
|
-
name = props.name
|
|
15
|
+
name = props.name,
|
|
16
|
+
_props$label = props.label,
|
|
17
|
+
label = _props$label === void 0 ? '监控策略' : _props$label;
|
|
16
18
|
var url = "/default/singleResourceStrategy/" + id + "?title=" + encodeURIComponent(name) + "-\u76D1\u63A7\u914D\u7F6E&ciId=" + id + "&ciType=" + ciType + "&ciName=" + encodeURIComponent(name);
|
|
17
19
|
return /*#__PURE__*/_react["default"].createElement(_reactRouterDom.Link, {
|
|
18
20
|
to: url
|
|
19
|
-
},
|
|
21
|
+
}, label);
|
|
20
22
|
}
|
|
@@ -9,10 +9,10 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
9
9
|
|
|
10
10
|
var _message = _interopRequireDefault(require("@alifd/next/lib/message"));
|
|
11
11
|
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
12
|
var _table = _interopRequireDefault(require("@alifd/next/lib/table"));
|
|
15
13
|
|
|
14
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
+
|
|
16
16
|
var _button = _interopRequireDefault(require("@alifd/next/lib/button"));
|
|
17
17
|
|
|
18
18
|
var _icon = _interopRequireDefault(require("@alifd/next/lib/icon"));
|
|
@@ -47,6 +47,8 @@ var _ResourceOverviewMetric = _interopRequireDefault(require("./ResourceOverview
|
|
|
47
47
|
|
|
48
48
|
var _BaseInfo = _interopRequireDefault(require("./BaseInfo"));
|
|
49
49
|
|
|
50
|
+
var _BaseInfoBlock = _interopRequireDefault(require("./BaseInfoBlock"));
|
|
51
|
+
|
|
50
52
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
51
53
|
|
|
52
54
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -69,7 +71,7 @@ function formatUrl(url) {
|
|
|
69
71
|
|
|
70
72
|
|
|
71
73
|
function ResourceOverview(props) {
|
|
72
|
-
var _viewerProps$resource;
|
|
74
|
+
var _viewerProps$resource, _baseInfo$resource;
|
|
73
75
|
|
|
74
76
|
var topo = props.topo,
|
|
75
77
|
id = props.id,
|
|
@@ -77,7 +79,7 @@ function ResourceOverview(props) {
|
|
|
77
79
|
ciType = props.ciType,
|
|
78
80
|
userId = props.userId,
|
|
79
81
|
viewerProps = props.viewerProps;
|
|
80
|
-
var resourceOverviewProps = viewerProps === null || viewerProps === void 0 ? void 0 : (_viewerProps$resource = viewerProps.resourceDetailProps) === null || _viewerProps$resource === void 0 ? void 0 : _viewerProps$resource.resourceOverviewProps;
|
|
82
|
+
var resourceOverviewProps = (viewerProps === null || viewerProps === void 0 ? void 0 : (_viewerProps$resource = viewerProps.resourceDetailProps) === null || _viewerProps$resource === void 0 ? void 0 : _viewerProps$resource.resourceOverviewProps) || {};
|
|
81
83
|
var ciAttrAndMetricData = (0, _useCiAttrAndMetricData["default"])({
|
|
82
84
|
topo: topo,
|
|
83
85
|
id: id
|
|
@@ -633,22 +635,19 @@ function ResourceOverview(props) {
|
|
|
633
635
|
return _alarmRiskOperation.apply(this, arguments);
|
|
634
636
|
}
|
|
635
637
|
|
|
638
|
+
var elementData = {
|
|
639
|
+
id: id,
|
|
640
|
+
ciType: ciType,
|
|
641
|
+
type: type,
|
|
642
|
+
name: baseInfo === null || baseInfo === void 0 ? void 0 : (_baseInfo$resource = baseInfo.resource) === null || _baseInfo$resource === void 0 ? void 0 : _baseInfo$resource.display_name
|
|
643
|
+
};
|
|
636
644
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
637
645
|
className: _indexModule["default"]['resource-overview']
|
|
638
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
639
|
-
|
|
640
|
-
headerExtra: ciType === 'network_link' && /*#__PURE__*/_react["default"].createElement(_SingleResourceStrategyLink["default"], {
|
|
641
|
-
id: id,
|
|
642
|
-
ciType: ciType,
|
|
643
|
-
name: baseInfo.resource.display_name
|
|
644
|
-
})
|
|
645
|
-
}, /*#__PURE__*/_react["default"].createElement(_BaseInfo["default"], {
|
|
646
|
-
topo: topo,
|
|
647
|
-
type: type,
|
|
648
|
-
data: baseInfo,
|
|
646
|
+
}, /*#__PURE__*/_react["default"].createElement(_BaseInfoBlock["default"], (0, _extends2["default"])({
|
|
647
|
+
data: elementData,
|
|
649
648
|
ciTypeMeta: ciTypeMeta,
|
|
650
|
-
|
|
651
|
-
})), /*#__PURE__*/_react["default"].createElement(_BlockBox["default"], {
|
|
649
|
+
baseInfo: baseInfo
|
|
650
|
+
}, resourceOverviewProps === null || resourceOverviewProps === void 0 ? void 0 : resourceOverviewProps.baseInfoProps)), /*#__PURE__*/_react["default"].createElement(_BlockBox["default"], {
|
|
652
651
|
headerTitle: "\u5173\u952E\u6307\u6807"
|
|
653
652
|
}, /*#__PURE__*/_react["default"].createElement(_ResourceOverviewMetric["default"], {
|
|
654
653
|
topo: topo,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,40 +1,49 @@
|
|
|
1
|
-
.
|
|
2
|
-
width: 832px;
|
|
1
|
+
@import '~@alifd/next/variables.scss';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
.title-popup{
|
|
4
|
+
width: 240px;
|
|
5
|
+
.search{
|
|
6
|
+
width: 100%;
|
|
7
|
+
padding: 4px 16px 12px;
|
|
6
8
|
}
|
|
9
|
+
.not-data{
|
|
10
|
+
color: var(--color-text1-4);
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
line-height: 200px;
|
|
13
|
+
text-align: center;
|
|
14
|
+
}
|
|
15
|
+
:global {
|
|
16
|
+
.#{$css-prefix}menu-content{
|
|
17
|
+
height: 200px;
|
|
18
|
+
overflow-y: auto;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
7
22
|
|
|
8
|
-
|
|
23
|
+
.baseInfo {
|
|
24
|
+
box-shadow: 0px 0px 6px 1px #F2F7FD;
|
|
25
|
+
.drawer-title{
|
|
9
26
|
font-size: 16px;
|
|
10
|
-
color: #333333;
|
|
11
|
-
line-height: 22px;
|
|
12
27
|
font-weight: 500;
|
|
28
|
+
color: #4D6277;
|
|
13
29
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.topo-drawer-alarm-banner {
|
|
24
|
-
padding-bottom: 8px;
|
|
25
|
-
margin-top: -10px;
|
|
26
|
-
|
|
27
|
-
.topo-drawer-alarm-txt {
|
|
28
|
-
font-size: 12px;
|
|
29
|
-
color: #333333;
|
|
30
|
-
line-height: 20px;
|
|
30
|
+
:global {
|
|
31
|
+
.#{$css-prefix}drawer-body {
|
|
32
|
+
height: calc(100% - 49px);
|
|
33
|
+
padding: 16px 24px;
|
|
34
|
+
.#{$css-prefix}tabs-content{
|
|
35
|
+
height: calc(100% - 31px);
|
|
36
|
+
overflow: auto;
|
|
37
|
+
}
|
|
31
38
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
}
|
|
40
|
+
.tab{
|
|
41
|
+
height: 100%;
|
|
42
|
+
:global {
|
|
43
|
+
.#{$css-prefix}tabs-content{
|
|
44
|
+
height: calc(100% - 31px);
|
|
45
|
+
overflow: auto;
|
|
46
|
+
}
|
|
38
47
|
}
|
|
39
48
|
}
|
|
40
49
|
}
|
|
@@ -13,13 +13,13 @@ var _ResourceWebControllUrlSettingDialog = _interopRequireDefault(require("./Res
|
|
|
13
13
|
|
|
14
14
|
var _MetricPollingPlugin = _interopRequireDefault(require("./MetricPollingPlugin"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _ResourceDetail = _interopRequireDefault(require("./ResourceDetail"));
|
|
17
17
|
|
|
18
18
|
function ViewerPlugin(props) {
|
|
19
19
|
var topo = props.topo,
|
|
20
20
|
viewerProps = props.viewerProps;
|
|
21
21
|
var store = topo.store;
|
|
22
|
-
var plugins = [_MetricPollingPlugin["default"], _ResourceWebControllUrlSettingDialog["default"],
|
|
22
|
+
var plugins = [_MetricPollingPlugin["default"], _ResourceWebControllUrlSettingDialog["default"], _ResourceDetail["default"]].concat((viewerProps === null || viewerProps === void 0 ? void 0 : viewerProps.plugins) || []);
|
|
23
23
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, plugins.map(function (Plugin, index) {
|
|
24
24
|
return /*#__PURE__*/_react["default"].createElement(Plugin, (0, _extends2["default"])({
|
|
25
25
|
key: index,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.8",
|
|
4
4
|
"description": "拓扑",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "build-scripts start",
|
|
@@ -110,6 +110,6 @@
|
|
|
110
110
|
"access": "public"
|
|
111
111
|
},
|
|
112
112
|
"license": "MIT",
|
|
113
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@3.1.
|
|
113
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@3.1.8/build/index.html",
|
|
114
114
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
|
115
115
|
}
|