@riil-frontend/component-topology 11.0.35 → 12.0.0-dev.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 (147) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.js +45 -29
  4. package/es/components/BatchAttrMetric/setting.js +1 -1
  5. package/es/components/MultiResourceDrawer/index.js +8 -6
  6. package/es/components/ResourceList/ResourceSelect.js +8 -7
  7. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
  8. package/es/components/SingleResourceDrawer/SelectDrawer.js +8 -6
  9. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
  10. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
  11. package/es/core/editor/components/BackgroundView/index.js +73 -54
  12. package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
  13. package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -5
  14. package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
  15. package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
  16. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
  17. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
  18. package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
  19. package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
  20. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
  21. package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
  22. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
  23. package/es/core/editor/hooks/useKeyboardShortcut.js +36 -32
  24. package/es/core/editor/utils/copyElementUtil.js +174 -0
  25. package/es/core/hooks/useCiAttributeChange.js +6 -3
  26. package/es/core/hooks/usePolling.js +21 -13
  27. package/es/core/hooks/useResourceConfig.js +37 -21
  28. package/es/core/hooks/useTopoEdit.js +202 -139
  29. package/es/core/models/Alarm.js +104 -38
  30. package/es/core/models/AttributeMetricDisplay.js +36 -14
  31. package/es/core/models/TopoApp.js +197 -75
  32. package/es/core/models/TopoGraphView.js +20 -10
  33. package/es/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
  34. package/es/core/models/cache/CiCache.js +12 -6
  35. package/es/core/models/cache/CiTypeCache.js +20 -10
  36. package/es/core/models/cache/DictCache.js +10 -6
  37. package/es/core/models/graph/Background.js +9 -6
  38. package/es/core/models/plugins/resourceWebControllUrl.js +21 -8
  39. package/es/core/models/tagstips/ElementTagTipConfig.js +20 -10
  40. package/es/core/models/topoData.js +7 -5
  41. package/es/core/models/utils/linkUtils.js +8 -5
  42. package/es/core/services/cmdb/metric.js +7 -5
  43. package/es/core/services/cmdb.js +9 -5
  44. package/es/core/services/index.js +23 -9
  45. package/es/core/services/topo/tagtip.js +7 -5
  46. package/es/core/store/models/customIcon.js +11 -6
  47. package/es/core/utils/imageUtil.js +7 -5
  48. package/es/core/utils/metricUtil.js +13 -1
  49. package/es/core/utils/saveSerialize.js +7 -5
  50. package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
  51. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +8 -5
  52. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
  53. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +47 -34
  54. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
  55. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +74 -34
  56. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
  57. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
  58. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -26
  59. package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +15 -7
  60. package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
  61. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
  62. package/es/networkTopo/components/Link/hook.js +21 -14
  63. package/es/networkTopo/components/Link/index.js +32 -18
  64. package/es/networkTopo/components/Link/setting.js +8 -6
  65. package/es/networkTopo/getTopoData.js +23 -10
  66. package/es/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
  67. package/es/networkTopo/models/TopoCenter.js +24 -10
  68. package/es/networkTopo/services/cmdb.js +333 -233
  69. package/es/networkTopo/services/mdc.js +24 -15
  70. package/es/networkTopo/services/metric.js +16 -11
  71. package/es/networkTopo/services/model.js +412 -283
  72. package/es/networkTopo/utils/exportData.js +7 -5
  73. package/es/utils/clipboardUtil.d.ts +7 -0
  74. package/es/utils/clipboardUtil.js +104 -0
  75. package/lib/components/BatchAttrMetric/setting.js +1 -1
  76. package/lib/components/MultiResourceDrawer/index.js +8 -6
  77. package/lib/components/ResourceList/ResourceSelect.js +8 -6
  78. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
  79. package/lib/components/SingleResourceDrawer/SelectDrawer.js +8 -6
  80. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
  81. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
  82. package/lib/core/editor/components/BackgroundView/index.js +74 -55
  83. package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
  84. package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -4
  85. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
  86. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
  87. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
  88. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
  89. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
  90. package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
  91. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
  92. package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
  93. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
  94. package/lib/core/editor/hooks/useKeyboardShortcut.js +37 -34
  95. package/lib/core/editor/utils/copyElementUtil.js +187 -0
  96. package/lib/core/hooks/useCiAttributeChange.js +6 -3
  97. package/lib/core/hooks/usePolling.js +21 -13
  98. package/lib/core/hooks/useResourceConfig.js +37 -21
  99. package/lib/core/hooks/useTopoEdit.js +202 -139
  100. package/lib/core/models/Alarm.js +104 -38
  101. package/lib/core/models/AttributeMetricDisplay.js +36 -14
  102. package/lib/core/models/TopoApp.js +197 -75
  103. package/lib/core/models/TopoGraphView.js +20 -10
  104. package/lib/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
  105. package/lib/core/models/cache/CiCache.js +12 -6
  106. package/lib/core/models/cache/CiTypeCache.js +20 -10
  107. package/lib/core/models/cache/DictCache.js +10 -6
  108. package/lib/core/models/graph/Background.js +9 -6
  109. package/lib/core/models/plugins/resourceWebControllUrl.js +21 -8
  110. package/lib/core/models/tagstips/ElementTagTipConfig.js +20 -10
  111. package/lib/core/models/topoData.js +7 -4
  112. package/lib/core/models/utils/linkUtils.js +8 -4
  113. package/lib/core/services/cmdb/metric.js +7 -4
  114. package/lib/core/services/cmdb.js +9 -4
  115. package/lib/core/services/index.js +21 -8
  116. package/lib/core/services/topo/tagtip.js +7 -4
  117. package/lib/core/store/models/customIcon.js +11 -6
  118. package/lib/core/utils/imageUtil.js +7 -4
  119. package/lib/core/utils/metricUtil.js +13 -1
  120. package/lib/core/utils/saveSerialize.js +7 -4
  121. package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
  122. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +9 -6
  123. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
  124. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +49 -36
  125. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
  126. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +73 -35
  127. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
  128. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
  129. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -25
  130. package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +14 -6
  131. package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
  132. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
  133. package/lib/networkTopo/components/Link/hook.js +23 -15
  134. package/lib/networkTopo/components/Link/index.js +32 -18
  135. package/lib/networkTopo/components/Link/setting.js +8 -6
  136. package/lib/networkTopo/getTopoData.js +23 -10
  137. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
  138. package/lib/networkTopo/models/TopoCenter.js +24 -10
  139. package/lib/networkTopo/services/cmdb.js +336 -235
  140. package/lib/networkTopo/services/mdc.js +24 -14
  141. package/lib/networkTopo/services/metric.js +16 -10
  142. package/lib/networkTopo/services/model.js +414 -284
  143. package/lib/networkTopo/utils/exportData.js +7 -4
  144. package/lib/utils/clipboardUtil.d.ts +7 -0
  145. package/lib/utils/clipboardUtil.js +113 -0
  146. package/lib/utils/htElementDataUtil.js +4 -2
  147. package/package.json +3 -2
