@riil-frontend/component-topology 6.0.20 → 7.0.0-dev.10
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 +15 -20
- package/es/core/components/titlebar/index.js +2 -1
- package/es/core/editor/components/EditorPlugin.js +1 -2
- package/es/core/editor/components/Toolbar/widgets/FontStyleButton.js +1 -9
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +11 -11
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +18 -14
- 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/components/settings/propertyViews/node/data/Data.js +2 -1
- package/es/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +4 -2
- package/es/core/editor/hooks/useKeyboardShortcut.js +1 -1
- package/es/core/editor/hooks/useUpdateHtTopoDefaultTagStyle.js +2 -2
- package/es/core/hooks/useTopoEdit.js +131 -169
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/models/topoData.js +3 -3
- package/es/core/store/coreModels.js +2 -0
- package/es/core/store/models/selection.js +3 -1
- package/es/core/store/models/topoConfig.js +7 -5
- package/es/core/store/models/topoMod.js +1 -1
- package/es/core/store/models/viewer/resourceDetail.js +31 -0
- package/es/core/utils/saveSerialize.js +2 -3
- 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/core/viewer/components/titlebar/BasicTools.js +3 -16
- package/es/core/viewer/components/titlebar/widgets/AlarmButton.js +25 -0
- package/es/networkTopo/getTopoData.js +2 -3
- package/es/networkTopo/store/topoCenter.js +27 -4
- package/es/style.js +22 -22
- package/lib/core/components/TopoView/topoView.js +15 -21
- package/lib/core/components/titlebar/index.js +5 -1
- package/lib/core/editor/components/EditorPlugin.js +1 -3
- package/lib/core/editor/components/Toolbar/widgets/FontStyleButton.js +1 -9
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +11 -12
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +18 -15
- 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/components/settings/propertyViews/node/data/Data.js +2 -1
- package/lib/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +4 -2
- package/lib/core/editor/hooks/useKeyboardShortcut.js +1 -1
- package/lib/core/editor/hooks/useUpdateHtTopoDefaultTagStyle.js +2 -2
- package/lib/core/hooks/useTopoEdit.js +131 -169
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/models/topoData.js +7 -11
- package/lib/core/store/coreModels.js +3 -0
- package/lib/core/store/models/selection.js +3 -1
- package/lib/core/store/models/topoConfig.js +7 -5
- package/lib/core/store/models/topoMod.js +1 -1
- package/lib/core/store/models/viewer/resourceDetail.js +40 -0
- package/lib/core/utils/saveSerialize.js +1 -3
- 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/core/viewer/components/titlebar/BasicTools.js +3 -17
- package/lib/core/viewer/components/titlebar/widgets/AlarmButton.js +36 -0
- package/lib/networkTopo/getTopoData.js +3 -5
- package/lib/networkTopo/store/topoCenter.js +27 -4
- package/lib/style.js +22 -22
- package/package.json +2 -2
- package/es/core/editor/components/plugins/MultipleResourceSelectPlugin.js +0 -15
- package/lib/core/editor/components/plugins/MultipleResourceSelectPlugin.js +0 -25
@@ -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
|
|
@@ -3,34 +3,21 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import React from "react";
|
4
4
|
import EditButton from "./widgets/EditButton";
|
5
5
|
import NodesDragSwitch from "./widgets/NodesDragSwitchWrapper";
|
6
|
-
import AlarmListShowButton from "./widgets/AlarmListShowButton";
|
7
6
|
import SettingButton from "./widgets/SettingButtonWidget";
|
8
|
-
import
|
7
|
+
import AlarmButton from "./widgets/AlarmButton";
|
9
8
|
export default function BasicTools(props) {
|
10
9
|
var topo = props.topo,
|
11
10
|
_props$showEditButton = props.showEditButton,
|
12
11
|
showEditButton = _props$showEditButton === void 0 ? true : _props$showEditButton,
|
13
12
|
children = props.children;
|
14
|
-
|
15
|
-
var _topo$store$useModel = topo.store.useModel("topoAlarm"),
|
16
|
-
alarmState = _topo$store$useModel[0],
|
17
|
-
alarmDispatchers = _topo$store$useModel[1];
|
18
|
-
|
19
|
-
var alarmPanelIsOpen = alarmState.alarmPanelIsOpen;
|
20
|
-
var alarmData = useEventData({
|
21
|
-
topo: topo
|
22
|
-
});
|
23
13
|
return /*#__PURE__*/React.createElement(_Box, {
|
24
14
|
direction: "row",
|
25
15
|
spacing: 8
|
26
16
|
}, showEditButton && /*#__PURE__*/React.createElement(EditButton, _extends({
|
27
17
|
topo: topo
|
28
|
-
}, props)), /*#__PURE__*/React.createElement(
|
18
|
+
}, props)), /*#__PURE__*/React.createElement(AlarmButton, _extends({
|
29
19
|
topo: topo
|
30
|
-
}, props, {
|
31
|
-
alarmPanelIsOpen: alarmPanelIsOpen,
|
32
|
-
alarmData: alarmData
|
33
|
-
})), /*#__PURE__*/React.createElement(SettingButton, props), /*#__PURE__*/React.createElement(NodesDragSwitch, _extends({
|
20
|
+
}, props)), /*#__PURE__*/React.createElement(SettingButton, props), /*#__PURE__*/React.createElement(NodesDragSwitch, _extends({
|
34
21
|
topo: topo
|
35
22
|
}, props)), children);
|
36
23
|
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import React from 'react';
|
3
|
+
import AlarmListShowButton from "./AlarmListShowButton";
|
4
|
+
import useEventData from "../../../../hooks/useEventData";
|
5
|
+
|
6
|
+
function AlarmButton(props) {
|
7
|
+
var topo = props.topo;
|
8
|
+
|
9
|
+
var _topo$store$useModel = topo.store.useModel("topoAlarm"),
|
10
|
+
alarmState = _topo$store$useModel[0],
|
11
|
+
alarmDispatchers = _topo$store$useModel[1];
|
12
|
+
|
13
|
+
var alarmPanelIsOpen = alarmState.alarmPanelIsOpen;
|
14
|
+
var alarmData = useEventData({
|
15
|
+
topo: topo
|
16
|
+
});
|
17
|
+
return /*#__PURE__*/React.createElement(AlarmListShowButton, _extends({
|
18
|
+
topo: topo
|
19
|
+
}, props, {
|
20
|
+
alarmPanelIsOpen: alarmPanelIsOpen,
|
21
|
+
alarmData: alarmData
|
22
|
+
}));
|
23
|
+
}
|
24
|
+
|
25
|
+
export default AlarmButton;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
4
|
-
import topoService from "@riil-frontend/component-topology-common/es/services/topo";
|
5
4
|
import { getLinksDetail } from "../core/models/utils/linkUtils";
|
6
5
|
import { queryCisByIds } from "../core/services";
|
7
6
|
import { addTopoDataResourcePermission } from "./utils/resourcePermissionUtil"; // import "./utils/__tests__/resourcePermissionUtil.test";
|
@@ -127,12 +126,12 @@ function _buildData() {
|
|
127
126
|
return _buildData.apply(this, arguments);
|
128
127
|
}
|
129
128
|
|
130
|
-
export default function getTopoData(_x4) {
|
129
|
+
export default function getTopoData(_x4, _x5) {
|
131
130
|
return _getTopoData.apply(this, arguments);
|
132
131
|
}
|
133
132
|
|
134
133
|
function _getTopoData() {
|
135
|
-
_getTopoData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id) {
|
134
|
+
_getTopoData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id, topoService) {
|
136
135
|
var data;
|
137
136
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
138
137
|
while (1) {
|
@@ -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
@@ -1,45 +1,45 @@
|
|
1
1
|
import '@riil-frontend/component-topology-graph/es/style';
|
2
2
|
import '@alifd/next/es/box/style';
|
3
3
|
import '@alifd/next/es/message/style';
|
4
|
-
import '@alifd/next/es/button/style';
|
5
|
-
import '@alifd/next/es/icon/style';
|
6
|
-
import '@alifd/next/es/overlay/style';
|
7
|
-
import '@alifd/next/es/list/style';
|
8
|
-
import '@alifd/next/es/card/style';
|
9
|
-
import '@riil-frontend/component-no-data-page/es/style';
|
10
|
-
import '@alifd/next/es/drawer/style';
|
11
|
-
import '@alifd/next/es/form/style';
|
12
|
-
import '@alifd/next/es/field/style';
|
13
|
-
import '@alifd/next/es/radio/style';
|
14
|
-
import '@alifd/next/es/checkbox/style';
|
15
|
-
import '@alifd/next/es/table/style';
|
16
|
-
import '@alifd/next/es/search/style';
|
17
|
-
import '@alifd/next/es/grid/style';
|
18
|
-
import '@riil-frontend/component-action-tree/es/style';
|
19
|
-
import '@riil-frontend/component-table-layout/es/style';
|
20
|
-
import '@riil-frontend/hooks/es/style';
|
21
|
-
import '@alifd/next/es/balloon/style';
|
22
4
|
import '@riil-frontend/component-topology-utils/es/style';
|
23
|
-
import '@alifd/next/es/dropdown/style';
|
24
|
-
import '@alifd/next/es/menu/style';
|
25
|
-
import '@alifd/next/es/dialog/style';
|
26
5
|
import '@riil-frontend/utils/es/style';
|
27
6
|
import '@riil-frontend/component-riil-event-emitter/es/style';
|
7
|
+
import '@alifd/next/es/drawer/style';
|
8
|
+
import '@alifd/next/es/menu-button/style';
|
9
|
+
import '@alifd/next/es/search/style';
|
28
10
|
import '@alifd/next/es/tab/style';
|
11
|
+
import '@alifd/next/es/table/style';
|
12
|
+
import '@riil-frontend/component-table-layout/es/style';
|
29
13
|
import '@riil-frontend/component-pager/es/style';
|
30
|
-
import '@alifd/next/es/
|
14
|
+
import '@alifd/next/es/button/style';
|
15
|
+
import '@alifd/next/es/icon/style';
|
31
16
|
import '@alifd/next/es/loading/style';
|
32
17
|
import '@alifd/next/es/divider/style';
|
18
|
+
import '@riil-frontend/component-no-data-page/es/style';
|
33
19
|
|
20
|
+
import '@alifd/next/es/overlay/style';
|
21
|
+
import '@alifd/next/es/checkbox/style';
|
34
22
|
import '@riil-frontend/component-crucial-link-topo/es/style';
|
35
23
|
import '@alifd/next/es/input/style';
|
24
|
+
import '@alifd/next/es/field/style';
|
25
|
+
import '@alifd/next/es/form/style';
|
26
|
+
import '@alifd/next/es/dialog/style';
|
36
27
|
import '@alifd/next/es/upload/style';
|
37
28
|
import '@alifd/next/es/config-provider/style';
|
38
29
|
import '@riil-frontend/component-common-res-list/es/style';
|
30
|
+
import '@alifd/next/es/balloon/style';
|
31
|
+
import '@alifd/next/es/menu/style';
|
32
|
+
import '@alifd/next/es/dropdown/style';
|
39
33
|
import '@alifd/next/es/range/style';
|
34
|
+
import '@alifd/next/es/radio/style';
|
40
35
|
import '@alifd/next/es/tag/style';
|
41
36
|
import '@alifd/next/es/number-picker/style';
|
42
37
|
import '@alifd/next/es/select/style';
|
43
38
|
import '@alifd/next/es/collapse/style';
|
39
|
+
import '@alifd/next/es/list/style';
|
44
40
|
|
41
|
+
import '@alifd/next/es/grid/style';
|
42
|
+
import '@riil-frontend/component-action-tree/es/style';
|
43
|
+
import '@riil-frontend/hooks/es/style';
|
44
|
+
import '@alifd/next/es/card/style';
|
45
45
|
import './index.scss';
|
@@ -21,8 +21,6 @@ var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-ut
|
|
21
21
|
|
22
22
|
var _showMessage = _interopRequireDefault(require("../../utils/showMessage"));
|
23
23
|
|
24
|
-
var _TitleBar = _interopRequireDefault(require("../titlebar/TitleBar"));
|
25
|
-
|
26
24
|
var _template = require("../../../utils/template");
|
27
25
|
|
28
26
|
var _edgeUtil = require("../../utils/edgeUtil");
|
@@ -73,7 +71,6 @@ var Topology = function Topology(props) {
|
|
73
71
|
onLoad = props.onLoad,
|
74
72
|
onDestroy = props.onDestroy,
|
75
73
|
onRefreshTopo = props.onRefresh,
|
76
|
-
onEnterEdit = props.onEnterEdit,
|
77
74
|
onSave = props.onSave,
|
78
75
|
nodeDeleteable = props.nodeDeleteable,
|
79
76
|
onNodeDelete = props.onNodeDelete,
|
@@ -187,7 +184,19 @@ var Topology = function Topology(props) {
|
|
187
184
|
topo.selectionModel.init();
|
188
185
|
topoDispatchers.update({
|
189
186
|
graphLoaded: true
|
190
|
-
});
|
187
|
+
}); // url选中元素
|
188
|
+
|
189
|
+
var _topo$store$getModelS = topo.store.getModelState('selection'),
|
190
|
+
initSelectionId = _topo$store$getModelS.initSelectionId;
|
191
|
+
|
192
|
+
if (initSelectionId) {
|
193
|
+
var ele = topo.getHtTopo().getGraphView().dm().getDataByTag(initSelectionId);
|
194
|
+
topo.getHtTopo().getGraphView().sm().setSelection([ele]);
|
195
|
+
var selectionDispatchers = topo.store.getModelDispatchers('selection');
|
196
|
+
selectionDispatchers.update({
|
197
|
+
initSelectionId: null
|
198
|
+
});
|
199
|
+
}
|
191
200
|
|
192
201
|
if (onLoaded) {
|
193
202
|
onLoaded(topoData);
|
@@ -234,10 +243,6 @@ var Topology = function Topology(props) {
|
|
234
243
|
rightEventHandle(event);
|
235
244
|
break;
|
236
245
|
|
237
|
-
case _componentTopologyGraph.TopoEvent.EVENT_DATA_PICK:
|
238
|
-
topoEdit.onBindData(event.data);
|
239
|
-
break;
|
240
|
-
|
241
246
|
case _componentTopologyGraph.TopoEvent.EVENT_DATA_DELETE:
|
242
247
|
topoEdit.onDeleteElement(event.data);
|
243
248
|
break;
|
@@ -251,10 +256,6 @@ var Topology = function Topology(props) {
|
|
251
256
|
onRefresh(event.data);
|
252
257
|
break;
|
253
258
|
|
254
|
-
case _componentTopologyGraph.TopoEvent.EVENT_EDIT_EXIT:
|
255
|
-
topoEdit.onExitEdit(event.data);
|
256
|
-
break;
|
257
|
-
|
258
259
|
case _componentTopologyGraph.TopoEvent.EVENT_CONTEXT_TOOL:
|
259
260
|
_rlog["default"].debug('自定义工具栏事件', event);
|
260
261
|
|
@@ -294,12 +295,7 @@ var Topology = function Topology(props) {
|
|
294
295
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
295
296
|
className: _TopoViewModule["default"].topoView,
|
296
297
|
"data-version": topo.version
|
297
|
-
}, titleBar !== false &&
|
298
|
-
topo: topo,
|
299
|
-
viewerProps: viewerProps,
|
300
|
-
onEnterEdit: onEnterEdit,
|
301
|
-
topoEditApi: topoEdit
|
302
|
-
})), isEditMode && /*#__PURE__*/_react["default"].createElement(_EditorToolbar["default"], {
|
298
|
+
}, titleBar !== false && titleBar, isEditMode && /*#__PURE__*/_react["default"].createElement(_EditorToolbar["default"], {
|
303
299
|
topo: topo,
|
304
300
|
topoEdit: topoEdit,
|
305
301
|
topoContext: {
|
@@ -341,8 +337,6 @@ Topology.propTypes = {
|
|
341
337
|
viewerProps: _propTypes["default"].object,
|
342
338
|
editorProps: _propTypes["default"].object,
|
343
339
|
topoContext: _propTypes["default"].object,
|
344
|
-
// 进入编辑模式
|
345
|
-
onEnterEdit: _propTypes["default"].func,
|
346
340
|
onRefresh: _propTypes["default"].func,
|
347
341
|
onSave: _propTypes["default"].func,
|
348
342
|
nodeDeleteable: _propTypes["default"].func,
|
@@ -354,7 +348,7 @@ Topology.propTypes = {
|
|
354
348
|
/**
|
355
349
|
* @deprecated 工具栏
|
356
350
|
*/
|
357
|
-
titleBar: _propTypes["default"].
|
351
|
+
titleBar: _propTypes["default"].any
|
358
352
|
};
|
359
353
|
Topology.defaultProps = {
|
360
354
|
defaultEnterEditMode: false,
|
@@ -30,4 +30,8 @@ exports.TitleWidget = _TitleWidget["default"];
|
|
30
30
|
|
31
31
|
var _ViewerTools = _interopRequireDefault(require("../../viewer/components/titlebar/ViewerTools"));
|
32
32
|
|
33
|
-
exports.ViewerTools = _ViewerTools["default"];
|
33
|
+
exports.ViewerTools = _ViewerTools["default"];
|
34
|
+
|
35
|
+
var _DebugTools = _interopRequireDefault(require("../../editor/components/titlebar/widgets/DebugTools"));
|
36
|
+
|
37
|
+
exports.DebugTools = _DebugTools["default"];
|
@@ -13,8 +13,6 @@ var _CustomIconPlugin = _interopRequireDefault(require("./CustomIconPlugin"));
|
|
13
13
|
|
14
14
|
var _SaveLoading = _interopRequireDefault(require("./plugins/SaveLoading"));
|
15
15
|
|
16
|
-
var _MultipleResourceSelectPlugin = _interopRequireDefault(require("./plugins/MultipleResourceSelectPlugin"));
|
17
|
-
|
18
16
|
var _GroupAddResourceDrawerPlugin = _interopRequireDefault(require("./GroupAddResourceDrawerPlugin"));
|
19
17
|
|
20
18
|
var _MetricPollingPlugin = _interopRequireDefault(require("../../viewer/components/plugins/MetricPollingPlugin"));
|
@@ -47,7 +45,7 @@ function TopoEditorPlugin(props) {
|
|
47
45
|
return null;
|
48
46
|
}
|
49
47
|
|
50
|
-
var plugins = [_CorePlugin["default"], _SaveLoading["default"], _AddElementThemePlugin["default"], _CustomIconPlugin["default"], _GroupAddResourceDrawerPlugin["default"],
|
48
|
+
var plugins = [_CorePlugin["default"], _SaveLoading["default"], _AddElementThemePlugin["default"], _CustomIconPlugin["default"], _GroupAddResourceDrawerPlugin["default"], _MetricPollingPlugin["default"]].concat((editorProps === null || editorProps === void 0 ? void 0 : editorProps.plugins) || []);
|
51
49
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, plugins.map(function (Plugin, index) {
|
52
50
|
return /*#__PURE__*/_react["default"].createElement(Plugin, (0, _extends2["default"])({
|
53
51
|
key: index,
|
@@ -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,22 @@ 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
|
+
fontSize: element.a('edge.tag.fontSize'),
|
27
|
+
bold: !!element.a('edge.tag.fontBold'),
|
28
|
+
italic: !!element.a('edge.tag.fontItalic')
|
28
29
|
}, (0, _colorUtil.parseBackground)(element.a('edge.tag.background')));
|
29
30
|
}
|
30
31
|
|
31
32
|
function setTextStyle(element, style, topo) {
|
32
|
-
var
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
otherStyle = (0, _objectWithoutPropertiesLoose2["default"])(_fontStyleUtil$remove, _excluded);
|
39
|
-
|
33
|
+
var color = style.color,
|
34
|
+
background = style.background,
|
35
|
+
opacity = style.opacity,
|
36
|
+
bold = style.bold,
|
37
|
+
italic = style.italic,
|
38
|
+
otherStyle = (0, _objectWithoutPropertiesLoose2["default"])(style, _excluded);
|
40
39
|
var tagStyle = (0, _extends2["default"])({}, otherStyle);
|
41
40
|
|
42
41
|
if ('color' in style) {
|
@@ -73,12 +72,12 @@ function setTextStyle(element, style, topo) {
|
|
73
72
|
|
74
73
|
|
75
74
|
function getEnabledFields(element) {
|
76
|
-
return ['fontFamily', 'color', 'background', 'opacity'];
|
75
|
+
return ['fontFamily', 'color', 'background', 'opacity', 'fontSize', 'bold', 'italic'];
|
77
76
|
}
|
78
77
|
|
79
78
|
function getFieldDisabled(element) {
|
80
79
|
return {
|
81
|
-
fontSize:
|
80
|
+
fontSize: false
|
82
81
|
};
|
83
82
|
}
|
84
83
|
|