@riil-frontend/component-topology 8.0.10 → 9.0.0-a.10
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/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +17 -17
- package/es/core/event/topoEventListener.js +22 -0
- package/es/core/hooks/useAlarm.js +18 -12
- package/es/core/hooks/useTopoEventListener.js +4 -18
- package/es/core/models/Alarm.js +4 -13
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/store/models/viewer/resourceDetail.js +7 -0
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +10 -9
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +99 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +5 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +78 -3
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +50 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +80 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +25 -2
- package/lib/core/event/topoEventListener.js +27 -0
- package/lib/core/hooks/useAlarm.js +19 -12
- package/lib/core/hooks/useTopoEventListener.js +3 -17
- package/lib/core/models/Alarm.js +5 -16
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/store/models/viewer/resourceDetail.js +7 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +10 -9
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +99 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +5 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +85 -3
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +49 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +86 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +25 -2
- package/package.json +3 -3
@@ -3,7 +3,10 @@
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
4
|
|
5
5
|
exports.__esModule = true;
|
6
|
+
exports.checkMenu = checkMenu;
|
7
|
+
exports.isOpenFlow = isOpenFlow;
|
6
8
|
exports.queryAssetModel = queryAssetModel;
|
9
|
+
exports.queryLastestValue = queryLastestValue;
|
7
10
|
exports.queryLatestMetrics = queryLatestMetrics;
|
8
11
|
exports.queryLinkInterfacesLatestMetrics = queryLinkInterfacesLatestMetrics;
|
9
12
|
exports.queryLinkLatestMetrics = queryLinkLatestMetrics;
|
@@ -152,6 +155,11 @@ function _queryLinkLatestMetrics() {
|
|
152
155
|
function queryLinkInterfacesLatestMetrics(_x5) {
|
153
156
|
return _queryLinkInterfacesLatestMetrics.apply(this, arguments);
|
154
157
|
}
|
158
|
+
/**
|
159
|
+
* @name checkMenu 判断当前流量监控权限
|
160
|
+
* @returns
|
161
|
+
*/
|
162
|
+
|
155
163
|
|
156
164
|
function _queryLinkInterfacesLatestMetrics() {
|
157
165
|
_queryLinkInterfacesLatestMetrics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(linkCi) {
|
@@ -233,4 +241,82 @@ function _queryLinkInterfacesLatestMetrics() {
|
|
233
241
|
}, _callee4);
|
234
242
|
}));
|
235
243
|
return _queryLinkInterfacesLatestMetrics.apply(this, arguments);
|
244
|
+
}
|
245
|
+
|
246
|
+
function checkMenu() {
|
247
|
+
return _checkMenu.apply(this, arguments);
|
248
|
+
}
|
249
|
+
/**
|
250
|
+
* @name isOpenFlow 是否配置流量分析
|
251
|
+
* @returns
|
252
|
+
*/
|
253
|
+
|
254
|
+
|
255
|
+
function _checkMenu() {
|
256
|
+
_checkMenu = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
257
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
258
|
+
while (1) {
|
259
|
+
switch (_context5.prev = _context5.next) {
|
260
|
+
case 0:
|
261
|
+
return _context5.abrupt("return", _componentTopologyUtils.request.post('/authorization/v1/api/authority/check/checkMenuAuthentication', [{
|
262
|
+
"url": "/default/trafficControl"
|
263
|
+
}]));
|
264
|
+
|
265
|
+
case 1:
|
266
|
+
case "end":
|
267
|
+
return _context5.stop();
|
268
|
+
}
|
269
|
+
}
|
270
|
+
}, _callee5);
|
271
|
+
}));
|
272
|
+
return _checkMenu.apply(this, arguments);
|
273
|
+
}
|
274
|
+
|
275
|
+
function isOpenFlow(_x6) {
|
276
|
+
return _isOpenFlow.apply(this, arguments);
|
277
|
+
}
|
278
|
+
/**
|
279
|
+
* @name isOpenFlow 查指标值
|
280
|
+
* @returns
|
281
|
+
*/
|
282
|
+
|
283
|
+
|
284
|
+
function _isOpenFlow() {
|
285
|
+
_isOpenFlow = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(params) {
|
286
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
287
|
+
while (1) {
|
288
|
+
switch (_context6.prev = _context6.next) {
|
289
|
+
case 0:
|
290
|
+
return _context6.abrupt("return", _componentTopologyUtils.request.post('/flow/v1/api/link/isOpenFlowMonitorByName', params));
|
291
|
+
|
292
|
+
case 1:
|
293
|
+
case "end":
|
294
|
+
return _context6.stop();
|
295
|
+
}
|
296
|
+
}
|
297
|
+
}, _callee6);
|
298
|
+
}));
|
299
|
+
return _isOpenFlow.apply(this, arguments);
|
300
|
+
}
|
301
|
+
|
302
|
+
function queryLastestValue(_x7) {
|
303
|
+
return _queryLastestValue.apply(this, arguments);
|
304
|
+
}
|
305
|
+
|
306
|
+
function _queryLastestValue() {
|
307
|
+
_queryLastestValue = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(params) {
|
308
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
309
|
+
while (1) {
|
310
|
+
switch (_context7.prev = _context7.next) {
|
311
|
+
case 0:
|
312
|
+
return _context7.abrupt("return", _componentTopologyUtils.request.post('/flow/v1/api/LinkAnalyse/queryLastestValue', params));
|
313
|
+
|
314
|
+
case 1:
|
315
|
+
case "end":
|
316
|
+
return _context7.stop();
|
317
|
+
}
|
318
|
+
}
|
319
|
+
}, _callee7);
|
320
|
+
}));
|
321
|
+
return _queryLastestValue.apply(this, arguments);
|
236
322
|
}
|
@@ -26,6 +26,7 @@ var useMetricModels = function useMetricModels(props) {
|
|
26
26
|
ciType = _props$data.ciType,
|
27
27
|
isMonite = props.isMonite,
|
28
28
|
ciTypeMeta = props.ciTypeMeta,
|
29
|
+
resourceData = props.resourceData,
|
29
30
|
topo = props.topo,
|
30
31
|
resourceOverviewProps = props.resourceOverviewProps;
|
31
32
|
|
@@ -59,7 +60,29 @@ var useMetricModels = function useMetricModels(props) {
|
|
59
60
|
return !!monitorMetrics.find(function (item) {
|
60
61
|
return item === m.code;
|
61
62
|
});
|
62
|
-
});
|
63
|
+
});
|
64
|
+
|
65
|
+
if (resourceData.attributes['network_link.is_crucial']) {
|
66
|
+
ciMonitorMetricModels.unshift({
|
67
|
+
changeValue: null,
|
68
|
+
code: "netDelayRatio",
|
69
|
+
id: "netDelayRatio",
|
70
|
+
isGoldMetric: true,
|
71
|
+
key: null,
|
72
|
+
name: "RTT时延",
|
73
|
+
unit: "ms"
|
74
|
+
});
|
75
|
+
ciMonitorMetricModels.unshift({
|
76
|
+
changeValue: null,
|
77
|
+
code: "retansRatio",
|
78
|
+
id: "retansRatio",
|
79
|
+
isGoldMetric: true,
|
80
|
+
key: null,
|
81
|
+
name: "重传率",
|
82
|
+
unit: "%"
|
83
|
+
});
|
84
|
+
} // 未监控不显示指标,临时在这里处理
|
85
|
+
|
63
86
|
|
64
87
|
if (!isMonite) {
|
65
88
|
ciMonitorMetricModels = [];
|
@@ -92,7 +115,7 @@ var useMetricModels = function useMetricModels(props) {
|
|
92
115
|
|
93
116
|
return _context.abrupt("return", displayMetricModels);
|
94
117
|
|
95
|
-
case
|
118
|
+
case 10:
|
96
119
|
case "end":
|
97
120
|
return _context.stop();
|
98
121
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "
|
3
|
+
"version": "9.0.0-a.10",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -55,7 +55,7 @@
|
|
55
55
|
},
|
56
56
|
"devDependencies": {
|
57
57
|
"@alifd/next": "1.21.16",
|
58
|
-
"@alifd/theme-19926": "^0.
|
58
|
+
"@alifd/theme-19926": "^0.48.2",
|
59
59
|
"@formily/next": "1.3.13",
|
60
60
|
"@formily/next-components": "1.3.13",
|
61
61
|
"@iceworks/spec": "^1.0.0",
|
@@ -116,6 +116,6 @@
|
|
116
116
|
"access": "public"
|
117
117
|
},
|
118
118
|
"license": "MIT",
|
119
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@
|
119
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@9.0.0-a.10/build/index.html",
|
120
120
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
121
|
}
|