@riil-frontend/component-topology 8.0.5 → 8.0.7

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.
@@ -1,7 +1,7 @@
1
- import _Message from "@alifd/next/es/message";
2
1
  import _extends from "@babel/runtime/helpers/extends";
3
2
  import _Button from "@alifd/next/es/button";
4
3
  import _Icon from "@alifd/next/es/icon";
4
+ import _Message from "@alifd/next/es/message";
5
5
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
6
6
 
7
7
  function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -16,7 +16,7 @@ import React, { useEffect, useMemo, useState } from 'react';
16
16
  import { rlog } from '@riil-frontend/component-topology-utils/lib/rlog'; // import { Link } from 'react-router-dom';
17
17
 
18
18
  import Link from "../../../../../../../components/Link";
19
- import { queryCisByIds } from "../../../../../../services";
19
+ import { queryCisByIds, commonQueryCiData } from "../../../../../../services";
20
20
  import alarmService from "../../../../../../services/alarm";
21
21
  import service from "../../../../../../services/overview";
22
22
  import BaseInfoBlock from "./BaseInfoBlock";
@@ -157,10 +157,39 @@ export default function ResourceOverview(props) {
157
157
  isAppTopo && resourceOverviewProps.onClose && resourceOverviewProps.onClose();
158
158
  }
159
159
 
160
- var jump = function jump(roomLink) {
161
- onClose();
162
- roomLink && window.open("" + window.location.origin + roomLink);
163
- }; // 基本信息可选项
160
+ var jump = /*#__PURE__*/function () {
161
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(roomLink, id) {
162
+ var power;
163
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
164
+ while (1) {
165
+ switch (_context.prev = _context.next) {
166
+ case 0:
167
+ onClose();
168
+ _context.next = 3;
169
+ return commonQueryCiData(id);
170
+
171
+ case 3:
172
+ power = _context.sent;
173
+ console.log(power);
174
+
175
+ if (power.data.length) {
176
+ window.open("" + window.location.origin + roomLink);
177
+ } else {
178
+ _Message.error('无访问权限,请联系管理员');
179
+ }
180
+
181
+ case 6:
182
+ case "end":
183
+ return _context.stop();
184
+ }
185
+ }
186
+ }, _callee);
187
+ }));
188
+
189
+ return function jump(_x, _x2) {
190
+ return _ref.apply(this, arguments);
191
+ };
192
+ }(); // 基本信息可选项
164
193
 
165
194
 
166
195
  var baseInfoCol = useMemo(function () {
@@ -220,27 +249,27 @@ export default function ResourceOverview(props) {
220
249
  }
221
250
 
222
251
  function _getDevice() {
223
- _getDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
252
+ _getDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
224
253
  var list;
225
- return _regeneratorRuntime.wrap(function _callee$(_context) {
254
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
226
255
  while (1) {
227
- switch (_context.prev = _context.next) {
256
+ switch (_context2.prev = _context2.next) {
228
257
  case 0:
229
- _context.next = 2;
258
+ _context2.next = 2;
230
259
  return service.getDeviceTypeList();
231
260
 
232
261
  case 2:
233
- list = _context.sent;
262
+ list = _context2.sent;
234
263
  setIsDevice(list.some(function (item) {
235
264
  return item.code === ciType;
236
265
  })); // console.log('getDevice', ciType, list);
237
266
 
238
267
  case 4:
239
268
  case "end":
240
- return _context.stop();
269
+ return _context2.stop();
241
270
  }
242
271
  }
243
- }, _callee);
272
+ }, _callee2);
244
273
  }));
245
274
  return _getDevice.apply(this, arguments);
246
275
  }
@@ -248,32 +277,32 @@ export default function ResourceOverview(props) {
248
277
  getDevice();
249
278
  }, [ciType]); // 获取地址信息:机房 机柜 起始U-结束U
250
279
 
