@riil-frontend/component-topology 9.0.0-a.4 → 9.0.0-a.6

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.
@@ -24,7 +24,7 @@ import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
24
24
  import SelectionModel from "./SelectionModel";
25
25
  import CiCache from "./cache/CiCache"; // eslint-disable-next-line no-undef
26
26
 
27
- var version = typeof "9.0.0-a.4" === 'string' ? "9.0.0-a.4" : null;
27
+ var version = typeof "9.0.0-a.6" === 'string' ? "9.0.0-a.6" : null;
28
28
  console.info("\u62D3\u6251\u7248\u672C: " + version);
29
29
  /**
30
30
  * 拓扑显示和编辑
@@ -285,26 +285,26 @@ export default function ResourceOverview(props) {
285
285
 
286
286
 
287
287
  function _getAddressFormat() {
288
- _getAddressFormat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref2) {
288
+ _getAddressFormat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref2) {
289
289
  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;
290
290
 
291
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
291
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
292
292
  while (1) {
293
- switch (_context4.prev = _context4.next) {
293
+ switch (_context3.prev = _context3.next) {
294
294
  case 0:
295
295
  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;
296
296
  address = '';
297
297
 
298
298
  if (!(owned_computer_room && owned_cabinet)) {
299
- _context4.next = 7;
299
+ _context3.next = 7;
300
300
  break;
301
301
  }
302
302
 
303
- _context4.next = 5;
303
+ _context3.next = 5;
304
304
  return queryCisByIds([owned_computer_room, owned_cabinet]);
305
305
 
306
306
  case 5:
307
- res = _context4.sent;
307
+ res = _context3.sent;
308
308
  address = (((_res$find = res.find(function (item) {
309
309
  return item.id === owned_computer_room;
310
310
  })) === 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) {
@@ -318,14 +318,14 @@ export default function ResourceOverview(props) {
318
318
  u = (start_u_location || '') + "-" + (end_u_location || '');
319
319
  }
320
320
 
321
- return _context4.abrupt("return", address || u ? "" + (address || '') + (u ? " " + u : '') : '');
321
+ return _context3.abrupt("return", address || u ? "" + (address || '') + (u ? " " + u : '') : '');
322
322
 
323
323
  case 10:
324
324
  case "end":
325
- return _context4.stop();
325
+ return _context3.stop();
326
326
  }
327
327
  }
328
- }, _callee4);
328
+ }, _callee3);
329
329
  }));
330
330
  return _getAddressFormat.apply(this, arguments);
331
331
  }
@@ -388,22 +388,22 @@ export default function ResourceOverview(props) {
388
388
  }
389
389
 
390
390
  function _alarmRiskOperation() {
391
- _alarmRiskOperation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(type, params) {
391
+ _alarmRiskOperation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(type, params) {
392
392
  var res;
393
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
393
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
394
394
  while (1) {
395
- switch (_context5.prev = _context5.next) {
395
+ switch (_context4.prev = _context4.next) {
396
396
  case 0:
397
397
  if (!(type === 'alarm')) {
398
- _context5.next = 6;
398
+ _context4.next = 6;
399
399
  break;
400
400
  }
401
401
 
402
- _context5.next = 3;
402
+ _context4.next = 3;
403
403
  return service.handleAlarm(params);
404
404
 
405
405
  case 3:
406
- res = _context5.sent;
406
+ res = _context4.sent;
407
407
 
408
408
  _Message.success('受理成功');
409
409
 
@@ -420,10 +420,10 @@ export default function ResourceOverview(props) {
420
420
 
421
421
  case 6:
422
422
  case "end":
423
- return _context5.stop();
423
+ return _context4.stop();
424
424
  }
425
425
  }
426
- }, _callee5);
426
+ }, _callee4);
427
427
  }));
428
428
  return _alarmRiskOperation.apply(this, arguments);
429
429
  }
@@ -442,31 +442,31 @@ export default function ResourceOverview(props) {
442
442
 
443
443
 
444
444
  function _baseInfoColChange() {
445
- _baseInfoColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(col) {
445
+ _baseInfoColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(col) {
446
446
  var _col;
447
447
 
448
- var infoData, attributeMap, _iterator, _step, item, value, contentTitle, _data, _ref4, _ref4$, _item, _attributeMap, object, _object, displayName, attr;
448
+ var infoData, attributeMap, _iterator, _step, item, value, contentTitle, _data, _ref3, _ref3$, _item, _attributeMap, object, _object, displayName, attr;
449
449
 
450
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
450
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
451
451
  while (1) {
452
- switch (_context7.prev = _context7.next) {
452
+ switch (_context6.prev = _context6.next) {
453
453
  case 0:
454
454
  if ((_col = col) !== null && _col !== void 0 && _col.length) {
455
- _context7.next = 3;
455
+ _context6.next = 3;
456
456
  break;
457
457
  }
458
458
 
459
459
  setBaseInfo([]);
460
- return _context7.abrupt("return");
460
+ return _context6.abrupt("return");
461
461
 
462
462
  case 3:
463
463
  settBaseInfoInitLoading(true);
464
464
  infoData = [];
465
- _context7.next = 7;
465
+ _context6.next = 7;
466
466
  return getAttribute(id);
467
467
 
468
468
  case 7:
469
- attributeMap = _context7.sent;
469
+ attributeMap = _context6.sent;
470
470
  // console.log('getAttribute', attributeMap);
471
471
  col = col.filter(function (item) {
472
472
  return !item.hidden;
@@ -475,21 +475,21 @@ export default function ResourceOverview(props) {
475
475
 
476
476
  case 10:
477
477
  if ((_step = _iterator()).done) {
478
- _context7.next = 26;
478
+ _context6.next = 26;
479
479
  break;
480
480
  }
481
481
 
482
482
  item = _step.value;
483
483
  value = formatMetric(attributeMap[item.dataIndex], ciTypeMeta.attributeMap[item.dataIndex]);
484
484
  contentTitle = value;
485
- return _context7.delegateYield( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
485
+ return _context6.delegateYield( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
486
486
  var link, address, owned_computer_room, owned_cabinet, roomLink, node;
487
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
487
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
488
488
  while (1) {
489
- switch (_context6.prev = _context6.next) {
489
+ switch (_context5.prev = _context5.next) {
490
490
  case 0:
491
- _context6.t0 = item.dataIndex;
492
- _context6.next = _context6.t0 === 'display_name' ? 3 : _context6.t0 === 'ciName' ? 6 : _context6.t0 === 'res_address' ? 9 : _context6.t0 === 'imageName' ? 16 : 20;
491
+ _context5.t0 = item.dataIndex;
492
+ _context5.next = _context5.t0 === 'display_name' ? 3 : _context5.t0 === 'ciName' ? 6 : _context5.t0 === 'res_address' ? 9 : _context5.t0 === 'imageName' ? 16 : 20;
493
493
  break;
494
494
 
495
495
  case 3:
@@ -510,19 +510,19 @@ export default function ResourceOverview(props) {
510
510
  }
511
511
 
512
512
  contentTitle = attributeMap.display_name || '-';
513
- return _context6.abrupt("break", 21);
513
+ return _context5.abrupt("break", 21);
514
514
 
515
515
  case 6:
516
516
  value = ciTypeMeta.displayName;
517
517
  contentTitle = value;
518
- return _context6.abrupt("break", 21);
518
+ return _context5.abrupt("break", 21);
519
519
 
520
520
  case 9:
521
- _context6.next = 11;
521
+ _context5.next = 11;
522
522
  return getAddressFormat(attributeMap);
523
523
 
524
524
  case 11:
525
- address = _context6.sent;
525
+ address = _context5.sent;
526
526
  owned_computer_room = attributeMap.owned_computer_room, owned_cabinet = attributeMap.owned_cabinet; // 跳转3D机房定位设备
527
527
 
528
528
  if (owned_computer_room && owned_cabinet) {
@@ -541,23 +541,23 @@ export default function ResourceOverview(props) {
541
541
  }
542
542
 
543
543
  contentTitle = address;
544
- return _context6.abrupt("break", 21);
544
+ return _context5.abrupt("break", 21);
545
545
 
546
546
  case 16:
547
547
  node = topo.getDataModel().getDataByTag(id);
548
548
  value = (node === null || node === void 0 ? void 0 : node.a('customName')) || (node === null || node === void 0 ? void 0 : node.a('name')) || '-';
549
549
  contentTitle = value;
550
- return _context6.abrupt("break", 21);
550
+ return _context5.abrupt("break", 21);
551
551
 
552
552
  case 20:
553
- return _context6.abrupt("break", 21);
553
+ return _context5.abrupt("break", 21);
554
554
 
555
555
  case 21:
556
556
  case "end":
557
- return _context6.stop();
557
+ return _context5.stop();
558
558
  }
559
559
  }
560
- }, _callee6);
560
+ }, _callee5);
561
561
  })(), "t0", 15);
562
562
 
563
563
  case 15:
@@ -568,9 +568,9 @@ export default function ResourceOverview(props) {
568
568
  }
569
569
 
570
570
  _data = topo.attributeMetricDisplay.getData() || [];
571
- _ref4 = [].concat(_data.filter(function (m) {
571
+ _ref3 = [].concat(_data.filter(function (m) {
572
572
  return m.id === id;
573
- })), _ref4$ = _ref4[0], _item = _ref4$ === void 0 ? {} : _ref4$;
573
+ })), _ref3$ = _ref3[0], _item = _ref3$ === void 0 ? {} : _ref3$;
574
574
  _attributeMap = _item.attributeMap || {};
575
575
  object = _attributeMap[item.dataIndex + "_object"] || {};
576
576
 
@@ -597,7 +597,7 @@ export default function ResourceOverview(props) {
597
597
  }));
598
598
 
599
599
  case 24:
600
- _context7.next = 10;
600
+ _context6.next = 10;
601
601
  break;
602
602
 
603
603
  case 26:
@@ -606,10 +606,10 @@ export default function ResourceOverview(props) {
606
606
 
607
607
  case 28:
608
608
  case "end":
609
- return _context7.stop();
609
+ return _context6.stop();
610
610
  }
611
611
  }
612
- }, _callee7);
612
+ }, _callee6);
613
613
  }));
614
614
  return _baseInfoColChange.apply(this, arguments);
615
615
  }
@@ -620,44 +620,44 @@ export default function ResourceOverview(props) {
620
620
 
621
621
 
622
622
  function _getAttribute() {
623
- _getAttribute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(id) {
624
- var _yield$resourceOvervi, baseInfos, res, _ref5, attributes;
623
+ _getAttribute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(id) {
624
+ var _yield$resourceOvervi, baseInfos, res, _ref4, attributes;
625
625
 
626
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
626
+ return _regeneratorRuntime.wrap(function _callee7$(_context7) {
627
627
  while (1) {
628
- switch (_context8.prev = _context8.next) {
628
+ switch (_context7.prev = _context7.next) {
629
629
  case 0:
630
630
  if (id) {
631
- _context8.next = 2;
631
+ _context7.next = 2;
632
632
  break;
633
633
  }
634
634
 
635
- return _context8.abrupt("return");
635
+ return _context7.abrupt("return");
636
636
 
637
637
  case 2:
638
638
  if (!(resourceOverviewProps !== null && resourceOverviewProps !== void 0 && resourceOverviewProps.getData)) {
639
- _context8.next = 9;
639
+ _context7.next = 9;
640
640
  break;
641
641
  }
642
642
 
643
- _context8.next = 5;
643
+ _context7.next = 5;
644
644
  return resourceOverviewProps === null || resourceOverviewProps === void 0 ? void 0 : resourceOverviewProps.getData({
645
645
  id: id
646
646
  });
647
647
 
648
648
  case 5:
649
- _yield$resourceOvervi = _context8.sent;
649
+ _yield$resourceOvervi = _context7.sent;
650
650
  baseInfos = _yield$resourceOvervi.baseInfos;
651
651
 
652
652
  if (!baseInfos) {
653
- _context8.next = 9;
653
+ _context7.next = 9;
654
654
  break;
655
655
  }
656
656
 
657
- return _context8.abrupt("return", baseInfos);
657
+ return _context7.abrupt("return", baseInfos);
658
658
 
659
659
  case 9:
660
- _context8.next = 11;
660
+ _context7.next = 11;
661
661
  return service.commonQueryCiData({
662
662
  condition: "id('" + id + "')",
663
663
  refAttribute: true,
@@ -670,16 +670,16 @@ export default function ResourceOverview(props) {
670
670
  });
671
671
 
672
672
  case 11:
673
- res = _context8.sent;
674
- _ref5 = (res === null || res === void 0 ? void 0 : res.data[0]) || {}, attributes = _ref5.attributes;
675
- return _context8.abrupt("return", attributes || {});
673
+ res = _context7.sent;
674
+ _ref4 = (res === null || res === void 0 ? void 0 : res.data[0]) || {}, attributes = _ref4.attributes;
675
+ return _context7.abrupt("return", attributes || {});
676
676
 
677
677
  case 14:
678
678
  case "end":
679
- return _context8.stop();
679
+ return _context7.stop();
680
680
  }
681
681
  }
682
- }, _callee8);
682
+ }, _callee7);
683
683
  }));
684
684
  return _getAttribute.apply(this, arguments);
685
685
  }
@@ -689,14 +689,14 @@ export default function ResourceOverview(props) {
689
689
  }
690
690
 
691
691
  function _metricColChange() {
692
- _metricColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(col) {
692
+ _metricColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(col) {
693
693
  var _col2, _col3;
694
694
 
695
- var codes, endTime, params, _ref6, times, metricList, newMetricList, metricLists;
695
+ var codes, endTime, params, _ref5, times, metricList, newMetricList, metricLists;
696
696
 
697
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
697
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
698
698
  while (1) {
699
- switch (_context9.prev = _context9.next) {
699
+ switch (_context8.prev = _context8.next) {
700
700
  case 0:
701
701
  // console.log('metricColChange col', col);
702
702
  col = (_col2 = col) === null || _col2 === void 0 ? void 0 : _col2.filter(function (item) {
@@ -704,13 +704,13 @@ export default function ResourceOverview(props) {
704
704
  });
705
705
 
706
706
  if ((_col3 = col) !== null && _col3 !== void 0 && _col3.length) {
707
- _context9.next = 4;
707
+ _context8.next = 4;
708
708
  break;
709
709
  }
710
710
 
711
711
  setMetric([]); // Message.error('指标未设置')
712
712
 
713
- return _context9.abrupt("return");
713
+ return _context8.abrupt("return");
714
714
 
715
715
  case 4:
716
716
  codes = col.map(function (item) {
@@ -726,7 +726,7 @@ export default function ResourceOverview(props) {
726
726
  };
727
727
 
728
728
  if (isAppTopo) {
729
- _ref6 = resourceOverviewProps.metricProps || {}, times = _ref6.times;
729
+ _ref5 = resourceOverviewProps.metricProps || {}, times = _ref5.times;
730
730
 
731
731
  if (times !== null && times !== void 0 && times.length) {
732
732
  params.startTime = times[0];
@@ -735,16 +735,20 @@ export default function ResourceOverview(props) {
735
735
  }
736
736
 
737
737
  setMetricInitLoading(true);
738
- _context9.next = 11;
738
+ _context8.next = 11;
739
739
  return service.getMetricList(params);
740
740
 
741
741
  case 11:
742
- metricList = _context9.sent;
743
- newMetricList = queryMetricList({
742
+ metricList = _context8.sent;
743
+ _context8.next = 14;
744
+ return queryMetricList({
744
745
  'name': data.attributes.display_name
745
746
  }, {
746
747
  'id': data.attributes.name
747
748
  });
749
+
750
+ case 14:
751
+ newMetricList = _context8.sent;
748
752
  metricLists = metricList.concat(getNewMetricList(newMetricList));
749
753
  rlog.debug('metricColChange', metricLists, monitorMetricModels);
750
754
  setMetric(col.map(function (item, key) {
@@ -771,105 +775,91 @@ export default function ResourceOverview(props) {
771
775
  }, 60000);
772
776
  }
773
777
 
774
- case 18:
778
+ case 20:
775
779
  case "end":
776
- return _context9.stop();
780
+ return _context8.stop();
777
781
  }
778
782
  }
779
- }, _callee9);
783
+ }, _callee8);
780
784
  }));
781
785
  return _metricColChange.apply(this, arguments);
782
786
  }
783
787
 
784
- var queryMetricList = /*#__PURE__*/function () {
785
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data, param) {
786
- var checkMenus, isOpen;
787
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
788
+ function queryMetricList(_x9, _x10) {
789
+ return _queryMetricList.apply(this, arguments);
790
+ }
791
+
792
+ function _queryMetricList() {
793
+ _queryMetricList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(data, param) {
794
+ var checkMenus, isOpen, list;
795
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
788
796
  while (1) {
789
- switch (_context3.prev = _context3.next) {
797
+ switch (_context9.prev = _context9.next) {
790
798
  case 0:
791
799
  if (!(ciType !== 'network_link')) {
792
- _context3.next = 2;
800
+ _context9.next = 2;
793
801
  break;
794
802
  }
795
803
 
796
- return _context3.abrupt("return", []);
804
+ return _context9.abrupt("return", []);
797
805
 
798
806
  case 2:
799
- _context3.next = 4;
807
+ _context9.next = 4;
800
808
  return checkMenu();
801
809
 
802
810
  case 4:
803
- checkMenus = _context3.sent;
811
+ checkMenus = _context9.sent;
804
812
 
805
813
  if (!(checkMenus[0].passed == 'PASS')) {
806
- _context3.next = 13;
814
+ _context9.next = 14;
807
815
  break;
808
816
  }
809
817
 
810
- _context3.next = 8;
818
+ _context9.next = 8;
811
819
  return isOpenFlow(data);
812
820
 
813
821
  case 8:
814
- isOpen = _context3.sent;
822
+ isOpen = _context9.sent;
815
823
 
816
824
  if (!isOpen) {
817
- _context3.next = 13;
825
+ _context9.next = 14;
818
826
  break;
819
827
  }
820
828
 
821
- _context3.next = 12;
829
+ _context9.next = 12;
822
830
  return queryLastestValue(param);
823
831
 
824
832
  case 12:
825
- return _context3.abrupt("return", _context3.sent);
826
-
827
- case 13:
828
- return _context3.abrupt("return", []);
833
+ list = _context9.sent;
834
+ return _context9.abrupt("return", list);
829
835
 
830
836
  case 14:
837
+ return _context9.abrupt("return", []);
838
+
839
+ case 15:
831
840
  case "end":
832
- return _context3.stop();
841
+ return _context9.stop();
833
842
  }
834
843
  }
835
- }, _callee3);
844
+ }, _callee9);
836
845
  }));
