@riil-frontend/component-topology 9.0.0-a.2 → 9.0.0-a.20
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.css +1 -1
- package/build/index.js +2 -2
- package/es/components/VerticalIconTab/VerticalIconTab.module.scss +11 -5
- package/es/core/components/TopoView/GraphViewPanel.js +3 -2
- package/es/core/editor/components/BackgroundView/index.module.scss +3 -0
- package/es/core/editor/components/Sidebar/Sidebar.module.scss +7 -7
- package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.module.scss +1 -0
- package/es/core/editor/components/Sidebar/views/ComponentPanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +2 -1
- package/es/core/editor/components/Sidebar/views/LinkPanel.js +1 -1
- package/es/core/editor/config/themes.js +53 -2
- package/es/core/event/topoEventListener.js +22 -0
- package/es/core/hooks/useAlarm.js +18 -12
- package/es/core/hooks/useCanvasTheme.js +8 -1
- 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/test/Test.js +52 -0
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +10 -9
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +11 -35
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +14 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +8 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +28 -56
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +57 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +13 -52
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +5 -5
- package/lib/components/VerticalIconTab/VerticalIconTab.module.scss +11 -5
- package/lib/core/components/TopoView/GraphViewPanel.js +3 -2
- package/lib/core/editor/components/BackgroundView/index.module.scss +3 -0
- package/lib/core/editor/components/Sidebar/Sidebar.module.scss +7 -7
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.module.scss +1 -0
- package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +2 -1
- package/lib/core/editor/components/Sidebar/views/LinkPanel.js +1 -1
- package/lib/core/editor/config/themes.js +53 -2
- package/lib/core/event/topoEventListener.js +27 -0
- package/lib/core/hooks/useAlarm.js +19 -12
- package/lib/core/hooks/useCanvasTheme.js +8 -1
- 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/test/Test.js +52 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +10 -9
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +10 -35
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +14 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +8 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +28 -55
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +58 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +13 -53
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +5 -5
- package/package.json +3 -3
@@ -15,8 +15,6 @@ var _react = require("react");
|
|
15
15
|
|
16
16
|
var _getCiDisplayMetricModels = require("../../../getCiDisplayMetricModels");
|
17
17
|
|
18
|
-
var _services = require("../components/LinkTopo/services");
|
19
|
-
|
20
18
|
/**
|
21
19
|
* 概览指标定义
|
22
20
|
* @param {*} props
|
@@ -47,7 +45,7 @@ var useMetricModels = function useMetricModels(props) {
|
|
47
45
|
|
48
46
|
function _fetchData() {
|
49
47
|
_fetchData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
50
|
-
var monitorMetrics, ciMonitorMetricModels,
|
48
|
+
var monitorMetrics, ciMonitorMetricModels, displayMetricModels, _metricCodes;
|
51
49
|
|
52
50
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
53
51
|
while (1) {
|
@@ -63,67 +61,29 @@ var useMetricModels = function useMetricModels(props) {
|
|
63
61
|
return item === m.code;
|
64
62
|
});
|
65
63
|
});
|
66
|
-
_context.next = 6;
|
67
|
-
return (0, _services.checkMenu)();
|
68
|
-
|
69
|
-
case 6:
|
70
|
-
checkMenus = _context.sent;
|
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
64
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
//
|
86
|
-
if (isOpen) {
|
87
|
-
ciMonitorMetricModels.push({
|
65
|
+
if (resourceData.attributes['network_link.is_crucial']) {
|
66
|
+
ciMonitorMetricModels.unshift({
|
88
67
|
changeValue: null,
|
89
|
-
code: "
|
90
|
-
id: "
|
68
|
+
code: "netDelayRatio",
|
69
|
+
id: "netDelayRatio",
|
91
70
|
isGoldMetric: true,
|
92
71
|
key: null,
|
93
|
-
name: "
|
72
|
+
name: "RTT时延",
|
94
73
|
unit: "ms"
|
95
74
|
});
|
96
|
-
ciMonitorMetricModels.
|
75
|
+
ciMonitorMetricModels.unshift({
|
97
76
|
changeValue: null,
|
98
|
-
code: "
|
99
|
-
id: "
|
77
|
+
code: "retansRatio",
|
78
|
+
id: "retansRatio",
|
100
79
|
isGoldMetric: true,
|
101
80
|
key: null,
|
102
|
-
name: "
|
81
|
+
name: "重传率",
|
103
82
|
unit: "%"
|
104
83
|
});
|
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
|
-
}
|
84
|
+
} // 未监控不显示指标,临时在这里处理
|
85
|
+
|
124
86
|
|
125
|
-
case 12:
|
126
|
-
// 未监控不显示指标,临时在这里处理
|
127
87
|
if (!isMonite) {
|
128
88
|
ciMonitorMetricModels = [];
|
129
89
|
}
|
@@ -155,7 +115,7 @@ var useMetricModels = function useMetricModels(props) {
|
|
155
115
|
|
156
116
|
return _context.abrupt("return", displayMetricModels);
|
157
117
|
|
158
|
-
case
|
118
|
+
case 10:
|
159
119
|
case "end":
|
160
120
|
return _context.stop();
|
161
121
|
}
|
@@ -16,15 +16,15 @@ var _linkUtil = require("../utils/linkUtil");
|
|
16
16
|
// network_link.actual_bandwidth
|
17
17
|
function calcEdgeWidth(actualBandwidth) {
|
18
18
|
if (!actualBandwidth) {
|
19
|
-
return
|
19
|
+
return 3;
|
20
20
|
} else if (actualBandwidth <= 100) {
|
21
|
-
return 2;
|
22
|
-
} else if (actualBandwidth <= 1000) {
|
23
21
|
return 3;
|
24
|
-
} else if (actualBandwidth <=
|
22
|
+
} else if (actualBandwidth <= 1000) {
|
25
23
|
return 4;
|
26
|
-
} else if (actualBandwidth
|
24
|
+
} else if (actualBandwidth <= 10000) {
|
27
25
|
return 5;
|
26
|
+
} else if (actualBandwidth > 10000) {
|
27
|
+
return 6;
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
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.20",
|
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@9.0.0-a.
|
119
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@9.0.0-a.20/build/index.html",
|
120
120
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
121
|
}
|