@riil-frontend/component-topology 7.0.7 → 8.0.0-a.1

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 (42) hide show
  1. package/build/index.js +1 -1
  2. package/es/components/BatchAttrMetric/setting.js +0 -2
  3. package/es/core/common/icons/basicIcons.js +57 -0
  4. package/es/core/common/icons/icon.js +3 -9
  5. package/es/core/components/ResourceViewAttributeSetting/Setting.js +5 -11
  6. package/es/core/components/ResourceViewAttributeSetting/nodeCiTypeAttrUtil.js +121 -0
  7. package/es/core/components/TopoView/GraphViewPanel.js +1 -2
  8. package/es/core/components/TopoView/topoView.js +3 -1
  9. package/es/core/hooks/useTopoEdit.js +35 -127
  10. package/es/core/models/AttributeMetricDisplay.js +4 -4
  11. package/es/core/models/TopoApp.js +1 -1
  12. package/es/core/models/tagstips/ElementTagTipConfig.js +17 -9
  13. package/es/core/models/utils/linkUtils.js +30 -36
  14. package/es/core/store/models/topoBizMod.js +1 -11
  15. package/es/core/store/models/topoConfig.js +6 -7
  16. package/es/core/store/models/topoMod.js +74 -50
  17. package/es/networkTopo/getTopoData.js +72 -64
  18. package/es/networkTopo/models/TopoCenter.js +14 -94
  19. package/es/networkTopo/services/topo/basic.js +26 -8
  20. package/es/networkTopo/utils/resourcePermissionUtil.js +2 -2
  21. package/es/utils/topoData.js +4 -169
  22. package/lib/components/BatchAttrMetric/setting.js +0 -4
  23. package/lib/core/common/icons/basicIcons.js +62 -0
  24. package/lib/core/common/icons/icon.js +4 -10
  25. package/lib/core/components/ResourceViewAttributeSetting/Setting.js +6 -11
  26. package/lib/core/components/ResourceViewAttributeSetting/nodeCiTypeAttrUtil.js +127 -0
  27. package/lib/core/components/TopoView/GraphViewPanel.js +1 -2
  28. package/lib/core/components/TopoView/topoView.js +4 -1
  29. package/lib/core/hooks/useTopoEdit.js +35 -129
  30. package/lib/core/models/AttributeMetricDisplay.js +4 -4
  31. package/lib/core/models/TopoApp.js +1 -1
  32. package/lib/core/models/tagstips/ElementTagTipConfig.js +17 -9
  33. package/lib/core/models/utils/linkUtils.js +27 -33
  34. package/lib/core/store/models/topoBizMod.js +1 -11
  35. package/lib/core/store/models/topoConfig.js +5 -6
  36. package/lib/core/store/models/topoMod.js +71 -48
  37. package/lib/networkTopo/getTopoData.js +73 -65
  38. package/lib/networkTopo/models/TopoCenter.js +14 -94
  39. package/lib/networkTopo/services/topo/basic.js +26 -8
  40. package/lib/networkTopo/utils/resourcePermissionUtil.js +2 -2
  41. package/lib/utils/topoData.js +6 -172
  42. package/package.json +2 -2
@@ -1,9 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
- import topoService from "@riil-frontend/component-topology-common/es/services/topo";
5
- import keyBy from "lodash/keyBy";
6
- import _ from "lodash";
4
+ import topoService from '@riil-frontend/component-topology-common/es/services/topo';
5
+ import keyBy from 'lodash/keyBy';
6
+ import _ from 'lodash';
7
7
  import { queryCisByIds, queryModelAsset } from "../../services"; // 查询所有连线
8
8
 
9
9
  import { getEdges } from "../../../utils/htElementUtils"; // const interfaceTypeMap = {
@@ -68,7 +68,7 @@ export var getInterfaceObject = /*#__PURE__*/function () {
68
68
  };
69
69
  }();