251
- function getAddressFormat(_x) {
280
+ function getAddressFormat(_x3) {
252
281
  return _getAddressFormat.apply(this, arguments);
253
282
  } // 告警table列配置
254
283
 
255
284
 
256
285
  function _getAddressFormat() {
257
- _getAddressFormat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref) {
286
+ _getAddressFormat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref2) {
258
287
  var owned_computer_room, owned_cabinet, start_u_location, end_u_location, address, _res$find, _res$find$attributes, _res$find2, _res$find2$attributes, res, u;
259
288
 
260
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
289
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
261
290
  while (1) {
262
- switch (_context2.prev = _context2.next) {
291
+ switch (_context3.prev = _context3.next) {
263
292
  case 0:
264
- owned_computer_room = _ref.owned_computer_room, owned_cabinet = _ref.owned_cabinet, start_u_location = _ref.start_u_location, end_u_location = _ref.end_u_location;
293
+ owned_computer_room = _ref2.owned_computer_room, owned_cabinet = _ref2.owned_cabinet, start_u_location = _ref2.start_u_location, end_u_location = _ref2.end_u_location;
265
294
  address = '';
266
295
 
267
296
  if (!(owned_computer_room && owned_cabinet)) {
268
- _context2.next = 7;
297
+ _context3.next = 7;
269
298
  break;
270
299
  }
271
300
 
272
- _context2.next = 5;
301
+ _context3.next = 5;
273
302
  return queryCisByIds([owned_computer_room, owned_cabinet]);
274
303
 
275
304
  case 5:
276
- res = _context2.sent;
305
+ res = _context3.sent;
277
306
  address = (((_res$find = res.find(function (item) {
278
307
  return item.id === owned_computer_room;
279
308
  })) === null || _res$find === void 0 ? void 0 : (_res$find$attributes = _res$find.attributes) === null || _res$find$attributes === void 0 ? void 0 : _res$find$attributes.display_name) || '') + " " + (((_res$find2 = res.find(function (item) {
@@ -287,14 +316,14 @@ export default function ResourceOverview(props) {
287
316
  u = (start_u_location || '') + "-" + (end_u_location || '');
288
317
  }
289
318
 
290
- return _context2.abrupt("return", address || u ? "" + (address || '') + (u ? " " + u : '') : '');
319
+ return _context3.abrupt("return", address || u ? "" + (address || '') + (u ? " " + u : '') : '');
291
320
 
292
321
  case 10:
293
322
  case "end":
294
- return _context2.stop();
323
+ return _context3.stop();
295
324
  }
296
325
  }
297
- }, _callee2);
326
+ }, _callee3);
298
327
  }));
299
328
  return _getAddressFormat.apply(this, arguments);
300
329
  }
@@ -352,27 +381,27 @@ export default function ResourceOverview(props) {
352
381
  }
353
382
  }]; // 告警/风险 操作 (受理)
354
383
 
355
- function alarmRiskOperation(_x2, _x3) {
384
+ function alarmRiskOperation(_x4, _x5) {
356
385
  return _alarmRiskOperation.apply(this, arguments);
357
386
  }
358
387
 
359
388
  function _alarmRiskOperation() {
360
- _alarmRiskOperation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(type, params) {
389
+ _alarmRiskOperation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(type, params) {
361
390
  var res;
362
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
391
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
363
392
  while (1) {
364
- switch (_context3.prev = _context3.next) {
393
+ switch (_context4.prev = _context4.next) {
365
394
  case 0:
366
395
  if (!(type === 'alarm')) {
367
- _context3.next = 6;
396
+ _context4.next = 6;
368
397
  break;
369
398
  }
370
399
 
371
- _context3.next = 3;
400
+ _context4.next = 3;
372
401
  return service.handleAlarm(params);
373
402
 
374
403
  case 3:
375
- res = _context3.sent;
404
+ res = _context4.sent;
376
405
 
377
406
  _Message.success('受理成功');
378
407
 
@@ -389,10 +418,10 @@ export default function ResourceOverview(props) {
389
418
 
390
419
  case 6:
391
420
  case "end":
392
- return _context3.stop();
421
+ return _context4.stop();
393
422
  }
394
423
  }
395
- }, _callee3);
424
+ }, _callee4);
396
425
  }));
