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

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.
@@ -10,6 +10,7 @@ exports.queryLastestValue = queryLastestValue;
10
10
  exports.queryLatestMetrics = queryLatestMetrics;
11
11
  exports.queryLinkInterfacesLatestMetrics = queryLinkInterfacesLatestMetrics;
12
12
  exports.queryLinkLatestMetrics = queryLinkLatestMetrics;
13
+ exports.queryRetansRatioNetDelayRatio = queryRetansRatioNetDelayRatio;
13
14
 
14
15
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
15
16
 
@@ -276,7 +277,7 @@ function isOpenFlow(_x6) {
276
277
  return _isOpenFlow.apply(this, arguments);
277
278
  }
278
279
  /**
279
- * @name isOpenFlow 查指标值
280
+ * @name queryLastestValue 查指标值
280
281
  * @returns
281
282
  */
282
283
 
@@ -319,4 +320,60 @@ function _queryLastestValue() {
319
320
  }, _callee7);
320
321
  }));
321
322
  return _queryLastestValue.apply(this, arguments);
323
+ }
324
+
325
+ function queryRetansRatioNetDelayRatio(_x8, _x9) {
326
+ return _queryRetansRatioNetDelayRatio.apply(this, arguments);
327
+ }
328
+
329
+ function _queryRetansRatioNetDelayRatio() {
330
+ _queryRetansRatioNetDelayRatio = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(params, retansRatioNetDelayRatioCodes) {
331
+ var result, linkOther;
332
+ return _regenerator["default"].wrap(function _callee8$(_context8) {
333
+ while (1) {
334
+ switch (_context8.prev = _context8.next) {
335
+ case 0:
336
+ if (retansRatioNetDelayRatioCodes.length) {
337
+ _context8.next = 2;
338
+ break;
339
+ }
340
+
341
+ return _context8.abrupt("return", []);
342
+
343
+ case 2:
344
+ _context8.next = 4;
345
+ return queryLastestValue(params);
346
+
347
+ case 4:
348
+ result = _context8.sent;
349
+ linkOther = [];
350
+
351
+ if (retansRatioNetDelayRatioCodes.includes('netDelayRatio')) {
352
+ linkOther.push({
353
+ 'code': 'netDelayRatio',
354
+ 'name': '下行RTT时延',
355
+ 'ts': result.time,
356
+ 'value': (result.upNetDelayRatio * 1).toFixed() + ' ms' + '|' + (result.downNetDelayRatio * 1).toFixed() + ' ms'
357
+ });
358
+ }
359
+
360
+ if (retansRatioNetDelayRatioCodes.includes('retansRatio')) {
361
+ linkOther.push({
362
+ 'code': 'retansRatio',
363
+ 'name': '重传率',
364
+ 'ts': result.time,
365
+ 'value': (result.upRetransRatio * 1).toFixed() + ' %' + '|' + (result.downRetansRatio * 1).toFixed() + ' %'
366
+ });
367
+ }
368
+
369
+ return _context8.abrupt("return", linkOther);
370
+
371
+ case 9:
372
+ case "end":
373
+ return _context8.stop();
374
+ }
375
+ }
376
+ }, _callee8);
377
+ }));
378
+ return _queryRetansRatioNetDelayRatio.apply(this, arguments);
322
379
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "9.0.0-a.11",
3
+ "version": "9.0.0-a.15",
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.11/build/index.html",
119
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@9.0.0-a.15/build/index.html",
120
120
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
121
121
  }