@@ -56,15 +56,13 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
56
56
  var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
57
57
 
58
58
  // eslint-disable-next-line no-undef
59
- var version = typeof "11.0.35" === 'string' ? "11.0.35" : null;
59
+ var version = typeof "12.0.0-dev.2" === 'string' ? "12.0.0-dev.2" : null;
60
60
  console.info("\u62D3\u6251\u7248\u672C: " + version);
61
61
  /**
62
62
  * 拓扑显示和编辑
63
63
  */
64
64
 
65
65
  var Topo = /*#__PURE__*/function () {
66
- var _exit, _load, _clear, _updateElements, _addElements, _updateData, _open, _close, _refresh, _openViewMode, _onTopoDataLoaded, _enterEditMode, _exitEditMode, _triggerSaveEvent, _save, _exportImage, _switchToViewMode, _switchToEditMode;
67
-
68
66
  function Topo(options) {
69
67
  this.options = void 0;
70
68
  this.id = void 0;
@@ -127,8 +125,10 @@ var Topo = /*#__PURE__*/function () {
127
125
  */
128
126
  ;
129
127
 
130
- _proto.exit = function exit() {
131
- return (_exit = _exit || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
128
+ _proto.exit =
129
+ /*#__PURE__*/
130
+ function () {
131
+ var _exit = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
132
132
  var topoDispatchers;
133
133
  return _regenerator["default"].wrap(function _callee$(_context) {
134
134
  while (1) switch (_context.prev = _context.next) {
@@ -145,11 +145,17 @@ var Topo = /*#__PURE__*/function () {
145
145
  return _context.stop();
146
146
  }
147
147
  }, _callee, this);
148
- }))).apply(this, arguments);
149
- };
148
+ }));
149
+
150
+ function exit() {
151
+ return _exit.apply(this, arguments);
152
+ }
153
+
154
+ return exit;
155
+ }();
150
156
 
