@centreon/ui 26.5.0 → 26.5.2
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
|
@@ -95,6 +95,14 @@ const StackLines = ({
|
|
|
95
95
|
? transparency || 80
|
|
96
96
|
: style.areaTransparency;
|
|
97
97
|
|
|
98
|
+
const linePartStack = stack.map((stackValue, index) => {
|
|
99
|
+
if (isNil(timeSeries[index][metric_id])) {
|
|
100
|
+
return [stackValue[0], null];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return stackValue;
|
|
104
|
+
});
|
|
105
|
+
|
|
98
106
|
return (
|
|
99
107
|
<g key={`stack-${prop('key', stack)}`}>
|
|
100
108
|
{displayAnchor && (
|
|
@@ -140,6 +148,16 @@ const StackLines = ({
|
|
|
140
148
|
})
|
|
141
149
|
}
|
|
142
150
|
opacity={highlight === false ? 0.3 : 1}
|
|
151
|
+
stroke="none"
|
|
152
|
+
/>
|
|
153
|
+
<Shape.LinePath
|
|
154
|
+
curve={curveType}
|
|
155
|
+
data={linePartStack}
|
|
156
|
+
defined={(d) => {
|
|
157
|
+
return !isNil(d[1]);
|
|
158
|
+
}}
|
|
159
|
+
fill="none"
|
|
160
|
+
opacity={highlight === false ? 0.3 : 1}
|
|
143
161
|
stroke={lineColor}
|
|
144
162
|
strokeDasharray={getStrokeDashArray({
|
|
145
163
|
dashLength: style?.dashLength,
|
|
@@ -152,6 +170,8 @@ const StackLines = ({
|
|
|
152
170
|
? Math.ceil(formattedLineWidth * 1.3)
|
|
153
171
|
: formattedLineWidth
|
|
154
172
|
}
|
|
173
|
+
x={(d) => xScale(getTime(d.data)) ?? 0}
|
|
174
|
+
y={(d) => yScale(d[1]) ?? 0}
|
|
155
175
|
/>
|
|
156
176
|
</g>
|
|
157
177
|
);
|
|
@@ -136,7 +136,9 @@ const toLine = ({
|
|
|
136
136
|
...defaultDsData,
|
|
137
137
|
...(ds_data || {}),
|
|
138
138
|
ds_color_area:
|
|
139
|
-
ds_data?.ds_color_area ??
|
|
139
|
+
ds_data?.ds_color_area ??
|
|
140
|
+
ds_data?.ds_color_line ??
|
|
141
|
+
defaultDsData.ds_color_line
|
|
140
142
|
};
|
|
141
143
|
|
|
142
144
|
return {
|
package/src/Listing/Row/Row.tsx
CHANGED
|
@@ -6,7 +6,6 @@ import { equals, lt, not, pluck } from 'ramda';
|
|
|
6
6
|
import { memo, useCallback, useEffect, useRef } from 'react';
|
|
7
7
|
|
|
8
8
|
import { useViewportIntersection } from '../../utils/useViewportIntersection';
|
|
9
|
-
|
|
10
9
|
import type { Column, ColumnConfiguration, RowColorCondition } from '../models';
|
|
11
10
|
|
|
12
11
|
type Props = {
|
|
@@ -146,7 +145,7 @@ const IntersectionRow = ({ isHovered, ...rest }: Props): JSX.Element => {
|
|
|
146
145
|
|
|
147
146
|
useEffect(() => {
|
|
148
147
|
setElement(getFirstCellElement() as HTMLDivElement);
|
|
149
|
-
}, [getFirstCellElement
|
|
148
|
+
}, [getFirstCellElement()]);
|
|
150
149
|
|
|
151
150
|
return (
|
|
152
151
|
<div className="contents w-full" data-is-hovered={isHovered} ref={rowRef}>
|
package/src/Listing/index.tsx
CHANGED
|
@@ -45,8 +45,6 @@ import DataCell from './Cell/DataCell';
|
|
|
45
45
|
import Checkbox from './Checkbox';
|
|
46
46
|
import { EmptyResult } from './EmptyResult/EmptyResult';
|
|
47
47
|
import { ListingHeader } from './Header';
|
|
48
|
-
import ListingRow from './Row/Row';
|
|
49
|
-
import { SkeletonLoader } from './Row/SkeletonLoaderRows';
|
|
50
48
|
import type {
|
|
51
49
|
Column,
|
|
52
50
|
ColumnConfiguration,
|
|
@@ -55,6 +53,8 @@ import type {
|
|
|
55
53
|
RowId,
|
|
56
54
|
SortOrder
|
|
57
55
|
} from './models';
|
|
56
|
+
import ListingRow from './Row/Row';
|
|
57
|
+
import { SkeletonLoader } from './Row/SkeletonLoaderRows';
|
|
58
58
|
import { subItemsPivotsAtom } from './tableAtoms';
|
|
59
59
|
import { labelNoResultFound as defaultLabelNoResultFound } from './translatedLabels';
|
|
60
60
|
import useStyleTable, { useColumnStyle } from './useStyleTable';
|
|
@@ -595,7 +595,7 @@ const Listing = <
|
|
|
595
595
|
component="div"
|
|
596
596
|
onMouseLeave={clearHoveredRow}
|
|
597
597
|
>
|
|
598
|
-
{rowsToDisplay.map((row
|
|
598
|
+
{rowsToDisplay.map((row) => {
|
|
599
599
|
const isRowSelected = isSelected(row);
|
|
600
600
|
const isSubItem = allSubItemIds.includes(
|
|
601
601
|
getSubItemRowId(row)
|
|
@@ -21,7 +21,7 @@ interface MemoComponent {
|
|
|
21
21
|
export const useMemoComponent = ({
|
|
22
22
|
Component,
|
|
23
23
|
memoProps
|
|
24
|
-
}: MemoComponent):
|
|
25
|
-
useMemo(() => Component,
|
|
24
|
+
}: MemoComponent): ReactElement =>
|
|
25
|
+
useMemo(() => Component, useDeepCompare(memoProps));
|
|
26
26
|
|
|
27
27
|
export default useMemoComponent;
|