@riil-frontend/component-topology 3.5.14 → 3.5.15
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/index.js +1 -1
- package/es/core/models/TopoApp.js +1 -1
- package/es/hooks/useManageStatus.js +5 -3
- package/es/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +18 -7
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/hooks/useManageStatus.js +5 -3
- package/lib/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +18 -7
- package/package.json +2 -2
|
@@ -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.5.
|
|
23
|
+
var version = typeof "3.5.15" === 'string' ? "3.5.15" : null;
|
|
24
24
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
25
25
|
/**
|
|
26
26
|
* 拓扑显示和编辑
|
|
@@ -33,7 +33,9 @@ export default function useManageStatus(props) {
|
|
|
33
33
|
topoState = _topo$store$useModel[0],
|
|
34
34
|
topoDispatchers = _topo$store$useModel[1];
|
|
35
35
|
|
|
36
|
-
var graphLoaded = topoState.graphLoaded
|
|
36
|
+
var graphLoaded = topoState.graphLoaded,
|
|
37
|
+
viewState = topoState.viewState;
|
|
38
|
+
var isEditMode = viewState === 'edit';
|
|
37
39
|
var resources = topo.dataModel.useCis();
|
|
38
40
|
useTopoEventListener({
|
|
39
41
|
type: 'manageStatus',
|
|
@@ -55,7 +57,7 @@ export default function useManageStatus(props) {
|
|
|
55
57
|
});
|
|
56
58
|
useEffect(function () {
|
|
57
59
|
// 首次加载和监控状态变化后,更新节点和连线置灰状态
|
|
58
|
-
if (graphLoaded) {
|
|
60
|
+
if (!isEditMode && graphLoaded) {
|
|
59
61
|
resources.forEach(function (resource) {
|
|
60
62
|
var type = resource.type,
|
|
61
63
|
id = resource.id,
|
|
@@ -74,5 +76,5 @@ export default function useManageStatus(props) {
|
|
|
74
76
|
}
|
|
75
77
|
});
|
|
76
78
|
}
|
|
77
|
-
}, [graphLoaded, resources]);
|
|
79
|
+
}, [isEditMode, graphLoaded, resources]);
|
|
78
80
|
}
|
|
@@ -72,24 +72,35 @@ function AddLinkDrawer(props) {
|
|
|
72
72
|
while (1) {
|
|
73
73
|
switch (_context.prev = _context.next) {
|
|
74
74
|
case 0:
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
if (!(id === null)) {
|
|
76
|
+
_context.next = 2;
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return _context.abrupt("return", {
|
|
81
|
+
ports: [],
|
|
82
|
+
portsDoc: {}
|
|
83
|
+
});
|
|
77
84
|
|
|
78
85
|
case 2:
|
|
86
|
+
_context.next = 4;
|
|
87
|
+
return service.getPortsById(id);
|
|
88
|
+
|
|
89
|
+
case 4:
|
|
79
90
|
result = _context.sent;
|
|
80
|
-
_context.next =
|
|
91
|
+
_context.next = 7;
|
|
81
92
|
return service.queryLinksByNodeId(id);
|
|
82
93
|
|
|
83
|
-
case
|
|
94
|
+
case 7:
|
|
84
95
|
links = _context.sent;
|
|
85
96
|
ifTypes = result.map(function (item) {
|
|
86
97
|
return item.type;
|
|
87
98
|
}); // console.log("端口类型列表", ifTypes);
|
|
88
99
|
|
|
89
|
-
_context.next =
|
|
100
|
+
_context.next = 11;
|
|
90
101
|
return getInterfaceObject(ifTypes);
|
|
91
102
|
|
|
92
|
-
case
|
|
103
|
+
case 11:
|
|
93
104
|
ifDoc = _context.sent;
|
|
94
105
|
// console.log("端口类型字典", ifDoc);
|
|
95
106
|
usedPorts = [];
|
|
@@ -123,7 +134,7 @@ function AddLinkDrawer(props) {
|
|
|
123
134
|
portsDoc: portsDoc
|
|
124
135
|
});
|
|
125
136
|
|
|
126
|
-
case
|
|
137
|
+
case 18:
|
|
127
138
|
case "end":
|
|
128
139
|
return _context.stop();
|
|
129
140
|
}
|
|
@@ -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.5.
|
|
51
|
+
var version = typeof "3.5.15" === 'string' ? "3.5.15" : null;
|
|
52
52
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
53
53
|
/**
|
|
54
54
|
* 拓扑显示和编辑
|
|
@@ -43,7 +43,9 @@ function useManageStatus(props) {
|
|
|
43
43
|
topoState = _topo$store$useModel[0],
|
|
44
44
|
topoDispatchers = _topo$store$useModel[1];
|
|
45
45
|
|
|
46
|
-
var graphLoaded = topoState.graphLoaded
|
|
46
|
+
var graphLoaded = topoState.graphLoaded,
|
|
47
|
+
viewState = topoState.viewState;
|
|
48
|
+
var isEditMode = viewState === 'edit';
|
|
47
49
|
var resources = topo.dataModel.useCis();
|
|
48
50
|
(0, _useTopoEventListener["default"])({
|
|
49
51
|
type: 'manageStatus',
|
|
@@ -64,7 +66,7 @@ function useManageStatus(props) {
|
|
|
64
66
|
});
|
|
65
67
|
(0, _react.useEffect)(function () {
|
|
66
68
|
// 首次加载和监控状态变化后,更新节点和连线置灰状态
|
|
67
|
-
if (graphLoaded) {
|
|
69
|
+
if (!isEditMode && graphLoaded) {
|
|
68
70
|
resources.forEach(function (resource) {
|
|
69
71
|
var type = resource.type,
|
|
70
72
|
id = resource.id,
|
|
@@ -83,5 +85,5 @@ function useManageStatus(props) {
|
|
|
83
85
|
}
|
|
84
86
|
});
|
|
85
87
|
}
|
|
86
|
-
}, [graphLoaded, resources]);
|
|
88
|
+
}, [isEditMode, graphLoaded, resources]);
|
|
87
89
|
}
|
|
@@ -101,24 +101,35 @@ function AddLinkDrawer(props) {
|
|
|
101
101
|
while (1) {
|
|
102
102
|
switch (_context.prev = _context.next) {
|
|
103
103
|
case 0:
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
if (!(id === null)) {
|
|
105
|
+
_context.next = 2;
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return _context.abrupt("return", {
|
|
110
|
+
ports: [],
|
|
111
|
+
portsDoc: {}
|
|
112
|
+
});
|
|
106
113
|
|
|
107
114
|
case 2:
|
|
115
|
+
_context.next = 4;
|
|
116
|
+
return _server["default"].getPortsById(id);
|
|
117
|
+
|
|
118
|
+
case 4:
|
|
108
119
|
result = _context.sent;
|
|
109
|
-
_context.next =
|
|
120
|
+
_context.next = 7;
|
|
110
121
|
return _server["default"].queryLinksByNodeId(id);
|
|
111
122
|
|
|
112
|
-
case
|
|
123
|
+
case 7:
|
|
113
124
|
links = _context.sent;
|
|
114
125
|
ifTypes = result.map(function (item) {
|
|
115
126
|
return item.type;
|
|
116
127
|
}); // console.log("端口类型列表", ifTypes);
|
|
117
128
|
|
|
118
|
-
_context.next =
|
|
129
|
+
_context.next = 11;
|
|
119
130
|
return (0, _linkUtils.getInterfaceObject)(ifTypes);
|
|
120
131
|
|
|
121
|
-
case
|
|
132
|
+
case 11:
|
|
122
133
|
ifDoc = _context.sent;
|
|
123
134
|
// console.log("端口类型字典", ifDoc);
|
|
124
135
|
usedPorts = [];
|
|
@@ -152,7 +163,7 @@ function AddLinkDrawer(props) {
|
|
|
152
163
|
portsDoc: portsDoc
|
|
153
164
|
});
|
|
154
165
|
|
|
155
|
-
case
|
|
166
|
+
case 18:
|
|
156
167
|
case "end":
|
|
157
168
|
return _context.stop();
|
|
158
169
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.15",
|
|
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.5.
|
|
113
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@3.5.15/build/index.html",
|
|
114
114
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
|
115
115
|
}
|