837
-
838
- return function queryMetricList(_x9, _x10) {
839
- return _ref3.apply(this, arguments);
840
- };
841
- }();
846
+ return _queryMetricList.apply(this, arguments);
847
+ }
842
848
 
843
849
  var getNewMetricList = function getNewMetricList(data) {
844
850
  return [{
845
851
  errorMsg: null,
846
- mainCiId: "downNetDelayRatio",
847
- metricCode: "downNetDelayRatio",
848
- metricValue: data.downNetDelayRatio,
849
- subCiId: '',
850
- subCiType: null,
851
- mainCiType: null
852
- }, {
853
- errorMsg: null,
854
- mainCiId: "downRetansRatio",
855
- metricCode: "downRetansRatio",
856
- metricValue: data.downRetansRatio,
857
- subCiId: '',
858
- subCiType: null,
859
- mainCiType: null
860
- }, {
861
- errorMsg: null,
862
- mainCiId: "upNetDelayRatio",
863
- metricCode: "upNetDelayRatio",
864
- metricValue: data.upNetDelayRatio,
852
+ mainCiId: "netDelayRatio",
853
+ metricCode: "netDelayRatio",
854
+ metricValue: data.upNetDelayRatio + ' ms' + '|' + data.downNetDelayRatio + ' ms',
865
855
  subCiId: '',
866
856
  subCiType: null,
867
857
  mainCiType: null
868
858
  }, {
869
859
  errorMsg: null,
870
- mainCiId: "upRetransRatio",
871
- metricCode: "upRetransRatio",
872
- metricValue: data.upRetransRatio,
860
+ mainCiId: "retansRatio",
861
+ metricCode: "retansRatio",
862
+ metricValue: data.upRetransRatio + ' %' + '|' + data.downRetansRatio + ' %',
873
863
  subCiId: '',
874
864
  subCiType: null,
875
865
  mainCiType: null
@@ -17,9 +17,9 @@ export default function LinkTopoCard(props) {
17
17
 
18
18
  var supportTemplates = (data === null || data === void 0 ? void 0 : (_data$attributes = data.attributes) === null || _data$attributes === void 0 ? void 0 : _data$attributes.support_templates) || ''; // 该资源监控模板
19
19
 
20
- var isCrucial = data === null || data === void 0 ? void 0 : data.attributes['network_link.is_crucial'];
20
+ var isCrucial = data === null || data === void 0 ? void 0 : data.attributes['network_link.is_crucial']; //是不是关键链路
21
21
 
22
- var _useState = useState(-1),
22
+ var _useState = useState(null),
23
23
  openFlow = _useState[0],
24
24
  setOpenFlow = _useState[1];
25
25
 
@@ -55,12 +55,12 @@ export default function LinkTopoCard(props) {
55
55
  //判断是不是有流量分析
56
56
  if (isOpen) {
57
57
  setOpenFlow({
58
- name: '跳转关键链路详情',
58
+ name: '查看流量构成',
59
59
  url: linkDetailsUrl
60
60
  });
61
61
  } else {
62
62
  setOpenFlow({
63
- name: '跳转流量分析配置',
63
+ name: '配置流量分析',
64
64
  url: analysisUrl
65
65
  });
66
66
  }
@@ -101,7 +101,9 @@ export default function LinkTopoCard(props) {
101
101
  })
102
102
  }, /*#__PURE__*/React.createElement(LinkTopo, {
103
103
  data: data,
104
- linkMetricCodes: metricCodes,
104
+ linkMetricCodes: openFlow && openFlow.name == '查看流量构成' ? metricCodes : metricCodes.filter(function (i) {
105
+ return i != 'netDelayRatio' && i != 'retansRatio';
106
+ }),
105
107
  openFlow: openFlow
106
108
  }));
107
109
  }
@@ -8,7 +8,7 @@ export default function useMetricPolling(_ref) {
8
8
  var linkCi = _ref.linkCi,
9
9
  linkMetricCodes = _ref.linkMetricCodes;
10
10
  var linkId = linkCi.id;
11
- var arr = ['downNetDelayRatio', 'downRetansRatio', 'upNetDelayRatio', 'upRetransRatio'];
11
+ var arr = ['netDelayRatio', 'retansRatio'];
12
12
  var oldCodes = [];
13
13
  var newCodes = [];
14
14
  linkMetricCodes.map(function (item) {
@@ -36,39 +36,21 @@ export default function useMetricPolling(_ref) {
36
36
  linkOther: []
37
37
  };
38
38
 
39
- if (newCodes.includes('downNetDelayRatio')) {
39
+ if (newCodes.includes('netDelayRatio')) {
40
40
  datas.linkOther.push({
41
- 'code': 'downNetDelayRatio',
41
+ 'code': 'netDelayRatio',
42
42
  'name': '下行RTT时延',
43
43
  'ts': result.time,
44
- 'value': result.downNetDelayRatio + ' ms'
44
+ 'value': result.upNetDelayRatio + ' ms' + '|' + result.downNetDelayRatio + ' ms'
45
45
  });
46
46
  }
47
47
 
48
- if (newCodes.includes('downRetansRatio')) {
48
+ if (newCodes.includes('retansRatio')) {
49
49
  datas.linkOther.push({
50
- 'code': 'downRetansRatio',
51
- 'name': '下行重传率',
50
+ 'code': 'retansRatio',
51
+ 'name': '重传率',
52
52
  'ts': result.time,
53
- 'value': result.downRetansRatio + ' %'
54
- });
55
- }
56
-
57
- if (newCodes.includes('upNetDelayRatio')) {
58
- datas.linkOther.push({
59
- 'code': 'upNetDelayRatio',
60
- 'name': '上行RTT时延',
61
- 'ts': result.time,
62
- 'value': result.upNetDelayRatio + ' ms'
63
- });
64
- }
65
-
66
- if (newCodes.includes('upRetransRatio')) {
67
- datas.linkOther.push({
68
- 'code': 'upRetransRatio',
69
- 'name': '上行重传率',
70
- 'ts': result.time,
71
- 'value': result.upRetransRatio + ' %'
53
+ 'value': result.upRetransRatio + ' %' + '|' + result.downRetansRatio + ' %'
72
54
  });
73
55
  }
74
56