@riil-frontend/component-topology 5.0.4 → 5.0.5
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/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +1 -1
- package/es/networkTopo/utils/exportData.js +1 -1
- package/es/utils/clusterUtil.js +5 -5
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +1 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +1 -1
- package/lib/networkTopo/utils/exportData.js +1 -1
- package/lib/utils/clusterUtil.js +5 -5
- package/package.json +2 -2
|
@@ -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 "5.0.
|
|
24
|
+
var version = typeof "5.0.5" === 'string' ? "5.0.5" : null;
|
|
25
25
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
26
26
|
/**
|
|
27
27
|
* 拓扑显示和编辑
|
|
@@ -89,7 +89,7 @@ export default function ClusterMemberTableContainer(props) {
|
|
|
89
89
|
topo = props.topo;
|
|
90
90
|
var datas = topo.dataModel.useDatas();
|
|
91
91
|
var childrenIds = datas.filter(function (item) {
|
|
92
|
-
return item.
|
|
92
|
+
return item.ownedCluster === data.id;
|
|
93
93
|
}).map(function (item) {
|
|
94
94
|
return item.id;
|
|
95
95
|
});
|
|
@@ -71,7 +71,7 @@ export default function ResourceOverview(props) {
|
|
|
71
71
|
var data = topo.dataModel.useDataById(id);
|
|
72
72
|
var datas = topo.dataModel.useDatas();
|
|
73
73
|
var childrenIds = datas.filter(function (item) {
|
|
74
|
-
return item.
|
|
74
|
+
return item.ownedCluster === data.id;
|
|
75
75
|
}).map(function (item) {
|
|
76
76
|
return item.id;
|
|
77
77
|
});
|
|
@@ -21,7 +21,7 @@ function _ref() {
|
|
|
21
21
|
id: topo.id,
|
|
22
22
|
'nodes': nodes.filter(function (node) {
|
|
23
23
|
return !clusters.find(function (c) {
|
|
24
|
-
return c.id === node.
|
|
24
|
+
return c.id === node.ownedCluster;
|
|
25
25
|
});
|
|
26
26
|
}).map(function (node) {
|
|
27
27
|
var element = topo.getDataModel().getDataByTag(node.id);
|
package/es/utils/clusterUtil.js
CHANGED
|
@@ -56,17 +56,17 @@ export function processClusterChildrenNodes(nodes, groups) {
|
|
|
56
56
|
*/
|
|
57
57
|
|
|
58
58
|
export function processClusterChildNode(node, groups) {
|
|
59
|
-
var
|
|
60
|
-
var ownerExisted =
|
|
61
|
-
return group.id ===
|
|
59
|
+
var ownedCluster = node.ownedCluster;
|
|
60
|
+
var ownerExisted = ownedCluster && groups.find(function (group) {
|
|
61
|
+
return group.id === ownedCluster;
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
-
if (!
|
|
64
|
+
if (!ownedCluster || !ownerExisted) {
|
|
65
65
|
return node;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
return _extends({}, node, {
|
|
69
|
-
groupId:
|
|
69
|
+
groupId: ownedCluster,
|
|
70
70
|
groupTag: null
|
|
71
71
|
});
|
|
72
72
|
}
|
|
@@ -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 "5.0.
|
|
53
|
+
var version = typeof "5.0.5" === 'string' ? "5.0.5" : null;
|
|
54
54
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
55
55
|
/**
|
|
56
56
|
* 拓扑显示和编辑
|
|
@@ -108,7 +108,7 @@ function ClusterMemberTableContainer(props) {
|
|
|
108
108
|
topo = props.topo;
|
|
109
109
|
var datas = topo.dataModel.useDatas();
|
|
110
110
|
var childrenIds = datas.filter(function (item) {
|
|
111
|
-
return item.
|
|
111
|
+
return item.ownedCluster === data.id;
|
|
112
112
|
}).map(function (item) {
|
|
113
113
|
return item.id;
|
|
114
114
|
});
|
|
@@ -102,7 +102,7 @@ function ResourceOverview(props) {
|
|
|
102
102
|
var data = topo.dataModel.useDataById(id);
|
|
103
103
|
var datas = topo.dataModel.useDatas();
|
|
104
104
|
var childrenIds = datas.filter(function (item) {
|
|
105
|
-
return item.
|
|
105
|
+
return item.ownedCluster === data.id;
|
|
106
106
|
}).map(function (item) {
|
|
107
107
|
return item.id;
|
|
108
108
|
});
|
|
@@ -33,7 +33,7 @@ function _ref() {
|
|
|
33
33
|
id: topo.id,
|
|
34
34
|
'nodes': nodes.filter(function (node) {
|
|
35
35
|
return !clusters.find(function (c) {
|
|
36
|
-
return c.id === node.
|
|
36
|
+
return c.id === node.ownedCluster;
|
|
37
37
|
});
|
|
38
38
|
}).map(function (node) {
|
|
39
39
|
var element = topo.getDataModel().getDataByTag(node.id);
|
package/lib/utils/clusterUtil.js
CHANGED
|
@@ -81,17 +81,17 @@ function processClusterChildrenNodes(nodes, groups) {
|
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
function processClusterChildNode(node, groups) {
|
|
84
|
-
var
|
|
85
|
-
var ownerExisted =
|
|
86
|
-
return group.id ===
|
|
84
|
+
var ownedCluster = node.ownedCluster;
|
|
85
|
+
var ownerExisted = ownedCluster && groups.find(function (group) {
|
|
86
|
+
return group.id === ownedCluster;
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
-
if (!
|
|
89
|
+
if (!ownedCluster || !ownerExisted) {
|
|
90
90
|
return node;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
return (0, _extends2["default"])({}, node, {
|
|
94
|
-
groupId:
|
|
94
|
+
groupId: ownedCluster,
|
|
95
95
|
groupTag: null
|
|
96
96
|
});
|
|
97
97
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5",
|
|
4
4
|
"description": "拓扑",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "build-scripts start",
|
|
@@ -115,6 +115,6 @@
|
|
|
115
115
|
"access": "public"
|
|
116
116
|
},
|
|
117
117
|
"license": "MIT",
|
|
118
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@5.0.
|
|
118
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@5.0.5/build/index.html",
|
|
119
119
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
|
120
120
|
}
|