@riil-frontend/component-topology 9.0.0-a.32 → 9.0.0-a.34
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.css +1 -1
- package/build/index.js +10 -10
- package/es/core/hooks/useTopoEdit.js +13 -17
- package/es/core/hooks/useTopoFullscreen.js +2 -1
- package/es/core/models/TopoApp.js +1 -1
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +3 -3
- package/lib/core/hooks/useTopoEdit.js +13 -17
- package/lib/core/hooks/useTopoFullscreen.js +2 -1
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +3 -3
- package/package.json +2 -2
@@ -989,42 +989,37 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
989
989
|
return _context16.abrupt("return");
|
990
990
|
|
991
991
|
case 3:
|
992
|
-
if (
|
993
|
-
|
994
|
-
|
995
|
-
}
|
996
|
-
|
997
|
-
return _context16.abrupt("return");
|
998
|
-
|
999
|
-
case 5:
|
992
|
+
// if (txtValue === nodeElement.a('bindIp')) {
|
993
|
+
// return;
|
994
|
+
// }
|
1000
995
|
// 根据配置查询拓扑数据
|
1001
996
|
dm = topo.getDataModel(); // 执行唯一性验证
|
1002
997
|
|
1003
998
|
isUnique = isUniqueIp(dm, txtValue, nodeElement); // 获取关联链路
|
1004
999
|
|
1005
1000
|
if (!isUnique) {
|
1006
|
-
_context16.next =
|
1001
|
+
_context16.next = 25;
|
1007
1002
|
break;
|
1008
1003
|
}
|
1009
1004
|
|
1010
1005
|
ip = buildIpNode(txtValue);
|
1011
|
-
_context16.next =
|
1006
|
+
_context16.next = 9;
|
1012
1007
|
return deleteExLink(nodeElement);
|
1013
1008
|
|
1014
|
-
case
|
1009
|
+
case 9:
|
1015
1010
|
nodeElement.a(ip);
|
1016
1011
|
nodeElement.setName(txtValue);
|
1017
1012
|
nodeElement.setTag("ip:" + txtValue); // 获取配置
|
1018
1013
|
|
1019
1014
|
configObj = topo.resourceConfig.getConfig();
|
1020
|
-
_context16.next =
|
1015
|
+
_context16.next = 15;
|
1021
1016
|
return resourceConfig.updateConfig(configObj);
|
1022
1017
|
|
1023
|
-
case
|
1024
|
-
_context16.next =
|
1018
|
+
case 15:
|
1019
|
+
_context16.next = 17;
|
1025
1020
|
return editDispatchers.fetchDataByConfig();
|
1026
1021
|
|
1027
|
-
case
|
1022
|
+
case 17:
|
1028
1023
|
configData = _context16.sent;
|
1029
1024
|
// console.log("configData",configObj, configData);
|
1030
1025
|
_elements = configData.elements;
|
@@ -1043,7 +1038,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1043
1038
|
nodes: [],
|
1044
1039
|
links: newLink,
|
1045
1040
|
linkGroups: newLinkGroup
|
1046
|
-
};
|
1041
|
+
};
|
1042
|
+
console.log("createElementsData", createElementsData);
|
1047
1043
|
|
1048
1044
|
if ([].concat(newLink, newLinkGroup).length > 0) {
|
1049
1045
|
_htTopo = topo.getHtTopo();
|
@@ -1051,7 +1047,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1051
1047
|
_htTopo.createElements(createElementsData);
|
1052
1048
|
}
|
1053
1049
|
|
1054
|
-
case
|
1050
|
+
case 25:
|
1055
1051
|
case "end":
|
1056
1052
|
return _context16.stop();
|
1057
1053
|
}
|
@@ -10,7 +10,8 @@ export default function useTopoFullscreen(props) {
|
|
10
10
|
var htTopo = topo.getHtTopo();
|
11
11
|
|
12
12
|
if ((graphLoaded || graphLoaded2) && topoData && htTopo.setFullScreenFunc) {
|
13
|
-
htTopo.setFullScreenFunc(function () {
|
13
|
+
htTopo.setFullScreenFunc(function () {
|
14
|
+
panelRef.current.requestFullscreen();
|
14
15
|
});
|
15
16
|
}
|
16
17
|
}, [topoData, graphLoaded, graphLoaded2]); // 监听退出全屏
|
@@ -24,7 +24,7 @@ import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
|
|
24
24
|
import SelectionModel from "./SelectionModel";
|
25
25
|
import CiCache from "./cache/CiCache"; // eslint-disable-next-line no-undef
|
26
26
|
|
27
|
-
var version = typeof "9.0.0-a.
|
27
|
+
var version = typeof "9.0.0-a.34" === 'string' ? "9.0.0-a.34" : null;
|
28
28
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
29
29
|
/**
|
30
30
|
* 拓扑显示和编辑
|
@@ -169,11 +169,11 @@ var LinkDynamicStyleExecutor = /*#__PURE__*/function () {
|
|
169
169
|
var autoChangeEdgeWidth = displayConfig.autoChangeEdgeWidth !== false;
|
170
170
|
|
171
171
|
if (!autoChangeEdgeWidth) {
|
172
|
-
return
|
172
|
+
return 3;
|
173
173
|
}
|
174
174
|
|
175
175
|
if (!links.length) {
|
176
|
-
return
|
176
|
+
return 3;
|
177
177
|
}
|
178
178
|
|
179
179
|
var total = 0;
|
@@ -192,7 +192,7 @@ var LinkDynamicStyleExecutor = /*#__PURE__*/function () {
|
|
192
192
|
var autoChangeEdgeWidth = displayConfig.autoChangeEdgeWidth !== false;
|
193
193
|
|
194
194
|
if (!autoChangeEdgeWidth) {
|
195
|
-
return
|
195
|
+
return 3;
|
196
196
|
}
|
197
197
|
|
198
198
|
return this.calcEdgeWidth(link.attributes['network_link.actual_bandwidth']);
|
@@ -1030,42 +1030,37 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1030
1030
|
return _context16.abrupt("return");
|
1031
1031
|
|
1032
1032
|
case 3:
|
1033
|
-
if (
|
1034
|
-
|
1035
|
-
|
1036
|
-
}
|
1037
|
-
|
1038
|
-
return _context16.abrupt("return");
|
1039
|
-
|
1040
|
-
case 5:
|
1033
|
+
// if (txtValue === nodeElement.a('bindIp')) {
|
1034
|
+
// return;
|
1035
|
+
// }
|
1041
1036
|
// 根据配置查询拓扑数据
|
1042
1037
|
dm = topo.getDataModel(); // 执行唯一性验证
|
1043
1038
|
|
1044
1039
|
isUnique = (0, _exitLinkUtil.isUniqueIp)(dm, txtValue, nodeElement); // 获取关联链路
|
1045
1040
|
|
1046
1041
|
if (!isUnique) {
|
1047
|
-
_context16.next =
|
1042
|
+
_context16.next = 25;
|
1048
1043
|
break;
|
1049
1044
|
}
|
1050
1045
|
|
1051
1046
|
ip = (0, _exitLinkUtil.buildIpNode)(txtValue);
|
1052
|
-
_context16.next =
|
1047
|
+
_context16.next = 9;
|
1053
1048
|
return deleteExLink(nodeElement);
|
1054
1049
|
|
1055
|
-
case
|
1050
|
+
case 9:
|
1056
1051
|
nodeElement.a(ip);
|
1057
1052
|
nodeElement.setName(txtValue);
|
1058
1053
|
nodeElement.setTag("ip:" + txtValue); // 获取配置
|
1059
1054
|
|
1060
1055
|
configObj = topo.resourceConfig.getConfig();
|
1061
|
-
_context16.next =
|
1056
|
+
_context16.next = 15;
|
1062
1057
|
return resourceConfig.updateConfig(configObj);
|
1063
1058
|
|
1064
|
-
case
|
1065
|
-
_context16.next =
|
1059
|
+
case 15:
|
1060
|
+
_context16.next = 17;
|
1066
1061
|
return editDispatchers.fetchDataByConfig();
|
1067
1062
|
|
1068
|
-
case
|
1063
|
+
case 17:
|
1069
1064
|
configData = _context16.sent;
|
1070
1065
|
// console.log("configData",configObj, configData);
|
1071
1066
|
_elements = configData.elements;
|
@@ -1084,7 +1079,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1084
1079
|
nodes: [],
|
1085
1080
|
links: newLink,
|
1086
1081
|
linkGroups: newLinkGroup
|
1087
|
-
};
|
1082
|
+
};
|
1083
|
+
console.log("createElementsData", createElementsData);
|
1088
1084
|
|
1089
1085
|
if ([].concat(newLink, newLinkGroup).length > 0) {
|
1090
1086
|
_htTopo = topo.getHtTopo();
|
@@ -1092,7 +1088,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1092
1088
|
_htTopo.createElements(createElementsData);
|
1093
1089
|
}
|
1094
1090
|
|
1095
|
-
case
|
1091
|
+
case 25:
|
1096
1092
|
case "end":
|
1097
1093
|
return _context16.stop();
|
1098
1094
|
}
|
@@ -20,7 +20,8 @@ function useTopoFullscreen(props) {
|
|
20
20
|
var htTopo = topo.getHtTopo();
|
21
21
|
|
22
22
|
if ((graphLoaded || graphLoaded2) && topoData && htTopo.setFullScreenFunc) {
|
23
|
-
htTopo.setFullScreenFunc(function () {
|
23
|
+
htTopo.setFullScreenFunc(function () {
|
24
|
+
panelRef.current.requestFullscreen();
|
24
25
|
});
|
25
26
|
}
|
26
27
|
}, [topoData, graphLoaded, graphLoaded2]); // 监听退出全屏
|
@@ -56,7 +56,7 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
|
|
56
56
|
var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
|
57
57
|
|
58
58
|
// eslint-disable-next-line no-undef
|
59
|
-
var version = typeof "9.0.0-a.
|
59
|
+
var version = typeof "9.0.0-a.34" === 'string' ? "9.0.0-a.34" : null;
|
60
60
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
61
61
|
/**
|
62
62
|
* 拓扑显示和编辑
|
@@ -180,11 +180,11 @@ var LinkDynamicStyleExecutor = /*#__PURE__*/function () {
|
|
180
180
|
var autoChangeEdgeWidth = displayConfig.autoChangeEdgeWidth !== false;
|
181
181
|
|
182
182
|
if (!autoChangeEdgeWidth) {
|
183
|
-
return
|
183
|
+
return 3;
|
184
184
|
}
|
185
185
|
|
186
186
|
if (!links.length) {
|
187
|
-
return
|
187
|
+
return 3;
|
188
188
|
}
|
189
189
|
|
190
190
|
var total = 0;
|
@@ -203,7 +203,7 @@ var LinkDynamicStyleExecutor = /*#__PURE__*/function () {
|
|
203
203
|
var autoChangeEdgeWidth = displayConfig.autoChangeEdgeWidth !== false;
|
204
204
|
|
205
205
|
if (!autoChangeEdgeWidth) {
|
206
|
-
return
|
206
|
+
return 3;
|
207
207
|
}
|
208
208
|
|
209
209
|
return this.calcEdgeWidth(link.attributes['network_link.actual_bandwidth']);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "9.0.0-a.
|
3
|
+
"version": "9.0.0-a.34",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -116,6 +116,6 @@
|
|
116
116
|
"access": "public"
|
117
117
|
},
|
118
118
|
"license": "MIT",
|
119
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@9.0.0-a.
|
119
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@9.0.0-a.34/build/index.html",
|
120
120
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
121
|
}
|