@riil-frontend/component-topology 3.5.12 → 3.5.13

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.
@@ -20,7 +20,7 @@ import { updateEdgeExpanded } from "../utils/edgeUtil";
20
20
  import PluginManager from "./PluginManager";
21
21
  import topoFactory from "./topoFactory"; // eslint-disable-next-line no-undef
22
22
 
23
- var version = typeof "3.5.12" === 'string' ? "3.5.12" : null;
23
+ var version = typeof "3.5.13" === 'string' ? "3.5.13" : null;
24
24
  console.info("\u62D3\u6251\u7248\u672C: " + version);
25
25
  /**
26
26
  * 拓扑显示和编辑
@@ -4,8 +4,7 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  * 连线组标注、悬浮框数据构建
5
5
  */
6
6
  import rlog from '@riil-frontend/component-topology-utils/es/rlog';
7
- import groupBy from 'lodash/groupBy';
8
- import { getEdgeGroupByNodeTags, getEdgeGroups } from "../../utils/htElementUtils";
7
+ import { getEdgeGroups } from "../../utils/htElementUtils";
9
8
  import AttributeFormatter from "../../core/models/attributeFormatter"; // 参与计算的链路指标
10
9
 
11
10
  var metrics = [// 总流速
@@ -87,11 +86,6 @@ var LinkTagsTipsBuilder = /*#__PURE__*/function () {
87
86
  var edgeGroupsTagsTips = groups.map(function (_ref) {
88
87
  var groupId = _ref.groupId,
89
88
  linkChildren = _ref.children;
90
- console.error(1111, {
91
- ciConfigs: ciConfigs,
92
- linkChildren: linkChildren,
93
- data: data
94
- });
95
89
  var config = ciConfigs.find(function (item) {
96
90
  return item.id === linkChildren[0].id;
97
91
  });
@@ -101,10 +95,7 @@ var LinkTagsTipsBuilder = /*#__PURE__*/function () {
101
95
  linkChildren: linkChildren,
102
96
  data: data
103
97
  });
104
- }); // console.error({
105
- // noParentLinks, groupMap, edgeGroups: edgeGroupsTagsTips, ciTagsAndTips, data
106
- // })
107
- // 获得连线组及子链路
98
+ }); // 获得连线组及子链路
108
99
  // 关联聚合链路、无子链路 时返回null
109
100
 
110
101
  function getGroupInfo(group) {
@@ -1,3 +1,4 @@
1
+ import rlog from "@riil-frontend/component-topology-utils/es/rlog";
1
2
  import sortBy from "lodash/sortBy";
2
3
  import { getEdges, getGroupChildrenNodes, getGroups, getLayerChildrenNodes, getLayers, getNodes } from "./htElementUtils";
3
4
  /**
@@ -49,18 +50,21 @@ function getResourceConfigFromHt(topo) {
49
50
 
50
51
  var exportLinkIdList = [];
51
52
  var edges = getEdges(dataModel);
52
- console.log(" 查询出口链路列表-edges", edges, dataModel);
53
+ rlog.debug(" 查询出口链路列表-edges", edges, dataModel);
53
54
  edges.forEach(function (edge) {
54
- var edgeData = htTopo.getEdgeData(edge); // eslint-disable-next-line no-underscore-dangle
55
+ var edgeData = htTopo.getEdgeData(edge); // 有组无子连线返回null
55
56
 
56
- var id = edgeData._attrObject.id;
57
+ if (edgeData) {
58
+ // eslint-disable-next-line no-underscore-dangle
59
+ var id = edgeData._attrObject.id;
57
60
 
58
- if (id) {
59
- var linkData = topo.dataModel.getDataById(id);
60
- var connectType = linkData !== null && linkData !== void 0 && linkData.attributes ? linkData === null || linkData === void 0 ? void 0 : linkData.attributes["network_link.connect_type"] : undefined;
61
+ if (id) {
62
+ var linkData = topo.dataModel.getDataById(id);
63
+ var connectType = linkData !== null && linkData !== void 0 && linkData.attributes ? linkData === null || linkData === void 0 ? void 0 : linkData.attributes["network_link.connect_type"] : undefined;
61
64
 
62
- if (connectType === "exit" && !exportLinkIdList.includes(id)) {
63
- exportLinkIdList.push(id);
65
+ if (connectType === "exit" && !exportLinkIdList.includes(id)) {
66
+ exportLinkIdList.push(id);
67
+ }
64
68
  }
65
69
  }
66
70
  });
@@ -48,7 +48,7 @@ var _PluginManager = _interopRequireDefault(require("./PluginManager"));
48
48
  var _topoFactory = _interopRequireDefault(require("./topoFactory"));
49
49
 
50
50
  // eslint-disable-next-line no-undef
51
- var version = typeof "3.5.12" === 'string' ? "3.5.12" : null;
51
+ var version = typeof "3.5.13" === 'string' ? "3.5.13" : null;
52
52
  console.info("\u62D3\u6251\u7248\u672C: " + version);
53
53
  /**
54
54
  * 拓扑显示和编辑
@@ -9,8 +9,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
 
10
10
  var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
11
11
 
12
- var _groupBy = _interopRequireDefault(require("lodash/groupBy"));
13
-
14
12
  var _htElementUtils = require("../../utils/htElementUtils");
15
13
 
16
14
  var _attributeFormatter = _interopRequireDefault(require("../../core/models/attributeFormatter"));
@@ -98,11 +96,6 @@ var LinkTagsTipsBuilder = /*#__PURE__*/function () {
98
96
  var edgeGroupsTagsTips = groups.map(function (_ref) {
99
97
  var groupId = _ref.groupId,
100
98
  linkChildren = _ref.children;
101
- console.error(1111, {
102
- ciConfigs: ciConfigs,
103
- linkChildren: linkChildren,
104
- data: data
105
- });
106
99
  var config = ciConfigs.find(function (item) {
107
100
  return item.id === linkChildren[0].id;
108
101
  });
@@ -112,10 +105,7 @@ var LinkTagsTipsBuilder = /*#__PURE__*/function () {
112
105
  linkChildren: linkChildren,
113
106
  data: data
114
107
  });
115
- }); // console.error({
116
- // noParentLinks, groupMap, edgeGroups: edgeGroupsTagsTips, ciTagsAndTips, data
117
- // })
118
- // 获得连线组及子链路
108
+ }); // 获得连线组及子链路
119
109
  // 关联聚合链路、无子链路 时返回null
