@centreon/ui 25.10.29 → 25.11.0
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
CHANGED
|
@@ -9,9 +9,11 @@ import {
|
|
|
9
9
|
find,
|
|
10
10
|
isEmpty,
|
|
11
11
|
isNil,
|
|
12
|
+
isNotNil,
|
|
12
13
|
keys,
|
|
13
14
|
map,
|
|
14
15
|
negate,
|
|
16
|
+
omit,
|
|
15
17
|
pick,
|
|
16
18
|
pipe,
|
|
17
19
|
pluck,
|
|
@@ -212,6 +214,39 @@ const InteractionWithGraph = ({
|
|
|
212
214
|
yScalesPerUnit
|
|
213
215
|
});
|
|
214
216
|
|
|
217
|
+
if (isNotNil(lineData?.stackOrder)) {
|
|
218
|
+
const test = Object.entries(omit(['timeTick'], timeValue)).reduce(
|
|
219
|
+
(acc, [key, value]) => {
|
|
220
|
+
const line = getLineForMetric({
|
|
221
|
+
lines,
|
|
222
|
+
metric_id: Number(key)
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
const isBelowStackOrder =
|
|
226
|
+
isNotNil(line?.stackOrder) &&
|
|
227
|
+
(line?.stackOrder as number) >= (lineData.stackOrder as number);
|
|
228
|
+
|
|
229
|
+
if (isBelowStackOrder) {
|
|
230
|
+
return acc + value;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
return acc;
|
|
234
|
+
},
|
|
235
|
+
0
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
const y0 = yScale(test);
|
|
239
|
+
|
|
240
|
+
const diffBetweenY0AndPointPosition = Math.abs(
|
|
241
|
+
y0 - margin.top - (graphHeight - pointPosition[1])
|
|
242
|
+
);
|
|
243
|
+
|
|
244
|
+
return {
|
|
245
|
+
...acc,
|
|
246
|
+
[metricId]: diffBetweenY0AndPointPosition
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
|
|
215
250
|
const y0 = yScale(value);
|
|
216
251
|
|
|
217
252
|
const diffBetweenY0AndPointPosition = Math.abs(
|
|
@@ -107,14 +107,16 @@ const PickersStartEndDate = ({
|
|
|
107
107
|
const maxEnd = rangeEndDate?.max;
|
|
108
108
|
const minEnd = rangeEndDate?.min || startDate;
|
|
109
109
|
|
|
110
|
-
const isColumn = equals(direction, PickersStartEndDateDirection.column)
|
|
110
|
+
const isColumn = equals(direction, PickersStartEndDateDirection.column);
|
|
111
111
|
|
|
112
112
|
return (
|
|
113
113
|
<LocalizationProvider
|
|
114
114
|
adapterLocale={locale.substring(0, 2)}
|
|
115
115
|
dateAdapter={AdapterDayjs}
|
|
116
116
|
>
|
|
117
|
-
<div
|
|
117
|
+
<div
|
|
118
|
+
className={`flex ${isColumn ? 'flex-col justify-center' : 'flex-row items-center py-2 px-4'} gap-2 ${className}`}
|
|
119
|
+
>
|
|
118
120
|
<PickerDateWithLabel
|
|
119
121
|
changeDate={changeDate}
|
|
120
122
|
date={startDate}
|