@riil-frontend/component-topology 4.0.11 → 4.0.14

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.
@@ -6,7 +6,7 @@ import BasicConfig from "./ResourceDisplay/BasicConfig"; // 默认中可配置
6
6
 
7
7
  var CommonOptions = [{
8
8
  value: 'metric:interface_totalbps',
9
- label: '总流速'
9
+ label: '总速率'
10
10
  }, {
11
11
  value: 'metric:bandwidth_utilization',
12
12
  label: '带宽利用率'
@@ -11,7 +11,7 @@ var CommonOptions = [{
11
11
  label: '目的端口'
12
12
  }, {
13
13
  value: 'metric:interface_totalbps',
14
- label: '总流速'
14
+ label: '总速率'
15
15
  }, {
16
16
  value: 'metric:bandwidth_utilization',
17
17
  label: '带宽利用率'
@@ -128,8 +128,8 @@ var Topology = function Topology(props) {
128
128
  }, []);
129
129
  var handleGraphDataLoaded = useCallback(function () {
130
130
  rlog.info("TopoView.handleGraphDataLoaded", topoData, topo.getDataModel().getDatas().toArray());
131
- fixLink(topo);
132
131
  upgradeV103GraphClusterNode(topo, topoData);
132
+ fixLink(topo);
133
133
  handleClusterNoPermission(topo);
134
134
  updateEdgeExpanded(topo);
135
135
  topoDispatchers.update({
@@ -142,8 +142,8 @@ var Topology = function Topology(props) {
142
142
  }, [topoData]);
143
143
  var handleGraphLoaded = useCallback(function () {
144
144
  rlog.info("TopoView.handleGraphLoaded", topoData, topo.getDataModel().getDatas().toArray());
145
- fixLink(topo);
146
145
  upgradeV103GraphClusterNode(topo, topoData);
146
+ fixLink(topo);
147
147
  handleClusterNoPermission(topo);
148
148
  updateEdgeExpanded(topo);
149
149
  topoDispatchers.update({
@@ -38,6 +38,7 @@ var Alarm = /*#__PURE__*/function () {
38
38
  var _open = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
39
39
  var _this = this;
40
40
 
41
+ var nodeCount;
41
42
  return _regeneratorRuntime.wrap(function _callee$(_context) {
42
43
  while (1) {
43
44
  switch (_context.prev = _context.next) {
@@ -50,23 +51,17 @@ var Alarm = /*#__PURE__*/function () {
50
51
  return _context.abrupt("return");
51
52
 
52
53
  case 2:
53
- this.confirmLargeResourceCount(function () {
54
- // 获得拓扑id
55
- var id = _this.topo.id;
56
-
57
- if (!id) {
58
- return;
59
- }
60
-
61
- rlog.info("Alarm.open 打开告警通道", id);
62
-
63
- _this.openTopoAlarm(id); // this.hmGetTopoAlarm(id);
64
-
65
-
66
- _this.hmGetTopoAlarmByDoc(id);
67
- });
54
+ nodeCount = this.topo.dataModel.getNodes().length;
55
+
56
+ if (nodeCount < 1500 || this.topo.isEditMode()) {
57
+ this.doOpen();
58
+ } else {
59
+ this.confirmOpenWhenLargeResource(function () {
60
+ _this.doOpen();
61
+ });
62
+ }
68
63
 
69
- case 3:
64
+ case 4:
70
65
  case "end":
71
66
  return _context.stop();
72
67
  }
@@ -79,7 +74,21 @@ var Alarm = /*#__PURE__*/function () {
79
74
  }
80
75
 
81
76
  return open;
82
- }()
77
+ }();
78
+
79
+ _proto.doOpen = function doOpen() {
80
+ // 获得拓扑id
81
+ var id = this.topo.id;
82
+
83
+ if (!id) {
84
+ return;
85
+ }
86
+
87
+ rlog.info("Alarm.open 打开告警通道", id);
88
+ this.openTopoAlarm(id); // this.hmGetTopoAlarm(id);
89
+
90
+ this.hmGetTopoAlarmByDoc(id);
91
+ }
83
92
  /**
84
93
  * 关闭告警。
85
94
  *
@@ -88,7 +97,14 @@ var Alarm = /*#__PURE__*/function () {
88
97
  ;
89
98
 
90
99
  _proto.close = function close() {
91
- // 获得拓扑id
100
+ this.updateState({
101
+ alarmPanelIsOpen: false,
102
+ alarmData: [],
103
+ alarmList: [],
104
+ risks: [],
105
+ alarmRecord: []
106
+ }); // 获得拓扑id
107
+
92
108
  var currentTopoId = this.currentTopoId;
93
109
 
94
110
  if (!currentTopoId) {
@@ -98,31 +114,22 @@ var Alarm = /*#__PURE__*/function () {
98
114
  rlog.info("关闭告警通道", currentTopoId); // 取消订阅告警推送
99
115
  // 关闭告警推送通道
100
116
 
101
- this.updateState({
102
- alarmData: [],
103
- alarmPanelIsOpen: false
104
- });
105
117
  this.closeTopoAlarm(currentTopoId);
106
118
  } // 资源数量多时确认是否开启
119
+ // eslint-disable-next-line class-methods-use-this
107
120
  ;
108
121
 
109
- _proto.confirmLargeResourceCount = function confirmLargeResourceCount(cb) {
110
- var nodeCount = this.topo.dataModel.getNodes().length;
111
-
112
- if (nodeCount < 1500 || this.topo.isEditMode()) {
113
- cb();
114
- } else {
115
- _Dialog.confirm({
116
- title: "提示",
117
- messageProps: {
118
- type: "warning"
119
- },
120
- content: "该拓扑图上节点较多,继续查询告警可能影响系统整体性能,是否暂不显示告警?",
121
- onCancel: function onCancel() {
122
- cb();
123
- }
124
- });
125
- }
122
+ _proto.confirmOpenWhenLargeResource = function confirmOpenWhenLargeResource(cb) {
123
+ _Dialog.confirm({
124
+ title: "提示",
125
+ messageProps: {
126
+ type: "warning"
127
+ },
128
+ content: "该拓扑图上节点较多,继续查询告警可能影响系统整体性能,是否暂不显示告警?",
129
+ onCancel: function onCancel() {
130
+ cb();
131
+ }
132
+ });
126
133
  }
127
134
  /**
128
135
  * 查询当前拓扑图有权限资源的告警列表
@@ -1,14 +1,14 @@
1
- import { getEdges as _getEdges, getGroupDatas, getNodes as _getNodes } from "../../utils/htElementUtils";
1
+ import { getEdges as _getEdges, getNodes as _getNodes } from "../../utils/htElementUtils";
2
2
 
3
- var TopoDataModel = /*#__PURE__*/function () {
4
- function TopoDataModel(topo) {
3
+ var GraphDataModel = /*#__PURE__*/function () {
4
+ function GraphDataModel(topo) {
5
5
  this.topo = topo;
6
6
  }
7
7
 
8
- var _proto = TopoDataModel.prototype;
8
+ var _proto = GraphDataModel.prototype;
9
9
 
10
10
  _proto.getGroups = function getGroups() {
11
- return getGroupDatas(this.topo.getDataModel());
11
+ return this.getGroups(this.topo.getDataModel());
12
12
  };
13
13
 
14
14
  _proto.getNodes = function getNodes() {
@@ -19,13 +19,7 @@ var TopoDataModel = /*#__PURE__*/function () {
19
19
  return _getEdges(this.topo.getDataModel());
20
20
  };
21
21
 
22
- _proto.getLines = function getLines() {
23
- return this.getEdges().filter(function (item) {
24
- return !!item.id;
25
- });
26
- };
27
-
28
- return TopoDataModel;
22
+ return GraphDataModel;
29
23
  }();
30
24
 
31
- export { TopoDataModel as default };
25
+ export { GraphDataModel as default };
@@ -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 "4.0.11" === 'string' ? "4.0.11" : null;
24
+ var version = typeof "4.0.14" === 'string' ? "4.0.14" : null;
25
25
  console.info("\u62D3\u6251\u7248\u672C: " + version);
26
26
  /**
27
27
  * 拓扑显示和编辑
@@ -404,9 +404,9 @@ var useTopoEdit = function useTopoEdit(params) {
404
404
 
405
405
 
406
406
  function findUNExistedLinkElements(elements) {
407
- var existedLinkIds = resourceConfig.getAllEdgeResourceIds();
407
+ var dm = topo.getDataModel();
408
408
  var newLinkElements = elements.filter(function (element) {
409
- return (element.type === "link" || element.type === "linkGroup") && existedLinkIds.indexOf(element.id) === -1;
409
+ return (element.type === "link" || element.type === "linkGroup") && !isExistedElement(topo.getHtTopo(), dm, element);
410
410
  });
411
411
  return newLinkElements;
412
412
  }
@@ -363,7 +363,7 @@ export default function (topoApp) {
363
363
 
364
364
  return _context4.abrupt("return", {
365
365
  topoData: topoData,
366
- elements: topoDataTrans,
366
+ elements: JSON.parse(JSON.stringify(topoDataTrans)),
367
367
  topoDataTrans: topoDataTrans
368
368
  });
369
369
 
@@ -10,7 +10,7 @@ var CommonOptions = [{
10
10
  label: '无'
11
11
  }, {
12
12
  value: '1',
13
- label: '总流速、带宽利用率',
13
+ label: '总速率、带宽利用率',
14
14
  options: {
15
15
  data: ['metric:interface_totalbps', 'metric:bandwidth_utilization']
16
16
  }
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  import { transformTopoElements } from "@riil-frontend/component-topology-graph/es/utils";
7
7
  import rlog from "@riil-frontend/component-topology-utils/es/rlog";
8
- import { getGroups } from "./htElementUtils";
8
+ import { getGroups, isExistedElement } from "./htElementUtils";
9
9
  import { findGroupChildren } from "./topoData";
10
10
  export function isCluster(node) {
11
11
  return !!node.cluster;
@@ -108,26 +108,27 @@ export function upgradeV103GraphClusterNode(topo, topoData) {
108
108
  // 查找图上未显示的集群、集群成员、关联的链路
109
109
  var topoDataTrans = transformTopoElements(topoData);
110
110
  var dm = topo.getDataModel();
111
- var list = topoDataTrans.filter(function (data) {
112
- return !dm.getDataByTag(data.id);
111
+ var unExistedList = topoDataTrans.filter(function (data) {
112
+ return !isExistedElement(topo.getHtTopo(), dm, data);
113
113
  });
114
114
 
115
- if (!list.length) {
115
+ if (!unExistedList.length) {
116
116
  return;
117
117
  }
118
118
 
119
- var groups = list.filter(function (item) {
119
+ rlog.error('集群1.0.2升级', unExistedList);
120
+ var groups = unExistedList.filter(function (item) {
120
121
  return item.type === 'group';
121
122
  });
122
123
  var createElementsData = {
123
124
  groups: groups,
124
- nodes: list.filter(function (item) {
125
+ nodes: unExistedList.filter(function (item) {
125
126
  return item.type === 'node';
126
127
  }),
127
- links: list.filter(function (item) {
128
+ links: unExistedList.filter(function (item) {
128
129
  return item.type === 'link';
129
130
  }),
130
- linkGroups: list.filter(function (item) {
131
+ linkGroups: unExistedList.filter(function (item) {
131
132
  return item.type === 'linkGroup';
132
133
  })
133
134
  };
@@ -301,15 +301,13 @@ export function setElementRuntimeStyle(element, name, value) {
301
301
  */
302
302
 
303
303
  export function isExistedElement(htTopo, dataModel, data) {
304
- var type = data.type,
305
- id = data.id;
306
-
307
- if (dataModel.getDataByTag(id)) {
304
+ if (dataModel.getDataByTag(data.id)) {
308
305
  return true;
309
- }
306
+ } // 识别区域
307
+
310
308
 
311
309
  var element = getElements(dataModel).find(function (item) {
312
- return item.a('tag') === data.tag;
310
+ return data.tag && item.a('tag') === data.tag;
313
311
  });
314
312
 
315
313
  if (element) {
@@ -317,5 +315,29 @@ export function isExistedElement(htTopo, dataModel, data) {
317
315
  } // 连线/连线组
318
316
 
319
317
 
318
+ var edges = getEdges(dataModel);
319
+
320
+ for (var i = 0; i < edges.length; i++) {
321
+ var edge = edges[i]; // 如果连线组折叠,判断子连线
322
+
323
+ var edgeData = htTopo.getEdgeData(edge);
324
+
325
+ if (edgeData) {
326
+ // eslint-disable-next-line no-underscore-dangle
327
+ var id = edgeData._attrObject.id;
328
+
329
+ if (id === data.id) {
330
+ return true;
331
+ }
332
+ } // 如果连线组展开,判断连线组
333
+ // eslint-disable-next-line no-underscore-dangle
334
+
335
+
336
+ if (edge.__edgeGroup && edge.__edgeGroup._tag === data.id) {
337
+ return true;
338
+ }
339
+ }
340
+
341
+ console.error(111, data);
320
342
  return false;
321
343
  }
@@ -18,7 +18,7 @@ var _BasicConfig = _interopRequireDefault(require("./ResourceDisplay/BasicConfig
18
18
  // 默认中可配置内容包括总速率、带宽利用率、发送速率、发送带宽利用率、接收速率、接收带宽利用率
19
19
  var CommonOptions = [{
20
20
  value: 'metric:interface_totalbps',
21
- label: '总流速'
21
+ label: '总速率'
22
22
  }, {
23
23
  value: 'metric:bandwidth_utilization',
24
24
  label: '带宽利用率'
@@ -22,7 +22,7 @@ var CommonOptions = [{
22
22
  label: '目的端口'
23
23
  }, {
24
24
  value: 'metric:interface_totalbps',
25
- label: '总流速'
25
+ label: '总速率'
26
26
  }, {
27
27
  value: 'metric:bandwidth_utilization',
28
28
  label: '带宽利用率'
@@ -163,8 +163,8 @@ var Topology = function Topology(props) {
163
163
  var handleGraphDataLoaded = (0, _react.useCallback)(function () {
164
164
  _rlog["default"].info("TopoView.handleGraphDataLoaded", topoData, topo.getDataModel().getDatas().toArray());
165
165
 
166
- (0, _graphLinkUtil.fixLink)(topo);
167
166
  (0, _clusterUtil.upgradeV103GraphClusterNode)(topo, topoData);
167
+ (0, _graphLinkUtil.fixLink)(topo);
168
168
  (0, _clusterUtil.handleClusterNoPermission)(topo);
169
169
  (0, _edgeUtil.updateEdgeExpanded)(topo);
170
170
  topoDispatchers.update({
@@ -178,8 +178,8 @@ var Topology = function Topology(props) {
178
178
  var handleGraphLoaded = (0, _react.useCallback)(function () {
179
179
  _rlog["default"].info("TopoView.handleGraphLoaded", topoData, topo.getDataModel().getDatas().toArray());
180
180
 
181
- (0, _graphLinkUtil.fixLink)(topo);
182
181
  (0, _clusterUtil.upgradeV103GraphClusterNode)(topo, topoData);
182
+ (0, _graphLinkUtil.fixLink)(topo);
183
183
  (0, _clusterUtil.handleClusterNoPermission)(topo);
184
184
  (0, _edgeUtil.updateEdgeExpanded)(topo);
185
185
  topoDispatchers.update({
@@ -51,6 +51,7 @@ var Alarm = /*#__PURE__*/function () {
51
51
  var _open = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
52
52
  var _this = this;
53
53
 
54
+ var nodeCount;
54
55
  return _regenerator["default"].wrap(function _callee$(_context) {
55
56
  while (1) {
56
57
  switch (_context.prev = _context.next) {
@@ -63,23 +64,17 @@ var Alarm = /*#__PURE__*/function () {
63
64
  return _context.abrupt("return");
64
65
 
65
66
  case 2:
66
- this.confirmLargeResourceCount(function () {
67
- // 获得拓扑id
68
- var id = _this.topo.id;
69
-
70
- if (!id) {
71
- return;
72
- }
73
-
74
- _rlog["default"].info("Alarm.open 打开告警通道", id);
75
-
76
- _this.openTopoAlarm(id); // this.hmGetTopoAlarm(id);
77
-
78
-
79
- _this.hmGetTopoAlarmByDoc(id);
80
- });
67
+ nodeCount = this.topo.dataModel.getNodes().length;
68
+
69
+ if (nodeCount < 1500 || this.topo.isEditMode()) {
70
+ this.doOpen();
71
+ } else {
72
+ this.confirmOpenWhenLargeResource(function () {
73
+ _this.doOpen();
74
+ });
75
+ }
81
76
 
82
- case 3:
77
+ case 4:
83
78
  case "end":
84
79
  return _context.stop();
85
80
  }
@@ -92,7 +87,22 @@ var Alarm = /*#__PURE__*/function () {
92
87
  }
93
88
 
94
89
  return open;
95
- }()
90
+ }();
91
+
92
+ _proto.doOpen = function doOpen() {
93
+ // 获得拓扑id
94
+ var id = this.topo.id;
95
+
96
+ if (!id) {
97
+ return;
98
+ }
99
+
100
+ _rlog["default"].info("Alarm.open 打开告警通道", id);
101
+
102
+ this.openTopoAlarm(id); // this.hmGetTopoAlarm(id);
103
+
104
+ this.hmGetTopoAlarmByDoc(id);
105
+ }
96
106
  /**
97
107
  * 关闭告警。
98
108
  *
@@ -101,7 +111,14 @@ var Alarm = /*#__PURE__*/function () {
101
111
  ;
102
112
 
103
113
  _proto.close = function close() {
104
- // 获得拓扑id
114
+ this.updateState({
115
+ alarmPanelIsOpen: false,
116
+ alarmData: [],
117
+ alarmList: [],
118
+ risks: [],
119
+ alarmRecord: []
120
+ }); // 获得拓扑id
121
+
105
122
  var currentTopoId = this.currentTopoId;
106
123
 
107
124
  if (!currentTopoId) {
@@ -112,31 +129,22 @@ var Alarm = /*#__PURE__*/function () {
112
129
  // 关闭告警推送通道
113
130
 
114
131
 
115
- this.updateState({
116
- alarmData: [],
117
- alarmPanelIsOpen: false
118
- });
119
132
  this.closeTopoAlarm(currentTopoId);
120
133
  } // 资源数量多时确认是否开启
134
+ // eslint-disable-next-line class-methods-use-this
121
135
  ;
122
136
 
123
- _proto.confirmLargeResourceCount = function confirmLargeResourceCount(cb) {
124
- var nodeCount = this.topo.dataModel.getNodes().length;
125
-
126
- if (nodeCount < 1500 || this.topo.isEditMode()) {
127
- cb();
128
- } else {
129
- _dialog["default"].confirm({
130
- title: "提示",
131
- messageProps: {
132
- type: "warning"
133
- },
134
- content: "该拓扑图上节点较多,继续查询告警可能影响系统整体性能,是否暂不显示告警?",
135
- onCancel: function onCancel() {
136
- cb();
137
- }
138
- });
139
- }
137
+ _proto.confirmOpenWhenLargeResource = function confirmOpenWhenLargeResource(cb) {
138
+ _dialog["default"].confirm({
139
+ title: "提示",
140
+ messageProps: {
141
+ type: "warning"
142
+ },
143
+ content: "该拓扑图上节点较多,继续查询告警可能影响系统整体性能,是否暂不显示告警?",
144
+ onCancel: function onCancel() {
145
+ cb();
146
+ }
147
+ });
140
148
  }
141
149
  /**
142
150
  * 查询当前拓扑图有权限资源的告警列表
@@ -5,15 +5,15 @@ exports["default"] = void 0;
5
5
 
6
6
  var _htElementUtils = require("../../utils/htElementUtils");
7
7
 
8
- var TopoDataModel = /*#__PURE__*/function () {
9
- function TopoDataModel(topo) {
8
+ var GraphDataModel = /*#__PURE__*/function () {
9
+ function GraphDataModel(topo) {
10
10
  this.topo = topo;
11
11
  }
12
12
 
13
- var _proto = TopoDataModel.prototype;
13
+ var _proto = GraphDataModel.prototype;
14
14
 
15
15
  _proto.getGroups = function getGroups() {
16
- return (0, _htElementUtils.getGroupDatas)(this.topo.getDataModel());
16
+ return this.getGroups(this.topo.getDataModel());
17
17
  };
18
18
 
19
19
  _proto.getNodes = function getNodes() {
@@ -24,13 +24,7 @@ var TopoDataModel = /*#__PURE__*/function () {
24
24
  return (0, _htElementUtils.getEdges)(this.topo.getDataModel());
25
25
  };
26
26
 
27
- _proto.getLines = function getLines() {
28
- return this.getEdges().filter(function (item) {
29
- return !!item.id;
30
- });
31
- };
32
-
33
- return TopoDataModel;
27
+ return GraphDataModel;
34
28
  }();
35
29
 
36
- exports["default"] = TopoDataModel;
30
+ exports["default"] = GraphDataModel;
@@ -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 "4.0.11" === 'string' ? "4.0.11" : null;
53
+ var version = typeof "4.0.14" === 'string' ? "4.0.14" : null;
54
54
  console.info("\u62D3\u6251\u7248\u672C: " + version);
55
55
  /**
56
56
  * 拓扑显示和编辑
@@ -435,9 +435,9 @@ var useTopoEdit = function useTopoEdit(params) {
435
435
 
436
436
 
437
437
  function findUNExistedLinkElements(elements) {
438
- var existedLinkIds = resourceConfig.getAllEdgeResourceIds();
438
+ var dm = topo.getDataModel();
439
439
  var newLinkElements = elements.filter(function (element) {
440
- return (element.type === "link" || element.type === "linkGroup") && existedLinkIds.indexOf(element.id) === -1;
440
+ return (element.type === "link" || element.type === "linkGroup") && !(0, _htElementUtils.isExistedElement)(topo.getHtTopo(), dm, element);
441
441
  });
442
442
  return newLinkElements;
443
443
  }
@@ -392,7 +392,7 @@ function _default(topoApp) {
392
392
 
393
393
  return _context4.abrupt("return", {
394
394
  topoData: topoData,
395
- elements: topoDataTrans,
395
+ elements: JSON.parse(JSON.stringify(topoDataTrans)),
396
396
  topoDataTrans: topoDataTrans
397
397
  });
398
398
 
@@ -23,7 +23,7 @@ var CommonOptions = [{
23
23
  label: '无'
24
24
  }, {
25
25
  value: '1',
26
- label: '总流速、带宽利用率',
26
+ label: '总速率、带宽利用率',
27
27
  options: {
28
28
  data: ['metric:interface_totalbps', 'metric:bandwidth_utilization']
29
29
  }
@@ -137,26 +137,28 @@ function upgradeV103GraphClusterNode(topo, topoData) {
137
137
  // 查找图上未显示的集群、集群成员、关联的链路
138
138
  var topoDataTrans = (0, _utils.transformTopoElements)(topoData);
139
139
  var dm = topo.getDataModel();
140
- var list = topoDataTrans.filter(function (data) {
141
- return !dm.getDataByTag(data.id);
140
+ var unExistedList = topoDataTrans.filter(function (data) {
141
+ return !(0, _htElementUtils.isExistedElement)(topo.getHtTopo(), dm, data);
142
142
  });
143
143
 
144
- if (!list.length) {
144
+ if (!unExistedList.length) {
145
145
  return;
146
146
  }
147
147
 
148
- var groups = list.filter(function (item) {
148
+ _rlog["default"].error('集群1.0.2升级', unExistedList);
149
+
150
+ var groups = unExistedList.filter(function (item) {
149
151
  return item.type === 'group';
150
152
  });
151
153
  var createElementsData = {
152
154
  groups: groups,
153
- nodes: list.filter(function (item) {
155
+ nodes: unExistedList.filter(function (item) {
154
156
  return item.type === 'node';
155
157
  }),
156
- links: list.filter(function (item) {
158
+ links: unExistedList.filter(function (item) {
157
159
  return item.type === 'link';
158
160
  }),
159
- linkGroups: list.filter(function (item) {
161
+ linkGroups: unExistedList.filter(function (item) {
160
162
  return item.type === 'linkGroup';
161
163
  })
162
164
  };