151
- _proto.load = function load(_x, _x2) {
152
- return (_load = _load || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(data, options) {
157
+ _proto.load = /*#__PURE__*/function () {
158
+ var _load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(data, options) {
153
159
  var _data$groups, groups, _data$nodes, nodes, links, lines, topoDispatchers;
154
160
 
155
161
  return _regenerator["default"].wrap(function _callee2$(_context2) {
@@ -176,11 +182,17 @@ var Topo = /*#__PURE__*/function () {
176
182
  return _context2.stop();
177
183
  }
178
184
  }, _callee2, this);
179
- }))).apply(this, arguments);
180
- };
185
+ }));
186
+
187
+ function load(_x, _x2) {
188
+ return _load.apply(this, arguments);
189
+ }
181
190
 
182
- _proto.clear = function clear() {
183
- return (_clear = _clear || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
191
+ return load;
192
+ }();
193
+
194
+ _proto.clear = /*#__PURE__*/function () {
195
+ var _clear = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
184
196
  return _regenerator["default"].wrap(function _callee3$(_context3) {
185
197
  while (1) switch (_context3.prev = _context3.next) {
186
198
  case 0:
@@ -188,8 +200,14 @@ var Topo = /*#__PURE__*/function () {
188
200
  return _context3.stop();
189
201
  }
190
202
  }, _callee3);
191
- }))).apply(this, arguments);
192
- };
203
+ }));
204
+
205
+ function clear() {
206
+ return _clear.apply(this, arguments);
207
+ }
208
+
209
+ return clear;
210
+ }();
193
211
 
194
212
  _proto.getId = function getId() {
195
213
  return this.id;
@@ -241,8 +259,10 @@ var Topo = /*#__PURE__*/function () {
241
259
  */
242
260
  ;
243
261
 
244
- _proto.updateElements = function updateElements(_x3) {
245
- return (_updateElements = _updateElements || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(data) {
262
+ _proto.updateElements =
263
+ /*#__PURE__*/
264
+ function () {
265
+ var _updateElements = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(data) {
246
266
  var _data$groups2, groups, _data$nodes2, nodes, links, lines;
247
267
 
248
268
  return _regenerator["default"].wrap(function _callee4$(_context4) {
@@ -270,8 +290,14 @@ var Topo = /*#__PURE__*/function () {
270
290
  return _context4.stop();
271
291
  }
272
292
  }, _callee4, this);
273
- }))).apply(this, arguments);
274
- }
293
+ }));
294
+
295
+ function updateElements(_x3) {
296
+ return _updateElements.apply(this, arguments);
297
+ }
298
+
299
+ return updateElements;
300
+ }()
275
301
  /**
276
302
  * 追加元素
277
303
  *
@@ -279,8 +305,10 @@ var Topo = /*#__PURE__*/function () {
279
305
  */
280
306
  ;
281
307
 
282
- _proto.addElements = function addElements(_x4) {
283
- return (_addElements = _addElements || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(elements) {
308
+ _proto.addElements =
309
+ /*#__PURE__*/
310
+ function () {
311
+ var _addElements = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(elements) {
284
312
  var data;
285
313
  return _regenerator["default"].wrap(function _callee5$(_context5) {
286
314
  while (1) switch (_context5.prev = _context5.next) {
@@ -297,8 +325,14 @@ var Topo = /*#__PURE__*/function () {
297
325
  return _context5.stop();
298
326
  }
299
327
  }, _callee5, this);
300
- }))).apply(this, arguments);
301
- }
328
+ }));
329
+
330
+ function addElements(_x4) {
331
+ return _addElements.apply(this, arguments);
332
+ }
333
+
334
+ return addElements;
335
+ }()
302
336
  /**
303
337
  * 全量更新数据
304
338
  *
@@ -306,8 +340,10 @@ var Topo = /*#__PURE__*/function () {
306
340
  */
307
341
  ;
308
342
 
309
- _proto.updateData = function updateData(_x5) {
310
- return (_updateData = _updateData || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(data) {
343
+ _proto.updateData =
344
+ /*#__PURE__*/
345
+ function () {
346
+ var _updateData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(data) {
311
347
  return _regenerator["default"].wrap(function _callee6$(_context6) {
312
348
  while (1) switch (_context6.prev = _context6.next) {
313
349
  case 0:
@@ -318,8 +354,14 @@ var Topo = /*#__PURE__*/function () {
318
354
  return _context6.stop();
319
355
  }
320
356
  }, _callee6, this);
321
- }))).apply(this, arguments);
322
- };
357
+ }));
358
+
359
+ function updateData(_x5) {
360
+ return _updateData.apply(this, arguments);
361
+ }
362
+
363
+ return updateData;
364
+ }();
323
365
 
