@centreon/ui 24.6.2 → 24.6.4

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.
Files changed (54) hide show
  1. package/package.json +1 -1
  2. package/src/Graph/BarChart/BarChart.cypress.spec.tsx +233 -0
  3. package/src/Graph/BarChart/BarChart.stories.tsx +213 -0
  4. package/src/Graph/BarChart/BarChart.tsx +101 -0
  5. package/src/Graph/BarChart/BarGroup.tsx +246 -0
  6. package/src/Graph/BarChart/BarStack.tsx +126 -0
  7. package/src/Graph/BarChart/ResponsiveBarChart.tsx +263 -0
  8. package/src/Graph/BarChart/SingleBar.tsx +62 -0
  9. package/src/Graph/BarChart/Tooltip/BarChartTooltip.tsx +122 -0
  10. package/src/Graph/BarChart/Tooltip/useBarChartTooltipStyles.ts +28 -0
  11. package/src/Graph/BarChart/atoms.ts +5 -0
  12. package/src/Graph/BarChart/models.ts +21 -0
  13. package/src/Graph/BarChart/useBarChartStyles.tsx +5 -0
  14. package/src/Graph/BarChart/useBarStack.ts +114 -0
  15. package/src/Graph/BarChart/useSingleBar.ts +199 -0
  16. package/src/Graph/Gauge/Gauge.cypress.spec.tsx +1 -1
  17. package/src/Graph/Gauge/Gauge.stories.tsx +1 -1
  18. package/src/Graph/LineChart/LineChart.cypress.spec.tsx +4 -4
  19. package/src/Graph/LineChart/LineChart.styles.ts +0 -5
  20. package/src/Graph/LineChart/LineChart.tsx +118 -122
  21. package/src/Graph/LineChart/index.stories.tsx +12 -12
  22. package/src/Graph/SingleBar/SingleBar.cypress.spec.tsx +1 -1
  23. package/src/Graph/SingleBar/SingleBar.stories.tsx +1 -1
  24. package/src/Graph/Text/Text.cypress.spec.tsx +1 -1
  25. package/src/Graph/Text/Text.stories.tsx +1 -1
  26. package/src/Graph/common/Axes/index.tsx +40 -13
  27. package/src/Graph/common/BaseChart/BaseChart.tsx +25 -6
  28. package/src/Graph/common/BaseChart/ChartSvgWrapper.tsx +15 -4
  29. package/src/Graph/{LineChart → common/BaseChart}/Header/index.tsx +3 -3
  30. package/src/Graph/common/BaseChart/Header/models.ts +4 -0
  31. package/src/Graph/common/BaseChart/Header/useHeaderStyles.ts +9 -0
  32. package/src/Graph/common/BaseChart/useBaseChartStyles.ts +6 -0
  33. package/src/Graph/{LineChart/BasicComponents → common/Thresholds}/ThresholdLine.tsx +20 -10
  34. package/src/Graph/{LineChart/BasicComponents → common/Thresholds}/Thresholds.tsx +8 -4
  35. package/src/Graph/common/timeSeries/index.ts +33 -11
  36. package/src/Graph/common/timeSeries/models.ts +1 -0
  37. package/src/Graph/common/useTooltipStyles.ts +1 -0
  38. package/src/Graph/mockedData/pingService.json +203 -0
  39. package/src/Graph/mockedData/pingServiceMixedStacked.json +203 -0
  40. package/src/Graph/mockedData/pingServiceStacked.json +203 -0
  41. /package/src/Graph/{LineChart/mockedData → mockedData}/annotationData.json +0 -0
  42. /package/src/Graph/{LineChart/mockedData → mockedData}/curvesWithSameColor.json +0 -0
  43. /package/src/Graph/{LineChart/mockedData → mockedData}/exclusionPeriodFirstPeriod.json +0 -0
  44. /package/src/Graph/{LineChart/mockedData → mockedData}/exclusionPeriodSecondPeriod.json +0 -0
  45. /package/src/Graph/{LineChart/mockedData → mockedData}/exclusionPeriodThirdPeriod.json +0 -0
  46. /package/src/Graph/{LineChart/mockedData → mockedData}/lastDay.json +0 -0
  47. /package/src/Graph/{LineChart/mockedData → mockedData}/lastDayAreaStack.json +0 -0
  48. /package/src/Graph/{LineChart/mockedData → mockedData}/lastDayForward.json +0 -0
  49. /package/src/Graph/{LineChart/mockedData → mockedData}/lastDayThreshold.json +0 -0
  50. /package/src/Graph/{LineChart/mockedData → mockedData}/lastDayWithIncompleteValues.json +0 -0
  51. /package/src/Graph/{LineChart/mockedData → mockedData}/lastDayWithNullValues.json +0 -0
  52. /package/src/Graph/{LineChart/mockedData → mockedData}/lastMonth.json +0 -0
  53. /package/src/Graph/{LineChart/mockedData → mockedData}/lastWeek.json +0 -0
  54. /package/src/Graph/{LineChart/mockedData → mockedData}/zoomPreview.json +0 -0
