@riil-frontend/component-topology 13.0.0-dev.9 → 13.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.
Files changed (38) hide show
  1. package/build/index.js +26 -26
  2. package/es/core/components/AlarmListPanel/components/AlarmListItem.js +10 -1
  3. package/es/core/components/AlarmListPanel/index.js +2 -1
  4. package/es/core/components/TopoView/topoView.js +8 -2
  5. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +6 -5
  6. package/es/core/hooks/useGraphAlarmDisplay.js +45 -18
  7. package/es/core/hooks/useLinkAlarmDisplay.js +163 -0
  8. package/es/core/hooks/useManageStatus.js +1 -0
  9. package/es/core/hooks/usePolling.js +78 -24
  10. package/es/core/hooks/useTopoEdit.js +2 -1
  11. package/es/core/models/TopoApp.js +1 -1
  12. package/es/core/models/utils/linkUtils.js +30 -24
  13. package/es/core/store/models/topoMod.js +3 -6
  14. package/es/core/utils/graphLinkUtil.js +1 -0
  15. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +2 -1
  16. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +3 -2
  17. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
  18. package/es/networkTopo/utils/relateTopoDataUtil.js +2 -4
  19. package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +10 -1
  20. package/lib/core/components/AlarmListPanel/index.js +2 -1
  21. package/lib/core/components/TopoView/topoView.js +8 -2
  22. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +6 -5
  23. package/lib/core/hooks/useGraphAlarmDisplay.js +46 -18
  24. package/lib/core/hooks/useLinkAlarmDisplay.js +175 -0
  25. package/lib/core/hooks/useManageStatus.js +1 -0
  26. package/lib/core/hooks/usePolling.js +73 -19
  27. package/lib/core/hooks/useTopoEdit.js +2 -1
  28. package/lib/core/models/TopoApp.js +1 -1
  29. package/lib/core/models/utils/linkUtils.js +30 -24
  30. package/lib/core/store/models/topoMod.js +3 -6
  31. package/lib/core/utils/graphLinkUtil.js +1 -0
  32. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +2 -1
  33. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +3 -2
  34. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
  35. package/lib/networkTopo/utils/relateTopoDataUtil.js +1 -4
  36. package/package.json +2 -2
  37. package/es/networkTopo/utils/__tests__/relateTopoData.js +0 -110
  38. package/lib/networkTopo/utils/__tests__/relateTopoData.js +0 -115
