@centreon/ui 24.8.2 → 24.8.3
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/package.json +14 -17
- package/src/Graph/BarChart/BarChart.cypress.spec.tsx +38 -79
- package/src/Graph/BarChart/BarChart.tsx +4 -4
- package/src/Graph/BarChart/BarGroup.tsx +81 -92
- package/src/Graph/BarChart/BarStack.tsx +21 -13
- package/src/Graph/BarChart/ResponsiveBarChart.tsx +26 -50
- package/src/Graph/BarChart/Tooltip/BarChartTooltip.tsx +1 -1
- package/src/Graph/BarChart/useBarStack.ts +1 -1
- package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/Point.tsx +1 -1
- package/src/Graph/Chart/BasicComponents/Lines/StackedLines/useStackedLines.ts +67 -0
- package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/Threshold/ThresholdWithPatternLines.tsx +4 -7
- package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/Threshold/index.tsx +6 -9
- package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/Threshold/models.ts +1 -2
- package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/Threshold/useScaleThreshold.ts +8 -20
- package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/index.tsx +64 -43
- package/src/Graph/{LineChart/LineChart.cypress.spec.tsx → Chart/Chart.cypress.spec.tsx} +272 -23
- package/src/Graph/{LineChart/index.stories.tsx → Chart/Chart.stories.tsx} +217 -24
- package/src/Graph/{LineChart/LineChart.styles.ts → Chart/Chart.styles.ts} +1 -1
- package/src/Graph/{LineChart/LineChart.tsx → Chart/Chart.tsx} +84 -100
- package/src/Graph/{LineChart → Chart}/InteractiveComponents/AnchorPoint/RegularAnchorPoint.tsx +5 -1
- package/src/Graph/{LineChart → Chart}/InteractiveComponents/AnchorPoint/StackedAnchorPoint.tsx +6 -1
- package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/GraphValueTooltip.tsx +61 -0
- package/src/Graph/{LineChart/InteractiveComponents/GraphValueTooltip/GraphValueTooltip.tsx → Chart/InteractiveComponents/GraphValueTooltip/GraphValueTooltipContent.tsx} +2 -2
- package/src/Graph/{LineChart → Chart}/InteractiveComponents/index.tsx +11 -15
- package/src/Graph/{LineChart → Chart}/Legend/Legend.styles.ts +1 -7
- package/src/Graph/{LineChart → Chart}/Legend/LegendHeader.tsx +9 -5
- package/src/Graph/{LineChart → Chart}/Legend/index.tsx +2 -1
- package/src/Graph/Chart/graphAtoms.ts +6 -0
- package/src/Graph/{LineChart → Chart}/index.tsx +10 -7
- package/src/Graph/{LineChart → Chart}/models.ts +8 -3
- package/src/Graph/common/Axes/AxisStyles.ts +11 -0
- package/src/Graph/common/Axes/UnitLabel.tsx +41 -10
- package/src/Graph/common/Axes/index.tsx +18 -12
- package/src/Graph/common/Axes/models.ts +4 -2
- package/src/Graph/common/Axes/useAxisY.ts +22 -12
- package/src/Graph/common/BaseChart/BaseChart.tsx +2 -2
- package/src/Graph/common/BaseChart/ChartSvgWrapper.tsx +8 -5
- package/src/Graph/common/BaseChart/useComputeBaseChartDimensions.ts +1 -1
- package/src/Graph/common/Grids/index.tsx +2 -2
- package/src/Graph/common/Thresholds/ThresholdLine.tsx +1 -1
- package/src/Graph/common/Thresholds/Thresholds.tsx +10 -15
- package/src/Graph/common/timeSeries/index.ts +109 -131
- package/src/Graph/common/timeSeries/models.ts +4 -5
- package/src/Graph/index.ts +4 -4
- package/src/Graph/mockedData/lastDayWithLotOfUnits.json +1668 -0
- package/src/Graph/mockedData/pingService.json +46 -1
- package/src/Graph/mockedData/pingServiceLinesBars.json +253 -0
- package/src/Graph/mockedData/pingServiceLinesBarsMixed.json +253 -0
- package/src/Graph/mockedData/pingServiceLinesBarsStacked.json +253 -0
- package/src/Graph/mockedData/pingServiceMixedStacked.json +46 -1
- package/src/Graph/mockedData/pingServiceStacked.json +46 -1
- package/src/Typography/EllipsisTypography.tsx +5 -2
- package/src/components/Form/AccessRights/AccessRights.cypress.spec.tsx +16 -24
- package/src/components/Form/AccessRights/AccessRights.stories.tsx +5 -5
- package/src/components/Form/AccessRights/AccessRights.tsx +3 -3
- package/src/components/Form/index.ts +2 -2
- package/src/utils/index.ts +2 -2
- package/src/Graph/BarChart/SingleBar.tsx +0 -62
- package/src/Graph/BarChart/useSingleBar.ts +0 -199
- package/src/Graph/LineChart/BasicComponents/Lines/StackedLines/useStackedLines.ts +0 -39
- package/src/Graph/LineChart/graphAtoms.ts +0 -3
- /package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/RegularLines/index.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/RegularLines/useRegularLines.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/StackedLines/index.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/Threshold/BasicThreshold.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/Threshold/Circle.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/Threshold/ThresholdWithVariation.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/Threshold/helpers/index.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/Threshold/useCoordinateCircle.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/BasicComponents/Lines/models.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/AnchorPoint/GuidingLines.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/AnchorPoint/index.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/AnchorPoint/models.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/AnchorPoint/useTickGraph.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Annotations/Annotation/Area.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Annotations/Annotation/Line.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Annotations/Annotation/index.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Annotations/Area/Downtime.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Annotations/EventAnnotations.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Annotations/Line/Acknowledgement.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Annotations/Line/Comments.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Annotations/annotationsAtoms.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Annotations/index.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Annotations/models.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Annotations/useAnnotation.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Bar.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/GraphValueTooltip/useGraphValueTooltip.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/GraphValueTooltip/useGraphValueTooltipStyles.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/TimeShiftZones/TimeShiftIcon.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/TimeShiftZones/TimeShiftZone.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/TimeShiftZones/index.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/TimeShiftZones/models.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/TimeShiftZones/useTimeShiftZones.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Tooltip/index.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Tooltip/models.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/Tooltip/useGraphTooltip.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/ZoomPreview/index.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/ZoomPreview/models.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/ZoomPreview/useZoomPreview.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/ZoomPreview/zoomPreviewAtoms.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/InteractiveComponents/interactionWithGraphAtoms.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/Legend/LegendContent.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/Legend/models.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/Legend/useLegend.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/LoadingSkeleton.tsx +0 -0
- /package/src/Graph/{LineChart → Chart}/common/index.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/helpers/doc.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/helpers/index.ts +0 -0
- /package/src/Graph/{LineChart → Chart}/translatedLabels.ts +0 -0
- /package/src/Graph/{LineChart/useLineChartData.ts → Chart/useChartData.ts} +0 -0
- /package/src/Graph/{LineChart/useLineChartIntersection.ts → Chart/useChartIntersection.ts} +0 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
{
|
|
2
|
+
"global": {
|
|
3
|
+
"base": 1000,
|
|
4
|
+
"title": "Ping service"
|
|
5
|
+
},
|
|
6
|
+
"metrics": [
|
|
7
|
+
{
|
|
8
|
+
"metric_id": 2,
|
|
9
|
+
"metric": "Centreon-Server: pl",
|
|
10
|
+
"metric_legend": "Centreon-Server: pl",
|
|
11
|
+
"unit": "B",
|
|
12
|
+
"min": 0.0,
|
|
13
|
+
"max": 100.0,
|
|
14
|
+
"ds_data": {
|
|
15
|
+
"ds_color_line": "#F30B23",
|
|
16
|
+
"ds_color_area": "#F30B23",
|
|
17
|
+
"ds_filled": true,
|
|
18
|
+
"ds_invert": false,
|
|
19
|
+
"ds_legend": null,
|
|
20
|
+
"ds_stack": true,
|
|
21
|
+
"ds_order": 1,
|
|
22
|
+
"ds_transparency": 80.0,
|
|
23
|
+
"ds_color_line_mode": 0
|
|
24
|
+
},
|
|
25
|
+
"displayAs": "bar",
|
|
26
|
+
"legend": "Centreon-Server: Packet Loss",
|
|
27
|
+
"stack": 0,
|
|
28
|
+
"warning_high_threshold": 20.0,
|
|
29
|
+
"critical_high_threshold": 50.0,
|
|
30
|
+
"warning_low_threshold": 0.0,
|
|
31
|
+
"critical_low_threshold": 0.0,
|
|
32
|
+
"ds_order": 1,
|
|
33
|
+
"data": [
|
|
34
|
+
1243.0,
|
|
35
|
+
3562.0,
|
|
36
|
+
3532.0,
|
|
37
|
+
9843.0,
|
|
38
|
+
3332.0,
|
|
39
|
+
6576.0,
|
|
40
|
+
5647.0,
|
|
41
|
+
8763.0,
|
|
42
|
+
7487.0,
|
|
43
|
+
4783.0,
|
|
44
|
+
6835.0,
|
|
45
|
+
null,
|
|
46
|
+
null
|
|
47
|
+
],
|
|
48
|
+
"last_value": 0.0,
|
|
49
|
+
"minimum_value": null,
|
|
50
|
+
"maximum_value": 0.0,
|
|
51
|
+
"average_value": 0.0
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"metric_id": 10,
|
|
55
|
+
"metric": "Space used",
|
|
56
|
+
"metric_legend": "Space used",
|
|
57
|
+
"unit": "B",
|
|
58
|
+
"min": 0.0,
|
|
59
|
+
"max": 100.0,
|
|
60
|
+
"ds_data": {
|
|
61
|
+
"ds_color_line": "#654321",
|
|
62
|
+
"ds_color_area": "#654321",
|
|
63
|
+
"ds_filled": true,
|
|
64
|
+
"ds_invert": false,
|
|
65
|
+
"ds_legend": null,
|
|
66
|
+
"ds_stack": true,
|
|
67
|
+
"ds_order": 1,
|
|
68
|
+
"ds_transparency": 80.0,
|
|
69
|
+
"ds_color_line_mode": 0
|
|
70
|
+
},
|
|
71
|
+
"displayAs": "bar",
|
|
72
|
+
"legend": "Space used",
|
|
73
|
+
"stack": 0,
|
|
74
|
+
"warning_high_threshold": 20.0,
|
|
75
|
+
"critical_high_threshold": 50.0,
|
|
76
|
+
"warning_low_threshold": 0.0,
|
|
77
|
+
"critical_low_threshold": 0.0,
|
|
78
|
+
"ds_order": 1,
|
|
79
|
+
"data": [
|
|
80
|
+
7277.536221378278,
|
|
81
|
+
1070.9229992641347,
|
|
82
|
+
5417.157870751178,
|
|
83
|
+
7650.368581547736,
|
|
84
|
+
3062.1382654626154,
|
|
85
|
+
6896.485403855089,
|
|
86
|
+
6016.271762192416,
|
|
87
|
+
592.4173666516415,
|
|
88
|
+
9130.151161464735,
|
|
89
|
+
2556.376532531991,
|
|
90
|
+
8085.328518673757,
|
|
91
|
+
6283.734720996918,
|
|
92
|
+
5617.226479531896
|
|
93
|
+
],
|
|
94
|
+
"last_value": 0.0,
|
|
95
|
+
"minimum_value": null,
|
|
96
|
+
"maximum_value": 0.0,
|
|
97
|
+
"average_value": 0.0
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"metric_id": 1,
|
|
101
|
+
"metric": "Centreon-Server: rta",
|
|
102
|
+
"metric_legend": "Centreon-Server: rta",
|
|
103
|
+
"unit": "ms",
|
|
104
|
+
"min": 0.0,
|
|
105
|
+
"max": null,
|
|
106
|
+
"ds_data": {
|
|
107
|
+
"ds_color_line": "#29AFEE",
|
|
108
|
+
"ds_color_area": "#29AFEE",
|
|
109
|
+
"ds_filled": true,
|
|
110
|
+
"ds_invert": false,
|
|
111
|
+
"ds_legend": null,
|
|
112
|
+
"ds_stack": true,
|
|
113
|
+
"ds_order": 1,
|
|
114
|
+
"ds_transparency": 80.0,
|
|
115
|
+
"ds_color_line_mode": 0
|
|
116
|
+
},
|
|
117
|
+
"displayAs": "line",
|
|
118
|
+
"legend": "Centreon-Server: Round-Trip Average Time",
|
|
119
|
+
"stack": 0,
|
|
120
|
+
"warning_high_threshold": 200.0,
|
|
121
|
+
"critical_high_threshold": 400.0,
|
|
122
|
+
"warning_low_threshold": 0.0,
|
|
123
|
+
"critical_low_threshold": 0.0,
|
|
124
|
+
"ds_order": 1,
|
|
125
|
+
"data": [
|
|
126
|
+
0.04508,
|
|
127
|
+
0.0242,
|
|
128
|
+
0.03592,
|
|
129
|
+
0.01304,
|
|
130
|
+
0.025,
|
|
131
|
+
0.02748,
|
|
132
|
+
0.05296,
|
|
133
|
+
0.01864,
|
|
134
|
+
0.02688,
|
|
135
|
+
0.03676,
|
|
136
|
+
0.03696,
|
|
137
|
+
null,
|
|
138
|
+
null
|
|
139
|
+
],
|
|
140
|
+
"last_value": 0.04,
|
|
141
|
+
"minimum_value": null,
|
|
142
|
+
"maximum_value": null,
|
|
143
|
+
"average_value": 0.03
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"metric_id": 3,
|
|
147
|
+
"metric": "Centreon-Server: rtmax",
|
|
148
|
+
"metric_legend": "Centreon-Server: rtmax",
|
|
149
|
+
"unit": "ms",
|
|
150
|
+
"min": null,
|
|
151
|
+
"max": null,
|
|
152
|
+
"ds_data": {
|
|
153
|
+
"ds_color_line": "#525256",
|
|
154
|
+
"ds_color_area": "#525256",
|
|
155
|
+
"ds_filled": false,
|
|
156
|
+
"ds_invert": true,
|
|
157
|
+
"ds_legend": null,
|
|
158
|
+
"ds_stack": true,
|
|
159
|
+
"ds_order": 2,
|
|
160
|
+
"ds_transparency": 80.0,
|
|
161
|
+
"ds_color_line_mode": 0
|
|
162
|
+
},
|
|
163
|
+
"displayAs": "line",
|
|
164
|
+
"legend": "Centreon-Server: Round-Trip Maximum Time",
|
|
165
|
+
"stack": 0,
|
|
166
|
+
"warning_high_threshold": null,
|
|
167
|
+
"critical_high_threshold": null,
|
|
168
|
+
"warning_low_threshold": null,
|
|
169
|
+
"critical_low_threshold": null,
|
|
170
|
+
"ds_order": 2,
|
|
171
|
+
"data": [
|
|
172
|
+
0.11372,
|
|
173
|
+
0.05604,
|
|
174
|
+
0.08556,
|
|
175
|
+
0.02548,
|
|
176
|
+
0.05352,
|
|
177
|
+
0.05336,
|
|
178
|
+
0.109,
|
|
179
|
+
0.04112,
|
|
180
|
+
0.05504,
|
|
181
|
+
0.06812,
|
|
182
|
+
0.08644,
|
|
183
|
+
null,
|
|
184
|
+
null
|
|
185
|
+
],
|
|
186
|
+
"last_value": 0.09,
|
|
187
|
+
"minimum_value": null,
|
|
188
|
+
"maximum_value": 0.11,
|
|
189
|
+
"average_value": null
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"metric_id": 4,
|
|
193
|
+
"metric": "Centreon-Server: rtmin",
|
|
194
|
+
"metric_legend": "Centreon-Server: rtmin",
|
|
195
|
+
"unit": "ms",
|
|
196
|
+
"min": null,
|
|
197
|
+
"max": null,
|
|
198
|
+
"ds_data": {
|
|
199
|
+
"ds_color_line": "#191777",
|
|
200
|
+
"ds_color_area": "#191777",
|
|
201
|
+
"ds_filled": false,
|
|
202
|
+
"ds_invert": false,
|
|
203
|
+
"ds_legend": null,
|
|
204
|
+
"ds_stack": true,
|
|
205
|
+
"ds_order": 2,
|
|
206
|
+
"ds_transparency": 80.0,
|
|
207
|
+
"ds_color_line_mode": 0
|
|
208
|
+
},
|
|
209
|
+
"displayAs": "line",
|
|
210
|
+
"legend": "Centreon-Server: Round-Trip Minimum Time",
|
|
211
|
+
"stack": 0,
|
|
212
|
+
"warning_high_threshold": null,
|
|
213
|
+
"critical_high_threshold": null,
|
|
214
|
+
"warning_low_threshold": null,
|
|
215
|
+
"critical_low_threshold": null,
|
|
216
|
+
"ds_order": 2,
|
|
217
|
+
"data": [
|
|
218
|
+
0.00984,
|
|
219
|
+
0.008,
|
|
220
|
+
0.00784,
|
|
221
|
+
0.00624,
|
|
222
|
+
0.00932,
|
|
223
|
+
0.01348,
|
|
224
|
+
0.01796,
|
|
225
|
+
0.0064,
|
|
226
|
+
0.01148,
|
|
227
|
+
0.01644,
|
|
228
|
+
0.01168,
|
|
229
|
+
null,
|
|
230
|
+
null
|
|
231
|
+
],
|
|
232
|
+
"last_value": 0.01,
|
|
233
|
+
"minimum_value": 0.01,
|
|
234
|
+
"maximum_value": null,
|
|
235
|
+
"average_value": null
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"times": [
|
|
239
|
+
"2024-06-19T10:50:00+02:00",
|
|
240
|
+
"2024-06-19T10:55:00+02:00",
|
|
241
|
+
"2024-06-19T11:00:00+02:00",
|
|
242
|
+
"2024-06-19T11:05:00+02:00",
|
|
243
|
+
"2024-06-19T11:10:00+02:00",
|
|
244
|
+
"2024-06-19T11:15:00+02:00",
|
|
245
|
+
"2024-06-19T11:20:00+02:00",
|
|
246
|
+
"2024-06-19T11:25:00+02:00",
|
|
247
|
+
"2024-06-19T11:30:00+02:00",
|
|
248
|
+
"2024-06-19T11:35:00+02:00",
|
|
249
|
+
"2024-06-19T11:40:00+02:00",
|
|
250
|
+
"2024-06-19T11:45:00+02:00",
|
|
251
|
+
"2024-06-19T11:50:00+02:00"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
@@ -4,6 +4,51 @@
|
|
|
4
4
|
"title": "Ping service"
|
|
5
5
|
},
|
|
6
6
|
"metrics": [
|
|
7
|
+
{
|
|
8
|
+
"metric_id": 10,
|
|
9
|
+
"metric": "Space used",
|
|
10
|
+
"metric_legend": "Space used",
|
|
11
|
+
"unit": "B",
|
|
12
|
+
"min": 0.0,
|
|
13
|
+
"max": 100.0,
|
|
14
|
+
"ds_data": {
|
|
15
|
+
"ds_color_line": "#654321",
|
|
16
|
+
"ds_color_area": "#654321",
|
|
17
|
+
"ds_filled": true,
|
|
18
|
+
"ds_invert": false,
|
|
19
|
+
"ds_legend": null,
|
|
20
|
+
"ds_stack": false,
|
|
21
|
+
"ds_order": 1,
|
|
22
|
+
"ds_transparency": 80.0,
|
|
23
|
+
"ds_color_line_mode": 0
|
|
24
|
+
},
|
|
25
|
+
"legend": "Space used",
|
|
26
|
+
"stack": 1,
|
|
27
|
+
"warning_high_threshold": 20.0,
|
|
28
|
+
"critical_high_threshold": 50.0,
|
|
29
|
+
"warning_low_threshold": 0.0,
|
|
30
|
+
"critical_low_threshold": 0.0,
|
|
31
|
+
"ds_order": 1,
|
|
32
|
+
"data": [
|
|
33
|
+
7277.536221378278,
|
|
34
|
+
1070.9229992641347,
|
|
35
|
+
5417.157870751178,
|
|
36
|
+
7650.368581547736,
|
|
37
|
+
3062.1382654626154,
|
|
38
|
+
6896.485403855089,
|
|
39
|
+
6016.271762192416,
|
|
40
|
+
592.4173666516415,
|
|
41
|
+
9130.151161464735,
|
|
42
|
+
2556.376532531991,
|
|
43
|
+
8085.328518673757,
|
|
44
|
+
6283.734720996918,
|
|
45
|
+
5617.226479531896
|
|
46
|
+
],
|
|
47
|
+
"last_value": 0.0,
|
|
48
|
+
"minimum_value": null,
|
|
49
|
+
"maximum_value": 0.0,
|
|
50
|
+
"average_value": 0.0
|
|
51
|
+
},
|
|
7
52
|
{
|
|
8
53
|
"metric_id": 2,
|
|
9
54
|
"metric": "Centreon-Server: pl",
|
|
@@ -200,4 +245,4 @@
|
|
|
200
245
|
"2024-06-19T11:45:00+02:00",
|
|
201
246
|
"2024-06-19T11:50:00+02:00"
|
|
202
247
|
]
|
|
203
|
-
}
|
|
248
|
+
}
|
|
@@ -49,6 +49,51 @@
|
|
|
49
49
|
"maximum_value": 0.0,
|
|
50
50
|
"average_value": 0.0
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
"metric_id": 10,
|
|
54
|
+
"metric": "Space used",
|
|
55
|
+
"metric_legend": "Space used",
|
|
56
|
+
"unit": "B",
|
|
57
|
+
"min": 0.0,
|
|
58
|
+
"max": 100.0,
|
|
59
|
+
"ds_data": {
|
|
60
|
+
"ds_color_line": "#654321",
|
|
61
|
+
"ds_color_area": "#654321",
|
|
62
|
+
"ds_filled": true,
|
|
63
|
+
"ds_invert": false,
|
|
64
|
+
"ds_legend": null,
|
|
65
|
+
"ds_stack": false,
|
|
66
|
+
"ds_order": 1,
|
|
67
|
+
"ds_transparency": 80.0,
|
|
68
|
+
"ds_color_line_mode": 0
|
|
69
|
+
},
|
|
70
|
+
"legend": "Space used",
|
|
71
|
+
"stack": 1,
|
|
72
|
+
"warning_high_threshold": 20.0,
|
|
73
|
+
"critical_high_threshold": 50.0,
|
|
74
|
+
"warning_low_threshold": 0.0,
|
|
75
|
+
"critical_low_threshold": 0.0,
|
|
76
|
+
"ds_order": 2,
|
|
77
|
+
"data": [
|
|
78
|
+
7277.536221378278,
|
|
79
|
+
1070.9229992641347,
|
|
80
|
+
5417.157870751178,
|
|
81
|
+
7650.368581547736,
|
|
82
|
+
3062.1382654626154,
|
|
83
|
+
6896.485403855089,
|
|
84
|
+
6016.271762192416,
|
|
85
|
+
592.4173666516415,
|
|
86
|
+
9130.151161464735,
|
|
87
|
+
2556.376532531991,
|
|
88
|
+
8085.328518673757,
|
|
89
|
+
6283.734720996918,
|
|
90
|
+
5617.226479531896
|
|
91
|
+
],
|
|
92
|
+
"last_value": 0.0,
|
|
93
|
+
"minimum_value": null,
|
|
94
|
+
"maximum_value": 0.0,
|
|
95
|
+
"average_value": 0.0
|
|
96
|
+
},
|
|
52
97
|
{
|
|
53
98
|
"metric_id": 1,
|
|
54
99
|
"metric": "Centreon-Server: rta",
|
|
@@ -200,4 +245,4 @@
|
|
|
200
245
|
"2024-06-19T11:45:00+02:00",
|
|
201
246
|
"2024-06-19T11:50:00+02:00"
|
|
202
247
|
]
|
|
203
|
-
}
|
|
248
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Box, Typography, TypographyProps } from '@mui/material';
|
|
2
2
|
|
|
3
|
-
const EllipsisTypography = (
|
|
3
|
+
const EllipsisTypography = ({
|
|
4
|
+
containerClassname,
|
|
5
|
+
...props
|
|
6
|
+
}: TypographyProps & { containerClassname?: string }): JSX.Element => {
|
|
4
7
|
return (
|
|
5
|
-
<Box sx={{ width: '100%' }}>
|
|
8
|
+
<Box className={containerClassname} sx={{ width: '100%' }}>
|
|
6
9
|
<Typography
|
|
7
10
|
sx={{
|
|
8
11
|
overflow: 'hidden',
|
|
@@ -131,15 +131,6 @@ describe('Access rights', () => {
|
|
|
131
131
|
|
|
132
132
|
cy.findByTestId(`remove-Kathy Schmitt`).click();
|
|
133
133
|
|
|
134
|
-
cy.findByTestId(`remove-Kathy Schmitt`).should(
|
|
135
|
-
'have.attr',
|
|
136
|
-
'data-removed',
|
|
137
|
-
'true'
|
|
138
|
-
);
|
|
139
|
-
cy.contains(labels.list.removed).should('be.visible');
|
|
140
|
-
|
|
141
|
-
cy.findByTestId(`remove-Kathy Schmitt`).click();
|
|
142
|
-
|
|
143
134
|
cy.findByTestId(`remove-Kathy Schmitt`).should(
|
|
144
135
|
'have.attr',
|
|
145
136
|
'data-removed',
|
|
@@ -175,6 +166,7 @@ describe('Access rights', () => {
|
|
|
175
166
|
it('submits the new acces rights list with the updated contact', () => {
|
|
176
167
|
const { save } = initialize({});
|
|
177
168
|
|
|
169
|
+
cy.findByTestId(`remove-Kathy Schmitt`).click();
|
|
178
170
|
cy.findByTestId(`role-Kathy Schmitt`).parent().click();
|
|
179
171
|
|
|
180
172
|
cy.get('li[data-value="editor"]').click();
|
|
@@ -263,7 +255,7 @@ describe('Access rights', () => {
|
|
|
263
255
|
|
|
264
256
|
cy.findByTestId('role-Entity Group 10').should('have.value', 'editor');
|
|
265
257
|
cy.contains(labels.list.added).should('be.visible');
|
|
266
|
-
cy.contains('
|
|
258
|
+
cy.contains('2 added').should('be.visible');
|
|
267
259
|
|
|
268
260
|
cy.makeSnapshot();
|
|
269
261
|
});
|
|
@@ -276,7 +268,7 @@ describe('Access rights', () => {
|
|
|
276
268
|
|
|
277
269
|
cy.waitForRequest('@getContactGroups');
|
|
278
270
|
|
|
279
|
-
cy.contains('Entity Group
|
|
271
|
+
cy.contains('Entity Group 11').click();
|
|
280
272
|
cy.findByTestId('add_role').parent().click();
|
|
281
273
|
cy.get('li[data-value="editor"]').click();
|
|
282
274
|
cy.findByTestId('add').click();
|
|
@@ -288,7 +280,7 @@ describe('Access rights', () => {
|
|
|
288
280
|
|
|
289
281
|
cy.findByTestId('remove-Linda Schultz').click();
|
|
290
282
|
|
|
291
|
-
cy.contains('
|
|
283
|
+
cy.contains('3 added | 1 updated | 1 removed').should('be.visible');
|
|
292
284
|
|
|
293
285
|
cy.makeSnapshot();
|
|
294
286
|
});
|
|
@@ -301,10 +293,10 @@ describe('Access rights', () => {
|
|
|
301
293
|
|
|
302
294
|
cy.waitForRequest('@getContacts');
|
|
303
295
|
|
|
304
|
-
cy.contains('Entity
|
|
296
|
+
cy.contains('Entity 11').click();
|
|
305
297
|
cy.findByLabelText(labels.add.autocompleteContact).should(
|
|
306
298
|
'have.value',
|
|
307
|
-
'Entity
|
|
299
|
+
'Entity 11'
|
|
308
300
|
);
|
|
309
301
|
|
|
310
302
|
cy.contains(labels.add.contactGroup).click();
|
|
@@ -324,18 +316,18 @@ describe('Access rights', () => {
|
|
|
324
316
|
|
|
325
317
|
cy.waitForRequest('@getContacts');
|
|
326
318
|
|
|
327
|
-
cy.contains('Entity
|
|
319
|
+
cy.contains('Entity 11').click();
|
|
328
320
|
|
|
329
321
|
cy.findByTestId('add').click();
|
|
330
322
|
|
|
331
|
-
cy.contains('Entity
|
|
323
|
+
cy.contains('Entity 11').should('be.visible');
|
|
332
324
|
|
|
333
325
|
cy.contains(labels.list.added).should('be.visible');
|
|
334
326
|
|
|
335
|
-
cy.findByTestId('remove-Entity
|
|
327
|
+
cy.findByTestId('remove-Entity 11').click();
|
|
336
328
|
|
|
337
|
-
cy.contains('Entity
|
|
338
|
-
cy.contains(
|
|
329
|
+
cy.contains('Entity 11').should('not.exist');
|
|
330
|
+
cy.contains('3 Added').should('not.exist');
|
|
339
331
|
|
|
340
332
|
cy.makeSnapshot();
|
|
341
333
|
});
|
|
@@ -347,7 +339,7 @@ describe('Access rights', () => {
|
|
|
347
339
|
|
|
348
340
|
cy.waitForRequest('@getContacts');
|
|
349
341
|
|
|
350
|
-
cy.contains('Entity
|
|
342
|
+
cy.contains('Entity 11').click();
|
|
351
343
|
|
|
352
344
|
cy.findByTestId('add_role').parent().click();
|
|
353
345
|
cy.get('li[data-value="editor"]').click();
|
|
@@ -356,7 +348,7 @@ describe('Access rights', () => {
|
|
|
356
348
|
|
|
357
349
|
cy.waitForRequest('@getContacts');
|
|
358
350
|
|
|
359
|
-
cy.contains('Entity
|
|
351
|
+
cy.contains('Entity 12').click();
|
|
360
352
|
|
|
361
353
|
cy.findByTestId('add_role').should('have.value', 'viewer');
|
|
362
354
|
|
|
@@ -371,13 +363,13 @@ describe('Access rights', () => {
|
|
|
371
363
|
|
|
372
364
|
cy.waitForRequest('@getContacts');
|
|
373
365
|
|
|
374
|
-
cy.contains('Entity
|
|
366
|
+
cy.contains('Entity 11').click();
|
|
375
367
|
|
|
376
368
|
cy.findByTestId('add').click();
|
|
377
369
|
|
|
378
|
-
cy.contains('Entity
|
|
370
|
+
cy.contains('Entity 11').should('be.visible');
|
|
379
371
|
|
|
380
|
-
cy.findByTestId('role-Entity
|
|
372
|
+
cy.findByTestId('role-Entity 11').should('have.value', 'viewer');
|
|
381
373
|
cy.contains(labels.list.added)
|
|
382
374
|
.should('be.visible')
|
|
383
375
|
.then(() => {
|
|
@@ -3,7 +3,7 @@ import { http, HttpResponse } from 'msw';
|
|
|
3
3
|
|
|
4
4
|
import { SnackbarProvider } from '../../..';
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import { AccessRights } from './AccessRights';
|
|
7
7
|
import {
|
|
8
8
|
accessRightsWithStates,
|
|
9
9
|
buildResult,
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
roles
|
|
14
14
|
} from './storiesData';
|
|
15
15
|
|
|
16
|
-
const meta: Meta<typeof
|
|
17
|
-
component:
|
|
16
|
+
const meta: Meta<typeof AccessRights> = {
|
|
17
|
+
component: AccessRights,
|
|
18
18
|
parameters: {
|
|
19
19
|
msw: {
|
|
20
20
|
handlers: [
|
|
@@ -31,12 +31,12 @@ const meta: Meta<typeof AccessRightsForm> = {
|
|
|
31
31
|
|
|
32
32
|
const Template = (args): JSX.Element => (
|
|
33
33
|
<SnackbarProvider>
|
|
34
|
-
<
|
|
34
|
+
<AccessRights {...args} />
|
|
35
35
|
</SnackbarProvider>
|
|
36
36
|
);
|
|
37
37
|
|
|
38
38
|
export default meta;
|
|
39
|
-
type Story = StoryObj<typeof
|
|
39
|
+
type Story = StoryObj<typeof AccessRights>;
|
|
40
40
|
|
|
41
41
|
export const Default: Story = {
|
|
42
42
|
args: {
|
|
@@ -23,7 +23,7 @@ interface Props {
|
|
|
23
23
|
submit: (values: Array<AccessRightInitialValues>) => Promise<void>;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export const
|
|
26
|
+
export const AccessRightsContent = ({
|
|
27
27
|
initialValues,
|
|
28
28
|
roles,
|
|
29
29
|
endpoints,
|
|
@@ -54,8 +54,8 @@ export const AccessRights = ({
|
|
|
54
54
|
);
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
export
|
|
57
|
+
export const AccessRights = (props: Props): JSX.Element => (
|
|
58
58
|
<Provider>
|
|
59
|
-
<
|
|
59
|
+
<AccessRightsContent {...props} />
|
|
60
60
|
</Provider>
|
|
61
61
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * from './Form.models';
|
|
2
2
|
export * from './Dashboard';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { AccessRights } from './AccessRights/AccessRights';
|
|
4
|
+
export { AccessRights as AccessRightsV2 } from './AccessRights/AccessRights';
|
package/src/utils/index.ts
CHANGED
|
@@ -23,6 +23,6 @@ export * from './usePluralizedTranslation';
|
|
|
23
23
|
export * from './useResizeObserver';
|
|
24
24
|
export * from './useFullscreen';
|
|
25
25
|
export * from './resourcesStatusURL';
|
|
26
|
-
export * from '../Graph/
|
|
27
|
-
export * from '../Graph/
|
|
26
|
+
export * from '../Graph/Chart/helpers';
|
|
27
|
+
export * from '../Graph/Chart/InteractiveComponents/TimeShiftZones/useTimeShiftZones';
|
|
28
28
|
export * from '../TimePeriods/helpers';
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { memo } from 'react';
|
|
2
|
-
|
|
3
|
-
import { equals, pick } from 'ramda';
|
|
4
|
-
|
|
5
|
-
import { useSingleBar, UseSingleBarProps } from './useSingleBar';
|
|
6
|
-
import { BarStyle } from './models';
|
|
7
|
-
|
|
8
|
-
const SingleBar = ({
|
|
9
|
-
lines,
|
|
10
|
-
secondUnit,
|
|
11
|
-
bar,
|
|
12
|
-
leftScale,
|
|
13
|
-
rightScale,
|
|
14
|
-
size,
|
|
15
|
-
isCenteredZero,
|
|
16
|
-
isHorizontal,
|
|
17
|
-
isTooltipHidden,
|
|
18
|
-
barStyle
|
|
19
|
-
}: UseSingleBarProps & {
|
|
20
|
-
barStyle: BarStyle;
|
|
21
|
-
}): JSX.Element => {
|
|
22
|
-
const { barLength, barPadding, listeners } = useSingleBar({
|
|
23
|
-
bar,
|
|
24
|
-
isCenteredZero,
|
|
25
|
-
isHorizontal,
|
|
26
|
-
isTooltipHidden,
|
|
27
|
-
leftScale,
|
|
28
|
-
lines,
|
|
29
|
-
rightScale,
|
|
30
|
-
secondUnit,
|
|
31
|
-
size
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<rect
|
|
36
|
-
data-testid={`single-bar-${bar.key}-${bar.index}-${bar.value}`}
|
|
37
|
-
fill={bar.color}
|
|
38
|
-
height={Math.ceil(isHorizontal ? barLength : bar.height)}
|
|
39
|
-
opacity={barStyle.opacity}
|
|
40
|
-
rx={(isHorizontal ? bar.width : bar.height) * barStyle.radius}
|
|
41
|
-
width={Math.ceil(isHorizontal ? bar.width : barLength)}
|
|
42
|
-
x={isHorizontal ? bar.x : barPadding}
|
|
43
|
-
y={isHorizontal ? barPadding : bar.y}
|
|
44
|
-
{...listeners}
|
|
45
|
-
/>
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const propsToMemoize = [
|
|
50
|
-
'bar',
|
|
51
|
-
'lines',
|
|
52
|
-
'secondUnit',
|
|
53
|
-
'size',
|
|
54
|
-
'isCenteredZero',
|
|
55
|
-
'isHorizontal',
|
|
56
|
-
'isTooltipHidden',
|
|
57
|
-
'barStyle'
|
|
58
|
-
];
|
|
59
|
-
|
|
60
|
-
export default memo(SingleBar, (prevProps, nextProps) =>
|
|
61
|
-
equals(pick(propsToMemoize, prevProps), pick(propsToMemoize, nextProps))
|
|
62
|
-
);
|