@@ -0,0 +1,203 @@
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": "%",
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
+ "legend": "Centreon-Server: Packet Loss",
26
+ "stack": 0,
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
+ 0.0,
34
+ 0.0,
35
+ 0.0,
36
+ 0.0,
37
+ 0.0,
38
+ 0.0,
39
+ 0.0,
40
+ 0.0,
41
+ 0.0,
42
+ -10.0,
43
+ 20.0,
44
+ null,
45
+ null
46
+ ],
47
+ "last_value": 0.0,
48
+ "minimum_value": null,
49
+ "maximum_value": 0.0,
50
+ "average_value": 0.0
51
+ },
52
+ {
53
+ "metric_id": 1,
54
+ "metric": "Centreon-Server: rta",
55
+ "metric_legend": "Centreon-Server: rta",
56
+ "unit": "ms",
57
+ "min": 0.0,
58
+ "max": null,
59
+ "ds_data": {
60
+ "ds_color_line": "#29AFEE",
61
+ "ds_color_area": "#29AFEE",
62
+ "ds_filled": true,
63
+ "ds_invert": false,
64
+ "ds_legend": null,
65
+ "ds_stack": true,
66
+ "ds_order": 1,
67
+ "ds_transparency": 80.0,
68
+ "ds_color_line_mode": 0
69
+ },
70
+ "legend": "Centreon-Server: Round-Trip Average Time",
71
+ "stack": 0,
72
+ "warning_high_threshold": 200.0,
73
+ "critical_high_threshold": 400.0,
74
+ "warning_low_threshold": 0.0,
75
+ "critical_low_threshold": 0.0,
76
+ "ds_order": 1,
77
+ "data": [
78
+ 0.04508,
79
+ 0.0242,
80
+ 0.03592,
81
+ 0.01304,
82
+ 0.025,
83
+ 0.02748,
84
+ 0.05296,
85
+ 0.01864,
86
+ 0.02688,
87
+ 0.03676,
88
+ 0.03696,
89
+ null,
90
+ null
91
+ ],
92
+ "last_value": 0.04,
93
+ "minimum_value": null,
94
+ "maximum_value": null,
95
+ "average_value": 0.03
96
+ },
97
+ {
98
+ "metric_id": 3,
99
+ "metric": "Centreon-Server: rtmax",
100
+ "metric_legend": "Centreon-Server: rtmax",
101
+ "unit": "ms",
102
+ "min": null,
103
+ "max": null,
104
+ "ds_data": {
105
+ "ds_color_line": "#525256",
106
+ "ds_color_area": "#525256",
107
+ "ds_filled": false,
108
+ "ds_invert": false,
109
+ "ds_legend": null,
110
+ "ds_stack": true,
111
+ "ds_order": 2,
112
+ "ds_transparency": 80.0,
113
+ "ds_color_line_mode": 0
114
+ },
115
+ "legend": "Centreon-Server: Round-Trip Maximum Time",
116
+ "stack": 0,
117
+ "warning_high_threshold": null,
118
+ "critical_high_threshold": null,
119
+ "warning_low_threshold": null,
120
+ "critical_low_threshold": null,
121
+ "ds_order": 2,
122
+ "data": [
123
+ 0.11372,
124
+ 0.05604,
125
+ 0.08556,
126
+ 0.02548,
127
+ 0.05352,
128
+ 0.05336,
129
+ 0.109,
130
+ 0.04112,
131
+ 0.05504,
132
+ 0.06812,
133
+ 0.08644,
134
+ null,
135
+ null
136
+ ],
137
+ "last_value": 0.09,
138
+ "minimum_value": null,
139
+ "maximum_value": 0.11,
140
+ "average_value": null
141
+ },
142
+ {
143
+ "metric_id": 4,
144
+ "metric": "Centreon-Server: rtmin",
145
+ "metric_legend": "Centreon-Server: rtmin",
146
+ "unit": "ms",
147
+ "min": null,
148
+ "max": null,
149
+ "ds_data": {
150
+ "ds_color_line": "#191777",
151
+ "ds_color_area": "#191777",
152
+ "ds_filled": false,
153
+ "ds_invert": false,
154
+ "ds_legend": null,
155
+ "ds_stack": true,
156
+ "ds_order": 2,
157
+ "ds_transparency": 80.0,
158
+ "ds_color_line_mode": 0
159
+ },
160
+ "legend": "Centreon-Server: Round-Trip Minimum Time",
161
+ "stack": 0,
162
+ "warning_high_threshold": null,
163
+ "critical_high_threshold": null,
164
+ "warning_low_threshold": null,
165
+ "critical_low_threshold": null,
166
+ "ds_order": 2,
167
+ "data": [
168
+ 0.00984,
169
+ 0.008,
170
+ 0.00784,
171
+ 0.00624,
172
+ 0.00932,
173
+ 0.01348,
174
+ 0.01796,
175
+ 0.0064,
176
+ 0.01148,
177
+ 0.01644,
178
+ 0.01168,
179
+ null,
180
+ null
181
+ ],
182
+ "last_value": 0.01,
183
+ "minimum_value": 0.01,
184
+ "maximum_value": null,
185
+ "average_value": null
186
+ }
187
+ ],
188
+ "times": [
189
+ "2024-06-19T10:50:00+02:00",
190
+ "2024-06-19T10:55:00+02:00",
191
+ "2024-06-19T11:00:00+02:00",
192
+ "2024-06-19T11:05:00+02:00",
193
+ "2024-06-19T11:10:00+02:00",
194
+ "2024-06-19T11:15:00+02:00",
195
+ "2024-06-19T11:20:00+02:00",
196
+ "2024-06-19T11:25:00+02:00",
197
+ "2024-06-19T11:30:00+02:00",
198
+ "2024-06-19T11:35:00+02:00",
199
+ "2024-06-19T11:40:00+02:00",
200
+ "2024-06-19T11:45:00+02:00",
201
+ "2024-06-19T11:50:00+02:00"
202
+ ]
203
+ }