@riil-frontend/component-topology 6.0.20 → 7.0.0-dev.2
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 +12 -12
- package/es/core/components/TopoView/topoView.js +13 -1
- package/es/core/editor/components/Toolbar/widgets/FontStyleButton.js +1 -9
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +10 -11
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +12 -13
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +4 -4
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +16 -9
- package/es/core/editor/hooks/useUpdateHtTopoDefaultTagStyle.js +2 -2
- 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 +61 -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 +1 -1
- package/lib/core/components/TopoView/topoView.js +13 -1
- package/lib/core/editor/components/Toolbar/widgets/FontStyleButton.js +1 -9
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +10 -12
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +12 -14
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +4 -4
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +16 -10
- package/lib/core/editor/hooks/useUpdateHtTopoDefaultTagStyle.js +2 -2
- 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 +60 -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 +1 -1
- package/package.json +2 -2
@@ -1,135 +1,137 @@
|
|
1
1
|
@import "~@alifd/next/variables.scss";
|
2
2
|
|
3
3
|
.resource-overview {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
4
|
+
|
5
|
+
}
|
6
|
+
|
7
|
+
.base-info {
|
8
|
+
margin-top: 16px;
|
9
|
+
margin-right: -25px;
|
10
|
+
overflow: hidden;
|
11
|
+
.item {
|
12
|
+
width: 220px;
|
13
|
+
max-width: 100%;
|
14
|
+
margin-right: 25px;
|
15
|
+
margin-bottom: 8px;
|
16
|
+
display: flex;
|
17
|
+
float: left;
|
18
|
+
.label {
|
19
|
+
white-space: nowrap;
|
20
|
+
}
|
21
|
+
.content {
|
22
|
+
flex: 1;
|
23
|
+
overflow: hidden;
|
24
|
+
text-overflow: ellipsis;
|
25
|
+
white-space: nowrap;
|
26
|
+
color: #4d6277;
|
27
|
+
.link {
|
28
|
+
width: 100%;
|
29
|
+
display: block;
|
20
30
|
overflow: hidden;
|
21
31
|
text-overflow: ellipsis;
|
22
32
|
white-space: nowrap;
|
23
|
-
color: #4d6277;
|
24
|
-
.link {
|
25
|
-
width: 100%;
|
26
|
-
display: block;
|
27
|
-
overflow: hidden;
|
28
|
-
text-overflow: ellipsis;
|
29
|
-
white-space: nowrap;
|
30
|
-
}
|
31
33
|
}
|
32
34
|
}
|
33
35
|
}
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
36
|
+
}
|
37
|
+
.indicator {
|
38
|
+
width: 525px;
|
39
|
+
margin: 20px 0 12px;
|
40
|
+
display: flex;
|
41
|
+
flex-wrap: wrap;
|
42
|
+
.no-data{
|
43
|
+
width: 100%;
|
44
|
+
height: 120px;
|
45
|
+
line-height: 120px;
|
46
|
+
text-align: center;
|
47
|
+
}
|
48
|
+
.item {
|
49
|
+
width: 240px;
|
50
|
+
margin-bottom: 24px;
|
51
|
+
&:nth-child(2n + 1) {
|
52
|
+
margin-right: 24px;
|
44
53
|
}
|
45
|
-
.
|
46
|
-
|
47
|
-
|
48
|
-
&:nth-child(2n + 1) {
|
49
|
-
margin-right: 24px;
|
50
|
-
}
|
51
|
-
.title {
|
52
|
-
font-size: 13px;
|
53
|
-
color: #78849c;
|
54
|
-
}
|
55
|
-
.content {
|
56
|
-
margin-top: 10px;
|
57
|
-
font-size: 26px;
|
58
|
-
color: #4d6277;
|
59
|
-
}
|
60
|
-
.chart {
|
61
|
-
margin-top: 16px;
|
62
|
-
}
|
54
|
+
.title {
|
55
|
+
font-size: 13px;
|
56
|
+
color: #78849c;
|
63
57
|
}
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
// border: none;
|
69
|
-
// }
|
70
|
-
// .item {
|
71
|
-
// width: 175px;
|
72
|
-
// height: 100px;
|
73
|
-
// box-sizing: border-box;
|
74
|
-
// display: flex;
|
75
|
-
// flex-direction: column;
|
76
|
-
// text-align: center;
|
77
|
-
// border-right: 1px solid #f2f5fa;
|
78
|
-
// &:last-child {
|
79
|
-
// border: none;
|
80
|
-
// }
|
81
|
-
// .content {
|
82
|
-
// margin-top: 19px;
|
83
|
-
// height: 32px;
|
84
|
-
// line-height: 32px;
|
85
|
-
// font-size: 32px;
|
86
|
-
// color: #4d6277;
|
87
|
-
// }
|
88
|
-
// .label {
|
89
|
-
// margin-top: 12px;
|
90
|
-
// height: 20px;
|
91
|
-
// font-size: 14px;
|
92
|
-
// font-weight: 400;
|
93
|
-
// color: #78849c;
|
94
|
-
// line-height: 20px;
|
95
|
-
// }
|
96
|
-
// }
|
97
|
-
// }
|
98
|
-
}
|
99
|
-
.alarm {
|
100
|
-
margin-top: 12px;
|
101
|
-
.alarm-title {
|
102
|
-
overflow: hidden;
|
103
|
-
text-overflow: ellipsis;
|
104
|
-
white-space: nowrap;
|
58
|
+
.content {
|
59
|
+
margin-top: 10px;
|
60
|
+
font-size: 26px;
|
61
|
+
color: #4d6277;
|
105
62
|
}
|
106
|
-
.
|
107
|
-
|
108
|
-
height: 12px;
|
109
|
-
font-size: 12px;
|
110
|
-
margin-right: 4px;
|
63
|
+
.chart {
|
64
|
+
margin-top: 16px;
|
111
65
|
}
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
66
|
+
}
|
67
|
+
// .row {
|
68
|
+
// display: flex;
|
69
|
+
// border-bottom: 1px solid #f2f5fa;
|
70
|
+
// &:last-child {
|
71
|
+
// border: none;
|
72
|
+
// }
|
73
|
+
// .item {
|
74
|
+
// width: 175px;
|
75
|
+
// height: 100px;
|
76
|
+
// box-sizing: border-box;
|
77
|
+
// display: flex;
|
78
|
+
// flex-direction: column;
|
79
|
+
// text-align: center;
|
80
|
+
// border-right: 1px solid #f2f5fa;
|
81
|
+
// &:last-child {
|
82
|
+
// border: none;
|
83
|
+
// }
|
84
|
+
// .content {
|
85
|
+
// margin-top: 19px;
|
86
|
+
// height: 32px;
|
87
|
+
// line-height: 32px;
|
88
|
+
// font-size: 32px;
|
89
|
+
// color: #4d6277;
|
90
|
+
// }
|
91
|
+
// .label {
|
92
|
+
// margin-top: 12px;
|
93
|
+
// height: 20px;
|
94
|
+
// font-size: 14px;
|
95
|
+
// font-weight: 400;
|
96
|
+
// color: #78849c;
|
97
|
+
// line-height: 20px;
|
98
|
+
// }
|
99
|
+
// }
|
100
|
+
// }
|
101
|
+
}
|
102
|
+
.alarm {
|
103
|
+
margin-top: 12px;
|
104
|
+
.alarm-title {
|
105
|
+
overflow: hidden;
|
106
|
+
text-overflow: ellipsis;
|
107
|
+
white-space: nowrap;
|
108
|
+
}
|
109
|
+
.alarm-color-icon {
|
110
|
+
width: 12px;
|
111
|
+
height: 12px;
|
112
|
+
font-size: 12px;
|
113
|
+
margin-right: 4px;
|
114
|
+
}
|
115
|
+
.no-data {
|
116
|
+
font-size: 14px;
|
117
|
+
text-align: center;
|
118
|
+
color: var(--color-text1-4);
|
119
|
+
height: 120px;
|
120
|
+
line-height: 120px;
|
121
|
+
}
|
122
|
+
:global {
|
123
|
+
.#{$css-prefix}btn-helper {
|
124
|
+
vertical-align: baseline;
|
118
125
|
}
|
119
|
-
|
120
|
-
|
121
|
-
vertical-align: baseline;
|
122
|
-
}
|
123
|
-
.risk-icon {
|
124
|
-
color: #ff7843;
|
125
|
-
}
|
126
|
-
.#{$css-prefix}table .#{$css-prefix}table-body tr:last-child td {
|
127
|
-
border-bottom: none;
|
128
|
-
}
|
129
|
-
// .#{$css-prefix}btn{
|
130
|
-
// height: 28px !important;
|
131
|
-
// }
|
126
|
+
.risk-icon {
|
127
|
+
color: #ff7843;
|
132
128
|
}
|
129
|
+
.#{$css-prefix}table .#{$css-prefix}table-body tr:last-child td {
|
130
|
+
border-bottom: none;
|
131
|
+
}
|
132
|
+
// .#{$css-prefix}btn{
|
133
|
+
// height: 28px !important;
|
134
|
+
// }
|
133
135
|
}
|
134
136
|
}
|
135
137
|
|
@@ -99,22 +99,45 @@ export default {
|
|
99
99
|
});
|
100
100
|
|
101
101
|
case 22:
|
102
|
-
_context.next =
|
102
|
+
_context.next = 29;
|
103
103
|
break;
|
104
104
|
|
105
105
|
case 24:
|
106
|
-
|
106
|
+
if (!params.selectedElementTag) {
|
107
|
+
_context.next = 27;
|
108
|
+
break;
|
109
|
+
}
|
110
|
+
|
111
|
+
_context.next = 27;
|
112
|
+
return dispatch.selection.update({
|
113
|
+
initSelectionId: params.selectedElementTag
|
114
|
+
});
|
115
|
+
|
116
|
+
case 27:
|
117
|
+
_context.next = 29;
|
107
118
|
return dispatch.topoMod.initData(_extends({}, params, {
|
108
119
|
type: params.type,
|
109
120
|
id: id
|
110
121
|
}));
|
111
122
|
|
112
|
-
case
|
123
|
+
case 29:
|
113
124
|
_this.update({
|
114
125
|
loading: false
|
126
|
+
}); // 是否打开概览
|
127
|
+
|
128
|
+
|
129
|
+
if (!params.openResourceOverview) {
|
130
|
+
_context.next = 33;
|
131
|
+
break;
|
132
|
+
}
|
133
|
+
|
134
|
+
_context.next = 33;
|
135
|
+
return dispatch.resourceDetail.update({
|
136
|
+
visible: true,
|
137
|
+
id: params.openResourceOverview
|
115
138
|
});
|
116
139
|
|
117
|
-
case
|
140
|
+
case 33:
|
118
141
|
case "end":
|
119
142
|
return _context.stop();
|
120
143
|
}
|
package/es/style.js
CHANGED
@@ -25,9 +25,9 @@ import '@alifd/next/es/menu/style';
|
|
25
25
|
import '@alifd/next/es/dialog/style';
|
26
26
|
import '@riil-frontend/utils/es/style';
|
27
27
|
import '@riil-frontend/component-riil-event-emitter/es/style';
|
28
|
+
import '@alifd/next/es/menu-button/style';
|
28
29
|
import '@alifd/next/es/tab/style';
|
29
30
|
import '@riil-frontend/component-pager/es/style';
|
30
|
-
import '@alifd/next/es/menu-button/style';
|
31
31
|
import '@alifd/next/es/loading/style';
|
32
32
|
import '@alifd/next/es/divider/style';
|
33
33
|
|
@@ -187,7 +187,19 @@ var Topology = function Topology(props) {
|
|
187
187
|
topo.selectionModel.init();
|
188
188
|
topoDispatchers.update({
|
189
189
|
graphLoaded: true
|
190
|
-
});
|
190
|
+
}); // url选中元素
|
191
|
+
|
192
|
+
var _topo$store$getModelS = topo.store.getModelState('selection'),
|
193
|
+
initSelectionId = _topo$store$getModelS.initSelectionId;
|
194
|
+
|
195
|
+
if (initSelectionId) {
|
196
|
+
var ele = topo.getHtTopo().getGraphView().dm().getDataByTag(initSelectionId);
|
197
|
+
topo.getHtTopo().getGraphView().sm().setSelection([ele]);
|
198
|
+
var selectionDispatchers = topo.store.getModelDispatchers('selection');
|
199
|
+
selectionDispatchers.update({
|
200
|
+
initSelectionId: null
|
201
|
+
});
|
202
|
+
}
|
191
203
|
|
192
204
|
if (onLoaded) {
|
193
205
|
onLoaded(topoData);
|
@@ -68,16 +68,8 @@ function FontStyleButton(props) {
|
|
68
68
|
underline: underline
|
69
69
|
})),
|
70
70
|
value = _useState2[0],
|
71
|
-
setValue = _useState2[1];
|
71
|
+
setValue = _useState2[1];
|
72
72
|
|
73
|
-
|
74
|
-
var selection = topo.selectionModel.useHtSelection();
|
75
|
-
(0, _react.useEffect)(function () {
|
76
|
-
var containText = selection.filter(function (ele) {
|
77
|
-
return (0, _htElementUtils.isText)(ele);
|
78
|
-
}).length;
|
79
|
-
setDisabled(!containText);
|
80
|
-
}, [selection]);
|
81
73
|
(0, _react.useEffect)(function () {
|
82
74
|
setValue(buildValue({
|
83
75
|
bold: bold,
|
@@ -20,23 +20,21 @@ var _colorUtil = require("../colorUtil");
|
|
20
20
|
var _excluded = ["color", "background", "opacity", "bold", "italic"];
|
21
21
|
|
22
22
|
function getTextStyle(element) {
|
23
|
-
var underline = null;
|
24
23
|
return (0, _extends2["default"])({
|
25
24
|
color: (0, _colorUtil.parseColor)(element.a('edge.tag.color')),
|
26
25
|
fontFamily: element.a('edge.tag.fontFamily') || '微软雅黑',
|
27
|
-
|
26
|
+
bold: !!element.a('edge.tag.fontBold'),
|
27
|
+
itatic: !!element.a('edge.tag.fontItalic')
|
28
28
|
}, (0, _colorUtil.parseBackground)(element.a('edge.tag.background')));
|
29
29
|
}
|
30
30
|
|
31
31
|
function setTextStyle(element, style, topo) {
|
32
|
-
var
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
otherStyle = (0, _objectWithoutPropertiesLoose2["default"])(_fontStyleUtil$remove, _excluded);
|
39
|
-
|
32
|
+
var color = style.color,
|
33
|
+
background = style.background,
|
34
|
+
opacity = style.opacity,
|
35
|
+
bold = style.bold,
|
36
|
+
italic = style.italic,
|
37
|
+
otherStyle = (0, _objectWithoutPropertiesLoose2["default"])(style, _excluded);
|
40
38
|
var tagStyle = (0, _extends2["default"])({}, otherStyle);
|
41
39
|
|
42
40
|
if ('color' in style) {
|
@@ -73,12 +71,12 @@ function setTextStyle(element, style, topo) {
|
|
73
71
|
|
74
72
|
|
75
73
|
function getEnabledFields(element) {
|
76
|
-
return ['fontFamily', 'color', 'background', 'opacity'];
|
74
|
+
return ['fontFamily', 'color', 'background', 'opacity', 'fontSize', 'bold', 'italic'];
|
77
75
|
}
|
78
76
|
|
79
77
|
function getFieldDisabled(element) {
|
80
78
|
return {
|
81
|
-
fontSize:
|
79
|
+
fontSize: false
|
82
80
|
};
|
83
81
|
}
|
84
82
|
|
@@ -20,7 +20,7 @@ var _colorUtil = require("../colorUtil");
|
|
20
20
|
var _excluded = ["color", "background", "opacity", "bold", "italic"];
|
21
21
|
|
22
22
|
function getTextStyle(element) {
|
23
|
-
var underline =
|
23
|
+
var underline = !!element.a('node.tag.fontUnderline');
|
24
24
|
return (0, _extends2["default"])({
|
25
25
|
color: (0, _colorUtil.parseColor)(element.a('ht.color')),
|
26
26
|
underline: underline
|
@@ -28,14 +28,12 @@ function getTextStyle(element) {
|
|
28
28
|
}
|
29
29
|
|
30
30
|
function setTextStyle(element, style, topo) {
|
31
|
-
var
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
otherStyle = (0, _objectWithoutPropertiesLoose2["default"])(_fontStyleUtil$remove, _excluded);
|
38
|
-
|
31
|
+
var color = style.color,
|
32
|
+
background = style.background,
|
33
|
+
opacity = style.opacity,
|
34
|
+
bold = style.bold,
|
35
|
+
italic = style.italic,
|
36
|
+
otherStyle = (0, _objectWithoutPropertiesLoose2["default"])(style, _excluded);
|
39
37
|
var tagStyle = (0, _extends2["default"])({}, otherStyle);
|
40
38
|
|
41
39
|
if ('color' in style) {
|
@@ -66,7 +64,7 @@ function setTextStyle(element, style, topo) {
|
|
66
64
|
}
|
67
65
|
|
68
66
|
function getEnabledFields(element) {
|
69
|
-
return ['fontFamily', 'color', 'background', 'opacity'];
|
67
|
+
return ['fontFamily', 'color', 'background', 'opacity', 'fontSize', 'bold', 'italic', 'underline'];
|
70
68
|
}
|
71
69
|
/**
|
72
70
|
* 获得字段是否禁用
|
@@ -78,10 +76,10 @@ function getEnabledFields(element) {
|
|
78
76
|
|
79
77
|
function getFieldDisabled(element) {
|
80
78
|
return {
|
81
|
-
fontSize:
|
82
|
-
bold:
|
83
|
-
italic:
|
84
|
-
underline:
|
79
|
+
fontSize: false,
|
80
|
+
bold: false,
|
81
|
+
italic: false,
|
82
|
+
underline: false
|
85
83
|
};
|
86
84
|
}
|
87
85
|
|
@@ -20,10 +20,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
20
20
|
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; }
|
21
21
|
|
22
22
|
var fieldDisabled = {
|
23
|
-
fontSize:
|
24
|
-
bold:
|
25
|
-
italic:
|
26
|
-
underline:
|
23
|
+
fontSize: false,
|
24
|
+
bold: false,
|
25
|
+
italic: false,
|
26
|
+
underline: false
|
27
27
|
};
|
28
28
|
|
29
29
|
function GlobalTagStyleSetting(props) {
|
@@ -16,7 +16,7 @@ var _fontStyleUtil = _interopRequireDefault(require("../../../../../settings/com
|
|
16
16
|
var _colorUtil = require("../ElementTextStyleSetting/colorUtil");
|
17
17
|
|
18
18
|
var _excluded = ["color", "background", "opacity"],
|
19
|
-
_excluded2 = ["color", "background", "opacity", "bold", "italic"];
|
19
|
+
_excluded2 = ["color", "background", "opacity", "bold", "italic", "underline"];
|
20
20
|
var defaultStyle = {
|
21
21
|
color: '#AFB9C2',
|
22
22
|
fontFamily: '微软雅黑'
|
@@ -29,7 +29,10 @@ function useValues(topo) {
|
|
29
29
|
return (0, _extends2["default"])({
|
30
30
|
color: (nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.color) || defaultStyle.color,
|
31
31
|
fontFamily: (nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.fontFamily) || defaultStyle.fontFamily,
|
32
|
-
fontSize: nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.fontSize
|
32
|
+
fontSize: nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.fontSize,
|
33
|
+
bold: nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.bold,
|
34
|
+
italic: nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.italic,
|
35
|
+
underline: nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.underline
|
33
36
|
}, (0, _colorUtil.parseBackground)(nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.background));
|
34
37
|
}
|
35
38
|
|
@@ -74,14 +77,13 @@ function buildStyle(styleData, prevTagStyle) {
|
|
74
77
|
}
|
75
78
|
|
76
79
|
function buildGlobalStyle(styleData) {
|
77
|
-
var
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
otherStyle = (0, _objectWithoutPropertiesLoose2["default"])(
|
84
|
-
|
80
|
+
var color = styleData.color,
|
81
|
+
background = styleData.background,
|
82
|
+
opacity = styleData.opacity,
|
83
|
+
bold = styleData.bold,
|
84
|
+
italic = styleData.italic,
|
85
|
+
underline = styleData.underline,
|
86
|
+
otherStyle = (0, _objectWithoutPropertiesLoose2["default"])(styleData, _excluded2);
|
85
87
|
var tagStyle = (0, _extends2["default"])({}, otherStyle);
|
86
88
|
|
87
89
|
if ('color' in styleData) {
|
@@ -96,6 +98,10 @@ function buildGlobalStyle(styleData) {
|
|
96
98
|
tagStyle.fontItalic = italic;
|
97
99
|
}
|
98
100
|
|
101
|
+
if ('underline' in styleData) {
|
102
|
+
tagStyle.fontUnderline = underline;
|
103
|
+
}
|
104
|
+
|
99
105
|
if ('background' in styleData) {
|
100
106
|
// 背景颜色
|
101
107
|
tagStyle.background = (0, _colorUtil.formatRgbaColor)(background);
|
@@ -22,12 +22,12 @@ function useUpdateHtTopoDefaultTagStyle(props) {
|
|
22
22
|
var nodeLabelStyle = displayConfig.nodeLabelStyle,
|
23
23
|
defaultEdgeLabelStyle = displayConfig.defaultEdgeLabelStyle;
|
24
24
|
(0, _react.useEffect)(function () {
|
25
|
-
if (nodeLabelStyle) {
|
25
|
+
if (nodeLabelStyle && topo.getHtTopo().setDefaultNodeLabelStyle) {
|
26
26
|
topo.getHtTopo().setDefaultNodeLabelStyle(nodeLabelStyle);
|
27
27
|
}
|
28
28
|
}, [nodeLabelStyle]);
|
29
29
|
(0, _react.useEffect)(function () {
|
30
|
-
if (defaultEdgeLabelStyle) {
|
30
|
+
if (defaultEdgeLabelStyle && topo.getHtTopo().setDefaultEdgeTagStyle) {
|
31
31
|
topo.getHtTopo().setDefaultEdgeTagStyle(defaultEdgeLabelStyle);
|
32
32
|
}
|
33
33
|
}, [defaultEdgeLabelStyle]);
|
@@ -54,7 +54,7 @@ var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTag
|
|
54
54
|
var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
|
55
55
|
|
56
56
|
// eslint-disable-next-line no-undef
|
57
|
-
var version = typeof "
|
57
|
+
var version = typeof "7.0.0-dev.2" === 'string' ? "7.0.0-dev.2" : null;
|
58
58
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
59
59
|
/**
|
60
60
|
* 拓扑显示和编辑
|
@@ -27,6 +27,8 @@ var _topoAlarm = _interopRequireDefault(require("./models/topoAlarm"));
|
|
27
27
|
|
28
28
|
var _displayConfig = _interopRequireDefault(require("./models/displayConfig"));
|
29
29
|
|
30
|
+
var _resourceDetail = _interopRequireDefault(require("./models/viewer/resourceDetail"));
|
31
|
+
|
30
32
|
var _topoBaseInfoOverview = _interopRequireDefault(require("./models/topoBaseInfoOverview"));
|
31
33
|
|
32
34
|
var _lock = _interopRequireDefault(require("./models/viewer/lock"));
|
@@ -46,6 +48,7 @@ var _default = {
|
|
46
48
|
// 显示模式
|
47
49
|
topoAlarm: _topoAlarm["default"],
|
48
50
|
displayConfig: _displayConfig["default"],
|
51
|
+
resourceDetail: _resourceDetail["default"],
|
49
52
|
topoBaseInfoOverview: _topoBaseInfoOverview["default"],
|
50
53
|
lock: _lock["default"]
|
51
54
|
};
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports["default"] = void 0;
|
7
|
+
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
+
|
10
|
+
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
11
|
+
|
12
|
+
/**
|
13
|
+
* 资源概览
|
14
|
+
*/
|
15
|
+
var _default = {
|
16
|
+
// 定义 model 的初始 state
|
17
|
+
state: {
|
18
|
+
visible: false,
|
19
|
+
id: null // 资源id
|
20
|
+
|
21
|
+
},
|
22
|
+
// 定义改变该模型状态的纯函数
|
23
|
+
reducers: {
|
24
|
+
update: function update(prevState, payload) {
|
25
|
+
return (0, _extends2["default"])({}, prevState, payload);
|
26
|
+
},
|
27
|
+
reset: function reset(prevState, payload) {
|
28
|
+
return {
|
29
|
+
visible: false,
|
30
|
+
id: null // 资源id
|
31
|
+
|
32
|
+
};
|
33
|
+
}
|
34
|
+
},
|
35
|
+
// 定义处理该模型副作用的函数
|
36
|
+
effects: function effects(dispatch) {
|
37
|
+
return {};
|
38
|
+
}
|
39
|
+
};
|
40
|
+
exports["default"] = _default;
|
@@ -25,10 +25,7 @@ function ResourceDetail(props) {
|
|
25
25
|
var topo = props.topo,
|
26
26
|
userId = props.userId,
|
27
27
|
activeData = props.activeData,
|
28
|
-
resourceData = props.resourceData;
|
29
|
-
// <Tab.Item title="网络信息表" key="3">网络信息表</Tab.Item>
|
30
|
-
// <Tab.Item title="Web工作台" key="4">Web工作台</Tab.Item> */}
|
31
|
-
|
28
|
+
resourceData = props.resourceData;
|
32
29
|
var tabBodys = [{
|
33
30
|
title: '资源概览',
|
34
31
|
content: /*#__PURE__*/_react["default"].createElement(_ResourceOverview["default"], (0, _extends2["default"])({}, props, activeData, {
|
@@ -47,7 +44,7 @@ function ResourceDetail(props) {
|
|
47
44
|
data: resourceData,
|
48
45
|
topo: topo
|
49
46
|
}),
|
50
|
-
visible:
|
47
|
+
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)
|
51
48
|
}].filter(function (item) {
|
52
49
|
return item.visible !== false;
|
53
50
|
});
|