397
426
  return _alarmRiskOperation.apply(this, arguments);
398
427
  }
@@ -405,37 +434,37 @@ export default function ResourceOverview(props) {
405
434
  name: props.name ? props.name : props.resourceData.attributes.name
406
435
  }; // 基本信息设置改变
407
436
 
408
- function baseInfoColChange(_x4) {
437
+ function baseInfoColChange(_x6) {
409
438
  return _baseInfoColChange.apply(this, arguments);
410
439
  } // 获取属性信息
411
440
 
412
441
 
413
442
  function _baseInfoColChange() {
414
- _baseInfoColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(col) {
443
+ _baseInfoColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(col) {
415
444
  var _col;
416
445
 
417
- var infoData, attributeMap, _iterator, _step, item, value, contentTitle, link, address, owned_computer_room, owned_cabinet, node, _data, _ref2, _ref2$, _item, _attributeMap, object, _object, displayName, attr;
446
+ var infoData, attributeMap, _iterator, _step, item, value, contentTitle, _data, _ref3, _ref3$, _item, _attributeMap, object, _object, displayName, attr;
418
447
 
419
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
448
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
420
449
  while (1) {
421
- switch (_context4.prev = _context4.next) {
450
+ switch (_context6.prev = _context6.next) {
422
451
  case 0:
423
452
  if ((_col = col) !== null && _col !== void 0 && _col.length) {
424
- _context4.next = 3;
453
+ _context6.next = 3;
425
454
  break;
426
455
  }
427
456
 
428
457
  setBaseInfo([]);
429
- return _context4.abrupt("return");
458
+ return _context6.abrupt("return");
430
459
 
431
460
  case 3:
432
461
  settBaseInfoInitLoading(true);
433
462
  infoData = [];
434
- _context4.next = 7;
463
+ _context6.next = 7;
435
464
  return getAttribute(id);
436
465
 
437
466
  case 7:
438
- attributeMap = _context4.sent;
467
+ attributeMap = _context6.sent;
439
468
  // console.log('getAttribute', attributeMap);
440
469
  col = col.filter(function (item) {
441
470
  return !item.hidden;
@@ -444,73 +473,85 @@ export default function ResourceOverview(props) {
444
473
 
445
474
  case 10:
446
475
  if ((_step = _iterator()).done) {
447
- _context4.next = 47;
476
+ _context6.next = 26;
448
477
  break;
449
478
  }
450
479
 
451
480
  item = _step.value;
452
481
  value = formatMetric(attributeMap[item.dataIndex], ciTypeMeta.attributeMap[item.dataIndex]);
453
482
  contentTitle = value;
454
- _context4.t0 = item.dataIndex;
455
- _context4.next = _context4.t0 === 'display_name' ? 17 : _context4.t0 === 'ciName' ? 21 : _context4.t0 === 'res_address' ? 24 : _context4.t0 === 'imageName' ? 31 : 35;
456
- break;
457
-
458
- case 17:
459
- link = "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + ciTypeMeta.domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType; // 资源跳转链接
460
-
461
- value = /*#__PURE__*/React.createElement("span", {
462
- onClick: onClose
463
- }, /*#__PURE__*/React.createElement(Link, {
464
- className: styles.link,
465
- title: attributeMap.display_name || '',
466
- to: formatUrl(link)
467
- }, attributeMap.display_name || '-'));
468
- contentTitle = attributeMap.display_name || '-';
469
- return _context4.abrupt("break", 36);
470
-
471
- case 21:
472
- value = ciTypeMeta.displayName;
473
- contentTitle = value;
474
- return _context4.abrupt("break", 36);
475
-
476
- case 24:
477
- _context4.next = 26;
478
- return getAddressFormat(attributeMap);
479
-
480
- case 26:
481
- address = _context4.sent;
482
- owned_computer_room = attributeMap.owned_computer_room, owned_cabinet = attributeMap.owned_cabinet; // 跳转3D机房定位设备
483
-
484
- if (owned_computer_room && owned_cabinet) {
485
- (function () {
486
- // /visual/room/index_runtime.html?type=preview&room_id=00000000383e3381&rack_id=11&device_id=122
487
- var roomLink = "/visual/room/index_runtime.html?type=preview&room_id=" + owned_computer_room + "&rack_id=" + owned_cabinet + "&device_id=" + id;
488
- value = /*#__PURE__*/React.createElement("span", {
489
- onClick: function onClick() {
490
- jump(roomLink);
483
+ return _context6.delegateYield( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
484
+ var link, address, owned_computer_room, owned_cabinet, roomLink, node;
485
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
486
+ while (1) {
487
+ switch (_context5.prev = _context5.next) {
488
+ case 0:
489
+ _context5.t0 = item.dataIndex;
490
+ _context5.next = _context5.t0 === 'display_name' ? 3 : _context5.t0 === 'ciName' ? 7 : _context5.t0 === 'res_address' ? 10 : _context5.t0 === 'imageName' ? 17 : 21;
491
+ break;
492
+
493
+ case 3:
494
+ link = "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + ciTypeMeta.domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType; // 资源跳转链接
495
+
496
+ value = /*#__PURE__*/React.createElement("span", {
497
+ onClick: onClose
498
+ }, /*#__PURE__*/React.createElement(Link, {
499
+ className: styles.link,
500
+ title: attributeMap.display_name || '',
501
+ to: formatUrl(link)
502
+ }, attributeMap.display_name || '-'));
503
+ contentTitle = attributeMap.display_name || '-';
504
+ return _context5.abrupt("break", 22);
505
+
506
+ case 7:
507
+ value = ciTypeMeta.displayName;
508
+ contentTitle = value;
509
+ return _context5.abrupt("break", 22);
510
+
511
+ case 10:
512
+ _context5.next = 12;
513
+ return getAddressFormat(attributeMap);
514
+
515
+ case 12:
516
+ address = _context5.sent;
517
+ owned_computer_room = attributeMap.owned_computer_room, owned_cabinet = attributeMap.owned_cabinet; // 跳转3D机房定位设备
518
+
519
+ if (owned_computer_room && owned_cabinet) {
520
+ // /visual/room/index_runtime.html?type=preview&room_id=00000000383e3381&rack_id=11&device_id=122
521
+ roomLink = "/visual/room/index_runtime.html?type=preview&room_id=" + owned_computer_room + "&rack_id=" + owned_cabinet + "&device_id=" + id;
522
+ value = /*#__PURE__*/React.createElement("span", {
523
+ onClick: function onClick() {
524
+ jump(roomLink, owned_computer_room);
525
+ }
526
+ }, /*#__PURE__*/React.createElement("span", {
527
+ className: styles.link,
528
+ title: address
529
+ }, address));
530
+ } else {
531
+ value = address;
532
+ }
533
+
534
+ contentTitle = address;
535
+ return _context5.abrupt("break", 22);
536
+
537
+ case 17:
538
+ node = topo.getDataModel().getDataByTag(id);
539
+ value = (node === null || node === void 0 ? void 0 : node.a('customName')) || (node === null || node === void 0 ? void 0 : node.a('name')) || '-';
540
+ contentTitle = value;
541
+ return _context5.abrupt("break", 22);
542
+
543
+ case 21:
544
+ return _context5.abrupt("break", 22);
545
+
546
+ case 22:
547
+ case "end":
548
+ return _context5.stop();
491
549
  }
492
- }, /*#__PURE__*/React.createElement("span", {
493
- className: styles.link,
494
- title: address
495
- }, address));
496
- })();
497
- } else {
498
- value = address;
499
- }
550
+ }
551
+ }, _callee5);
552
+ })(), "t0", 15);
500
553
 
501
- contentTitle = address;
502
- return _context4.abrupt("break", 36);
503
-
504
- case 31:
505
- node = topo.getDataModel().getDataByTag(id);
506
- value = (node === null || node === void 0 ? void 0 : node.a('customName')) || (node === null || node === void 0 ? void 0 : node.a('name')) || '-';
507
- contentTitle = value;
508
- return _context4.abrupt("break", 36);
509
-
510
- case 35:
511
- return _context4.abrupt("break", 36);
512
-
513
- case 36:
554
+ case 15:
514
555
  // 拿翻译字段属性数据
515
556
  if (attributeMap[item.dataIndex] && attributeMap[item.dataIndex + ".name"]) {
516
557
  value = attributeMap[item.dataIndex + ".name"];
@@ -518,9 +559,9 @@ export default function ResourceOverview(props) {
518
559
  }
519
560
 
520
561
  _data = topo.attributeMetricDisplay.getData() || [];
521
- _ref2 = [].concat(_data.filter(function (m) {
562
+ _ref3 = [].concat(_data.filter(function (m) {
522
563
  return m.id === id;
523
- })), _ref2$ = _ref2[0], _item = _ref2$ === void 0 ? {} : _ref2$;
564
+ })), _ref3$ = _ref3[0], _item = _ref3$ === void 0 ? {} : _ref3$;
524
565
  _attributeMap = _item.attributeMap || {};
525
566
  object = _attributeMap[item.dataIndex + "_object"] || {};
526
567
 
@@ -546,68 +587,68 @@ export default function ResourceOverview(props) {
546
587
  contentTitle: contentTitle
547
588
  }));
548
589
 
549
- case 45:
550
- _context4.next = 10;
590
+ case 24:
591
+ _context6.next = 10;
551
592
  break;
552
593
 
553
- case 47:
594
+ case 26:
554
595
  settBaseInfoInitLoading(false);
555
596
  setBaseInfo(infoData);
556
597
 
557
- case 49:
598
+ case 28:
558
599
  case "end":
559
- return _context4.stop();
600
+ return _context6.stop();
560
601
  }
561
602
  }
562
- }, _callee4);
603
+ }, _callee6);
563
604
  }));