324
366
  _proto.replaceNode = function replaceNode(id, newNode) {
325
367
  this.view.replaceNode(id, newNode); // TODO 更新store,触发属性、指标模型加载,更新指标
@@ -336,8 +378,8 @@ var Topo = /*#__PURE__*/function () {
336
378
  this.view.fitContent(anim, padding, notZoomIn);
337
379
  };
338
380
 
339
- _proto.open = function open(_x6, _x7) {
340
- return (_open = _open || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(id, mode) {
381
+ _proto.open = /*#__PURE__*/function () {
382
+ var _open = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(id, mode) {
341
383
  var lastId;
342
384
  return _regenerator["default"].wrap(function _callee7$(_context7) {
343
385
  while (1) switch (_context7.prev = _context7.next) {
@@ -358,11 +400,17 @@ var Topo = /*#__PURE__*/function () {
358
400
  return _context7.stop();
359
401
  }
360
402
  }, _callee7, this);
361
- }))).apply(this, arguments);
362
- };
403
+ }));
404
+
405
+ function open(_x6, _x7) {
406
+ return _open.apply(this, arguments);
407
+ }
363
408
 
364
- _proto.close = function close() {
365
- return (_close = _close || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
409
+ return open;
410
+ }();
411
+
412
+ _proto.close = /*#__PURE__*/function () {
413
+ var _close = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
366
414
  return _regenerator["default"].wrap(function _callee8$(_context8) {
367
415
  while (1) switch (_context8.prev = _context8.next) {
368
416
  case 0:
@@ -384,11 +432,17 @@ var Topo = /*#__PURE__*/function () {
384
432
  return _context8.stop();
385
433
  }
386
434
  }, _callee8, this);
387
- }))).apply(this, arguments);
388
- };
435
+ }));
436
+
437
+ function close() {
438
+ return _close.apply(this, arguments);
439
+ }
440
+
441
+ return close;
442
+ }();
389
443
 
390
- _proto.refresh = function refresh() {
391
- return (_refresh = _refresh || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
444
+ _proto.refresh = /*#__PURE__*/function () {
445
+ var _refresh = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
392
446
  return _regenerator["default"].wrap(function _callee9$(_context9) {
393
447
  while (1) switch (_context9.prev = _context9.next) {
394
448
  case 0:
@@ -396,8 +450,14 @@ var Topo = /*#__PURE__*/function () {
396
450
  return _context9.stop();
397
451
  }
398
452
  }, _callee9);
399
- }))).apply(this, arguments);
400
- };
453
+ }));
454
+
455
+ function refresh() {
456
+ return _refresh.apply(this, arguments);
457
+ }
458
+
459
+ return refresh;
460
+ }();
401
461
 
