@riil-frontend/component-topology 9.0.0-a.15 → 9.0.0-a.17

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.15" === 'string' ? "9.0.0-a.15" : null;
27
+ var version = typeof "9.0.0-a.17" === 'string' ? "9.0.0-a.17" : null;
28
28
  console.info("\u62D3\u6251\u7248\u672C: " + version);
29
29
  /**
30
30
  * 拓扑显示和编辑
@@ -12,6 +12,20 @@ export default function LinkTopo(props) {
12
12
  linkCi: data,
13
13
  linkMetricCodes: linkMetricCodes
14
14
  });
15
+ var linkMetrics = [].concat(metricData.linkMetrics, metricData.linkOther);
16
+ var linkMetricsList = [];
17
+
18
+ if (linkMetrics.length > 0) {
19
+ linkMetricCodes.forEach(function (e) {
20
+ var linkMetricsData = linkMetrics.filter(function (i) {
21
+ return e == i.code;
22
+ });
23
+ if (linkMetricsData.length > 0) linkMetricsList.push(linkMetricsData[0]);
24
+ });
25
+ metricData.linkMetrics = linkMetricsList;
26
+ metricData.linkOther = [];
27
+ }
28
+
15
29
  return /*#__PURE__*/React.createElement("div", {
16
30
  className: styles.container
17
31
  }, /*#__PURE__*/React.createElement(CrucialLinkTopo, _extends({
@@ -318,9 +318,9 @@ function _queryRetansRatioNetDelayRatio() {
318
318
  if (retansRatioNetDelayRatioCodes.includes('netDelayRatio')) {
319
319
  linkOther.push({
320
320
  'code': 'netDelayRatio',
321
- 'name': '下行RTT时延',
321
+ 'name': 'RTT时延',
322
322
  'ts': result.time,
323
- 'value': (result.upNetDelayRatio * 1).toFixed() + ' ms' + '|' + (result.downNetDelayRatio * 1).toFixed() + ' ms'
323
+ 'value': (result.upNetDelayRatio * 1).toFixed(2) + ' ms' + '|' + (result.downNetDelayRatio * 1).toFixed(2) + ' ms'
324
324
  });
325
325
  }
326
326
 
@@ -329,7 +329,7 @@ function _queryRetansRatioNetDelayRatio() {
329
329
  'code': 'retansRatio',
330
330
  'name': '重传率',
331
331
  'ts': result.time,
332
- 'value': (result.upRetransRatio * 1).toFixed() + ' %' + '|' + (result.downRetansRatio * 1).toFixed() + ' %'
332
+ 'value': result.upRetransRatio + ' %' + '|' + result.downRetansRatio + ' %'
333
333
  });
334
334
  }
335
335
 
@@ -56,7 +56,7 @@ 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 "9.0.0-a.15" === 'string' ? "9.0.0-a.15" : null;
59
+ var version = typeof "9.0.0-a.17" === 'string' ? "9.0.0-a.17" : null;
60
60
  console.info("\u62D3\u6251\u7248\u672C: " + version);
61
61
  /**
62
62
  * 拓扑显示和编辑
@@ -25,6 +25,20 @@ function LinkTopo(props) {
25
25
  linkCi: data,
26
26
  linkMetricCodes: linkMetricCodes
27
27
  });
28
+ var linkMetrics = [].concat(metricData.linkMetrics, metricData.linkOther);
29
+ var linkMetricsList = [];
30
+
31
+ if (linkMetrics.length > 0) {
32
+ linkMetricCodes.forEach(function (e) {
33
+ var linkMetricsData = linkMetrics.filter(function (i) {
34
+ return e == i.code;
35
+ });
36
+ if (linkMetricsData.length > 0) linkMetricsList.push(linkMetricsData[0]);
37
+ });
38
+ metricData.linkMetrics = linkMetricsList;
39
+ metricData.linkOther = [];
40
+ }
41
+
28
42
  return /*#__PURE__*/_react["default"].createElement("div", {
29
43
  className: _LinkTopoModule["default"].container
30
44
  }, /*#__PURE__*/_react["default"].createElement(_componentCrucialLinkTopo["default"], (0, _extends2["default"])({
@@ -351,9 +351,9 @@ function _queryRetansRatioNetDelayRatio() {
351
351
  if (retansRatioNetDelayRatioCodes.includes('netDelayRatio')) {
352
352
  linkOther.push({
353
353
  'code': 'netDelayRatio',
354
- 'name': '下行RTT时延',
354
+ 'name': 'RTT时延',
355
355
  'ts': result.time,
356
- 'value': (result.upNetDelayRatio * 1).toFixed() + ' ms' + '|' + (result.downNetDelayRatio * 1).toFixed() + ' ms'
356
+ 'value': (result.upNetDelayRatio * 1).toFixed(2) + ' ms' + '|' + (result.downNetDelayRatio * 1).toFixed(2) + ' ms'
357
357
  });
358
358
  }
359
359
 
@@ -362,7 +362,7 @@ function _queryRetansRatioNetDelayRatio() {
362
362
  'code': 'retansRatio',
363
363
  'name': '重传率',
364
364
  'ts': result.time,
365
- 'value': (result.upRetransRatio * 1).toFixed() + ' %' + '|' + (result.downRetansRatio * 1).toFixed() + ' %'
365
+ 'value': result.upRetransRatio + ' %' + '|' + result.downRetansRatio + ' %'
366
366
  });
367
367
  }
368
368
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "9.0.0-a.15",
3
+ "version": "9.0.0-a.17",
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.15/build/index.html",
119
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@9.0.0-a.17/build/index.html",
120
120
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
121
121
  }