564
605
  return _baseInfoColChange.apply(this, arguments);
565
606
  }
566
607
 
567
- function getAttribute(_x5) {
608
+ function getAttribute(_x7) {
568
609
  return _getAttribute.apply(this, arguments);
569
610
  } // 指标设置改变
570
611
 
571
612
 
572
613
  function _getAttribute() {
573
- _getAttribute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(id) {
574
- var _yield$resourceOvervi, baseInfos, res, _ref3, attributes;
614
+ _getAttribute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(id) {
615
+ var _yield$resourceOvervi, baseInfos, res, _ref4, attributes;
575
616
 
576
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
617
+ return _regeneratorRuntime.wrap(function _callee7$(_context7) {
577
618
  while (1) {
578
- switch (_context5.prev = _context5.next) {
619
+ switch (_context7.prev = _context7.next) {
579
620
  case 0:
580
621
  if (id) {
581
- _context5.next = 2;
622
+ _context7.next = 2;
582
623
  break;
583
624
  }
584
625
 
585
- return _context5.abrupt("return");
626
+ return _context7.abrupt("return");
586
627
 
587
628
  case 2:
588
629
  if (!(resourceOverviewProps !== null && resourceOverviewProps !== void 0 && resourceOverviewProps.getData)) {
589
- _context5.next = 9;
630
+ _context7.next = 9;
590
631
  break;
591
632
  }
592
633
 
593
- _context5.next = 5;
634
+ _context7.next = 5;
594
635
  return resourceOverviewProps === null || resourceOverviewProps === void 0 ? void 0 : resourceOverviewProps.getData({
595
636
  id: id
596
637
  });
597
638
 
598
639
  case 5:
599
- _yield$resourceOvervi = _context5.sent;
640
+ _yield$resourceOvervi = _context7.sent;
600
641
  baseInfos = _yield$resourceOvervi.baseInfos;
601
642
 
602
643
  if (!baseInfos) {
603
- _context5.next = 9;
644
+ _context7.next = 9;
604
645
  break;
605
646
  }
606
647
 
607
- return _context5.abrupt("return", baseInfos);
648
+ return _context7.abrupt("return", baseInfos);
608
649
 
609
650
  case 9:
610
- _context5.next = 11;
651
+ _context7.next = 11;
611
652
  return service.commonQueryCiData({
612
653
  condition: "id('" + id + "')",
613
654
  refAttribute: true,
@@ -620,33 +661,33 @@ export default function ResourceOverview(props) {
620
661
  });
621
662
 
622
663
  case 11:
623
- res = _context5.sent;
624
- _ref3 = (res === null || res === void 0 ? void 0 : res.data[0]) || {}, attributes = _ref3.attributes;
625
- return _context5.abrupt("return", attributes || {});
664
+ res = _context7.sent;
665
+ _ref4 = (res === null || res === void 0 ? void 0 : res.data[0]) || {}, attributes = _ref4.attributes;
666
+ return _context7.abrupt("return", attributes || {});
626
667
 
627
668
  case 14:
628
669
  case "end":
629
- return _context5.stop();
670
+ return _context7.stop();
630
671
  }
631
672
  }
632
- }, _callee5);
673
+ }, _callee7);
633
674
  }));
634
675
  return _getAttribute.apply(this, arguments);
635
676
  }
