@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.
- package/build/index.js +1 -1
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +112 -122
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +7 -5
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +8 -26
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +13 -46
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +112 -122
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +7 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +8 -26
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +13 -46
- package/package.json +2 -2
@@ -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 = ['
|
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('
|
55
|
+
if (newCodes.includes('netDelayRatio')) {
|
56
56
|
datas.linkOther.push({
|
57
|
-
'code': '
|
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('
|
64
|
+
if (newCodes.includes('retansRatio')) {
|
65
65
|
datas.linkOther.push({
|
66
|
-
'code': '
|
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,
|
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 (
|
73
|
-
|
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: "
|
90
|
-
id: "
|
75
|
+
code: "netDelayRatio",
|
76
|
+
id: "netDelayRatio",
|
91
77
|
isGoldMetric: true,
|
92
78
|
key: null,
|
93
|
-
name: "
|
79
|
+
name: "RTT时延",
|
94
80
|
unit: "ms"
|
95
81
|
});
|
96
|
-
ciMonitorMetricModels.
|
82
|
+
ciMonitorMetricModels.unshift({
|
97
83
|
changeValue: null,
|
98
|
-
code: "
|
99
|
-
id: "
|
84
|
+
code: "retansRatio",
|
85
|
+
id: "retansRatio",
|
100
86
|
isGoldMetric: true,
|
101
87
|
key: null,
|
102
|
-
name: "
|
88
|
+
name: "重传率",
|
103
89
|
unit: "%"
|
104
90
|
});
|
105
|
-
|
106
|
-
|
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
|
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.
|
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.
|
119
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@9.0.0-a.6/build/index.html",
|
120
120
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
121
|
}
|