402
462
  _proto.getGraphView = function getGraphView() {
403
463
  return this.view.topoClient.getGraphView();
@@ -424,8 +484,8 @@ var Topo = /*#__PURE__*/function () {
424
484
  this.view.topoClient.searchElements(filterType, value);
425
485
  };
426
486
 
427
- _proto.openViewMode = function openViewMode(_x8) {
428
- return (_openViewMode = _openViewMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(id) {
487
+ _proto.openViewMode = /*#__PURE__*/function () {
488
+ var _openViewMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(id) {
429
489
  return _regenerator["default"].wrap(function _callee10$(_context10) {
430
490
  while (1) switch (_context10.prev = _context10.next) {
431
491
  case 0:
@@ -433,8 +493,14 @@ var Topo = /*#__PURE__*/function () {
433
493
  return _context10.stop();
434
494
  }
435
495
  }, _callee10);
436
- }))).apply(this, arguments);
437
- };
496
+ }));
497
+
498
+ function openViewMode(_x8) {
499
+ return _openViewMode.apply(this, arguments);
500
+ }
501
+
502
+ return openViewMode;
503
+ }();
438
504
 
439
505
  _proto.isViewMode = function isViewMode() {
440
506
  return !this.isEditMode();
@@ -448,8 +514,8 @@ var Topo = /*#__PURE__*/function () {
448
514
  return this.store.getModelState('topoMod').graphLoaded;
449
515
  };
450
516
 
451
- _proto.onTopoDataLoaded = function onTopoDataLoaded(_x9) {
452
- return (_onTopoDataLoaded = _onTopoDataLoaded || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(topoData) {
517
+ _proto.onTopoDataLoaded = /*#__PURE__*/function () {
518
+ var _onTopoDataLoaded = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(topoData) {
453
519
  return _regenerator["default"].wrap(function _callee11$(_context11) {
454
520
  while (1) switch (_context11.prev = _context11.next) {
455
521
  case 0:
@@ -460,15 +526,23 @@ var Topo = /*#__PURE__*/function () {
460
526
  return _context11.stop();
461
527
  }
462
528
  }, _callee11, this);
463
- }))).apply(this, arguments);
464
- }
529
+ }));
530
+
531
+ function onTopoDataLoaded(_x9) {
532
+ return _onTopoDataLoaded.apply(this, arguments);
533
+ }
534
+
535
+ return onTopoDataLoaded;
536
+ }()
465
537
  /**
466
538
  * 进入编辑模式
467
539
  */
468
540
  ;
469
541
 
470
- _proto.enterEditMode = function enterEditMode() {
471
- return (_enterEditMode = _enterEditMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12() {
542
+ _proto.enterEditMode =
543
+ /*#__PURE__*/
544
+ function () {
545
+ var _enterEditMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12() {
472
546
  var topoDispatchers, iconManageDispatchers;
473
547
  return _regenerator["default"].wrap(function _callee12$(_context12) {
474
548
  while (1) switch (_context12.prev = _context12.next) {
@@ -520,11 +594,17 @@ var Topo = /*#__PURE__*/function () {
520
594
  return _context12.stop();
521
595
  }
522
596
  }, _callee12, this);
523
- }))).apply(this, arguments);
524
- };
597
+ }));
525
598
 
526
- _proto.exitEditMode = function exitEditMode() {
527
- return (_exitEditMode = _exitEditMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13() {
599
+ function enterEditMode() {
600
+ return _enterEditMode.apply(this, arguments);
601
+ }
602
+
603
+ return enterEditMode;
604
+ }();
605
+
606
+ _proto.exitEditMode = /*#__PURE__*/function () {
607
+ var _exitEditMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13() {
528
608
  var editDispatchers;
529
609
  return _regenerator["default"].wrap(function _callee13$(_context13) {
530
610
  while (1) switch (_context13.prev = _context13.next) {
@@ -549,15 +629,23 @@ var Topo = /*#__PURE__*/function () {
549
629
  return _context13.stop();
550
630
  }
551
631
  }, _callee13, this);
552
- }))).apply(this, arguments);
553
- }
632
+ }));
633
+
634
+ function exitEditMode() {
635
+ return _exitEditMode.apply(this, arguments);
636
+ }
637
+
638
+ return exitEditMode;
639
+ }()
554
640
  /**
555
641
  * 后续待优化,移除该接口,由ht提供原子接口获取相关数据
556
642
  */
