@riil-frontend/component-topology 10.0.7 → 10.0.8

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.
@@ -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 = 11;
82
+ _context2.next = 12;
81
83
  break;
82
84
  }
83
85
 
84
- _context2.next = 11;
86
+ _context2.next = 12;
85
87
  return extraOnOk(displayConfig);
86
88
 
87
- case 11:
89
+ case 12:
88
90
  topo.historyManager.endTransaction();
89
91
 
90
- case 12:
92
+ case 13:
91
93
  case "end":
92
94
  return _context2.stop();
93
95
  }
@@ -318,12 +318,8 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
318
318
  return item.type === "graph";
319
319
  }).length; // ipNode逻辑
320
320
 
321
- if (isCustom) {
322
- return true;
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.7" === 'string' ? "10.0.7" : null;
27
+ var version = typeof "10.0.8" === 'string' ? "10.0.8" : 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: "IPv4地址",
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 = 11;
93
+ _context2.next = 12;
92
94
  break;
93
95
  }
94
96
 
95
- _context2.next = 11;
97
+ _context2.next = 12;
96
98
  return extraOnOk(displayConfig);
97
99
 
98
- case 11:
100
+ case 12:
99
101
  topo.historyManager.endTransaction();
100
102
 
101
- case 12:
103
+ case 13:
102
104
  case "end":
103
105
  return _context2.stop();
104
106
  }
@@ -336,12 +336,8 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
336
336
  return item.type === "graph";
337
337
  }).length; // ipNode逻辑
338
338
 
339
- if (isCustom) {
340
- return true;
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.7" === 'string' ? "10.0.7" : null;
59
+ var version = typeof "10.0.8" === 'string' ? "10.0.8" : 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: "IPv4地址",
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.7",
3
+ "version": "10.0.8",
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.7/build/index.html",
119
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@10.0.8/build/index.html",
120
120
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
121
121
  }