@riil-frontend/component-topology 4.0.22 → 4.0.23
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/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +2 -2
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/models/utils/linkUtils.js +7 -14
- package/lib/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +2 -2
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/models/utils/linkUtils.js +7 -14
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ import React, { useEffect, useState, useRef } from "react";
|
|
|
7
7
|
import styles from "./ResourceDisplay/CommonCheckboxGroup.module.scss";
|
|
8
8
|
import { plurals } from "../../models/utils/linkUtils";
|
|
9
9
|
var LineExpandAllRadioGroup = /*#__PURE__*/React.forwardRef(function LineExpandAllRadioGroup(props, ref) {
|
|
10
|
-
var _plurals
|
|
10
|
+
var _plurals;
|
|
11
11
|
|
|
12
12
|
var value = props.value,
|
|
13
13
|
onChange = props.onChange,
|
|
@@ -18,7 +18,7 @@ var LineExpandAllRadioGroup = /*#__PURE__*/React.forwardRef(function LineExpandA
|
|
|
18
18
|
showType = _useState[0],
|
|
19
19
|
setShowType = _useState[1];
|
|
20
20
|
|
|
21
|
-
var _useState2 = useState((_plurals
|
|
21
|
+
var _useState2 = useState((_plurals = plurals[value !== null && value !== void 0 ? value : 2]) !== null && _plurals !== void 0 ? _plurals : []),
|
|
22
22
|
pluralType = _useState2[0],
|
|
23
23
|
setPluralType = _useState2[1];
|
|
24
24
|
|
|
@@ -21,7 +21,7 @@ import PluginManager from "./PluginManager";
|
|
|
21
21
|
import topoFactory from "./topoFactory";
|
|
22
22
|
import ElementTagTipConfig from "./tagstips/ElementTagTipConfig"; // eslint-disable-next-line no-undef
|
|
23
23
|
|
|
24
|
-
var version = typeof "4.0.
|
|
24
|
+
var version = typeof "4.0.23" === 'string' ? "4.0.23" : null;
|
|
25
25
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
26
26
|
/**
|
|
27
27
|
* 拓扑显示和编辑
|
|
@@ -184,6 +184,7 @@ export var showLinkByConfig = function showLinkByConfig(props) {
|
|
|
184
184
|
|
|
185
185
|
var showPhy = types.indexOf("phy") >= 0;
|
|
186
186
|
var showAgg = types.indexOf("agg") >= 0;
|
|
187
|
+
console.log("edges----types", showType, types, showAgg);
|
|
187
188
|
|
|
188
189
|
if (Array.isArray(edges) && edges.length > 0) {
|
|
189
190
|
edges.map(function (edge) {
|
|
@@ -191,21 +192,13 @@ export var showLinkByConfig = function showLinkByConfig(props) {
|
|
|
191
192
|
// 单链路全部显示
|
|
192
193
|
edge.s("2d.visible", true);
|
|
193
194
|
} else {
|
|
194
|
-
var d = topo.dataModel.getDataById(edge.getTag());
|
|
195
|
-
// 判断是否聚合链路
|
|
196
|
-
|
|
197
|
-
if (d.destination_type === "network.agg_interface" && d.source_type === "network.agg_interface") {
|
|
198
|
-
|
|
199
|
-
edge.s("2d.visible", true);
|
|
200
|
-
} else {
|
|
201
|
-
edge.s("2d.visible", false);
|
|
202
|
-
}
|
|
195
|
+
var d = topo.dataModel.getDataById(edge.getTag());
|
|
196
|
+
console.log("edge", edge, d); // 判断是否聚合链路
|
|
197
|
+
|
|
198
|
+
if (d.attributes.destination_type === "network.agg_interface" && d.attributes.source_type === "network.agg_interface") {
|
|
199
|
+
edge.s("2d.visible", showAgg);
|
|
203
200
|
} else {
|
|
204
|
-
|
|
205
|
-
edge.s("2d.visible", true);
|
|
206
|
-
} else {
|
|
207
|
-
edge.s("2d.visible", false);
|
|
208
|
-
}
|
|
201
|
+
edge.s("2d.visible", showPhy);
|
|
209
202
|
}
|
|
210
203
|
}
|
|
211
204
|
});
|
|
@@ -26,7 +26,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
28
|
var LineExpandAllRadioGroup = /*#__PURE__*/_react["default"].forwardRef(function LineExpandAllRadioGroup(props, ref) {
|
|
29
|
-
var _plurals
|
|
29
|
+
var _plurals;
|
|
30
30
|
|
|
31
31
|
var value = props.value,
|
|
32
32
|
onChange = props.onChange,
|
|
@@ -37,7 +37,7 @@ var LineExpandAllRadioGroup = /*#__PURE__*/_react["default"].forwardRef(function
|
|
|
37
37
|
showType = _useState[0],
|
|
38
38
|
setShowType = _useState[1];
|
|
39
39
|
|
|
40
|
-
var _useState2 = (0, _react.useState)((_plurals
|
|
40
|
+
var _useState2 = (0, _react.useState)((_plurals = _linkUtils.plurals[value !== null && value !== void 0 ? value : 2]) !== null && _plurals !== void 0 ? _plurals : []),
|
|
41
41
|
pluralType = _useState2[0],
|
|
42
42
|
setPluralType = _useState2[1];
|
|
43
43
|
|
|
@@ -50,7 +50,7 @@ var _topoFactory = _interopRequireDefault(require("./topoFactory"));
|
|
|
50
50
|
var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTagTipConfig"));
|
|
51
51
|
|
|
52
52
|
// eslint-disable-next-line no-undef
|
|
53
|
-
var version = typeof "4.0.
|
|
53
|
+
var version = typeof "4.0.23" === 'string' ? "4.0.23" : null;
|
|
54
54
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
55
55
|
/**
|
|
56
56
|
* 拓扑显示和编辑
|
|
@@ -210,6 +210,7 @@ var showLinkByConfig = function showLinkByConfig(props) {
|
|
|
210
210
|
|
|
211
211
|
var showPhy = types.indexOf("phy") >= 0;
|
|
212
212
|
var showAgg = types.indexOf("agg") >= 0;
|
|
213
|
+
console.log("edges----types", showType, types, showAgg);
|
|
213
214
|
|
|
214
215
|
if (Array.isArray(edges) && edges.length > 0) {
|
|
215
216
|
edges.map(function (edge) {
|
|
@@ -217,21 +218,13 @@ var showLinkByConfig = function showLinkByConfig(props) {
|
|
|
217
218
|
// 单链路全部显示
|
|
218
219
|
edge.s("2d.visible", true);
|
|
219
220
|
} else {
|
|
220
|
-
var d = topo.dataModel.getDataById(edge.getTag());
|
|
221
|
-
// 判断是否聚合链路
|
|
222
|
-
|
|
223
|
-
if (d.destination_type === "network.agg_interface" && d.source_type === "network.agg_interface") {
|
|
224
|
-
|
|
225
|
-
edge.s("2d.visible", true);
|
|
226
|
-
} else {
|
|
227
|
-
edge.s("2d.visible", false);
|
|
228
|
-
}
|
|
221
|
+
var d = topo.dataModel.getDataById(edge.getTag());
|
|
222
|
+
console.log("edge", edge, d); // 判断是否聚合链路
|
|
223
|
+
|
|
224
|
+
if (d.attributes.destination_type === "network.agg_interface" && d.attributes.source_type === "network.agg_interface") {
|
|
225
|
+
edge.s("2d.visible", showAgg);
|
|
229
226
|
} else {
|
|
230
|
-
|
|
231
|
-
edge.s("2d.visible", true);
|
|
232
|
-
} else {
|
|
233
|
-
edge.s("2d.visible", false);
|
|
234
|
-
}
|
|
227
|
+
edge.s("2d.visible", showPhy);
|
|
235
228
|
}
|
|
236
229
|
}
|
|
237
230
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.23",
|
|
4
4
|
"description": "拓扑",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "build-scripts start",
|
|
@@ -114,6 +114,6 @@
|
|
|
114
114
|
"access": "public"
|
|
115
115
|
},
|
|
116
116
|
"license": "MIT",
|
|
117
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@4.0.
|
|
117
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@4.0.23/build/index.html",
|
|
118
118
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
|
119
119
|
}
|