@centreon/ui 24.11.10 → 24.11.12
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 +1 -1
- package/src/Dashboard/Dashboard.styles.ts +1 -1
- package/src/Dashboard/Grid.tsx +2 -8
- package/src/Dashboard/Layout.tsx +40 -43
- package/src/Form/Inputs/Autocomplete.tsx +4 -2
- package/src/Form/Inputs/ConnectedAutocomplete.tsx +1 -1
- package/src/Form/Inputs/Radio.tsx +1 -1
- package/src/Form/Inputs/Text.tsx +1 -1
- package/src/Graph/BarChart/BarChart.cypress.spec.tsx +1 -1
- package/src/Graph/BarChart/BarGroup.tsx +15 -2
- package/src/Graph/BarChart/BarStack.tsx +64 -13
- package/src/Graph/BarChart/ResponsiveBarChart.tsx +2 -0
- package/src/Graph/Chart/Chart.tsx +6 -3
- package/src/Graph/Chart/InteractiveComponents/index.tsx +1 -1
- package/src/Graph/Chart/index.tsx +1 -1
- package/src/Graph/common/utils.ts +2 -2
- package/src/Icon/BusinessActivityIcon.tsx +12 -0
- package/src/Icon/ContainerIcon.tsx +20 -0
- package/src/Icon/DowntimeIcon.tsx +8 -1
- package/src/Icon/HostGroupIcon.tsx +8 -0
- package/src/Icon/MetaServiceIcon.tsx +12 -0
- package/src/Icon/ServiceGroupIcon.tsx +8 -0
- package/src/Icon/index.ts +7 -2
- package/src/Listing/index.tsx +26 -27
- package/src/Typography/EllipsisTypography.tsx +7 -3
- package/src/components/Layout/PageLayout/PageLayout.styles.ts +1 -1
- /package/src/Icon/{AcnowledgementIcon.tsx → AcknowledgementIcon.tsx} +0 -0
package/package.json
CHANGED
package/src/Dashboard/Grid.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement, useMemo } from 'react';
|
|
2
2
|
|
|
3
3
|
import { scaleLinear } from '@visx/scale';
|
|
4
4
|
import { Grid as VisxGrid } from '@visx/visx';
|
|
@@ -13,15 +13,9 @@ interface Props {
|
|
|
13
13
|
columns: number;
|
|
14
14
|
height: number;
|
|
15
15
|
width: number;
|
|
16
|
-
containerRef: MutableRefObject<HTMLDivElement | null>;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
|
-
const Grid = ({
|
|
20
|
-
width,
|
|
21
|
-
height,
|
|
22
|
-
columns,
|
|
23
|
-
containerRef
|
|
24
|
-
}: Props): ReactElement => {
|
|
18
|
+
const Grid = ({ width, height, columns }: Props): ReactElement => {
|
|
25
19
|
const theme = useTheme();
|
|
26
20
|
|
|
27
21
|
const xScale = useMemo(
|
package/src/Dashboard/Layout.tsx
CHANGED
|
@@ -4,10 +4,7 @@ import { useSetAtom } from 'jotai';
|
|
|
4
4
|
import GridLayout, { Layout, WidthProvider } from 'react-grid-layout';
|
|
5
5
|
import 'react-grid-layout/css/styles.css';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
ParentSize,
|
|
9
|
-
useMemoComponent
|
|
10
|
-
} from '..';
|
|
7
|
+
import { ParentSize, useMemoComponent } from '..';
|
|
11
8
|
|
|
12
9
|
import { Box } from '@mui/material';
|
|
13
10
|
import { useDashboardLayoutStyles } from './Dashboard.styles';
|
|
@@ -33,10 +30,10 @@ const bottom = (layout: Array<Layout>): number => {
|
|
|
33
30
|
layout.forEach((panel) => {
|
|
34
31
|
bottomY = panel.y + panel.h;
|
|
35
32
|
if (bottomY > max) max = bottomY;
|
|
36
|
-
})
|
|
33
|
+
});
|
|
37
34
|
|
|
38
35
|
return max;
|
|
39
|
-
}
|
|
36
|
+
};
|
|
40
37
|
|
|
41
38
|
const DashboardLayout = <T extends Layout>({
|
|
42
39
|
children,
|
|
@@ -67,14 +64,10 @@ const DashboardLayout = <T extends Layout>({
|
|
|
67
64
|
}, []);
|
|
68
65
|
|
|
69
66
|
const containerHeight = useMemo((): number | undefined => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
(nbRow - 1) * 20 +
|
|
75
|
-
containerPaddingY * 2
|
|
76
|
-
);
|
|
77
|
-
}, [layout, rowHeight])
|
|
67
|
+
const nbRow = bottom(getLayout(layout));
|
|
68
|
+
const containerPaddingY = 4;
|
|
69
|
+
return nbRow * rowHeight + (nbRow - 1) * 20 + containerPaddingY * 2;
|
|
70
|
+
}, [layout, rowHeight]) ?? 0;
|
|
78
71
|
|
|
79
72
|
useEffect(() => {
|
|
80
73
|
window.addEventListener('resize', resize);
|
|
@@ -86,36 +79,40 @@ const DashboardLayout = <T extends Layout>({
|
|
|
86
79
|
|
|
87
80
|
return useMemoComponent({
|
|
88
81
|
Component: (
|
|
89
|
-
<Box
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
cols={columns}
|
|
103
|
-
containerPadding={[4, 0]}
|
|
104
|
-
layout={getLayout(layout)}
|
|
105
|
-
margin={[20, 20]}
|
|
106
|
-
resizeHandles={['s', 'e', 'se']}
|
|
107
|
-
rowHeight={rowHeight}
|
|
82
|
+
<Box
|
|
83
|
+
ref={dashboardContainerRef}
|
|
84
|
+
sx={{ overflowY: 'auto', overflowX: 'hidden' }}
|
|
85
|
+
>
|
|
86
|
+
<ParentSize>
|
|
87
|
+
{({ width, height }): JSX.Element => (
|
|
88
|
+
<Box className={classes.container}>
|
|
89
|
+
{displayGrid && (
|
|
90
|
+
<Grid
|
|
91
|
+
columns={columns}
|
|
92
|
+
height={
|
|
93
|
+
containerHeight > height ? containerHeight : height
|
|
94
|
+
}
|
|
108
95
|
width={width}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
96
|
+
/>
|
|
97
|
+
)}
|
|
98
|
+
<ReactGridLayout
|
|
99
|
+
cols={columns}
|
|
100
|
+
containerPadding={[4, 0]}
|
|
101
|
+
layout={getLayout(layout)}
|
|
102
|
+
margin={[20, 20]}
|
|
103
|
+
resizeHandles={['s', 'e', 'se']}
|
|
104
|
+
rowHeight={rowHeight}
|
|
105
|
+
width={width}
|
|
106
|
+
onLayoutChange={changeLayout}
|
|
107
|
+
onResizeStart={startResize}
|
|
108
|
+
onResizeStop={stopResize}
|
|
109
|
+
>
|
|
110
|
+
{children}
|
|
111
|
+
</ReactGridLayout>
|
|
112
|
+
</Box>
|
|
113
|
+
)}
|
|
114
|
+
</ParentSize>
|
|
115
|
+
</Box>
|
|
119
116
|
),
|
|
120
117
|
memoProps: [columns, layout, displayGrid, isStatic, ...additionalMemoProps]
|
|
121
118
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import { FormikValues, useFormikContext } from 'formik';
|
|
4
|
-
import { equals, isNil, map, not,
|
|
4
|
+
import { path, equals, isNil, map, not, prop, type } from 'ramda';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
|
|
7
7
|
import { FormHelperText, Stack } from '@mui/material';
|
|
@@ -188,7 +188,9 @@ const Autocomplete = ({
|
|
|
188
188
|
value={getValues() ?? null}
|
|
189
189
|
onChange={changeValues}
|
|
190
190
|
onTextChange={textChange}
|
|
191
|
-
style={{
|
|
191
|
+
style={{
|
|
192
|
+
width: (autocomplete?.fullWidth ?? true) ? 'auto' : '180px'
|
|
193
|
+
}}
|
|
192
194
|
/>
|
|
193
195
|
{inputErrors && (
|
|
194
196
|
<Stack>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useMemo } from 'react';
|
|
2
2
|
|
|
3
3
|
import { FormikValues, useFormikContext } from 'formik';
|
|
4
|
-
import { equals, isEmpty,
|
|
4
|
+
import { path, equals, isEmpty, propEq, reject, split } from 'ramda';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
|
|
7
7
|
import {
|
package/src/Form/Inputs/Text.tsx
CHANGED
|
@@ -18,6 +18,12 @@ import { Line, TimeValue } from '../common/timeSeries/models';
|
|
|
18
18
|
import BarStack from './BarStack';
|
|
19
19
|
import { BarStyle } from './models';
|
|
20
20
|
|
|
21
|
+
// Minimum value for logarithmic scale to avoid log(0)
|
|
22
|
+
const minLogScaleValue = 0.001;
|
|
23
|
+
|
|
24
|
+
const getNeutralValue = (scaleType?: 'linear' | 'logarithmic') =>
|
|
25
|
+
equals(scaleType, 'logarithmic') ? minLogScaleValue : 0;
|
|
26
|
+
|
|
21
27
|
interface Props {
|
|
22
28
|
barStyle: BarStyle;
|
|
23
29
|
isTooltipHidden: boolean;
|
|
@@ -27,6 +33,7 @@ interface Props {
|
|
|
27
33
|
timeSeries: Array<TimeValue>;
|
|
28
34
|
xScale;
|
|
29
35
|
yScalesPerUnit: Record<string, ScaleLinear<number, number>>;
|
|
36
|
+
scaleType?: 'linear' | 'logarithmic';
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
const BarGroup = ({
|
|
@@ -37,7 +44,8 @@ const BarGroup = ({
|
|
|
37
44
|
xScale,
|
|
38
45
|
yScalesPerUnit,
|
|
39
46
|
isTooltipHidden,
|
|
40
|
-
barStyle
|
|
47
|
+
barStyle,
|
|
48
|
+
scaleType
|
|
41
49
|
}: Props): JSX.Element => {
|
|
42
50
|
const isHorizontal = equals(orientation, 'horizontal');
|
|
43
51
|
|
|
@@ -142,6 +150,8 @@ const BarGroup = ({
|
|
|
142
150
|
[isHorizontal, placeholderScale, xScale, metricScale]
|
|
143
151
|
);
|
|
144
152
|
|
|
153
|
+
const neutralValue = useMemo(() => getNeutralValue(scaleType), [scaleType]);
|
|
154
|
+
|
|
145
155
|
return (
|
|
146
156
|
<BarComponent<TimeValue>
|
|
147
157
|
color={colorScale}
|
|
@@ -185,6 +195,7 @@ const BarGroup = ({
|
|
|
185
195
|
lines={linesBar}
|
|
186
196
|
timeSeries={timeSeriesBar}
|
|
187
197
|
yScale={yScalesPerUnit[bar.key.replace('stacked-', '')]}
|
|
198
|
+
neutralValue={neutralValue}
|
|
188
199
|
/>
|
|
189
200
|
) : (
|
|
190
201
|
<BarStack
|
|
@@ -198,6 +209,7 @@ const BarGroup = ({
|
|
|
198
209
|
lines={[linesBar]}
|
|
199
210
|
timeSeries={timeSeriesBar}
|
|
200
211
|
yScale={yScalesPerUnit[linesBar.unit]}
|
|
212
|
+
neutralValue={neutralValue}
|
|
201
213
|
/>
|
|
202
214
|
);
|
|
203
215
|
})}
|
|
@@ -215,7 +227,8 @@ const propsToMemoize = [
|
|
|
215
227
|
'lines',
|
|
216
228
|
'secondUnit',
|
|
217
229
|
'isCenteredZero',
|
|
218
|
-
'barStyle'
|
|
230
|
+
'barStyle',
|
|
231
|
+
'scaleType'
|
|
219
232
|
];
|
|
220
233
|
|
|
221
234
|
export default memo(BarGroup, (prevProps, nextProps) => {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { memo } from 'react';
|
|
2
2
|
|
|
3
|
-
import { scaleBand } from '@visx/scale';
|
|
3
|
+
import { ScaleType, scaleBand } from '@visx/scale';
|
|
4
4
|
import { BarRounded } from '@visx/shape';
|
|
5
5
|
import { dec, equals, gt, pick } from 'ramda';
|
|
6
6
|
|
|
7
|
+
import { BarGroupBar, SeriesPoint, StackKey } from '@visx/shape/lib/types';
|
|
7
8
|
import { BarStyle } from './models';
|
|
8
9
|
import { UseBarStackProps, useBarStack } from './useBarStack';
|
|
9
10
|
|
|
@@ -19,6 +20,7 @@ interface Props extends Omit<UseBarStackProps, 'xScale'> {
|
|
|
19
20
|
barStyle: BarStyle;
|
|
20
21
|
barWidth: number;
|
|
21
22
|
isTooltipHidden: boolean;
|
|
23
|
+
neutralValue: number;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
const getPadding = ({ padding, size, isNegativeValue }): number => {
|
|
@@ -29,6 +31,47 @@ const getPadding = ({ padding, size, isNegativeValue }): number => {
|
|
|
29
31
|
return padding + size;
|
|
30
32
|
};
|
|
31
33
|
|
|
34
|
+
interface GetFirstBarHeightProps {
|
|
35
|
+
bar: Omit<BarGroupBar<StackKey>, 'key' | 'value'> & {
|
|
36
|
+
bar: SeriesPoint<unknown>;
|
|
37
|
+
key: StackKey;
|
|
38
|
+
};
|
|
39
|
+
isHorizontal: boolean;
|
|
40
|
+
barWidth: number;
|
|
41
|
+
y: number;
|
|
42
|
+
isFirstBar: boolean;
|
|
43
|
+
yScale: ScaleType;
|
|
44
|
+
neutralValue: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const getFirstBarHeight = ({
|
|
48
|
+
bar,
|
|
49
|
+
isHorizontal,
|
|
50
|
+
barWidth,
|
|
51
|
+
y,
|
|
52
|
+
isFirstBar,
|
|
53
|
+
yScale,
|
|
54
|
+
neutralValue
|
|
55
|
+
}: GetFirstBarHeightProps): number => {
|
|
56
|
+
if (!isFirstBar || !isHorizontal) {
|
|
57
|
+
return isHorizontal ? Math.abs(bar.height) : barWidth;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (equals(bar.height, 0)) {
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (isHorizontal && bar.height < 0) {
|
|
65
|
+
return bar.height;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (isHorizontal) {
|
|
69
|
+
return Math.abs(bar.width) - (y - yScale(neutralValue));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return barWidth;
|
|
73
|
+
};
|
|
74
|
+
|
|
32
75
|
const BarStack = ({
|
|
33
76
|
timeSeries,
|
|
34
77
|
isHorizontal,
|
|
@@ -38,7 +81,8 @@ const BarStack = ({
|
|
|
38
81
|
barPadding,
|
|
39
82
|
barIndex,
|
|
40
83
|
isTooltipHidden,
|
|
41
|
-
barStyle = { opacity: 1, radius: 0.2 }
|
|
84
|
+
barStyle = { opacity: 1, radius: 0.2 },
|
|
85
|
+
neutralValue
|
|
42
86
|
}: Props): JSX.Element => {
|
|
43
87
|
const {
|
|
44
88
|
BarStackComponent,
|
|
@@ -73,7 +117,21 @@ const BarStack = ({
|
|
|
73
117
|
{...barRoundedProps}
|
|
74
118
|
data-testid={`stacked-bar-${bar.key}-${bar.index}-${bar.bar[1]}`}
|
|
75
119
|
fill={bar.color}
|
|
76
|
-
height={
|
|
120
|
+
height={getFirstBarHeight({
|
|
121
|
+
bar,
|
|
122
|
+
barWidth,
|
|
123
|
+
y: isHorizontal
|
|
124
|
+
? getPadding({
|
|
125
|
+
isNegativeValue,
|
|
126
|
+
padding: bar.y,
|
|
127
|
+
size: bar.height
|
|
128
|
+
})
|
|
129
|
+
: barPadding,
|
|
130
|
+
isFirstBar: shouldApplyRadiusOnBottom,
|
|
131
|
+
isHorizontal,
|
|
132
|
+
yScale,
|
|
133
|
+
neutralValue
|
|
134
|
+
})}
|
|
77
135
|
key={`bar-stack-${barStack.index}-${bar.index}`}
|
|
78
136
|
opacity={barStyle.opacity ?? 1}
|
|
79
137
|
radius={barWidth * barStyle.radius}
|
|
@@ -87,15 +145,7 @@ const BarStack = ({
|
|
|
87
145
|
size: bar.width
|
|
88
146
|
})
|
|
89
147
|
}
|
|
90
|
-
y={
|
|
91
|
-
isHorizontal
|
|
92
|
-
? getPadding({
|
|
93
|
-
isNegativeValue,
|
|
94
|
-
padding: bar.y,
|
|
95
|
-
size: bar.height
|
|
96
|
-
})
|
|
97
|
-
: barPadding
|
|
98
|
-
}
|
|
148
|
+
y={isHorizontal ? bar.y : barPadding}
|
|
99
149
|
onMouseEnter={
|
|
100
150
|
isTooltipHidden
|
|
101
151
|
? undefined
|
|
@@ -122,7 +172,8 @@ const propsToMemoize = [
|
|
|
122
172
|
'barPadding',
|
|
123
173
|
'barIndex',
|
|
124
174
|
'isTooltipHidden',
|
|
125
|
-
'barStyle'
|
|
175
|
+
'barStyle',
|
|
176
|
+
'neutralValue'
|
|
126
177
|
];
|
|
127
178
|
|
|
128
179
|
export default memo(BarStack, (prevProps, nextProps) => {
|
|
@@ -39,6 +39,7 @@ interface Props
|
|
|
39
39
|
thresholdUnit?: string;
|
|
40
40
|
thresholds?: ThresholdsModel;
|
|
41
41
|
width: number;
|
|
42
|
+
skipIntersectionObserver?: boolean;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
const ResponsiveBarChart = ({
|
|
@@ -226,6 +227,7 @@ const ResponsiveBarChart = ({
|
|
|
226
227
|
timeSeries={timeSeries}
|
|
227
228
|
xScale={xScale}
|
|
228
229
|
yScalesPerUnit={yScalesPerUnit}
|
|
230
|
+
scaleType={axis?.scale}
|
|
229
231
|
/>
|
|
230
232
|
{thresholds?.enabled && (
|
|
231
233
|
<Thresholds
|
|
@@ -59,17 +59,20 @@ interface Props extends LineChartProps {
|
|
|
59
59
|
transformMatrix?: {
|
|
60
60
|
fx?: (pointX: number) => number;
|
|
61
61
|
fy?: (pointY: number) => number;
|
|
62
|
-
}
|
|
62
|
+
};
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
const filterLines = (
|
|
65
|
+
const filterLines = (
|
|
66
|
+
lines: Array<Line>,
|
|
67
|
+
displayThreshold: boolean
|
|
68
|
+
): Array<Line> => {
|
|
66
69
|
if (!displayThreshold) {
|
|
67
70
|
return lines;
|
|
68
71
|
}
|
|
69
72
|
const lineOriginMetric = findLineOfOriginMetricThreshold(lines);
|
|
70
73
|
|
|
71
74
|
if (isEmpty(lineOriginMetric)) {
|
|
72
|
-
|
|
75
|
+
return lines;
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
const findLinesUpperLower = lines.map((line) =>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import AccountTreeIcon from '@mui/icons-material/AccountTree';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
import BaseIcon from './BaseIcon';
|
|
5
|
+
|
|
6
|
+
export const BusinessActivityIcon = (props: SvgIconProps): JSX.Element => (
|
|
7
|
+
<BaseIcon
|
|
8
|
+
Icon={AccountTreeIcon}
|
|
9
|
+
dataTestId="BusinessActivityIcon"
|
|
10
|
+
{...props}
|
|
11
|
+
/>
|
|
12
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvgIconProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
import BaseIcon from './BaseIcon';
|
|
4
|
+
|
|
5
|
+
const icon = (
|
|
6
|
+
<g>
|
|
7
|
+
<path d="M301 745.9L28 662.4c-7.4-2.3-12.5-9.2-12.5-16.9V270.4c0-5.7 2.7-10.9 7.3-14.3 4.6-3.3 10.4-4.2 15.8-2.5l273.1 88.5c7.3 2.4 12.2 9.1 12.2 16.8V729c0 5.6-2.7 10.9-7.2 14.2-3.1 2.3-6.8 3.5-10.5 3.5-1.8-.1-3.5-.3-5.2-.8zm5.2-16.9l5.2-16.9-5.2 16.9zM50.8 632.4l237.8 72.7V371.7l-237.8-77v337.7z" />
|
|
8
|
+
<path d="M295.7 743.2c-4.5-3.3-7.2-8.6-7.2-14.2V358.8c0-7.6 4.9-14.4 12.2-16.8l273.1-88.5c5.4-1.8 11.3-.8 15.8 2.5 4.6 3.4 7.3 8.7 7.3 14.3v375.1c0 7.8-5 14.6-12.5 16.9l-273.1 83.4-5.2-16.9 5.2 16.9c-1.7.5-3.4.8-5.2.8-3.6.1-7.3-1-10.4-3.3zm28.2-371.5V705l237.8-72.7V294.7l-237.8 77zM16.3 275.9c-3-9.3 2.1-19.3 11.4-22.3L300.8 165c9.2-3 19.2 2.1 22.2 11.3 3 9.3-2.1 19.3-11.3 22.2L38.6 287.2c-1.8.6-3.7.9-5.5.9-7.4-.1-14.3-4.8-16.8-12.2z" />
|
|
9
|
+
<path d="M573.9 287.2l-273-88.5c-9.3-3-14.4-13-11.4-22.2 3-9.3 13-14.4 22.2-11.3l273.1 88.5c9.3 3 14.4 13 11.4 22.3-2.4 7.4-9.4 12.2-16.8 12.2-1.9-.1-3.7-.5-5.5-1zm-131.3 42.5l-273.1-88.5c-9.3-3-14.4-13-11.4-22.2 3-9.3 12.9-14.4 22.3-11.4l273 88.5c9.3 3 14.4 13 11.4 22.3-2.4 7.4-9.3 12.2-16.8 12.2-1.7 0-3.5-.3-5.4-.9z" />
|
|
10
|
+
</g>
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export const ContainerIcon = (props: SvgIconProps): JSX.Element => (
|
|
14
|
+
<BaseIcon
|
|
15
|
+
{...props}
|
|
16
|
+
dataTestId="ContainerIcon"
|
|
17
|
+
Icon={icon}
|
|
18
|
+
viewBox="6 156 600 600"
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
@@ -10,5 +10,12 @@ const icon = (
|
|
|
10
10
|
);
|
|
11
11
|
|
|
12
12
|
export const DowntimeIcon = (props: SvgIconProps): JSX.Element => (
|
|
13
|
-
<BaseIcon
|
|
13
|
+
<BaseIcon
|
|
14
|
+
{...props}
|
|
15
|
+
dataTestId="DowntimeIcon"
|
|
16
|
+
Icon={icon}
|
|
17
|
+
height="24"
|
|
18
|
+
viewBox="0 0 24 24"
|
|
19
|
+
width="24"
|
|
20
|
+
/>
|
|
14
21
|
);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import BusinessIcon from '@mui/icons-material/Business';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
import BaseIcon from './BaseIcon';
|
|
5
|
+
|
|
6
|
+
export const HostGroupIcon = (props: SvgIconProps): JSX.Element => (
|
|
7
|
+
<BaseIcon Icon={BusinessIcon} dataTestId="HostGroupIcon" {...props} />
|
|
8
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import SettingsInputSvideoIcon from '@mui/icons-material/SettingsInputSvideo';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
import BaseIcon from './BaseIcon';
|
|
5
|
+
|
|
6
|
+
export const MetaServiceIcon = (props: SvgIconProps): JSX.Element => (
|
|
7
|
+
<BaseIcon
|
|
8
|
+
Icon={SettingsInputSvideoIcon}
|
|
9
|
+
dataTestId="MetaServiceIcon"
|
|
10
|
+
{...props}
|
|
11
|
+
/>
|
|
12
|
+
);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import LinearScaleIcon from '@mui/icons-material/LinearScale';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
import BaseIcon from './BaseIcon';
|
|
5
|
+
|
|
6
|
+
export const ServiceGroupIcon = (props: SvgIconProps): JSX.Element => (
|
|
7
|
+
<BaseIcon Icon={LinearScaleIcon} dataTestId="ServiceGroupIcon" {...props} />
|
|
8
|
+
);
|
package/src/Icon/index.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
export { DowntimeIcon } from './DowntimeIcon';
|
|
2
|
+
export { AcknowledgementIcon } from './AcknowledgementIcon';
|
|
1
3
|
export { HostIcon } from './HostIcon';
|
|
2
4
|
export { ServiceIcon } from './ServiceIcon';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
+
export { BusinessActivityIcon } from './BusinessActivityIcon';
|
|
6
|
+
export { HostGroupIcon } from './HostGroupIcon';
|
|
7
|
+
export { ServiceGroupIcon } from './ServiceGroupIcon';
|
|
8
|
+
export { MetaServiceIcon } from './MetaServiceIcon';
|
|
9
|
+
export { ContainerIcon } from './ContainerIcon';
|
package/src/Listing/index.tsx
CHANGED
|
@@ -526,33 +526,32 @@ const Listing = <
|
|
|
526
526
|
className={classes.container}
|
|
527
527
|
ref={containerRef as RefObject<HTMLDivElement>}
|
|
528
528
|
>
|
|
529
|
-
{
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}
|
|
529
|
+
{isActionBarVisible && (
|
|
530
|
+
<div
|
|
531
|
+
className={classes.actionBar}
|
|
532
|
+
ref={actionBarRef as RefObject<HTMLDivElement>}
|
|
533
|
+
>
|
|
534
|
+
<ListingActionBar
|
|
535
|
+
actions={actions}
|
|
536
|
+
actionsBarMemoProps={actionsBarMemoProps}
|
|
537
|
+
columnConfiguration={columnConfiguration}
|
|
538
|
+
columns={columns}
|
|
539
|
+
currentPage={currentPage}
|
|
540
|
+
customPaginationClassName={customPaginationClassName}
|
|
541
|
+
limit={limit}
|
|
542
|
+
listingVariant={listingVariant}
|
|
543
|
+
moveTablePagination={moveTablePagination}
|
|
544
|
+
paginated={paginated}
|
|
545
|
+
totalRows={totalRows}
|
|
546
|
+
viewerModeConfiguration={viewerModeConfiguration}
|
|
547
|
+
widthToMoveTablePagination={widthToMoveTablePagination}
|
|
548
|
+
onLimitChange={changeLimit}
|
|
549
|
+
onPaginate={onPaginate}
|
|
550
|
+
onResetColumns={onResetColumns}
|
|
551
|
+
onSelectColumns={onSelectColumns}
|
|
552
|
+
/>
|
|
553
|
+
</div>
|
|
554
|
+
)}
|
|
556
555
|
|
|
557
556
|
<ParentSize
|
|
558
557
|
parentSizeStyles={{
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type ForwardedRef, forwardRef } from 'react';
|
|
2
2
|
|
|
3
3
|
import { Box, Typography, type TypographyProps } from '@mui/material';
|
|
4
4
|
|
|
5
5
|
const EllipsisTypography = forwardRef(
|
|
6
6
|
(
|
|
7
|
-
{
|
|
8
|
-
|
|
7
|
+
{
|
|
8
|
+
containerClassname,
|
|
9
|
+
...props
|
|
10
|
+
}: TypographyProps & { containerClassname?: string },
|
|
11
|
+
ref?: ForwardedRef<HTMLSpanElement>
|
|
12
|
+
) => {
|
|
9
13
|
return (
|
|
10
14
|
<Box className={containerClassname} sx={{ width: '100%' }}>
|
|
11
15
|
<Typography
|
|
@@ -24,7 +24,7 @@ export const useStyles = makeStyles()((theme) => ({
|
|
|
24
24
|
backgroundColor: theme.palette.layout.body.background
|
|
25
25
|
},
|
|
26
26
|
'&[data-has-actions="true"]': {
|
|
27
|
-
gridTemplateRows: 'min-content auto'
|
|
27
|
+
gridTemplateRows: 'min-content auto'
|
|
28
28
|
},
|
|
29
29
|
display: 'grid',
|
|
30
30
|
gridTemplateRows: 'auto',
|
|
File without changes
|