557
643
  ;
558
644
 
559
- _proto.triggerSaveEvent = function triggerSaveEvent() {
560
- return (_triggerSaveEvent = _triggerSaveEvent || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14() {
645
+ _proto.triggerSaveEvent =
646
+ /*#__PURE__*/
647
+ function () {
648
+ var _triggerSaveEvent = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14() {
561
649
  return _regenerator["default"].wrap(function _callee14$(_context14) {
562
650
  while (1) switch (_context14.prev = _context14.next) {
563
651
  case 0:
@@ -568,15 +656,23 @@ var Topo = /*#__PURE__*/function () {
568
656
  return _context14.stop();
569
657
  }
570
658
  }, _callee14, this);
571
- }))).apply(this, arguments);
572
- }
659
+ }));
660
+
661
+ function triggerSaveEvent() {
662
+ return _triggerSaveEvent.apply(this, arguments);
663
+ }
664
+
665
+ return triggerSaveEvent;
666
+ }()
573
667
  /**
574
668
  * FIXME 待优化,移除该接口,由ht提供原子接口获取相关数据
575
669
  */
576
670
  ;
577
671
 
578
- _proto.save = function save() {
579
- return (_save = _save || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15() {
672
+ _proto.save =
673
+ /*#__PURE__*/
674
+ function () {
675
+ var _save = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15() {
580
676
  return _regenerator["default"].wrap(function _callee15$(_context15) {
581
677
  while (1) switch (_context15.prev = _context15.next) {
582
678
  case 0:
@@ -587,8 +683,14 @@ var Topo = /*#__PURE__*/function () {
587
683
  return _context15.stop();
588
684
  }
589
685
  }, _callee15, this);
590
- }))).apply(this, arguments);
591
- }
686
+ }));
687
+
688
+ function save() {
689
+ return _save.apply(this, arguments);
690
+ }
691
+
692
+ return save;
693
+ }()
592
694
  /**
593
695
  * 导出为图片
594
696
  *
@@ -596,8 +698,10 @@ var Topo = /*#__PURE__*/function () {
596
698
  */
597
699
  ;
598
700
 
599
- _proto.exportImage = function exportImage(_x10) {
600
- return (_exportImage = _exportImage || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(name) {
701
+ _proto.exportImage =
702
+ /*#__PURE__*/
703
+ function () {
704
+ var _exportImage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(name) {
601
705
  var fileName;
602
706
  return _regenerator["default"].wrap(function _callee16$(_context16) {
603
707
  while (1) switch (_context16.prev = _context16.next) {
@@ -614,8 +718,14 @@ var Topo = /*#__PURE__*/function () {
614
718
  return _context16.stop();
615
719
  }
616
720
  }, _callee16, this);
617
- }))).apply(this, arguments);
618
- };
721
+ }));
722
+
723
+ function exportImage(_x10) {
724
+ return _exportImage.apply(this, arguments);
725
+ }
726
+
727
+ return exportImage;
728
+ }();
619
729
 
620
730
  _proto.loadAlarm = function loadAlarm(alarmList) {
621
731
  this.alarm.updateState({
@@ -623,8 +733,8 @@ var Topo = /*#__PURE__*/function () {
623
733
  });
624
734
  };
625
735
 
626
- _proto.switchToViewMode = function switchToViewMode() {
627
- return (_switchToViewMode = _switchToViewMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17() {
736
+ _proto.switchToViewMode = /*#__PURE__*/function () {
737
+ var _switchToViewMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17() {
628
738
  return _regenerator["default"].wrap(function _callee17$(_context17) {
629
739
  while (1) switch (_context17.prev = _context17.next) {
630
740
  case 0:
@@ -632,11 +742,17 @@ var Topo = /*#__PURE__*/function () {
632
742
  return _context17.stop();
633
743
  }
634
744
  }, _callee17);
635
- }))).apply(this, arguments);
636
- };
745
+ }));
746
+
747
+ function switchToViewMode() {
748
+ return _switchToViewMode.apply(this, arguments);
749
+ }
750
+
751
+ return switchToViewMode;
752
+ }();
637
753
 
