@riil-frontend/component-topology 9.0.0-a.5 → 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 @@ function useMetricPolling(_ref) {
24
24
  var linkCi = _ref.linkCi,
25
25
  linkMetricCodes = _ref.linkMetricCodes;
26
26
  var linkId = linkCi.id;
27
- var arr = ['downNetDelayRatio', 'downRetansRatio', 'upNetDelayRatio', 'upRetransRatio'];
27
+ var arr = ['netDelayRatio', 'retansRatio'];
28
28
  var oldCodes = [];
29
29
  var newCodes = [];
30
30
  linkMetricCodes.map(function (item) {
@@ -52,39 +52,21 @@ function useMetricPolling(_ref) {
52
52
  linkOther: []
53
53
  };
54
54
 
55
- if (newCodes.includes('downNetDelayRatio')) {
55
+ if (newCodes.includes('netDelayRatio')) {
56
56
  datas.linkOther.push({
57
- 'code': 'downNetDelayRatio',
57
+ 'code': 'netDelayRatio',
58
58
  'name': '下行RTT时延',
59
59
  'ts': result.time,
60
- 'value': result.downNetDelayRatio + ' ms'
60
+ 'value': result.upNetDelayRatio + ' ms' + '|' + result.downNetDelayRatio + ' ms'
61
61
  });
62
62
  }
63
63
 
64
- if (newCodes.includes('downRetansRatio')) {
64
+ if (newCodes.includes('retansRatio')) {
65
65
  datas.linkOther.push({
66
- 'code': 'downRetansRatio',
67
- 'name': '下行重传率',
66
+ 'code': 'retansRatio',
67
+ 'name': '重传率',
68
68
  'ts': result.time,
69
- 'value': result.downRetansRatio + ' %'
70
- });
71
- }
72
-
73
- if (newCodes.includes('upNetDelayRatio')) {
74
- datas.linkOther.push({
75
- 'code': 'upNetDelayRatio',
76
- 'name': '上行RTT时延',
77
- 'ts': result.time,
78
- 'value': result.upNetDelayRatio + ' ms'
79
- });
80
- }
81
-
82
- if (newCodes.includes('upRetransRatio')) {
83
- datas.linkOther.push({
84
- 'code': 'upRetransRatio',
85
- 'name': '上行重传率',
86
- 'ts': result.time,
87
- 'value': result.upRetransRatio + ' %'
69
+ 'value': result.upRetransRatio + ' %' + '|' + result.downRetansRatio + ' %'
88
70
  });
89
71
  }
90
72
 
@@ -47,7 +47,7 @@ var useMetricModels = function useMetricModels(props) {
47
47
 
48
48
  function _fetchData() {
49
49
  _fetchData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
50
- var monitorMetrics, ciMonitorMetricModels, checkMenus, isOpen, displayMetricModels, _metricCodes;
50
+ var monitorMetrics, ciMonitorMetricModels, checkMenus, displayMetricModels, _metricCodes;
51
51
 
52
52
  return _regenerator["default"].wrap(function _callee$(_context) {
53
53
  while (1) {
@@ -69,61 +69,28 @@ var useMetricModels = function useMetricModels(props) {
69
69
  case 6:
70
70
  checkMenus = _context.sent;
71
71
 
72
- if (!(checkMenus[0].passed == 'PASS' && resourceData.attributes.display_name && resourceData.attributes['network_link.is_crucial'])) {
73
- _context.next = 12;
74
- break;
75
- }
76
-
77
- _context.next = 10;
78
- return (0, _services.isOpenFlow)({
79
- 'name': resourceData.attributes.display_name
80
- });
81
-
82
- case 10:
83
- isOpen = _context.sent;
84
-
85
- //
86
- if (isOpen) {
87
- ciMonitorMetricModels.push({
72
+ if (checkMenus[0].passed == 'PASS' && resourceData.attributes.display_name && resourceData.attributes['network_link.is_crucial']) {
73
+ ciMonitorMetricModels.unshift({
88
74
  changeValue: null,
89
- code: "downNetDelayRatio",
90
- id: "downNetDelayRatio",
75
+ code: "netDelayRatio",
76
+ id: "netDelayRatio",
91
77
  isGoldMetric: true,
92
78
  key: null,
93
- name: "下行RTT时延",
79
+ name: "RTT时延",
94
80
  unit: "ms"
95
81
  });
96
- ciMonitorMetricModels.push({
82
+ ciMonitorMetricModels.unshift({
97
83
  changeValue: null,
98
- code: "downRetansRatio",
99
- id: "downRetansRatio",
84
+ code: "retansRatio",
85
+ id: "retansRatio",
100
86
  isGoldMetric: true,
101
87
  key: null,
102
- name: "下行重传率",
88
+ name: "重传率",
103
89
  unit: "%"
104
90
  });
105
- ciMonitorMetricModels.push({
106
- changeValue: null,
107
- code: "upNetDelayRatio",
108
- id: "upNetDelayRatio",
109
- isGoldMetric: true,
110
- key: null,
111
- name: "上行RTT时延",
112
- unit: "ms"
113
- });
114
- ciMonitorMetricModels.push({
115
- changeValue: null,
116
- code: "upRetransRatio",
117
- id: "upRetransRatio",
118
- isGoldMetric: true,
119
- key: null,
120
- name: "上行重传率",
121
- unit: "%"
122
- });
123
- }
91
+ } // 未监控不显示指标,临时在这里处理
92
+
124
93
 
125
- case 12:
126
- // 未监控不显示指标,临时在这里处理
127
94
  if (!isMonite) {
128
95
  ciMonitorMetricModels = [];
129
96
  }
@@ -155,7 +122,7 @@ var useMetricModels = function useMetricModels(props) {
155
122
 
156
123
  return _context.abrupt("return", displayMetricModels);
157
124
 
158
- case 17:
125
+ case 13:
159
126
  case "end":
160
127
  return _context.stop();
161
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "9.0.0-a.5",
3
+ "version": "9.0.0-a.6",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -116,6 +116,6 @@
116
116
  "access": "public"
117
117
  },
118
118
  "license": "MIT",
119
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@9.0.0-a.5/build/index.html",
119
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@9.0.0-a.6/build/index.html",
120
120
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
121
121
  }