@@ -27,7 +27,7 @@ var _useCiAttributeChange = _interopRequireDefault(require("./useCiAttributeChan
27
27
 
28
28
  var _useHtDataPropertyChangeListener = _interopRequireDefault(require("./ht/useHtDataPropertyChangeListener"));
29
29
 
30
- var rlog = _loglevel["default"].getLogger('topo');
30
+ var rlog = _loglevel["default"].getLogger("topo");
31
31
  /**
32
32
  * 轮询获取指标hooks
33
33
  * @param {*} props
@@ -40,15 +40,15 @@ var usePolling = function usePolling(props) {
40
40
  (0, _useCiAttributeChange["default"])({
41
41
  topo: topo
42
42
  });
43
- var bizState = store.useModelState('topoBizMod');
43
+ var bizState = store.useModelState("topoBizMod");
44
44
  var resAndMetrics = bizState.resAndMetrics,
45
45
  pollingSwitch = bizState.pollingSwitch;
46
- var displayConfig = topo.store.useModelState('displayConfig');
47
- var resourceOverviewState = topo.store.useModelState('topoBaseInfoOverview');
46
+ var displayConfig = topo.store.useModelState("displayConfig");
47
+ var resourceOverviewState = topo.store.useModelState("topoBaseInfoOverview");
48
48
  var resIdsList = resAndMetrics === null || resAndMetrics === void 0 ? void 0 : resAndMetrics.resIdsList;
49
49
  /**
50
50
  * 查询拓扑图资源的属性指标
51
- *
51
+ *
52
52
  * @returns {array}
53
53
  */
54
54
 
@@ -56,7 +56,7 @@ var usePolling = function usePolling(props) {
56
56
  return _fetchData.apply(this, arguments);
57
57
  }
58
58
  /**
59
- *
59
+ *
60
60
  * @returns {{id, attributes: object[], metrics: object[]}[]} 属性和指标
61
61
  */
62
62
 
@@ -72,7 +72,7 @@ var usePolling = function usePolling(props) {
72
72
  var ipv6 = data.attributeMap.ipv6_address;
73
73
 
74
74
  if (!ipv6 && data.attributeMap.ipv6_address_list) {
75
- ipv6 = (data.attributeMap.ipv6_address_list || '').split(',')[0];
75
+ ipv6 = (data.attributeMap.ipv6_address_list || "").split(",")[0];
76
76
  }
77
77
 
78
78
  return (0, _extends2["default"])({}, data, {
@@ -104,9 +104,62 @@ var usePolling = function usePolling(props) {
104
104
  // 合并属性、指标
105
105
  var _topo$dataModel$getDa = topo.dataModel.getData(),
106
106
  nodes = _topo$dataModel$getDa.nodes,
107
- links = _topo$dataModel$getDa.links;
108
-
109
- return [].concat(nodes, links).filter(function (item) {
107
+ links = _topo$dataModel$getDa.links; // console.log('fetchData-mergeData',ciMetricsResult, nodes, links)
108
+ // 判断通断状态
109
+
110
+
111
+ var breakLinks = links.filter(function (item) {
112
+ return item.ciType === "network_link";
113
+ }).map(function (link) {
114
+ console.log("fetchData-mergeData", link);
115
+ var breakFlag = false;
116
+ ciMetricsResult.forEach(function (item) {
117
+ if (item.id === link.id) {
118
+ if (item.metrics.hasOwnProperty("run_status")) {
119
+ if (item.metrics.run_status !== "1") {
120
+ breakFlag = true;
121
+ }
122
+ }
123
+
124
+ if (link.attributes["network_link.is_crucial"] && item.metrics.hasOwnProperty("remote_ping_status")) {
125
+ if (item.metrics.remote_ping_status !== "1") {
126
+ breakFlag = true;
127
+ }
128
+ }
129
+ }
130
+ });
131
+ var element = topo.getDataModel().getDataByTag(link.id);
132
+
133
+ if (!element) {
134
+ return;
135
+ }
136
+
137
+ if (breakFlag) {
138
+ console.log("link.setNodeStyleIcon-breakFlag", element);
139
+ topo.getHtTopo().setNodeStyleIcon(element, {
140
+ styleIcon: "linkbreak",
141
+ position: 17,
142
+ icon: "resource.link.linkbreak"
143
+ });
144
+ topo.dataModel.updateData([(0, _extends2["default"])({}, link, {
145
+ breakState: true
146
+ })]);
147
+ element === null || element === void 0 ? void 0 : element.s("edge.color", "#C9CED2");
148
+ return link.id; //element.a('linkbreak',true);
149
+ } else {
150
+ // 恢复状态
151
+ element.removeStyleIcon("linkbreak");
152
+ topo.dataModel.updateData([(0, _extends2["default"])({}, link, {
153
+ breakState: false
154
+ })]);
155
+ element === null || element === void 0 ? void 0 : element.a('linkbreak', false);
156
+ return undefined; // topo.getHtTopo().setNodeStyleIcon(element, { styleIcon: 'linkbreak',position: 17, icon: 'resource.link.linkbreak' });
157
+ }
158
+ });
159
+ console.log('link-break', breakLinks, links);
160
+ return [].concat(nodes, links.filter(function (link) {
161
+ return !breakLinks.includes(link.id);
162
+ })).filter(function (item) {
110
163
  return !!item.ciType;
111
164
  }).map(function (ciData) {
112
165
  var resultData = (0, _extends2["default"])({}, ciData, {
@@ -125,7 +178,7 @@ var usePolling = function usePolling(props) {
125
178
  });
126
179
  };
127
180
 
128
- _topo$store$getModelS = topo.store.getModelState('topoBizMod').resAndMetrics, resIdsList = _topo$store$getModelS.resIdsList, nodeIdsList = _topo$store$getModelS.nodeIdsList; // rlog.debug('根据ci的id获取属性的值-getCiArrByIds', resIdsList, metrics);
181
+ _topo$store$getModelS = topo.store.getModelState("topoBizMod").resAndMetrics, resIdsList = _topo$store$getModelS.resIdsList, nodeIdsList = _topo$store$getModelS.nodeIdsList; // rlog.debug('根据ci的id获取属性的值-getCiArrByIds', resIdsList, metrics);
129
182
  // 无资源,不查询
130
183
 
131
184
  if (resIdsList.length) {
@@ -140,7 +193,8 @@ var usePolling = function usePolling(props) {
140
193
  codes = topo.attributeMetricDisplay.getResourceMetricCodes();
141
194
  param = {
142
195
  ciId: nodeIdsList,
143
- codes: codes,
196
+ codes: [].concat(codes, ["run_status", "remote_ping_status"]),
197
+ // 判断链路通断状态
144
198
  // 过滤掉不需要查询的
145
199
  relationId: topo.attributeMetricDisplay.getEdges().map(function (edge) {
146
200
  return {
@@ -230,7 +284,7 @@ var usePolling = function usePolling(props) {
230
284
 
231
285
  (0, _react.useEffect)(function () {
232
286
  if (topo.options.enableDefaultMetricLoader) {
233
- rlog.debug('usePolling.useEffect: 开始轮询', {
287
+ rlog.debug("usePolling.useEffect: 开始轮询", {
234
288
  pollingSwitch: pollingSwitch,
235
289
  resIdsList: resIdsList,
236
290
  resourceOverviewState: resourceOverviewState,
@@ -241,16 +295,16 @@ var usePolling = function usePolling(props) {
241
295
 
242
296
  return function () {
243
297
  if (loading) {
244
- rlog.debug('usePolling.useEffect: 结束轮询', resAndMetrics);
298
+ rlog.debug("usePolling.useEffect: 结束轮询", resAndMetrics);
245
299
  stopPoll();
246
300
  }
247
301
  };
248
302
  }, [pollingSwitch, resIdsList, displayConfig, resourceOverviewState.id, resourceOverviewState.metricCodes]); // 属性变更监听更新
249
303
 
250
- (0, _componentRiilEventEmitter.useCbbEventListener)('topo', {
251
- name: 'topo',
304
+ (0, _componentRiilEventEmitter.useCbbEventListener)("topo", {
305
+ name: "topo",
252
306
  onMessage: function onMessage(message) {
253
- if (message.type === 'attribute') {
307
+ if (message.type === "attribute") {
254
308
  var data = message.data;
255
309
  }
256
310
  }
@@ -261,8 +315,8 @@ var usePolling = function usePolling(props) {
261
315
  onChange: function onChange(e) {
262
316
  var property = e.property,
263
317
  data = e.data;
264
- var isGroupExpandedChanged = data instanceof ht.Group && property === 'expanded';
265
- var isEdgeExpandedChanged = data instanceof ht.Edge && property === 'edge.expanded';
318
+ var isGroupExpandedChanged = data instanceof ht.Group && property === "expanded";
319
+ var isEdgeExpandedChanged = data instanceof ht.Edge && property === "edge.expanded";
266
320
 
267
321
  if (isGroupExpandedChanged || isEdgeExpandedChanged) {
268
322
  topo.attributeMetricDisplay.updateTagsTips();
@@ -1171,7 +1171,8 @@ var useTopoEdit = function useTopoEdit(params) {
1171
1171
  */
1172
1172
  onSaveTopo: onSaveTopo,
1173
1173
  getResourceConfigFromHt: resourceConfig.getConfigFromHt,
1174
- onLayerAdded: onLayerAdded
1174
+ onLayerAdded: onLayerAdded,
1175
+ findUNExistedLinkElements: findUNExistedLinkElements
1175
1176
  };
1176
1177
  };
1177
1178
 
@@ -54,7 +54,7 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
54
54
  var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
55
55
 
56
56
  // eslint-disable-next-line no-undef
57
- var version = typeof "13.0.0-dev.9" === 'string' ? "13.0.0-dev.9" : null;
57
+ var version = typeof "13.0.2" === 'string' ? "13.0.2" : null;
58
58
  console.info("\u62D3\u6251\u7248\u672C: " + version);
59
59
  /**
60
60
  * 拓扑显示和编辑
@@ -72,38 +72,33 @@ function isAggLink(link) {
72
72
  return (link === null || link === void 0 ? void 0 : (_link$attributes2 = link.attributes) === null || _link$attributes2 === void 0 ? void 0 : _link$attributes2.destination_type) === "network.agg_interface" && (link === null || link === void 0 ? void 0 : (_link$attributes3 = link.attributes) === null || _link$attributes3 === void 0 ? void 0 : _link$attributes3.source_type) === "network.agg_interface";
73
73
  }
74
74
 
75
- function mergeLinksData(links, linkCis, nodes, interfaceCiMap, interfaceDoc) {
75
+ function mergeLinksData(links, linkCis, nodes, ciMap, interfaceDoc) {
76
76
  var linkCiMap = (0, _keyBy["default"])(links, "id");
77
77
  return links.map(function (link) {
78
- var _interfaceCiMap$attri, _interfaceCiMap$attri2;
78
+ var _ciMap$attributes$net, _ciMap$attributes$net2, _ciMap$attributes$sou, _ciMap$attributes$des;
79
79
 
80
80
  var linkCi = linkCiMap[link.id];
81
- var attributes = (0, _extends2["default"])({}, linkCi === null || linkCi === void 0 ? void 0 : linkCi.attributes);
82
- var sourceNode = nodes.find(function (node) {
83
- return node.id === attributes["network_link.source_device_id"];
84
- });
85
- var targetNode = nodes.find(function (node) {
86
- return node.id === attributes["network_link.destination_device_id"];
87
- }); // 翻译
81
+ var attributes = (0, _extends2["default"])({}, linkCi === null || linkCi === void 0 ? void 0 : linkCi.attributes); // 翻译
88
82
 
89
83
  return (0, _extends2["default"])({}, link, {
84
+ breakState: false,
90
85
  attributes: (0, _extends2["default"])({}, attributes, {
91
86
  // 源/目的设备
92
87
  "network_link.source_device_id_object": {
93
- displayName: sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.name
88
+ displayName: (_ciMap$attributes$net = ciMap[attributes["network_link.source_device_id"]]) === null || _ciMap$attributes$net === void 0 ? void 0 : _ciMap$attributes$net.attributes["display_name"]
94
89
  },
95
90
  "network_link.destination_device_id_object": {
96
- displayName: targetNode === null || targetNode === void 0 ? void 0 : targetNode.name
91
+ displayName: (_ciMap$attributes$net2 = ciMap[attributes["network_link.destination_device_id"]]) === null || _ciMap$attributes$net2 === void 0 ? void 0 : _ciMap$attributes$net2.attributes["display_name"]
97
92
  },
98
93
  // 源/目的接口类型
99
94
  source_type_object: interfaceDoc[attributes.source_type],
100
95
  destination_type_object: interfaceDoc[attributes.destination_type],
101
96
  // 源/目的接口
102
97
  source_id_object: {
103
- displayName: (_interfaceCiMap$attri = interfaceCiMap[attributes.source_id]) === null || _interfaceCiMap$attri === void 0 ? void 0 : _interfaceCiMap$attri.attributes["display_name"]
98
+ displayName: (_ciMap$attributes$sou = ciMap[attributes.source_id]) === null || _ciMap$attributes$sou === void 0 ? void 0 : _ciMap$attributes$sou.attributes["display_name"]
104
99
  },
105
100
  destination_id_object: {
106
- displayName: (_interfaceCiMap$attri2 = interfaceCiMap[attributes.destination_id]) === null || _interfaceCiMap$attri2 === void 0 ? void 0 : _interfaceCiMap$attri2.attributes["display_name"]
101
+ displayName: (_ciMap$attributes$des = ciMap[attributes.destination_id]) === null || _ciMap$attributes$des === void 0 ? void 0 : _ciMap$attributes$des.attributes["display_name"]
107
102
  }
108
103
  })
109
104
  });
@@ -116,7 +111,7 @@ function getLinksDetail(_x, _x2) {
116
111
 
117
112
  function _getLinksDetail() {
118
113
  _getLinksDetail = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(links, nodes) {
119
- var linkCis, interfaceIds, interfaceTypes, interfaceCiMap, interfaceDoc;
114
+ var linkCis, ciMap, ciIds, interfaceTypes, loadCiMap, interfaceDoc;
120
115
  return _regenerator["default"].wrap(function _callee$(_context) {
121
116
  while (1) switch (_context.prev = _context.next) {
122
117
  case 0:
@@ -129,11 +124,20 @@ function _getLinksDetail() {
129
124
 
130
125
  case 2:
131
126
  linkCis = links;
132
- interfaceIds = [].concat(linkCis.map(function (item) {
127
+ ciMap = (0, _keyBy["default"])(nodes, "id");
128
+ ciIds = _lodash["default"].uniq([].concat(linkCis.map(function (item) {
129
+ return item.attributes['network_link.destination_device_id'];
130
+ }), linkCis.map(function (item) {
131
+ return item.attributes['network_link.source_device_id'];
132
+ }), linkCis.map(function (item) {
133
133
  return item.attributes.source_id;
134
134
  }), linkCis.map(function (item) {
135
135
  return item.attributes.destination_id;
136
- }));
136
+ }))).filter(function (item) {
137
+ return !!item;
138
+ }).filter(function (item) {
139
+ return !ciMap[item];
140
+ });
137
141
  interfaceTypes = _lodash["default"].compact(_lodash["default"].uniq([].concat(linkCis.map(function (item) {
138
142
  return item.attributes.source_type;
139
143
  }), linkCis.map(function (item) {
@@ -141,19 +145,21 @@ function _getLinksDetail() {
141
145
  })))).filter(function (item) {
142
146
  return item !== "ip";
143
147
  });
144
- _context.next = 7;
145
- return _CiCache["default"].load(interfaceIds);
148
+ _context.next = 8;
149
+ return _CiCache["default"].load(ciIds);
146
150
 
147
- case 7:
148
- interfaceCiMap = _context.sent;
149
- _context.next = 10;
151
+ case 8:
152
+ loadCiMap = _context.sent;
153
+ _context.next = 11;
150
154
  return _CiTypeCache["default"].load(interfaceTypes);
151
155
 
152
- case 10:
156
+ case 11:
153
157
  interfaceDoc = _context.sent;
154
- return _context.abrupt("return", mergeLinksData(links, linkCis, nodes, interfaceCiMap, interfaceDoc));
158
+ Object.assign(ciMap, loadCiMap); // console.log('getLinksDetail-mergeLinksData', { relations, interfaceIds, interfaceCis, })
159
+
160
+ return _context.abrupt("return", mergeLinksData(links, linkCis, nodes, ciMap, interfaceDoc));
155
161
 
156
- case 12:
162
+ case 14:
157
163
  case "end":
158
164
  return _context.stop();
159
165
  }
@@ -415,7 +415,8 @@ function _default(topoApp) {
415
415
  globalConfig: extraConfig,
416
416
  type: (_result$config = result.config) === null || _result$config === void 0 ? void 0 : _result$config.showType,
417
417
  topoData: topoData,
418
- resAndMetrics: resAndMetrics
418
+ resAndMetrics: resAndMetrics,
419
+ loading: false
419
420
  });
420
421
 
421
422
  case 47:
@@ -447,11 +448,7 @@ function _default(topoApp) {
447
448
 
448
449
  topoApp.options.onLoad();
449
450
 
450
- _this3.update({
451
- loading: false
452
- });
453
-
454
- case 62:
451
+ case 61:
455
452
  case "end":
456
453
  return _context4.stop();
457
454
  }
@@ -16,6 +16,7 @@ function fixLink(topo) {
16
16
  edges.forEach(function (edge) {
17
17
  var source = edge.getSource();
18
18
  var target = edge.getTarget();
19
+ console.log('fixLink', edge, source, target);
19
20
  var linkData = linkDatas.find(function (data) {
20
21
  return data.id === edge.getTag();
21
22
  }); // TODO 判断两端互相切换
@@ -920,7 +920,8 @@ function ResourceOverview(props) {
920
920
  return item.code;
921
921
  }),
922
922
  getOverviewConfig: resourceOverviewProps.getOverviewConfig,
923
- saveOverviewConfig: resourceOverviewProps.saveOverviewConfig
923
+ saveOverviewConfig: resourceOverviewProps.saveOverviewConfig,
924
+ jumpto: topo.viewProps.jumpto
924
925
  }) : /*#__PURE__*/_react["default"].createElement(_BlockBox["default"], {
925
926
  headerTitle: "\u5173\u952E\u6307\u6807",
926
927
  headerExtra: /*#__PURE__*/_react["default"].createElement(_Configurator["default"], {
@@ -20,7 +20,8 @@ var _LinkTopoModule = _interopRequireDefault(require("./LinkTopo.module.scss"));
20
20
  function LinkTopo(props) {
21
21
  var data = props.data,
22
22
  linkMetricCodes = props.linkMetricCodes,
23
- openFlow = props.openFlow;
23
+ openFlow = props.openFlow,
24
+ jumpto = props.jumpto;
24
25
  var metricData = (0, _useMetricPolling["default"])({
25
26
  linkCi: data,
26
27
  linkMetricCodes: linkMetricCodes
@@ -46,7 +47,7 @@ function LinkTopo(props) {
46
47
  data: data // 链路ci数据
47
48
  ,
48
49
  isNarrow: true,
49
- jumpto: (0, _componentTopologyUtils.getHistory)().push
50
+ jumpto: jumpto || (0, _componentTopologyUtils.getHistory)().push
50
51
  }, metricData, {
51
52
  openFlow: openFlow
52
53
  })));
@@ -31,7 +31,8 @@ function LinkTopoCard(props) {
31
31
  defaultCols = props.defaultCols,
32
32
  metricCol = props.metricCol,
33
33
  metricColChange = props.metricColChange,
34
- metricCodes = props.metricCodes; // eslint-disable-next-line camelcase
34
+ metricCodes = props.metricCodes,
35
+ jumpto = props.jumpto; // eslint-disable-next-line camelcase
35
36
 
36
37
  var supportTemplates = (data === null || data === void 0 ? void 0 : (_data$attributes = data.attributes) === null || _data$attributes === void 0 ? void 0 : _data$attributes.support_templates) || ''; // 该资源监控模板
37
38
 
@@ -122,6 +123,7 @@ function LinkTopoCard(props) {
122
123
  linkMetricCodes: openFlow && openFlow.name == '查看流量构成' ? metricCodes : metricCodes.filter(function (i) {
123
124
  return i != 'netDelayRatio' && i != 'retansRatio';
124
125
  }),
125
- openFlow: openFlow
126
+ openFlow: openFlow,
127
+ jumpto: jumpto
126
128
  }));
127
129
  }
@@ -10,8 +10,6 @@ exports.processByConditionTopoData = processByConditionTopoData;
10
10
 
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
 
13
- var _relateTopoData = require("./__tests__/relateTopoData");
14
-
15
13
  // 关联拓扑数据
16
14
 
17
15
  /**
@@ -70,7 +68,7 @@ function buildTopoNode(topoId) {
70
68
  // name: ,
71
69
  bindType: "topo",
72
70
  // 绑定资源类型。关联资源 值为空,关联IP ip
73
- bindIp: topoId,
71
+ bindTopo: topoId,
74
72
  // TODO 所属区域,从序列化拿
75
73
  // 'groupId': null,
76
74
  // 'groupTag': null,
@@ -84,7 +82,6 @@ function buildTopoNode(topoId) {
84
82
  }
85
83
 
86
84
  function buildTopoLinks(links) {
87
- // links.push(...topoLinks)
88
85
  return links.map(function (link) {
89
86
  return (0, _extends2["default"])({}, link, {
90
87
  "source": link.sourceType ? link.sourceType + ':' + link.source : link.source,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "13.0.0-dev.9",
3
+ "version": "13.0.2",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -123,6 +123,6 @@
123
123
  "access": "public"
124
124
  },
125
125
  "license": "MIT",
126
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@13.0.0-dev.9/build/index.html",
126
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@13.0.2/build/index.html",
127
127
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
128
128
  }
@@ -1,110 +0,0 @@
1
- export var topoLinks = [// 子拓扑与资源间
2
- {
3
- "id": "1-2",
4
- "name": "子拓扑链路",
5
- 'sourceType': 'topo',
6
- "source": "3",
7
- "target": "00000000010de861",
8
- "operation": "delete",
9
- "ciType": "network_link",
10
- "attributes": {
11
- "network_link.source_device_ipv4": "172.17.166.18",
12
- "network_link.destination_ipv4": "1.5.5.5",
13
- "network_link.work_mode": "AandS",
14
- "support_templates": "m.ethernet_link",
15
- "rated_bandwidth": 100,
16
- "network_link.actual_bandwidth": 100,
17
- "source_type": "network.interface",
18
- "network_link.connect_type": "phy",
19
- "display_name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
20
- "asset_status": "2",
21
- "network_link_type": "2",
22
- "destination_type": "ip",
23
- "network_link.role": "master",
24
- "network_link.network_category": "CAN",
25
- "dcs": "331268969",
26
- "network_link.source_ipv4": "172.17.166.18",
27
- "name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
28
- "distance_outlet": 2147483647,
29
- "network_link.is_crucial": false,
30
- "source_id": "00000000010de8b2",
31
- "network_link.source_device_id": "00000000010de861"
32
- },
33
- "sourceCode": null,
34
- "level": null,
35
- "customType": null,
36
- "manageStatus": 3
37
- }, // 子拓扑与IP间
38
- {
39
- "id": "3-2",
40
- "name": "子拓扑链路",
41
- 'sourceType': 'topo',
42
- "source": "3",
43
- "target": "",
44
- "operation": "delete",
45
- "ciType": "network_link",
46
- "attributes": {
47
- "network_link.source_device_ipv4": "172.17.166.18",
48
- "network_link.destination_ipv4": "1.5.5.5",
49
- "network_link.work_mode": "AandS",
50
- "support_templates": "m.ethernet_link",
51
- "rated_bandwidth": 100,
52
- "network_link.actual_bandwidth": 100,
53
- "source_type": "network.interface",
54
- "network_link.connect_type": "phy",
55
- "display_name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
56
- "asset_status": "2",
57
- "network_link_type": "2",
58
- "destination_type": "ip",
59
- "network_link.role": "master",
60
- "network_link.network_category": "CAN",
61
- "dcs": "331268969",
62
- "network_link.source_ipv4": "172.17.166.18",
63
- "name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
64
- "distance_outlet": 2147483647,
65
- "network_link.is_crucial": false,
66
- "source_id": "00000000010de8b2",
67
- "network_link.source_device_id": "00000000010de861"
68
- },
69
- "sourceCode": null,
70
- "level": null,
71
- "customType": null,
72
- "manageStatus": 3
73
- }, // 子拓扑之间
74
- {
75
- "id": "2-2",
76
- "name": "子拓扑链路",
77
- 'sourceType': 'topo',
78
- "source": "3",
79
- 'targetType': 'topo',
80
- "target": "6",
81
- "operation": "delete",
82
- "ciType": "network_link",
83
- "attributes": {
84
- "network_link.source_device_ipv4": "172.17.166.18",
85
- "network_link.destination_ipv4": "1.5.5.5",
86
- "network_link.work_mode": "AandS",
87
- "support_templates": "m.ethernet_link",
88
- "rated_bandwidth": 100,
89
- "network_link.actual_bandwidth": 100,
90
- "source_type": "network.interface",
91
- "network_link.connect_type": "phy",
92
- "display_name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
93
- "asset_status": "2",
94
- "network_link_type": "2",
95
- "destination_type": "ip",
96
- "network_link.role": "master",
97
- "network_link.network_category": "CAN",
98
- "dcs": "331268969",
99
- "network_link.source_ipv4": "172.17.166.18",
100
- "name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
101
- "distance_outlet": 2147483647,
102
- "network_link.is_crucial": false,
103
- "source_id": "00000000010de8b2",
104
- "network_link.source_device_id": "00000000010de861"
105
- },
106
- "sourceCode": null,
107
- "level": null,
108
- "customType": null,
109
- "manageStatus": 3
110
- }];
@@ -1,115 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.topoLinks = void 0;
5
- var topoLinks = [// 子拓扑与资源间
6
- {
7
- "id": "1-2",
8
- "name": "子拓扑链路",
9
- 'sourceType': 'topo',
10
- "source": "3",
11
- "target": "00000000010de861",
12
- "operation": "delete",
13
- "ciType": "network_link",
14
- "attributes": {
15
- "network_link.source_device_ipv4": "172.17.166.18",
16
- "network_link.destination_ipv4": "1.5.5.5",
17
- "network_link.work_mode": "AandS",
18
- "support_templates": "m.ethernet_link",
19
- "rated_bandwidth": 100,
20
- "network_link.actual_bandwidth": 100,
21
- "source_type": "network.interface",
22
- "network_link.connect_type": "phy",
23
- "display_name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
24
- "asset_status": "2",
25
- "network_link_type": "2",
26
- "destination_type": "ip",
27
- "network_link.role": "master",
28
- "network_link.network_category": "CAN",
29
- "dcs": "331268969",
30
- "network_link.source_ipv4": "172.17.166.18",
31
- "name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
32
- "distance_outlet": 2147483647,
33
- "network_link.is_crucial": false,
34
- "source_id": "00000000010de8b2",
35
- "network_link.source_device_id": "00000000010de861"
36
- },
37
- "sourceCode": null,
38
- "level": null,
39
- "customType": null,
40
- "manageStatus": 3
41
- }, // 子拓扑与IP间
42
- {
43
- "id": "3-2",
44
- "name": "子拓扑链路",
45
- 'sourceType': 'topo',
46
- "source": "3",
47
- "target": "",
48
- "operation": "delete",
49
- "ciType": "network_link",
50
- "attributes": {
51
- "network_link.source_device_ipv4": "172.17.166.18",
52
- "network_link.destination_ipv4": "1.5.5.5",
53
- "network_link.work_mode": "AandS",
54
- "support_templates": "m.ethernet_link",
55
- "rated_bandwidth": 100,
56
- "network_link.actual_bandwidth": 100,
57
- "source_type": "network.interface",
58
- "network_link.connect_type": "phy",
59
- "display_name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
60
- "asset_status": "2",
61
- "network_link_type": "2",
62
- "destination_type": "ip",
63
- "network_link.role": "master",
64
- "network_link.network_category": "CAN",
65
- "dcs": "331268969",
66
- "network_link.source_ipv4": "172.17.166.18",
67
- "name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
68
- "distance_outlet": 2147483647,
69
- "network_link.is_crucial": false,
70
- "source_id": "00000000010de8b2",
71
- "network_link.source_device_id": "00000000010de861"
72
- },
73
- "sourceCode": null,
74
- "level": null,
75
- "customType": null,
76
- "manageStatus": 3
77
- }, // 子拓扑之间
78
- {
79
- "id": "2-2",
80
- "name": "子拓扑链路",
81
- 'sourceType': 'topo',
82
- "source": "3",
83
- 'targetType': 'topo',
84
- "target": "6",
85
- "operation": "delete",
86
- "ciType": "network_link",
87
- "attributes": {
88
- "network_link.source_device_ipv4": "172.17.166.18",
89
- "network_link.destination_ipv4": "1.5.5.5",
90
- "network_link.work_mode": "AandS",
91
- "support_templates": "m.ethernet_link",
92
- "rated_bandwidth": 100,
93
- "network_link.actual_bandwidth": 100,
94
- "source_type": "network.interface",
95
- "network_link.connect_type": "phy",
96
- "display_name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
97
- "asset_status": "2",
98
- "network_link_type": "2",
99
- "destination_type": "ip",
100
- "network_link.role": "master",
101
- "network_link.network_category": "CAN",
102
- "dcs": "331268969",
103
- "network_link.source_ipv4": "172.17.166.18",
104
- "name": "172.17.166.18(Fa 0/10) - 1.5.5.5",
105
- "distance_outlet": 2147483647,
106
- "network_link.is_crucial": false,
107
- "source_id": "00000000010de8b2",
108
- "network_link.source_device_id": "00000000010de861"
109
- },
110
- "sourceCode": null,
111
- "level": null,
112
- "customType": null,
113
- "manageStatus": 3
114
- }];
115
- exports.topoLinks = topoLinks;