638
- _proto.switchToEditMode = function switchToEditMode() {
639
- return (_switchToEditMode = _switchToEditMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18() {
754
+ _proto.switchToEditMode = /*#__PURE__*/function () {
755
+ var _switchToEditMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18() {
640
756
  return _regenerator["default"].wrap(function _callee18$(_context18) {
641
757
  while (1) switch (_context18.prev = _context18.next) {
642
758
  case 0:
@@ -644,8 +760,14 @@ var Topo = /*#__PURE__*/function () {
644
760
  return _context18.stop();
645
761
  }
646
762
  }, _callee18);
647
- }))).apply(this, arguments);
648
- };
763
+ }));
764
+
765
+ function switchToEditMode() {
766
+ return _switchToEditMode.apply(this, arguments);
767
+ }
768
+
769
+ return switchToEditMode;
770
+ }();
649
771
 
650
772
  _proto.initStore = function initStore() {
651
773
  var store = (0, _createStore["default"])(this, this.options.storeModels || {});
@@ -19,8 +19,6 @@ var _Background = _interopRequireDefault(require("./graph/Background"));
19
19
  * 包含元素操作相关,不同类型拓扑图结构不同,后续支持多种实现
20
20
  */
21
21
  var TopoGraphView = /*#__PURE__*/function () {
22
- var _switchToViewMode, _switchToEditMode;
23
-
24
22
  function TopoGraphView() {
25
23
  this.store = void 0;
26
24
 
@@ -62,8 +60,8 @@ var TopoGraphView = /*#__PURE__*/function () {
62
60
  this.topoClient.getGraphView().fitContent(anim, padding, notZoomIn);
63
61
  };
64
62
 
65
- _proto.switchToViewMode = function switchToViewMode() {
66
- return (_switchToViewMode = _switchToViewMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
63
+ _proto.switchToViewMode = /*#__PURE__*/function () {
64
+ var _switchToViewMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
67
65
  return _regenerator["default"].wrap(function _callee$(_context) {
68
66
  while (1) switch (_context.prev = _context.next) {
69
67
  case 0:
@@ -74,11 +72,17 @@ var TopoGraphView = /*#__PURE__*/function () {
74
72
  return _context.stop();
75
73
  }
76
74
  }, _callee, this);
77
- }))).apply(this, arguments);
78
- };
75
+ }));
76
+
77
+ function switchToViewMode() {
78
+ return _switchToViewMode.apply(this, arguments);
79
+ }
80
+
81
+ return switchToViewMode;
82
+ }();
79
83
 
80
- _proto.switchToEditMode = function switchToEditMode() {
81
- return (_switchToEditMode = _switchToEditMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
84
+ _proto.switchToEditMode = /*#__PURE__*/function () {
85
+ var _switchToEditMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
82
86
  return _regenerator["default"].wrap(function _callee2$(_context2) {
83
87
  while (1) switch (_context2.prev = _context2.next) {
84
88
  case 0:
@@ -89,8 +93,14 @@ var TopoGraphView = /*#__PURE__*/function () {
89
93
  return _context2.stop();
90
94
  }
91
95
  }, _callee2, this);
92
- }))).apply(this, arguments);
93
- };
96
+ }));
97
+
98
+ function switchToEditMode() {
99
+ return _switchToEditMode.apply(this, arguments);
100
+ }
101
+
102
+ return switchToEditMode;
103
+ }();
94
104
 