120
110
 
121
111
  function getGroupInfo(group) {
@@ -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 _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
9
+
8
10
  var _sortBy = _interopRequireDefault(require("lodash/sortBy"));
9
11
 
10
12
  var _htElementUtils = require("./htElementUtils");
@@ -57,18 +59,23 @@ function getResourceConfigFromHt(topo) {
57
59
 
58
60
  var exportLinkIdList = [];
59
61
  var edges = (0, _htElementUtils.getEdges)(dataModel);
60
- console.log(" 查询出口链路列表-edges", edges, dataModel);
62
+
63
+ _rlog["default"].debug(" 查询出口链路列表-edges", edges, dataModel);
64
+
61
65
  edges.forEach(function (edge) {
62
- var edgeData = htTopo.getEdgeData(edge); // eslint-disable-next-line no-underscore-dangle
66
+ var edgeData = htTopo.getEdgeData(edge); // 有组无子连线返回null
63
67
 
64
- var id = edgeData._attrObject.id;
68
+ if (edgeData) {
69
+ // eslint-disable-next-line no-underscore-dangle
70
+ var id = edgeData._attrObject.id;
65
71
 
66
- if (id) {
67
- var linkData = topo.dataModel.getDataById(id);
68
- var connectType = linkData !== null && linkData !== void 0 && linkData.attributes ? linkData === null || linkData === void 0 ? void 0 : linkData.attributes["network_link.connect_type"] : undefined;
72
+ if (id) {
73
+ var linkData = topo.dataModel.getDataById(id);
74
+ var connectType = linkData !== null && linkData !== void 0 && linkData.attributes ? linkData === null || linkData === void 0 ? void 0 : linkData.attributes["network_link.connect_type"] : undefined;
69
75
 
70
- if (connectType === "exit" && !exportLinkIdList.includes(id)) {
71
- exportLinkIdList.push(id);
76
+ if (connectType === "exit" && !exportLinkIdList.includes(id)) {
77
+ exportLinkIdList.push(id);
78
+ }
72
79
  }
73
80
  }
74
81
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "3.5.12",
3
+ "version": "3.5.13",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -110,6 +110,6 @@
110
110
  "access": "public"
111
111
  },
112
112
  "license": "MIT",
113
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@3.5.12/build/index.html",
113
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@3.5.13/build/index.html",
114
114
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
115
115
  }