@riil-frontend/component-topology 10.0.7 → 10.0.9
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 +7 -7
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +6 -4
- package/es/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +16 -13
- package/es/core/models/AttributeMetricDisplay.js +2 -6
- package/es/core/models/TopoApp.js +1 -1
- package/es/networkTopo/models/IpNodeTagsTipsBuilder.js +1 -40
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +6 -4
- package/lib/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +17 -13
- package/lib/core/models/AttributeMetricDisplay.js +2 -6
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/networkTopo/models/IpNodeTagsTipsBuilder.js +1 -40
- package/package.json +2 -2
@@ -74,20 +74,22 @@ export default (function (props) {
|
|
74
74
|
return displayConfigDispatchers.update(displayConfig);
|
75
75
|
|
76
76
|
case 7:
|
77
|
+
// 更新节点名称显示隐藏
|
78
|
+
topo.attributeMetricDisplay.updateNodesNameVisible();
|
77
79
|
extraOnOk = displaySettingProps === null || displaySettingProps === void 0 ? void 0 : displaySettingProps.onOk;
|
78
80
|
|
79
81
|
if (!extraOnOk) {
|
80
|
-
_context2.next =
|
82
|
+
_context2.next = 12;
|
81
83
|
break;
|
82
84
|
}
|
83
85
|
|
84
|
-
_context2.next =
|
86
|
+
_context2.next = 12;
|
85
87
|
return extraOnOk(displayConfig);
|
86
88
|
|
87
|
-
case
|
89
|
+
case 12:
|
88
90
|
topo.historyManager.endTransaction();
|
89
91
|
|
90
|
-
case
|
92
|
+
case 13:
|
91
93
|
case "end":
|
92
94
|
return _context2.stop();
|
93
95
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _Balloon from "@alifd/next/es/balloon";
|
1
2
|
import _Button from "@alifd/next/es/button";
|
2
3
|
import _Icon from "@alifd/next/es/icon";
|
3
4
|
import _Divider from "@alifd/next/es/divider";
|
@@ -61,19 +62,21 @@ var AlignTypeList = function AlignTypeList(props) {
|
|
61
62
|
return item.value === 'divide' ? /*#__PURE__*/React.createElement(_Divider, {
|
62
63
|
key: index,
|
63
64
|
direction: "ver"
|
64
|
-
}) : /*#__PURE__*/React.createElement(
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
65
|
+
}) : /*#__PURE__*/React.createElement(_Balloon.Tooltip, {
|
66
|
+
trigger: /*#__PURE__*/React.createElement(_Button, {
|
67
|
+
key: index,
|
68
|
+
className: "" + styles.redioBtn,
|
69
|
+
text: true,
|
70
|
+
onClick: function onClick() {
|
71
|
+
handleChange(item);
|
72
|
+
} // eslint-disable-next-line no-unneeded-ternary
|
73
|
+
,
|
74
|
+
disabled: (item.value === 'distributeHorizontal' || item.value === 'distributeVertical') && distributionDisabled
|
75
|
+
}, /*#__PURE__*/React.createElement(_Icon, {
|
76
|
+
type: item.icon
|
77
|
+
})),
|
78
|
+
align: "b"
|
79
|
+
}, item.label);
|
77
80
|
}));
|
78
81
|
};
|
79
82
|
|
@@ -318,12 +318,8 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
|
|
318
318
|
return item.type === "graph";
|
319
319
|
}).length; // ipNode逻辑
|
320
320
|
|
321
|
-
if (isCustom) {
|
322
|
-
|
323
|
-
} else {
|
324
|
-
return !!(data || []).filter(function (item) {
|
325
|
-
return item.type === "graph";
|
326
|
-
}).length;
|
321
|
+
if (isCustom && node.bindType === "ip") {
|
322
|
+
visible = true;
|
327
323
|
}
|
328
324
|
}
|
329
325
|
|
@@ -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 "10.0.
|
27
|
+
var version = typeof "10.0.9" === 'string' ? "10.0.9" : null;
|
28
28
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
29
29
|
/**
|
30
30
|
* 拓扑显示和编辑
|
@@ -35,40 +35,18 @@ var IpNodeTagsTipsBuilder = /*#__PURE__*/function () {
|
|
35
35
|
var tagHasIpv4 = tagDatas.filter(function (item) {
|
36
36
|
return item.code === "ipv4_address";
|
37
37
|
}).length > 0;
|
38
|
-
var tagHasName = tagDatas.filter(function (item) {
|
39
|
-
return item.code === "display_name";
|
40
|
-
}).length > 0;
|
41
38
|
var tipHasIpv4 = tipDatas.filter(function (item) {
|
42
39
|
return item.code === "ipv4_address";
|
43
40
|
}).length > 0;
|
44
|
-
var tipHasName = tipDatas.filter(function (item) {
|
45
|
-
return item.code === "display_name";
|
46
|
-
}).length > 0;
|
47
41
|
ipNodes.map(function (node) {
|
48
42
|
var tags = [];
|
49
43
|
|
50
|
-
if (tagHasName) {
|
51
|
-
var _element$a, _element$a2;
|
52
|
-
|
53
|
-
var element = dm.getDataByTag(node.id);
|
54
|
-
tags.push({
|
55
|
-
type: "attribute",
|
56
|
-
code: "display_name",
|
57
|
-
// 属性code
|
58
|
-
name: "显示名称",
|
59
|
-
// 属性名称
|
60
|
-
value: (_element$a = element.a("customName")) !== null && _element$a !== void 0 ? _element$a : node.name,
|
61
|
-
// 属性值
|
62
|
-
originValue: (_element$a2 = element.a("customName")) !== null && _element$a2 !== void 0 ? _element$a2 : node.name
|
63
|
-
});
|
64
|
-
}
|
65
|
-
|
66
44
|
if (tagHasIpv4) {
|
67
45
|
tags.push({
|
68
46
|
type: "attribute",
|
69
47
|
code: "ipv4_address",
|
70
48
|
// 属性code
|
71
|
-
name: "
|
49
|
+
name: "",
|
72
50
|
// 属性名称
|
73
51
|
value: node.bindIp,
|
74
52
|
// 属性值
|
@@ -78,23 +56,6 @@ var IpNodeTagsTipsBuilder = /*#__PURE__*/function () {
|
|
78
56
|
|
79
57
|
var tips = [];
|
80
58
|
|
81
|
-
if (tipHasName) {
|
82
|
-
var _element$a3, _element$a4;
|
83
|
-
|
84
|
-
var _element = dm.getDataByTag(node.id);
|
85
|
-
|
86
|
-
tips.push({
|
87
|
-
type: "attribute",
|
88
|
-
code: "display_name",
|
89
|
-
// 属性code
|
90
|
-
name: "显示名称",
|
91
|
-
// 属性名称
|
92
|
-
value: (_element$a3 = _element.a("customName")) !== null && _element$a3 !== void 0 ? _element$a3 : node.name,
|
93
|
-
// 属性值
|
94
|
-
originValue: (_element$a4 = _element.a("customName")) !== null && _element$a4 !== void 0 ? _element$a4 : node.name
|
95
|
-
});
|
96
|
-
}
|
97
|
-
|
98
59
|
if (tipHasIpv4) {
|
99
60
|
tips.push({
|
100
61
|
type: "attribute",
|
@@ -85,20 +85,22 @@ var _default = function _default(props) {
|
|
85
85
|
return displayConfigDispatchers.update(displayConfig);
|
86
86
|
|
87
87
|
case 7:
|
88
|
+
// 更新节点名称显示隐藏
|
89
|
+
topo.attributeMetricDisplay.updateNodesNameVisible();
|
88
90
|
extraOnOk = displaySettingProps === null || displaySettingProps === void 0 ? void 0 : displaySettingProps.onOk;
|
89
91
|
|
90
92
|
if (!extraOnOk) {
|
91
|
-
_context2.next =
|
93
|
+
_context2.next = 12;
|
92
94
|
break;
|
93
95
|
}
|
94
96
|
|
95
|
-
_context2.next =
|
97
|
+
_context2.next = 12;
|
96
98
|
return extraOnOk(displayConfig);
|
97
99
|
|
98
|
-
case
|
100
|
+
case 12:
|
99
101
|
topo.historyManager.endTransaction();
|
100
102
|
|
101
|
-
case
|
103
|
+
case 13:
|
102
104
|
case "end":
|
103
105
|
return _context2.stop();
|
104
106
|
}
|
@@ -5,6 +5,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
5
5
|
exports.__esModule = true;
|
6
6
|
exports["default"] = void 0;
|
7
7
|
|
8
|
+
var _balloon = _interopRequireDefault(require("@alifd/next/lib/balloon"));
|
9
|
+
|
8
10
|
var _button = _interopRequireDefault(require("@alifd/next/lib/button"));
|
9
11
|
|
10
12
|
var _icon = _interopRequireDefault(require("@alifd/next/lib/icon"));
|
@@ -77,19 +79,21 @@ var AlignTypeList = function AlignTypeList(props) {
|
|
77
79
|
return item.value === 'divide' ? /*#__PURE__*/_react["default"].createElement(_divider["default"], {
|
78
80
|
key: index,
|
79
81
|
direction: "ver"
|
80
|
-
}) : /*#__PURE__*/_react["default"].createElement(
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
82
|
+
}) : /*#__PURE__*/_react["default"].createElement(_balloon["default"].Tooltip, {
|
83
|
+
trigger: /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
84
|
+
key: index,
|
85
|
+
className: "" + _AlignSettingModule["default"].redioBtn,
|
86
|
+
text: true,
|
87
|
+
onClick: function onClick() {
|
88
|
+
handleChange(item);
|
89
|
+
} // eslint-disable-next-line no-unneeded-ternary
|
90
|
+
,
|
91
|
+
disabled: (item.value === 'distributeHorizontal' || item.value === 'distributeVertical') && distributionDisabled
|
92
|
+
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
93
|
+
type: item.icon
|
94
|
+
})),
|
95
|
+
align: "b"
|
96
|
+
}, item.label);
|
93
97
|
}));
|
94
98
|
};
|
95
99
|
|
@@ -336,12 +336,8 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
|
|
336
336
|
return item.type === "graph";
|
337
337
|
}).length; // ipNode逻辑
|
338
338
|
|
339
|
-
if (isCustom) {
|
340
|
-
|
341
|
-
} else {
|
342
|
-
return !!(data || []).filter(function (item) {
|
343
|
-
return item.type === "graph";
|
344
|
-
}).length;
|
339
|
+
if (isCustom && node.bindType === "ip") {
|
340
|
+
visible = true;
|
345
341
|
}
|
346
342
|
}
|
347
343
|
|
@@ -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 "10.0.
|
59
|
+
var version = typeof "10.0.9" === 'string' ? "10.0.9" : null;
|
60
60
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
61
61
|
/**
|
62
62
|
* 拓扑显示和编辑
|
@@ -44,40 +44,18 @@ var IpNodeTagsTipsBuilder = /*#__PURE__*/function () {
|
|
44
44
|
var tagHasIpv4 = tagDatas.filter(function (item) {
|
45
45
|
return item.code === "ipv4_address";
|
46
46
|
}).length > 0;
|
47
|
-
var tagHasName = tagDatas.filter(function (item) {
|
48
|
-
return item.code === "display_name";
|
49
|
-
}).length > 0;
|
50
47
|
var tipHasIpv4 = tipDatas.filter(function (item) {
|
51
48
|
return item.code === "ipv4_address";
|
52
49
|
}).length > 0;
|
53
|
-
var tipHasName = tipDatas.filter(function (item) {
|
54
|
-
return item.code === "display_name";
|
55
|
-
}).length > 0;
|
56
50
|
ipNodes.map(function (node) {
|
57
51
|
var tags = [];
|
58
52
|
|
59
|
-
if (tagHasName) {
|
60
|
-
var _element$a, _element$a2;
|
61
|
-
|
62
|
-
var element = dm.getDataByTag(node.id);
|
63
|
-
tags.push({
|
64
|
-
type: "attribute",
|
65
|
-
code: "display_name",
|
66
|
-
// 属性code
|
67
|
-
name: "显示名称",
|
68
|
-
// 属性名称
|
69
|
-
value: (_element$a = element.a("customName")) !== null && _element$a !== void 0 ? _element$a : node.name,
|
70
|
-
// 属性值
|
71
|
-
originValue: (_element$a2 = element.a("customName")) !== null && _element$a2 !== void 0 ? _element$a2 : node.name
|
72
|
-
});
|
73
|
-
}
|
74
|
-
|
75
53
|
if (tagHasIpv4) {
|
76
54
|
tags.push({
|
77
55
|
type: "attribute",
|
78
56
|
code: "ipv4_address",
|
79
57
|
// 属性code
|
80
|
-
name: "
|
58
|
+
name: "",
|
81
59
|
// 属性名称
|
82
60
|
value: node.bindIp,
|
83
61
|
// 属性值
|
@@ -87,23 +65,6 @@ var IpNodeTagsTipsBuilder = /*#__PURE__*/function () {
|
|
87
65
|
|
88
66
|
var tips = [];
|
89
67
|
|
90
|
-
if (tipHasName) {
|
91
|
-
var _element$a3, _element$a4;
|
92
|
-
|
93
|
-
var _element = dm.getDataByTag(node.id);
|
94
|
-
|
95
|
-
tips.push({
|
96
|
-
type: "attribute",
|
97
|
-
code: "display_name",
|
98
|
-
// 属性code
|
99
|
-
name: "显示名称",
|
100
|
-
// 属性名称
|
101
|
-
value: (_element$a3 = _element.a("customName")) !== null && _element$a3 !== void 0 ? _element$a3 : node.name,
|
102
|
-
// 属性值
|
103
|
-
originValue: (_element$a4 = _element.a("customName")) !== null && _element$a4 !== void 0 ? _element$a4 : node.name
|
104
|
-
});
|
105
|
-
}
|
106
|
-
|
107
68
|
if (tipHasIpv4) {
|
108
69
|
tips.push({
|
109
70
|
type: "attribute",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "10.0.
|
3
|
+
"version": "10.0.9",
|
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@10.0.
|
119
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@10.0.9/build/index.html",
|
120
120
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
121
|
}
|