95
105
  _proto.loadAlarm = function loadAlarm(alarms) {
96
106
  this.topoClient.loadAlarm(alarms);
@@ -19,11 +19,6 @@ function commonTransform(options) {
19
19
  if (ciData[attrType + "Map"][fieldCode + "_object"]) {
20
20
  fieldValue = ciData[attrType + "Map"][fieldCode + "_object"].displayName;
21
21
  }
22
- } // 分级字典特殊处理
23
-
24
-
25
- if (fieldMeta.dict) {
26
- fieldValue = fieldMeta.dict[fieldValue];
27
22
  }
28
23
 
29
24
  return {
@@ -15,8 +15,6 @@ var _services = require("../../services");
15
15
  * Ci缓存
16
16
  */
17
17
  var CiCache = /*#__PURE__*/function () {
18
- var _load;
19
-
20
18
  function CiCache() {
21
19
  /**
22
20
  * @param {object<string, object>}
@@ -31,8 +29,10 @@ var CiCache = /*#__PURE__*/function () {
31
29
  * @param ids {string[]}
32
30
  * @returns {Promise<Object>}
33
31
  */
34
- _proto.load = function load(_x) {
35
- return (_load = _load || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids) {
32
+ _proto.load =
33
+ /*#__PURE__*/
34
+ function () {
35
+ var _load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids) {
36
36
  var _this = this;
37
37
 
38
38
  var unloadCiIds, cis, map;
@@ -69,8 +69,14 @@ var CiCache = /*#__PURE__*/function () {
69
69
  return _context.stop();
70
70
  }
71
71
  }, _callee, this);
72
- }))).apply(this, arguments);
73
- };
72
+ }));
73
+
74
+ function load(_x) {
75
+ return _load.apply(this, arguments);
76
+ }
77
+
78
+ return load;
79
+ }();
74
80
 
75
81
  _proto.getCi = function getCi(id) {
76
82
  return this.ciMap[id];
@@ -23,16 +23,14 @@ var _keyBy = _interopRequireDefault(require("lodash/keyBy"));
23
23
  * Ci类型属性、指标缓存
24
24
  */
25
25
  var CiTypeCache = /*#__PURE__*/function () {
26
- var _getCiTypeMap, _load;
27
-
28
26
  function CiTypeCache() {
29
27
  this.ciTypeMap = {};
30
28
  }
31
29
 
32
30
  var _proto = CiTypeCache.prototype;
33
31
 
34
- _proto.getCiTypeMap = function getCiTypeMap(_x) {
35
- return (_getCiTypeMap = _getCiTypeMap || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ciTypeIds) {
32
+ _proto.getCiTypeMap = /*#__PURE__*/function () {
33
+ var _getCiTypeMap = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ciTypeIds) {
36
34
  return _regenerator["default"].wrap(function _callee$(_context) {
37
35
  while (1) switch (_context.prev = _context.next) {
38
36
  case 0:
@@ -58,11 +56,17 @@ var CiTypeCache = /*#__PURE__*/function () {
58
56
  return _context.stop();
59
57
  }
60
58
  }, _callee, this, [[0, 5]]);
61
- }))).apply(this, arguments);
62
- };
59
+ }));
60
+
61
+ function getCiTypeMap(_x) {
62
+ return _getCiTypeMap.apply(this, arguments);
63
+ }
64
+
65
+ return getCiTypeMap;
66
+ }();
63
67
 
64
- _proto.load = function load(_x2) {
65
- return (_load = _load || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(ciTypeIds) {
68
+ _proto.load = /*#__PURE__*/function () {
69
+ var _load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(ciTypeIds) {
66
70
  var _this = this;
67
71
 
68
72
  var unLoadCiTypeIds, ciTypeMetas;
@@ -85,8 +89,14 @@ var CiTypeCache = /*#__PURE__*/function () {
85
89
  return _context2.stop();
86
90
  }
87
91
  }, _callee2, this);
88
- }))).apply(this, arguments);
89
- };
92
+ }));
93
+
94
+ function load(_x2) {
95
+ return _load.apply(this, arguments);
96
+ }
97
+
98
+ return load;
99
+ }();
90
100
 
91
101
  _proto.addCiTypes = function addCiTypes(ciTypeMetas) {
92
102
  var _this2 = this;