@riil-frontend/component-topology 4.0.0-beta.9 → 4.0.2
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/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +32 -32
- package/es/components/BatchAttrMetric/setting.js +47 -7
- package/es/components/Drawer/Drawer.js +60 -0
- package/es/components/Drawer/index.js +1 -59
- package/es/constants/ResourceInfoDisplay.js +1 -4
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +31 -1
- package/es/core/components/AlarmListPanel/hooks/useAlarmList.js +34 -0
- package/es/core/components/AlarmListPanel/index.js +27 -24
- package/es/core/components/AlarmListPanel/index.module.scss +46 -16
- package/es/core/components/DisplaySettingDrawer/EdgeFlow.js +4 -6
- package/es/core/components/DisplaySettingDrawer/EdgeFlowDirection.js +4 -6
- package/es/core/components/DisplaySettingDrawer/NodeTag.js +3 -5
- package/es/core/components/DisplaySettingDrawer/NodeTip.js +4 -5
- package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -1
- package/es/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSetting.js +25 -0
- package/es/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSettingDrawer.js +8 -0
- package/es/core/components/TopoView/topoView.js +25 -1
- package/es/core/editor/components/settings/propertyViews/group/DataTab/GroupNodeList.js +4 -2
- package/es/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +0 -7
- package/es/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +13 -12
- package/es/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +4 -1
- package/es/core/editor/components/settings/propertyViews/group/{DataTab/ClusterGroupRelateData → cluster}/ClusterGroupRelateData.js +22 -9
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +2 -5
- package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeIcon.js +21 -0
- package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +5 -0
- package/es/core/editor/components/settings/propertyViews/node/NodePropertyView.js +3 -1
- package/es/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +36 -0
- package/es/core/editor/components/settings/propertyViews/node/Setting/Setting.js +2 -2
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +3 -5
- package/es/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +4 -2
- package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +28 -0
- package/es/core/models/AttributeMetricDisplay.js +28 -10
- package/es/core/models/TopoApp.js +12 -7
- package/es/core/models/TopoGraphView.js +3 -1
- package/es/core/models/attributeFormatter/index.js +2 -26
- package/es/core/models/cache/{CiTyeCache.js → CiTypeCache.js} +3 -1
- package/es/core/models/tagstips/ElementTagTipConfig.js +132 -0
- package/es/core/models/tagstips/utils.js +44 -0
- package/es/core/models/utils/linkUtils.js +3 -1
- package/es/core/services/topo.js +30 -0
- package/es/core/utils/edgeUtil.js +8 -0
- package/es/core/utils/graphLinkUtil.js +22 -0
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +24 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.module.scss +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +7 -101
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +13 -3
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +166 -89
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +7 -14
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +38 -13
- package/es/core/viewer/components/titlebar/BasicTools.js +5 -2
- package/es/core/viewer/components/titlebar/widgets/NodesDragSwitch.js +4 -2
- package/es/hooks/useAlarm.js +59 -0
- package/es/hooks/useEventData.js +20 -0
- package/es/hooks/useGraphAlarmDisplay.js +68 -18
- package/es/hooks/useManageStatus.js +0 -34
- package/es/hooks/useResourceConfig.js +6 -13
- package/es/hooks/useSelection.js +2 -4
- package/es/hooks/useTopoEdit.js +90 -37
- package/es/models/topoAlarm.js +8 -9
- package/es/models/topoMod.js +16 -8
- package/es/style.js +1 -0
- package/es/topoCenter/components/TopoView.js +6 -1
- package/es/topoCenter/components/Topology.js +7 -1
- package/es/topoCenter/components/editor/propertyViews/LayerRelatedResourceList.js +2 -2
- package/es/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +35 -15
- package/es/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +11 -2
- package/es/topoCenter/components/viewer/displaySetting/LinkTagCommonRidioGroup.js +24 -0
- package/es/topoCenter/components/viewer/displaySetting/LinkTagCommonRidioGroup.module.scss +23 -0
- package/es/topoCenter/components/viewer/displaySetting/LinkTagV2.js +87 -0
- package/es/topoCenter/getTopoData.js +18 -6
- package/es/topoCenter/hooks/editor/useGroupSortResources.js +16 -0
- package/es/topoCenter/hooks/useEdgeExpand.js +25 -0
- package/es/topoCenter/hooks/useLinkDynamicStyle.js +1 -1
- package/es/topoCenter/hooks/useTopoEdit.js +3 -0
- package/es/topoCenter/models/LinkDynamicStyleExecutor.js +38 -10
- package/es/topoCenter/models/TopoCenter.js +3 -11
- package/es/topoCenter/store/functionAuth.js +2 -0
- package/es/topoCenter/utils/SortResourcesUtil.js +3 -3
- package/es/topoCenter/utils/exportData.js +13 -7
- package/es/topoCenter/utils/linkUtil.js +8 -0
- package/es/utils/ResourceConfigUtil.js +4 -5
- package/es/utils/clusterUtil.js +27 -2
- package/es/utils/htElementDataUtil.js +22 -1
- package/es/utils/htElementUtils.js +22 -9
- package/es/utils/showGraphManageStatusUtil.js +67 -0
- package/es/utils/topoData.js +57 -32
- package/lib/components/BatchAttrMetric/setting.js +47 -6
- package/lib/components/Drawer/Drawer.js +73 -0
- package/lib/components/Drawer/index.js +2 -64
- package/lib/constants/ResourceInfoDisplay.js +1 -4
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +31 -1
- package/lib/core/components/AlarmListPanel/hooks/useAlarmList.js +40 -0
- package/lib/core/components/AlarmListPanel/index.js +30 -24
- package/lib/core/components/AlarmListPanel/index.module.scss +46 -16
- package/lib/core/components/DisplaySettingDrawer/EdgeFlow.js +4 -6
- package/lib/core/components/DisplaySettingDrawer/EdgeFlowDirection.js +4 -6
- package/lib/core/components/DisplaySettingDrawer/NodeTag.js +3 -6
- package/lib/core/components/DisplaySettingDrawer/NodeTip.js +4 -6
- package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -1
- package/lib/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSetting.js +39 -0
- package/lib/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSettingDrawer.js +17 -0
- package/lib/core/components/TopoView/topoView.js +28 -1
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/GroupNodeList.js +4 -2
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +0 -8
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +13 -13
- package/lib/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +5 -1
- package/lib/core/editor/components/settings/propertyViews/group/{DataTab/ClusterGroupRelateData → cluster}/ClusterGroupRelateData.js +23 -9
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +2 -5
- package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeIcon.js +31 -0
- package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +6 -0
- package/lib/core/editor/components/settings/propertyViews/node/NodePropertyView.js +3 -1
- package/lib/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +52 -0
- package/lib/core/editor/components/settings/propertyViews/node/Setting/Setting.js +3 -3
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +3 -5
- package/lib/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +5 -2
- package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +37 -0
- package/lib/core/models/AttributeMetricDisplay.js +28 -10
- package/lib/core/models/TopoApp.js +10 -5
- package/lib/core/models/TopoGraphView.js +3 -1
- package/lib/core/models/attributeFormatter/index.js +2 -26
- package/lib/core/models/cache/{CiTyeCache.js → CiTypeCache.js} +3 -1
- package/lib/core/models/tagstips/ElementTagTipConfig.js +142 -0
- package/lib/core/models/tagstips/utils.js +59 -0
- package/lib/core/models/utils/linkUtils.js +3 -1
- package/lib/core/services/topo.js +40 -0
- package/lib/core/utils/edgeUtil.js +12 -0
- package/lib/core/utils/graphLinkUtil.js +27 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +25 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.module.scss +1 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +7 -101
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +13 -3
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +166 -89
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +7 -14
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +38 -13
- package/lib/core/viewer/components/titlebar/BasicTools.js +6 -2
- package/lib/core/viewer/components/titlebar/widgets/NodesDragSwitch.js +4 -2
- package/lib/hooks/useAlarm.js +61 -0
- package/lib/hooks/useEventData.js +28 -0
- package/lib/hooks/useGraphAlarmDisplay.js +69 -18
- package/lib/hooks/useManageStatus.js +0 -34
- package/lib/hooks/useResourceConfig.js +6 -12
- package/lib/hooks/useSelection.js +1 -5
- package/lib/hooks/useTopoEdit.js +94 -36
- package/lib/models/topoAlarm.js +8 -9
- package/lib/models/topoMod.js +15 -8
- package/lib/style.js +1 -0
- package/lib/topoCenter/components/TopoView.js +8 -1
- package/lib/topoCenter/components/Topology.js +8 -1
- package/lib/topoCenter/components/editor/propertyViews/LayerRelatedResourceList.js +1 -1
- package/lib/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +35 -14
- package/lib/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +11 -2
- package/lib/topoCenter/components/viewer/displaySetting/LinkTagCommonRidioGroup.js +35 -0
- package/lib/topoCenter/components/viewer/displaySetting/LinkTagCommonRidioGroup.module.scss +23 -0
- package/lib/topoCenter/components/viewer/displaySetting/LinkTagV2.js +102 -0
- package/lib/topoCenter/getTopoData.js +19 -6
- package/lib/topoCenter/hooks/editor/useGroupSortResources.js +21 -0
- package/lib/topoCenter/hooks/useEdgeExpand.js +33 -0
- package/lib/topoCenter/hooks/useLinkDynamicStyle.js +1 -1
- package/lib/topoCenter/hooks/useTopoEdit.js +3 -0
- package/lib/topoCenter/models/LinkDynamicStyleExecutor.js +38 -9
- package/lib/topoCenter/models/TopoCenter.js +3 -12
- package/lib/topoCenter/store/functionAuth.js +2 -0
- package/lib/topoCenter/utils/SortResourcesUtil.js +3 -3
- package/lib/topoCenter/utils/exportData.js +14 -7
- package/lib/topoCenter/utils/linkUtil.js +15 -0
- package/lib/utils/ResourceConfigUtil.js +4 -4
- package/lib/utils/clusterUtil.js +34 -2
- package/lib/utils/htElementDataUtil.js +38 -1
- package/lib/utils/htElementUtils.js +24 -9
- package/lib/utils/showGraphManageStatusUtil.js +78 -0
- package/lib/utils/topoData.js +59 -32
- package/package.json +5 -5
|
@@ -7,9 +7,11 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
|
9
9
|
|
|
10
|
+
var _clusterUtil = require("../../utils/clusterUtil");
|
|
11
|
+
|
|
10
12
|
var _htElementUtils = require("../../utils/htElementUtils");
|
|
11
13
|
|
|
12
|
-
var
|
|
14
|
+
var _linkUtil = require("../utils/linkUtil");
|
|
13
15
|
|
|
14
16
|
// network_link.actual_bandwidth
|
|
15
17
|
function calcEdgeWidth(actualBandwidth) {
|
|
@@ -26,6 +28,26 @@ function calcEdgeWidth(actualBandwidth) {
|
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
|
|
31
|
+
var getChildrenNodeCiIds = function getChildrenNodeCiIds(nodes) {
|
|
32
|
+
var ciIds = [];
|
|
33
|
+
nodes.forEach(function (node) {
|
|
34
|
+
if ((0, _htElementUtils.isNode)(node) || (0, _clusterUtil.isClusterHtElement)(node)) {
|
|
35
|
+
var nodeTag = node.getTag();
|
|
36
|
+
|
|
37
|
+
if (nodeTag) {
|
|
38
|
+
ciIds.push(nodeTag);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
nodes.forEach(function (node) {
|
|
43
|
+
if (node instanceof ht.Group) {
|
|
44
|
+
var children = node.getChildren().toArray();
|
|
45
|
+
ciIds.push.apply(ciIds, getChildrenNodeCiIds(children));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return ciIds;
|
|
49
|
+
};
|
|
50
|
+
|
|
29
51
|
var LinkDynamicStyleExecutor = /*#__PURE__*/function () {
|
|
30
52
|
function LinkDynamicStyleExecutor(topo) {
|
|
31
53
|
this.calcEdgeWidth = calcEdgeWidth;
|
|
@@ -84,19 +106,26 @@ var LinkDynamicStyleExecutor = /*#__PURE__*/function () {
|
|
|
84
106
|
var edges = (0, _htElementUtils.getEdges)(dataModel);
|
|
85
107
|
edges.forEach(function (edge) {
|
|
86
108
|
try {
|
|
87
|
-
//
|
|
88
|
-
var
|
|
89
|
-
var
|
|
109
|
+
// 获取两端代理节点
|
|
110
|
+
var sourceAgent = edge.getSourceAgent();
|
|
111
|
+
var targetAgent = edge.getTargetAgent();
|
|
112
|
+
var sourceId = sourceAgent.getTag();
|
|
113
|
+
var targetId = targetAgent.getTag(); // 查询是否有聚合链路
|
|
114
|
+
|
|
90
115
|
var aggLink = linkGroups.find(function (link) {
|
|
91
116
|
return link.source === sourceId && link.target === targetId || link.target === sourceId && link.source === targetId;
|
|
92
117
|
}); // 如果连线组未关联链路并可见
|
|
93
118
|
|
|
94
119
|
if (!aggLink && edge.isEdgeGroupAgent()) {
|
|
95
|
-
//
|
|
96
|
-
var
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
120
|
+
// 查询两端代理节点(包含子节点)间的子链路列表
|
|
121
|
+
var sourceCiIds = getChildrenNodeCiIds([sourceAgent]);
|
|
122
|
+
var targetCiIds = getChildrenNodeCiIds([targetAgent]);
|
|
123
|
+
var aggLinks = (0, _linkUtil.getLinksBetweenNodes)(linkGroups, sourceCiIds, targetCiIds);
|
|
124
|
+
var phyLinks = (0, _linkUtil.getLinksBetweenNodes)(links, sourceCiIds, targetCiIds);
|
|
125
|
+
var linkBetweenNodes = aggLinks.length ? aggLinks : phyLinks; // 如果有子链路,计算线宽并设置
|
|
126
|
+
|
|
127
|
+
if (linkBetweenNodes.length) {
|
|
128
|
+
var edgeWidth = _this.calcEdgeGroupEdgeWidth(linkBetweenNodes);
|
|
100
129
|
|
|
101
130
|
edge.s('edge.width', edgeWidth);
|
|
102
131
|
}
|
|
@@ -21,16 +21,13 @@ var _createMenuCommands = _interopRequireDefault(require("../../contextmenu/crea
|
|
|
21
21
|
|
|
22
22
|
var _getTopoData = _interopRequireDefault(require("../getTopoData"));
|
|
23
23
|
|
|
24
|
-
var _SortResourcesUtil = _interopRequireDefault(require("../utils/SortResourcesUtil"));
|
|
25
|
-
|
|
26
24
|
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
|
27
25
|
|
|
28
26
|
var _store = _interopRequireDefault(require("../store"));
|
|
29
27
|
|
|
30
28
|
var _ResourceInfoDisplay = require("../../constants/ResourceInfoDisplay");
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
// import LinkTagsTipsBuilder from './LinkTagsTipsBuilder';
|
|
34
31
|
var TopoCenter = /*#__PURE__*/function (_TopoApp) {
|
|
35
32
|
(0, _inheritsLoose2["default"])(TopoCenter, _TopoApp);
|
|
36
33
|
|
|
@@ -49,8 +46,8 @@ var TopoCenter = /*#__PURE__*/function (_TopoApp) {
|
|
|
49
46
|
},
|
|
50
47
|
getDefaultLinkTipConfig: function getDefaultLinkTipConfig() {
|
|
51
48
|
return _ResourceInfoDisplay.DEFAULT_TIP_COMMON_CONFIG;
|
|
52
|
-
},
|
|
53
|
-
|
|
49
|
+
} // ExtElementTagTipBuilder: LinkTagsTipsBuilder,
|
|
50
|
+
|
|
54
51
|
},
|
|
55
52
|
onSwitchToEditModeBegin: function () {
|
|
56
53
|
var _onSwitchToEditModeBegin = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(topo) {
|
|
@@ -106,12 +103,6 @@ var TopoCenter = /*#__PURE__*/function (_TopoApp) {
|
|
|
106
103
|
id: topo.id
|
|
107
104
|
});
|
|
108
105
|
topoModDispatchers.refreshTopoTree();
|
|
109
|
-
},
|
|
110
|
-
editor: {
|
|
111
|
-
// 分层、区域的关联资源按名称排序
|
|
112
|
-
sortResources: function sortResources(nodes) {
|
|
113
|
-
return (0, _SortResourcesUtil["default"])(_this.store, nodes);
|
|
114
|
-
}
|
|
115
106
|
}
|
|
116
107
|
})) || this;
|
|
117
108
|
_this.resourceConfig = null;
|
|
@@ -9,9 +9,9 @@ function sortResources(store, nodes) {
|
|
|
9
9
|
|
|
10
10
|
var resources = [];
|
|
11
11
|
((data === null || data === void 0 ? void 0 : data.nodes) || []).forEach(function (res) {
|
|
12
|
-
var node = nodes.
|
|
13
|
-
return
|
|
14
|
-
})
|
|
12
|
+
var node = nodes.find(function (item) {
|
|
13
|
+
return item.id === res.id;
|
|
14
|
+
});
|
|
15
15
|
|
|
16
16
|
if (node) {
|
|
17
17
|
resources.push(node);
|
|
@@ -13,29 +13,36 @@ var _componentTopologyUtils = require("@riil-frontend/component-topology-utils")
|
|
|
13
13
|
|
|
14
14
|
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
|
15
15
|
|
|
16
|
+
var _clusterUtil = require("../../utils/clusterUtil");
|
|
17
|
+
|
|
16
18
|
function _default(_x) {
|
|
17
19
|
return _ref.apply(this, arguments);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
function _ref() {
|
|
21
23
|
_ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(topo) {
|
|
22
|
-
var _topo$store$getModelS, nodes, links, params, fileData, fileName, blob, elink;
|
|
24
|
+
var _topo$store$getModelS, nodes, links, linkGroups, clusters, params, fileData, fileName, blob, elink;
|
|
23
25
|
|
|
24
26
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
25
27
|
while (1) {
|
|
26
28
|
switch (_context.prev = _context.next) {
|
|
27
29
|
case 0:
|
|
28
|
-
_topo$store$getModelS = topo.store.getModelState('topoMod').data, nodes = _topo$store$getModelS.nodes, links = _topo$store$getModelS.links;
|
|
30
|
+
_topo$store$getModelS = topo.store.getModelState('topoMod').data, nodes = _topo$store$getModelS.nodes, links = _topo$store$getModelS.links, linkGroups = _topo$store$getModelS.linkGroups;
|
|
31
|
+
clusters = (0, _clusterUtil.findClusters)(nodes);
|
|
29
32
|
params = {
|
|
30
33
|
id: topo.id,
|
|
31
|
-
'nodes': nodes.
|
|
34
|
+
'nodes': nodes.filter(function (node) {
|
|
35
|
+
return !clusters.find(function (c) {
|
|
36
|
+
return c.id === node.ownerId;
|
|
37
|
+
});
|
|
38
|
+
}).map(function (node) {
|
|
32
39
|
var element = topo.getDataModel().getDataByTag(node.id);
|
|
33
40
|
return {
|
|
34
41
|
'id': node.id,
|
|
35
42
|
'imageName': element.a('customName') || element.a('name') || element.getName()
|
|
36
43
|
};
|
|
37
44
|
}),
|
|
38
|
-
'links': links.map(function (link) {
|
|
45
|
+
'links': [].concat(links, linkGroups).map(function (link) {
|
|
39
46
|
var id = link.id,
|
|
40
47
|
source = link.source,
|
|
41
48
|
target = link.target,
|
|
@@ -53,13 +60,13 @@ function _ref() {
|
|
|
53
60
|
|
|
54
61
|
_rlog["default"].error('导出数据', params);
|
|
55
62
|
|
|
56
|
-
_context.next =
|
|
63
|
+
_context.next = 6;
|
|
57
64
|
return _componentTopologyUtils.request.post('/topo/v1/api/structure/excel', params, {
|
|
58
65
|
responseType: 'blob' // responseType: 'arraybuffer',
|
|
59
66
|
|
|
60
67
|
});
|
|
61
68
|
|
|
62
|
-
case
|
|
69
|
+
case 6:
|
|
63
70
|
fileData = _context.sent;
|
|
64
71
|
fileName = topo.store.getModelState('topoMod').topoData.config.name + ".xls";
|
|
65
72
|
blob = new Blob([fileData]); // 处理文档流
|
|
@@ -74,7 +81,7 @@ function _ref() {
|
|
|
74
81
|
|
|
75
82
|
document.body.removeChild(elink);
|
|
76
83
|
|
|
77
|
-
case
|
|
84
|
+
case 17:
|
|
78
85
|
case "end":
|
|
79
86
|
return _context.stop();
|
|
80
87
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.getLinksBetweenNodes = getLinksBetweenNodes;
|
|
5
|
+
exports.isLink = isLink;
|
|
6
|
+
|
|
7
|
+
function isLink(link, id1, id2) {
|
|
8
|
+
return link.source === id1 && link.target === id2 || link.target === id1 && link.source === id2;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function getLinksBetweenNodes(links, ids1, ids2) {
|
|
12
|
+
return links.filter(function (link) {
|
|
13
|
+
return ids1.indexOf(link.source) !== -1 && ids2.indexOf(link.target) !== -1 || ids2.indexOf(link.source) !== -1 && ids1.indexOf(link.target) !== -1;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -11,6 +11,8 @@ var _sortBy = _interopRequireDefault(require("lodash/sortBy"));
|
|
|
11
11
|
|
|
12
12
|
var _clusterUtil = require("./clusterUtil");
|
|
13
13
|
|
|
14
|
+
var _htElementDataUtil = require("./htElementDataUtil");
|
|
15
|
+
|
|
14
16
|
var _htElementUtils = require("./htElementUtils");
|
|
15
17
|
|
|
16
18
|
/**
|
|
@@ -31,9 +33,7 @@ function getResourceConfigFromHt(topo) {
|
|
|
31
33
|
name: layerElement.s("label"),
|
|
32
34
|
order: layerElement.a("order"),
|
|
33
35
|
resources: {
|
|
34
|
-
"static": (0,
|
|
35
|
-
return !!node.getTag();
|
|
36
|
-
}).map(function (node) {
|
|
36
|
+
"static": (0, _htElementDataUtil.getLayerChildrenResourceElements)(layerElement).map(function (node) {
|
|
37
37
|
return node.getTag();
|
|
38
38
|
})
|
|
39
39
|
}
|
|
@@ -106,7 +106,7 @@ function getGroupConfigByElement(groupElement) {
|
|
|
106
106
|
name: groupElement.a("name"),
|
|
107
107
|
order: groupElement.a("order"),
|
|
108
108
|
resources: {
|
|
109
|
-
"static": (0,
|
|
109
|
+
"static": (0, _htElementDataUtil.getGroupChildrenResourceElements)(groupElement).filter(function (node) {
|
|
110
110
|
return !!node.getTag();
|
|
111
111
|
}).map(function (node) {
|
|
112
112
|
return node.getTag();
|
package/lib/utils/clusterUtil.js
CHANGED
|
@@ -4,14 +4,19 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
exports.buildClusterGroups = buildClusterGroups;
|
|
7
|
+
exports.findClusters = findClusters;
|
|
8
|
+
exports.handleClusterNoPermission = handleClusterNoPermission;
|
|
7
9
|
exports.isCluster = isCluster;
|
|
8
10
|
exports.isClusterHtElement = isClusterHtElement;
|
|
11
|
+
exports.isClusterMemberHtElement = isClusterMemberHtElement;
|
|
9
12
|
exports.processCluster = processCluster;
|
|
10
13
|
exports.processClusterChildNode = processClusterChildNode;
|
|
11
14
|
exports.processClusterChildrenNodes = processClusterChildrenNodes;
|
|
12
15
|
|
|
13
16
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
17
|
|
|
18
|
+
var _htElementUtils = require("./htElementUtils");
|
|
19
|
+
|
|
15
20
|
/**
|
|
16
21
|
* 集群处理工具类
|
|
17
22
|
*/
|
|
@@ -30,19 +35,27 @@ function processCluster(topoData) {
|
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
function buildClusterGroups(nodes) {
|
|
33
|
-
return nodes
|
|
38
|
+
return findClusters(nodes).map(function (n) {
|
|
34
39
|
return (0, _extends2["default"])({
|
|
35
40
|
tag: null,
|
|
36
41
|
parentId: n.groupId,
|
|
37
42
|
parentTag: n.groupTag
|
|
38
43
|
}, n, {
|
|
39
44
|
elementTemplate: 'cluster',
|
|
40
|
-
expandable: !!n.operation
|
|
45
|
+
expandable: !!n.operation,
|
|
46
|
+
// 无权限禁用展开折叠
|
|
47
|
+
styles: {
|
|
48
|
+
showExpanded: false // 是否默认展开
|
|
41
49
|
|
|
50
|
+
}
|
|
42
51
|
});
|
|
43
52
|
});
|
|
44
53
|
}
|
|
45
54
|
|
|
55
|
+
function findClusters(nodes) {
|
|
56
|
+
return nodes.filter(isCluster);
|
|
57
|
+
}
|
|
58
|
+
|
|
46
59
|
function processClusterChildrenNodes(nodes, groups) {
|
|
47
60
|
return nodes // 过滤集群
|
|
48
61
|
.filter(function (node) {
|
|
@@ -78,4 +91,23 @@ function processClusterChildNode(node, groups) {
|
|
|
78
91
|
|
|
79
92
|
function isClusterHtElement(element) {
|
|
80
93
|
return !!element.a('cluster');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function isClusterMemberHtElement(element) {
|
|
97
|
+
return element && element.getParent() && isClusterHtElement(element.getParent());
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* 集群无权限时收起
|
|
101
|
+
* @param {*} topo
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
function handleClusterNoPermission(topo) {
|
|
106
|
+
var dm = topo.getHtTopo().getGraphView().dm();
|
|
107
|
+
var groups = (0, _htElementUtils.getGroups)(dm);
|
|
108
|
+
groups.forEach(function (group) {
|
|
109
|
+
if (isClusterHtElement(group) && !group.a('operation') && group.isExpanded()) {
|
|
110
|
+
group.setExpanded(false);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
81
113
|
}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
+
exports.getAllEdgeResourceIds = void 0;
|
|
5
|
+
exports.getGroupChildrenResourceElements = getGroupChildrenResourceElements;
|
|
6
|
+
exports.getLayerChildrenResourceElements = getLayerChildrenResourceElements;
|
|
4
7
|
exports.isEdge = isEdge;
|
|
5
8
|
exports.isGroup = isGroup;
|
|
6
9
|
exports.isLayer = isLayer;
|
|
7
10
|
exports.isNode = isNode;
|
|
11
|
+
exports.isResourceElement = isResourceElement;
|
|
12
|
+
exports.isResourceNodeElement = isResourceNodeElement;
|
|
8
13
|
exports.isText = isText;
|
|
9
14
|
|
|
15
|
+
var htElementUtils = _interopRequireWildcard(require("./htElementUtils"));
|
|
16
|
+
|
|
17
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
|
+
|
|
19
|
+
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; }
|
|
20
|
+
|
|
10
21
|
function isLayer(element) {
|
|
11
22
|
return element.className === 'ht.Grid';
|
|
12
23
|
}
|
|
@@ -25,4 +36,30 @@ function isEdge(element) {
|
|
|
25
36
|
|
|
26
37
|
function isText(element) {
|
|
27
38
|
return element.className === 'ht.Text' && element.attrObject.isText;
|
|
28
|
-
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function isResourceElement(element) {
|
|
42
|
+
return !!element.a('ciType');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function isResourceNodeElement(element) {
|
|
46
|
+
return (htElementUtils.isGroup(element) || htElementUtils.isNode(element)) && isResourceElement(element);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function getGroupChildrenResourceElements(element) {
|
|
50
|
+
return (0, htElementUtils.getGroupChildren)(element).filter(isResourceElement);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function getLayerChildrenResourceElements(layerElement) {
|
|
54
|
+
return (0, htElementUtils.getLayerChildren)(layerElement).filter(isResourceElement);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
var getAllEdgeResourceIds = function getAllEdgeResourceIds(dm) {
|
|
58
|
+
return (0, htElementUtils.getEdges)(dm).filter(function (node) {
|
|
59
|
+
return !!node.getTag();
|
|
60
|
+
}).map(function (node) {
|
|
61
|
+
return node.getTag();
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
exports.getAllEdgeResourceIds = getAllEdgeResourceIds;
|
|
@@ -17,6 +17,7 @@ exports.getGroupData = getGroupData;
|
|
|
17
17
|
exports.getGroupDatas = getGroupDatas;
|
|
18
18
|
exports.getGroupElementByTag = getGroupElementByTag;
|
|
19
19
|
exports.getGroups = getGroups;
|
|
20
|
+
exports.getLayerChildren = getLayerChildren;
|
|
20
21
|
exports.getLayerChildrenNodes = getLayerChildrenNodes;
|
|
21
22
|
exports.getLayers = getLayers;
|
|
22
23
|
exports.getNodeData = getNodeData;
|
|
@@ -291,6 +292,21 @@ function getLayerChildrenNodes(layer) {
|
|
|
291
292
|
|
|
292
293
|
return layer.getChildren().getArray().filter(isNode);
|
|
293
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* 获取分层里的节点列表
|
|
297
|
+
*
|
|
298
|
+
* @param layer
|
|
299
|
+
* @return {*}
|
|
300
|
+
*/
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
function getLayerChildren(layer) {
|
|
304
|
+
if (!layer) {
|
|
305
|
+
return [];
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
return layer.getChildren().getArray();
|
|
309
|
+
}
|
|
294
310
|
/**
|
|
295
311
|
* 获取容器里的子元素列表
|
|
296
312
|
*
|
|
@@ -353,7 +369,7 @@ function setElementRuntimeStyle(element, name, value) {
|
|
|
353
369
|
*/
|
|
354
370
|
|
|
355
371
|
|
|
356
|
-
function isExistedElement(dataModel, data) {
|
|
372
|
+
function isExistedElement(htTopo, dataModel, data) {
|
|
357
373
|
var type = data.type,
|
|
358
374
|
id = data.id;
|
|
359
375
|
|
|
@@ -361,15 +377,14 @@ function isExistedElement(dataModel, data) {
|
|
|
361
377
|
return true;
|
|
362
378
|
}
|
|
363
379
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
380
|
+
var element = getElements(dataModel).find(function (item) {
|
|
381
|
+
return item.a('tag') === data.tag;
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
if (element) {
|
|
385
|
+
return true;
|
|
386
|
+
} // 连线/连线组
|
|
368
387
|
|
|
369
|
-
if (group) {
|
|
370
|
-
return true;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
388
|
|
|
374
389
|
return false;
|
|
375
390
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.removeManageStatus = removeManageStatus;
|
|
7
|
+
exports.showManageStatus = showManageStatus;
|
|
8
|
+
|
|
9
|
+
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/lib/rlog"));
|
|
10
|
+
|
|
11
|
+
var _htElementUtils = require("./htElementUtils");
|
|
12
|
+
|
|
13
|
+
function showManageStatus(options) {
|
|
14
|
+
var topo = options.topo,
|
|
15
|
+
resources = options.resources,
|
|
16
|
+
isEditMode = options.isEditMode,
|
|
17
|
+
graphLoaded = options.graphLoaded,
|
|
18
|
+
cisEventLevel = options.cisEventLevel;
|
|
19
|
+
|
|
20
|
+
var hasAlarm = function hasAlarm(id) {
|
|
21
|
+
return !!cisEventLevel.find(function (item) {
|
|
22
|
+
return item.id === id;
|
|
23
|
+
});
|
|
24
|
+
}; // 首次加载和监控状态变化后,更新节点和连线置灰状态
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
if (!isEditMode && graphLoaded) {
|
|
28
|
+
resources.forEach(function (resource) {
|
|
29
|
+
var type = resource.type,
|
|
30
|
+
id = resource.id,
|
|
31
|
+
manageStatus = resource.manageStatus,
|
|
32
|
+
permission = resource.permission;
|
|
33
|
+
var isNotMonite = manageStatus === 0;
|
|
34
|
+
var readable = !!(permission !== null && permission !== void 0 && permission.readable);
|
|
35
|
+
var showUnMoniteStatus = !hasAlarm(id) && isNotMonite && readable;
|
|
36
|
+
var element = topo.getDataModel().getDataByTag(id);
|
|
37
|
+
if (!element) return;
|
|
38
|
+
|
|
39
|
+
if (type === 'node') {
|
|
40
|
+
try {
|
|
41
|
+
if (showUnMoniteStatus) {
|
|
42
|
+
topo.getHtTopo().setNodeStyleIcon(element, {
|
|
43
|
+
styleIcon: 'unMoniter',
|
|
44
|
+
icon: 'resource.subIcon.unMoniter'
|
|
45
|
+
});
|
|
46
|
+
} else {
|
|
47
|
+
element.removeStyleIcon('unMoniter');
|
|
48
|
+
}
|
|
49
|
+
} catch (error) {
|
|
50
|
+
_rlog["default"].error('设置监控图标异常', element, error);
|
|
51
|
+
}
|
|
52
|
+
} else {
|
|
53
|
+
(0, _htElementUtils.setElementRuntimeStyle)(element, 'color', showUnMoniteStatus ? '#C9CED2' : undefined);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function removeManageStatus(options) {
|
|
60
|
+
var topo = options.topo,
|
|
61
|
+
resources = options.resources;
|
|
62
|
+
resources.forEach(function (resource) {
|
|
63
|
+
var type = resource.type,
|
|
64
|
+
id = resource.id;
|
|
65
|
+
var element = topo.getDataModel().getDataByTag(id);
|
|
66
|
+
if (!element) return;
|
|
67
|
+
|
|
68
|
+
if (type === 'node') {
|
|
69
|
+
try {
|
|
70
|
+
element.removeStyleIcon('unMoniter');
|
|
71
|
+
} catch (error) {
|
|
72
|
+
_rlog["default"].error('设置监控图标异常', element, error);
|
|
73
|
+
}
|
|
74
|
+
} else {
|
|
75
|
+
(0, _htElementUtils.setElementRuntimeStyle)(element, 'color', undefined);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
package/lib/utils/topoData.js
CHANGED
|
@@ -41,6 +41,8 @@ var _backgroundUtil = require("../core/utils/backgroundUtil");
|
|
|
41
41
|
|
|
42
42
|
var _clusterUtil = require("./clusterUtil");
|
|
43
43
|
|
|
44
|
+
var _htElementUtils = require("./htElementUtils");
|
|
45
|
+
|
|
44
46
|
var _excluded = ["extraConfig"];
|
|
45
47
|
|
|
46
48
|
/**
|
|
@@ -127,40 +129,35 @@ function formatGroup(group) {
|
|
|
127
129
|
|
|
128
130
|
function formatGroups(groups) {
|
|
129
131
|
return groups.map(formatGroup);
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
*
|
|
133
|
-
* @param attributes {array|object}
|
|
134
|
-
* @return {object}
|
|
135
|
-
*/
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
function nodeAttributesAdapter(attributes) {
|
|
139
|
-
if (Array.isArray(attributes)) {
|
|
140
|
-
var map = {};
|
|
141
|
-
attributes.forEach(function (attr) {
|
|
142
|
-
map[attr.code] = attr.value;
|
|
143
|
-
});
|
|
144
|
-
return map;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return attributes || {};
|
|
148
132
|
} // 格式化节点
|
|
149
133
|
|
|
150
134
|
|
|
151
|
-
var tfNode = function tfNode(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
var result = (0, _extends2["default"])({
|
|
155
|
-
ipAddress: attributes.ipAddress || null
|
|
156
|
-
}, node, {
|
|
157
|
-
operation: node.hasOwnProperty("operation") ? node.operation : null,
|
|
135
|
+
var tfNode = function tfNode(topoEngine, node) {
|
|
136
|
+
return (0, _extends2["default"])({}, node, {
|
|
158
137
|
metrics: [],
|
|
159
|
-
attributes: []
|
|
160
|
-
isShowName: engine.isViewMode() ? engine.attributeMetricDisplay.getNodeNameVisible(node) : true
|
|
138
|
+
attributes: []
|
|
161
139
|
});
|
|
162
|
-
|
|
163
|
-
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* ip、是否显示名称
|
|
143
|
+
*
|
|
144
|
+
* @param {*} topoEngine
|
|
145
|
+
* @param {*} topoData
|
|
146
|
+
* @returns
|
|
147
|
+
*/
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
function updateNodeInfo(topoEngine, topoData) {
|
|
151
|
+
return (0, _extends2["default"])({}, topoData, {
|
|
152
|
+
nodes: topoData.nodes.map(function (node) {
|
|
153
|
+
var attributes = node.attributes;
|
|
154
|
+
return (0, _extends2["default"])({}, node, {
|
|
155
|
+
ipAddress: node.ipAddress || (attributes === null || attributes === void 0 ? void 0 : attributes.ipAddress) || (attributes === null || attributes === void 0 ? void 0 : attributes.ipv4_address) || null,
|
|
156
|
+
isShowName: topoEngine.attributeMetricDisplay.getNodeNameVisible(node)
|
|
157
|
+
});
|
|
158
|
+
})
|
|
159
|
+
});
|
|
160
|
+
} // 格式化连线
|
|
164
161
|
|
|
165
162
|
|
|
166
163
|
var tfLink = function tfLink(engine, link) {
|
|
@@ -376,7 +373,37 @@ function buildGlobal(_ref2) {
|
|
|
376
373
|
},
|
|
377
374
|
icons: (0, _icon.getEditorIcons)(engine),
|
|
378
375
|
// 获取默认节点图标,可选参数。如果无返回值则继续使用内部默认
|
|
379
|
-
getDefaultNodeIcon: engine.options.getDefaultNodeIcon
|
|
376
|
+
getDefaultNodeIcon: engine.options.getDefaultNodeIcon,
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* 编辑界面左侧面板控制元素是否可拖动到区域中node代表拖动的元素,group代表图上的区域
|
|
380
|
+
* 区域不能拖拽到区域
|
|
381
|
+
* 元素不能拖拽到集群
|
|
382
|
+
*/
|
|
383
|
+
canDragElementToGroup: function canDragElementToGroup(element, group) {
|
|
384
|
+
if (!(0, _htElementUtils.isGroup)(group)) {
|
|
385
|
+
return true;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
if (element.dtype === 'container' && (0, _htElementUtils.isGroup)(group)) {
|
|
389
|
+
return false;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
if ((0, _htElementUtils.isGroup)(group) && group.a('cluster')) {
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
console.error(element, group);
|
|
397
|
+
return true;
|
|
398
|
+
},
|
|
399
|
+
// 图上元素能否拖动到区域中
|
|
400
|
+
canDragGraphElementsToGroup: function canDragGraphElementsToGroup(elemetns, group) {
|
|
401
|
+
if (!(0, _htElementUtils.isGroup)(group)) {
|
|
402
|
+
return true;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
return true;
|
|
406
|
+
}
|
|
380
407
|
};
|
|
381
408
|
}
|
|
382
409
|
/**
|
|
@@ -395,7 +422,7 @@ var combTopoData = function combTopoData(_ref3) {
|
|
|
395
422
|
globalConfig = _ref3.globalConfig,
|
|
396
423
|
ciTypeMap = _ref3.ciTypeMap,
|
|
397
424
|
engine = _ref3.engine;
|
|
398
|
-
var result = (0, _clusterUtil.processCluster)(data); // rlog.debug("combTopoData-接收到数据", result, engine, globalConfig);
|
|
425
|
+
var result = (0, _clusterUtil.processCluster)(updateNodeInfo(engine, data)); // rlog.debug("combTopoData-接收到数据", result, engine, globalConfig);
|
|
399
426
|
|
|
400
427
|
var config = (0, _extends2["default"])({
|
|
401
428
|
type: "auto"
|
|
@@ -809,7 +836,7 @@ function findGroupChildren(elements, group) {
|
|
|
809
836
|
var type = element.type,
|
|
810
837
|
groupId = element.groupId,
|
|
811
838
|
groupTag = element.groupTag;
|
|
812
|
-
var isChild = groupId === id || groupTag === tag;
|
|
839
|
+
var isChild = groupId === id || tag && groupTag === tag;
|
|
813
840
|
|
|
814
841
|
if (isChild) {
|
|
815
842
|
children.push(element);
|