636
677
 
637
- function metricColChange(_x6) {
678
+ function metricColChange(_x8) {
638
679
  return _metricColChange.apply(this, arguments);
639
680
  }
640
681
 
641
682
  function _metricColChange() {
642
- _metricColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(col) {
683
+ _metricColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(col) {
643
684
  var _col2, _col3;
644
685
 
645
- var codes, endTime, params, _ref4, times, metricList;
686
+ var codes, endTime, params, _ref5, times, metricList;
646
687
 
647
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
688
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
648
689
  while (1) {
649
- switch (_context6.prev = _context6.next) {
690
+ switch (_context8.prev = _context8.next) {
650
691
  case 0:
651
692
  // console.log('metricColChange col', col);
652
693
  col = (_col2 = col) === null || _col2 === void 0 ? void 0 : _col2.filter(function (item) {
@@ -654,13 +695,13 @@ export default function ResourceOverview(props) {
654
695
  });
655
696
 
656
697
  if ((_col3 = col) !== null && _col3 !== void 0 && _col3.length) {
657
- _context6.next = 4;
698
+ _context8.next = 4;
658
699
  break;
659
700
  }
660
701
 
661
702
  setMetric([]); // Message.error('指标未设置')
662
703
 
663
- return _context6.abrupt("return");
704
+ return _context8.abrupt("return");
664
705
 
665
706
  case 4:
666
707
  codes = col.map(function (item) {
@@ -676,7 +717,7 @@ export default function ResourceOverview(props) {
676
717
  };
677
718
 
678
719
  if (isAppTopo) {
679
- _ref4 = resourceOverviewProps.metricProps || {}, times = _ref4.times;
720
+ _ref5 = resourceOverviewProps.metricProps || {}, times = _ref5.times;
680
721
 
681
722
  if (times !== null && times !== void 0 && times.length) {
682
723
  params.startTime = times[0];
@@ -685,11 +726,11 @@ export default function ResourceOverview(props) {
685
726
  }
686
727
 
687
728
  setMetricInitLoading(true);
688
- _context6.next = 11;
729
+ _context8.next = 11;
689
730
  return service.getMetricList(params);
690
731
 
691
732
  case 11:
692
- metricList = _context6.sent;
733
+ metricList = _context8.sent;
693
734
  rlog.debug('metricColChange', metricList, monitorMetricModels);
694
735
  setMetric(col.map(function (item, key) {
695
736
  return {
@@ -717,10 +758,10 @@ export default function ResourceOverview(props) {
717
758
 
718
759
  case 16:
719
760
  case "end":
720
- return _context6.stop();
761
+ return _context8.stop();
721
762
  }
722
763
  }
723
- }, _callee6);
764
+ }, _callee8);
724
765
  }));
725
766
  return _metricColChange.apply(this, arguments);
726
767
  }
@@ -80,7 +80,8 @@ var HistoryManager = /*#__PURE__*/function () {
80
80
  var displayConfigProperties = [// 单多链路
81
81
  'expandAllEdges', // 节点标注
82
82
  'nodeLabelStyle', // 画布主题
83
- 'canvasTheme', 'linkTag', 'linkTip', 'nodeTag', 'nodeTip'];
83
+ 'canvasTheme', 'linkTag', 'linkTip', 'nodeTag', 'nodeTip', // @V1.4 网络拓扑特有,待迁移到网络拓扑
84
+ 'autoChangeEdgeWidth', 'autoHideEdgeTag'];
84
85
  var items = [{
85
86
  modelName: 'topoMod',
86
87
  property: 'data'
@@ -54,7 +54,7 @@ var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTag
54
54
  var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
55
55
 
56
56
  // eslint-disable-next-line no-undef
57
- var version = typeof "8.0.5" === 'string' ? "8.0.5" : null;
57
+ var version = typeof "8.0.7" === 'string' ? "8.0.7" : null;
58
58
  console.info("\u62D3\u6251\u7248\u672C: " + version);
59
59
  /**
60
60
  * 拓扑显示和编辑
@@ -566,44 +566,46 @@ var Topo = /*#__PURE__*/function () {
566
566
  while (1) {
567
567
  switch (_context12.prev = _context12.next) {
568
568
  case 0:
569
+ _rlog["default"].info('TopoApp.enterEditMode');
570
+
569
571
  if (!this.options.onSwitchToEditModeBegin) {
570
- _context12.next = 3;
572
+ _context12.next = 4;
571
573
  break;
572
574
  }
573
575
 
574
- _context12.next = 3;
576
+ _context12.next = 4;
575
577
  return this.options.onSwitchToEditModeBegin(this);
576
578
 
577
- case 3:
579
+ case 4:
578
580
  topoDispatchers = this.store.getModelDispatchers('topoMod');
579
- _context12.next = 6;
581
+ _context12.next = 7;
580
582
  return topoDispatchers.update({
581
583
  viewState: 'edit'
582
584
  });
583
585
 
584
- case 6:
585
- _context12.next = 8;
586
+ case 7:
587
+ _context12.next = 9;
586
588
  return this.view.switchToEditMode();
587
589
 
588
- case 8:
590
+ case 9:
589
591
  (0, _edgeUtil.updateEdgeExpanded)(this);
590
592
 
591
593
  if (!this.options.onSwitchToEditMode) {
592
- _context12.next = 12;
594
+ _context12.next = 13;
593
595
  break;
594
596
  }
595
597
 
596
- _context12.next = 12;
598
+ _context12.next = 13;
597
599
  return this.options.onSwitchToEditMode(this);
598
600
 
599
- case 12:
601
+ case 13:
600
602
  // 更新节点名称显示隐藏
601
603
  this.attributeMetricDisplay.updateNodesNameVisible(); // 加载自定义上传的图标
602
604
 
603
605
  iconManageDispatchers = this.store.getModelDispatchers('customIcon');
604
606
  iconManageDispatchers.loadEditorIcons();
605
607
 
606
- case 15:
608
+ case 16:
607
609
  case "end":
608
610
  return _context12.stop();
609
611
  }