70
70
  export function mergeLinksData(links, linkCis, nodes, interfaceCis, interfaceDoc) {
71
- var linkCiMap = keyBy(linkCis, "id");
71
+ var linkCiMap = keyBy(links, 'id');
72
72
  return links.map(function (link) {
73
73
  var _interfaceCis$find, _interfaceCis$find2;
74
74
 
@@ -77,22 +77,19 @@ export function mergeLinksData(links, linkCis, nodes, interfaceCis, interfaceDoc
77
77
  var attributes = _extends({}, linkCi === null || linkCi === void 0 ? void 0 : linkCi.attributes);
78
78
 
79
79
  var sourceNode = nodes.find(function (node) {
80
- return node.id === attributes["network_link.source_device_id"];
80
+ return node.id === attributes['network_link.source_device_id'];
81
81
  });
82
82
  var targetNode = nodes.find(function (node) {
83
- return node.id === attributes["network_link.destination_device_id"];
83
+ return node.id === attributes['network_link.destination_device_id'];
84
84
  }); // 翻译
85
85
 
86
86
  return _extends({}, link, {
87
- id: linkCi.id,
88
- ciType: linkCi === null || linkCi === void 0 ? void 0 : linkCi.typeCode,
89
- name: linkCi === null || linkCi === void 0 ? void 0 : linkCi.attributes.name,
90
87
  attributes: _extends({}, attributes, {
91
88
  // 源/目的设备
92
- "network_link.source_device_id_object": {
89
+ 'network_link.source_device_id_object': {
93
90
  displayName: sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.name
94
91
  },
95
- "network_link.destination_device_id_object": {
92
+ 'network_link.destination_device_id_object': {
96
93
  displayName: targetNode === null || targetNode === void 0 ? void 0 : targetNode.name
97
94
  },
98
95
  // 源/目的接口类型
@@ -102,12 +99,12 @@ export function mergeLinksData(links, linkCis, nodes, interfaceCis, interfaceDoc
102
99
  source_id_object: {
103
100
  displayName: (_interfaceCis$find = interfaceCis.find(function (node) {
104
101
  return node.id === attributes.source_id;
105
- })) === null || _interfaceCis$find === void 0 ? void 0 : _interfaceCis$find.attributes["display_name"]
102
+ })) === null || _interfaceCis$find === void 0 ? void 0 : _interfaceCis$find.attributes['display_name']
106
103
  },
107
104
  destination_id_object: {
108
105
  displayName: (_interfaceCis$find2 = interfaceCis.find(function (node) {
109
106
  return node.id === attributes.destination_id;
110
- })) === null || _interfaceCis$find2 === void 0 ? void 0 : _interfaceCis$find2.attributes["display_name"]
107
+ })) === null || _interfaceCis$find2 === void 0 ? void 0 : _interfaceCis$find2.attributes['display_name']
111
108
  }
112
109
  })
113
110
  });
@@ -132,36 +129,33 @@ function _getLinksDetail() {
132
129
  return _context2.abrupt("return", []);
133
130
 
134
131
  case 2:
135
- _context2.next = 4;
136
- return topoService.relation.batchQueryRelation(links.map(function (link) {
137
- return link.id;
138
- }));
139
-
140
- case 4:
141
- linkCis = _context2.sent;
132
+ // const linkCis = await topoService.relation.batchQueryRelation(
133
+ // links.map((link) => link.id)
134
+ // );
135
+ linkCis = links;
142
136
  interfaceIds = [];
143
137
  interfaceTypes = [];
144
- linkCis.map(function (item) {
138
+ linkCis.forEach(function (item) {
145
139
  interfaceIds.push(item.attributes.source_id);
146
140
  interfaceIds.push(item.attributes.destination_id);
147
141
  interfaceTypes.push(item.attributes.source_type);
148
142
  interfaceTypes.push(item.attributes.destination_type);
149
143
  });
150
- _context2.next = 10;
144
+ _context2.next = 8;
151
145
  return queryCisByIds(interfaceIds);
152
146
 
153
- case 10:
147
+ case 8:
154
148
  interfaceCis = _context2.sent;
155
- _context2.next = 13;
149
+ _context2.next = 11;
156
150
  return getInterfaceObject(interfaceTypes.filter(function (item) {
157
151
  return item !== 'ip';
158
152
  }));
159
153
 
160
- case 13:
154
+ case 11:
161
155
  interfaceDoc = _context2.sent;
162
156
  return _context2.abrupt("return", mergeLinksData(links, linkCis, nodes, interfaceCis, interfaceDoc));
163
157
 
164
- case 15:
158
+ case 13:
165
159
  case "end":
166
160
  return _context2.stop();
167
161
  }
@@ -188,10 +182,10 @@ export var compatibleWith = function compatibleWith(value) {
188
182
 
189
183
  export var plurals = {
190
184
  0: [],
191
- 1: ["phy"],
192
- 2: ["phy"],
193
- 3: ["agg"],
194
- 4: ["phy", "agg"]
185
+ 1: ['phy'],
186
+ 2: ['phy'],
187
+ 3: ['agg'],
188
+ 4: ['phy', 'agg']
195
189
  };
196
190
  export var showLinkByConfig = function showLinkByConfig(props) {
197
191
  var _plurals$compatibleWi;
@@ -206,25 +200,25 @@ export var showLinkByConfig = function showLinkByConfig(props) {
206
200
  var dm = gv.getDataModel();
207
201
  var edges = getEdges(dm); // console.log("edges", edges);
208
202
 
209
- var showPhy = types.indexOf("phy") >= 0;
210
- var showAgg = types.indexOf("agg") >= 0; // console.log("edges----types",showType, types,showPhy, showAgg);
203
+ var showPhy = types.indexOf('phy') >= 0;
204
+ var showAgg = types.indexOf('agg') >= 0; // console.log("edges----types",showType, types,showPhy, showAgg);
211
205
 
212
206
  if (Array.isArray(edges) && edges.length > 0) {
213
207
  edges.map(function (edge) {
214
208
  if (showType === 1 || showType === true) {
215
209
  // 单链路全部显示
216
210
  // console.log("单链路全部显示", edge);
217
- edge.s("2d.visible", true);
211
+ edge.s('2d.visible', true);
218
212
  } else {
219
213
  var _d$attributes, _d$attributes2;
220
214
 
221
215
  var d = topo.dataModel.getDataById(edge.getTag()); // 判断是否聚合链路
222
216
 
223
- if ((d === null || d === void 0 ? void 0 : (_d$attributes = d.attributes) === null || _d$attributes === void 0 ? void 0 : _d$attributes.destination_type) === "network.agg_interface" && (d === null || d === void 0 ? void 0 : (_d$attributes2 = d.attributes) === null || _d$attributes2 === void 0 ? void 0 : _d$attributes2.source_type) === "network.agg_interface") {
224
- edge.s("2d.visible", showAgg);
217
+ if ((d === null || d === void 0 ? void 0 : (_d$attributes = d.attributes) === null || _d$attributes === void 0 ? void 0 : _d$attributes.destination_type) === 'network.agg_interface' && (d === null || d === void 0 ? void 0 : (_d$attributes2 = d.attributes) === null || _d$attributes2 === void 0 ? void 0 : _d$attributes2.source_type) === 'network.agg_interface') {
218
+ edge.s('2d.visible', showAgg);
225
219
  } else {
226
220
  // console.log("edge", edge, d, showAgg);
227
- edge.s("2d.visible", showPhy);
221
+ edge.s('2d.visible', showPhy);
228
222
  }
229
223
  }
230
224
  });
@@ -11,7 +11,6 @@ export default function (engine) {
11
11
  metricDoc: {},
12
12
  attrDoc: {},
13
13
  allCiSet: {},
14
- ciSetDoc: {},
15
14
  pollingSwitch: false,
16
15
 
17
16
  /**
@@ -32,7 +31,6 @@ export default function (engine) {
32
31
  var _this = this;
33
32
 
34
33
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
35
- var ciDoc, newCiDoc;
36
34
  return _regeneratorRuntime.wrap(function _callee$(_context) {
37
35
  while (1) {
38
36
  switch (_context.prev = _context.next) {
@@ -41,17 +39,9 @@ export default function (engine) {
41
39
  resAndMetrics: conditions
42
40
  });
43
41
 
44
- ciDoc = conditions.ciDoc;
45
- newCiDoc = _extends({}, ciDoc); // rlog.debug('topoBizMod.combBatchCiInfo getBatchCiInfo', conditions);
46
-
47
- _this.update({
48
- ciSetDoc: newCiDoc,
49
- pollingSwitch: true
50
- });
51
-
52
42
  return _context.abrupt("return", {});
53
43
 
54
- case 5:
44
+ case 2:
55
45
  case "end":
56
46
  return _context.stop();
57
47
  }
@@ -13,7 +13,7 @@ import { removeFromArray } from "../../../utils/format";
13
13
  import { DEFAULT_GROUP } from "../../../utils/template";
14
14
  import { combTopoData, getCiTypes } from "../../../utils/topoData";
15
15
  import { saveTopo as _saveTopo, resToConditions, getLayoutId } from "../../../core/models/topoData";
16
- import { buildData as buildTopoData } from "../../../networkTopo/getTopoData";
16
+ import { addLinkData, buildData as buildTopoData } from "../../../networkTopo/getTopoData";
17
17
 
18
18
  var newGroupWithUUID = function newGroupWithUUID(group) {
19
19
  if (group === void 0) {
@@ -308,7 +308,7 @@ export default function (topoApp) {
308
308
  var _this4 = this;
309
309
 
310
310
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
311
- var topoId, resources, groups, exportLinkIdList, viewConditions, groupInfo, data, _yield$Promise$all, ciTypeMap, _combTopoData, topoData, resAndMetrics, topoDataTrans;
311
+ var topoId, resources, groups, exportLinkIdList, viewConditions, groupInfo, data, _yield$Promise$all, dataWithLinkDetail, _combTopoData, topoData, resAndMetrics, topoDataTrans;
312
312
 
313
313
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
314
314
  while (1) {
@@ -335,20 +335,19 @@ export default function (topoApp) {
335
335
  case 8:
336
336
  data = _context4.sent;
337
337
  _context4.next = 11;
338
- return Promise.all([topoApp.ciTyeCache.getCiTypeMap(getCiTypes(data)), dispatch.customIcon.loadCustomIcons()]);
338
+ return Promise.all([addLinkData(data), topoApp.ciTyeCache.getCiTypeMap(getCiTypes(data)), dispatch.customIcon.loadCustomIcons()]);
339
339
 
340
340
  case 11:
341
341
  _yield$Promise$all = _context4.sent;
342
- ciTypeMap = _yield$Promise$all[0];
342
+ dataWithLinkDetail = _yield$Promise$all[0];
343
343
  _combTopoData = combTopoData({
344
344
  engine: topoApp,
345
345
  data: data,
346
346
  linkTo: null,
347
- globalConfig: state.topoMod.globalConfig,
348
- ciTypeMap: ciTypeMap
347
+ globalConfig: state.topoMod.globalConfig
349
348
  }), topoData = _combTopoData.topoData, resAndMetrics = _combTopoData.resAndMetrics;
350
349
  dispatch.topoMod.update({
351
- data: data
350
+ data: dataWithLinkDetail
352
351
  });
353
352
  topoDataTrans = transformTopoElements(topoData);
354
353
 
@@ -1,18 +1,19 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
- import moment from "moment";
5
- import topoService from "@riil-frontend/component-topology-common/es/services/topo";
6
- import rlog from "@riil-frontend/component-topology-utils/es/rlog";
4
+ import moment from 'moment';
5
+ import topoService from '@riil-frontend/component-topology-common/es/services/topo';
6
+ import rlog from '@riil-frontend/component-topology-utils/es/rlog';
7
7
  import { combTopoData, getCiTypes, parseTopoData } from "../../../utils/topoData";
8
8
  import { loopTreeByKey } from "../../../utils/tree";
9
- import topoPermissonUtil from "../../../utils/topoPermissionUtil"; // const clone = (data) => JSON.parse(JSON.stringify(data));
9
+ import topoPermissonUtil from "../../../utils/topoPermissionUtil";
10
+ import { addLinkData } from "../../../networkTopo/getTopoData"; // const clone = (data) => JSON.parse(JSON.stringify(data));
10
11
 
11
12
  export default function (topoApp) {
12
13
  return {
13
14
  state: {
14
15
  loading: true,
15
- viewState: "view",
16
+ viewState: 'view',
16
17
  // view, create, 2种模式
17
18
  graphLoaded: false,
18
19
  graphLoaded2: false,
@@ -21,7 +22,7 @@ export default function (topoApp) {
21
22
  initParams: {},
22
23
  topoLoadError: false,
23
24
  id: undefined,
24
- topoId: "",
25
+ topoId: '',
25
26
  type: undefined,
26
27
  // 拓扑类型
27
28
  currentTopo: undefined,
@@ -65,8 +66,8 @@ export default function (topoApp) {
65
66
 
66
67
  topoModState = rootState.topoMod; // 处理URL参数
67
68
 
68
- type = params.type || "view";
69
- id = params.id || topoModState.topoId || "";
69
+ type = params.type || 'view';
70
+ id = params.id || topoModState.topoId || '';
70
71
  rlog.debug("topoMod.init \u521D\u59CB\u5316(" + id + ")...", {
71
72
  params: params,
72
73
  rootState: rootState
@@ -99,7 +100,7 @@ export default function (topoApp) {
99
100
  loading: false
100
101
  });
101
102
 
102
- rlog.debug("topoMod.initTopoCenter 初始化完成", {
103
+ rlog.debug('topoMod.initTopoCenter 初始化完成', {
103
104
  rootState: rootState
104
105
  });
105
106
 
@@ -144,7 +145,7 @@ export default function (topoApp) {
144
145
  switch (_context2.prev = _context2.next) {
145
146
  case 0:
146
147
  id = playload.id, data = playload.data, linkTo = playload.linkTo;
147
- viewState = playload.mode || playload.viewState || "view";
148
+ viewState = playload.mode || playload.viewState || 'view';
148
149
  topoId = id || data.config.id;
149
150
 
150
151
  _this2.update({
@@ -164,7 +165,7 @@ export default function (topoApp) {
164
165
  });
165
166
 
166
167
  case 6:
167
- if (viewState === "edit") {
168
+ if (viewState === 'edit') {
168
169
  // TODO 待优化进入编辑模式方式
169
170
  _this2.enterEditMode();
170
171
  }
@@ -191,7 +192,7 @@ export default function (topoApp) {
191
192
  this.update({
192
193
  graphLoaded: false,
193
194
  graphLoaded2: false,
194
- topoId: "",
195
+ topoId: '',
195
196
  topoData: null,
196
197
  currentTopo: undefined,
197
198
  data: null,
@@ -201,7 +202,7 @@ export default function (topoApp) {
201
202
  },
202
203
  switchToViewMode: function switchToViewMode(playload, rootState) {
203
204
  this.update({
204
- viewState: "view"
205
+ viewState: 'view'
205
206
  });
206
207
  },
207
208
  enterEditMode: function enterEditMode(playload, rootState) {
@@ -225,7 +226,7 @@ export default function (topoApp) {
225
226
  if (!topoId) {
226
227
  // 查找第一个
227
228
  treeData = rootState.topoTreeMod.treeData;
228
- loopTreeByKey(treeData, "type", 1, function (item, index, arr) {
229
+ loopTreeByKey(treeData, 'type', 1, function (item, index, arr) {
229
230
  if (!topoId) {
230
231
  topoId = item.id;
231
232
  }
@@ -302,7 +303,7 @@ export default function (topoApp) {
302
303
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
303
304
  var _result$config;
304
305
 
305
- var startTime, topoId, data, linkToData, refresh, clear, linkTo, startState, permission, result, graphConfig, topoConfig, _yield$Promise$all, ciTypeMap, customIcons, xxx, extraConfig, _combTopoData, topoData, resAndMetrics, endTime;
306
+ var startTime, topoId, data, linkToData, refresh, clear, linkTo, startState, permission, result, graphConfig, topoConfig, _yield$Promise$all, ciTypeMap, customIcons, xxx, extraConfig, _combTopoData, topoData, resAndMetrics, _yield$Promise$all2, newData, endTime;
306
307
 
307
308
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
308
309
  while (1) {
@@ -335,25 +336,28 @@ export default function (topoApp) {
335
336
 
336
337
  _this5.update(startState);
337
338
 
339
+ dispatch.topoBizMod.update({
340
+ pollingSwitch: false
341
+ });
338
342
  topoApp.options.onLoadStart(); // TODO 待移到拓扑中心
339
343
 
340
- permission = "write";
344
+ permission = 'write';
341
345
 
342
346
  if (!topoApp.options.usePermission) {
343
- _context6.next = 18;
347
+ _context6.next = 19;
344
348
  break;
345
349
  }
346
350
 
347
- _context6.next = 13;
351
+ _context6.next = 14;
348
352
  return _this5.getTopoPermission({
349
353
  id: topoId
350
354
  });
351
355
 
352
- case 13:
356
+ case 14:
353
357
  permission = _context6.sent;
354
358
 
355
359
  if (topoPermissonUtil.isReadable(permission)) {
356
- _context6.next = 18;
360
+ _context6.next = 19;
357
361
  break;
358
362
  }
359
363
 
@@ -368,23 +372,23 @@ export default function (topoApp) {
368
372
  topoApp.options.onLoad();
369
373
  return _context6.abrupt("return");
370
374
 
371
- case 18:
375
+ case 19:
372
376
  if (!data) {
373
- _context6.next = 29;
377
+ _context6.next = 30;
374
378
  break;
375
379
  }
376
380
 
377
381
  graphConfig = {};
378
382
 
379
383
  if (!topoId) {
380
- _context6.next = 26;
384
+ _context6.next = 27;
381
385
  break;
382
386
  }
383
387
 
384
- _context6.next = 23;
388
+ _context6.next = 24;
385
389
  return topoService.getTopoData(topoId);
386
390
 
387
- case 23:
391
+ case 24:
388
392
  topoConfig = _context6.sent;
389
393
  if (!topoConfig) rlog.error("\u672A\u67E5\u8BE2\u5230\u62D3\u6251id " + topoId + " \u7684\u6570\u636E\uFF0C\u8BF7\u68C0\u67E5");
390
394
  graphConfig = {
@@ -393,21 +397,21 @@ export default function (topoApp) {
393
397
  serialize: topoConfig === null || topoConfig === void 0 ? void 0 : topoConfig.serialize
394
398
  };
395
399
 
396
- case 26:
400
+ case 27:
397
401
  result = _extends({}, data, graphConfig);
398
- _context6.next = 32;
402
+ _context6.next = 33;
399
403
  break;
400
404
 
401
- case 29:
402
- _context6.next = 31;
405
+ case 30:
406
+ _context6.next = 32;
403
407
  return topoApp.options.loadData(topoId, topoApp.serverApi);
404
408
 
405
- case 31:
409
+ case 32:
406
410
  result = _context6.sent;
407
411
 
408
- case 32:
412
+ case 33:
409
413
  if (result) {
410
- _context6.next = 36;
414
+ _context6.next = 37;
411
415
  break;
412
416
  }
413
417
 
@@ -422,19 +426,19 @@ export default function (topoApp) {
422
426
  topoApp.options.onLoad();
423
427
  return _context6.abrupt("return");
424
428
 
425
- case 36:
429
+ case 37:
426
430
  result = parseTopoData(result);
427
- rlog.debug("topoMod.initTopoData 查询数据完成", topoId, linkTo, result);
428
- _context6.next = 40;
429
- return Promise.all([topoApp.ciTyeCache.getCiTypeMap(getCiTypes(result)), dispatch.customIcon.loadCustomIcons(), topoApp.elementTagTipConfig.init(result) // 暂停新配置开发
431
+ rlog.debug('topoMod.initTopoData 查询数据完成', topoId, linkTo, result);
432
+ _context6.next = 41;
433
+ return Promise.all([// topoApp.ciTyeCache.getCiTypeMap(getCiTypes(result)),
434
+ dispatch.customIcon.loadCustomIcons() // topoApp.elementTagTipConfig.init(result), // 暂停新配置开发
430
435
  ]);
431
436
 
432
- case 40:
437
+ case 41:
433
438
  _yield$Promise$all = _context6.sent;
434
439
  ciTypeMap = _yield$Promise$all[0];
435
440
  customIcons = _yield$Promise$all[1];
436
441
  xxx = _yield$Promise$all[2];
437
- rlog.debug("topoMod.initTopoData Ci属性指标元数据", ciTypeMap);
438
442
  extraConfig = result.global.extraConfig;
439
443
  _context6.next = 48;
440
444
  return dispatch.displayConfig.setConfig(_extends({}, extraConfig, {
@@ -447,13 +451,11 @@ export default function (topoApp) {
447
451
  engine: topoApp,
448
452
  data: result,
449
453
  linkTo: linkTo,
450
- globalConfig: extraConfig,
451
- ciTypeMap: ciTypeMap,
452
- permission: permission
454
+ globalConfig: extraConfig
453
455
  }), topoData = _combTopoData.topoData, resAndMetrics = _combTopoData.resAndMetrics; // rlog.debug("topoMod.initTopoData combTopoData", { topoData, resAndMetrics, });
454
456
 
455
- _this5.update({
456
- loading: false,
457
+ _context6.next = 51;
458
+ return _this5.update({
457
459
  currentTopo: topoData.config,
458
460
  data: result,
459
461
  globalConfig: extraConfig,
@@ -462,16 +464,38 @@ export default function (topoApp) {
462
464
  resAndMetrics: resAndMetrics
463
465
  });
464
466
 
467
+ case 51:
465
468
  dispatch.topoBizMod.combBatchCiInfo(resAndMetrics);
466
469
  dispatch.background.init(extraConfig); // TODO 优化打开拓扑图显示告警速度:打开拓扑图立即请求告警
467
470
 
468
- topoApp.alarm.open();
471
+ topoApp.alarm.open(); // 加载标注悬浮框数据
472
+
473
+ _context6.next = 56;
474
+ return Promise.all([addLinkData(result), topoApp.ciTyeCache.getCiTypeMap(getCiTypes(result)), topoApp.elementTagTipConfig.init(result) // 暂停新配置开发
475
+ ]);
476
+
477
+ case 56:
478
+ _yield$Promise$all2 = _context6.sent;
479
+ newData = _yield$Promise$all2[0];
480
+ _context6.next = 60;
481
+ return _this5.update({
482
+ data: newData
483
+ });
484
+
485
+ case 60:
486
+ dispatch.topoBizMod.update({
487
+ pollingSwitch: true
488
+ });
469
489
  topoApp.onTopoDataLoaded(topoData);
470
490
  endTime = moment();
471
- rlog.info("topoMod.initTopoData 初始化拓扑图数据完成. 耗时: ", endTime.diff(startTime, "seconds", true));
491
+ rlog.info('topoMod.initTopoData 初始化拓扑图数据完成. 耗时: ', endTime.diff(startTime, 'seconds', true));
472
492
  topoApp.options.onLoad();
473
493
 
474
- case 57:
494
+ _this5.update({
495
+ loading: false
496
+ });
497
+
498
+ case 66:
475
499
  case "end":
476
500
  return _context6.stop();
477
501
  }
@@ -527,13 +551,13 @@ export default function (topoApp) {
527
551
  }
528
552
 
529
553
  if (conditions.id === state.topoMod.topoId) {
530
- if (conditions.type === "delete") {
554
+ if (conditions.type === 'delete') {
531
555
  _this7.update({
532
556
  topoId: conditions.defId
533
557
  });
534
558
  }
535
559
 
536
- if (conditions.type === "rename") {
560
+ if (conditions.type === 'rename') {
537
561
  td = _extends({}, state.topoMod.topoData, {
538
562
  config: _extends({}, state.topoMod.topoData.config, {
539
563
  name: conditions.name
@@ -577,10 +601,10 @@ export default function (topoApp) {
577
601
  switch (_context10.prev = _context10.next) {
578
602
  case 0:
579
603
  if (conditions === void 0) {
580
- conditions = "";
604
+ conditions = '';
581
605
  }
582
606
 
583
- rlog.debug("updateDelId", conditions);
607
+ rlog.debug('updateDelId', conditions);
584
608
 
585
609
  case 2:
586
610
  case "end":