@centreon/ui 23.10.87 → 23.10.89
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
|
@@ -110,7 +110,7 @@ const ResponsiveSingleBar = ({
|
|
|
110
110
|
() =>
|
|
111
111
|
scaleLinear<number>({
|
|
112
112
|
domain: [0, adaptedMaxValue],
|
|
113
|
-
range: [0, width]
|
|
113
|
+
range: [0, width - 10 || 0]
|
|
114
114
|
}),
|
|
115
115
|
[width, adaptedMaxValue]
|
|
116
116
|
);
|
|
@@ -150,7 +150,7 @@ const ResponsiveSingleBar = ({
|
|
|
150
150
|
height={barHeights[size]}
|
|
151
151
|
rx={4}
|
|
152
152
|
style={springStyle}
|
|
153
|
-
x={
|
|
153
|
+
x={5}
|
|
154
154
|
y={groupMargin + (isSmall ? 0 : 2 * margins.top)}
|
|
155
155
|
/>
|
|
156
156
|
<Bar
|
|
@@ -160,7 +160,7 @@ const ResponsiveSingleBar = ({
|
|
|
160
160
|
ry={4}
|
|
161
161
|
stroke={alpha(theme.palette.text.primary, 0.3)}
|
|
162
162
|
width={maxBarWidth}
|
|
163
|
-
x={
|
|
163
|
+
x={5}
|
|
164
164
|
y={groupMargin + (isSmall ? 0 : 2 * margins.top)}
|
|
165
165
|
/>
|
|
166
166
|
{thresholds.enabled && (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ParentSize } from '../..';
|
|
2
2
|
|
|
3
3
|
import { SingleBarProps } from './models';
|
|
4
4
|
import ResponsiveSingleBar from './ResponsiveSingleBar';
|
|
@@ -9,7 +9,7 @@ const SingleBar = ({ data, ...props }: SingleBarProps): JSX.Element | null => {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<
|
|
12
|
+
<ParentSize>
|
|
13
13
|
{({ width, height }) => (
|
|
14
14
|
<ResponsiveSingleBar
|
|
15
15
|
{...props}
|
|
@@ -18,7 +18,7 @@ const SingleBar = ({ data, ...props }: SingleBarProps): JSX.Element | null => {
|
|
|
18
18
|
width={width}
|
|
19
19
|
/>
|
|
20
20
|
)}
|
|
21
|
-
</
|
|
21
|
+
</ParentSize>
|
|
22
22
|
);
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -55,10 +55,12 @@ interface PerformanceGraphData extends Omit<LineChartData, 'global'> {
|
|
|
55
55
|
base: number;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
const resourceTypeQueryParameter = {
|
|
58
|
+
export const resourceTypeQueryParameter = {
|
|
59
59
|
[WidgetResourceType.host]: 'host.id',
|
|
60
60
|
[WidgetResourceType.hostCategory]: 'hostcategory.id',
|
|
61
61
|
[WidgetResourceType.hostGroup]: 'hostgroup.id',
|
|
62
|
+
[WidgetResourceType.serviceCategory]: 'servicecategory.id',
|
|
63
|
+
[WidgetResourceType.serviceGroup]: 'servicegroup.id',
|
|
62
64
|
[WidgetResourceType.service]: 'service.name'
|
|
63
65
|
};
|
|
64
66
|
|
package/src/index.ts
CHANGED
|
@@ -123,7 +123,10 @@ export type {
|
|
|
123
123
|
export { default as Responsive } from './Responsive';
|
|
124
124
|
export { default as useFetchQuery } from './api/useFetchQuery';
|
|
125
125
|
export { default as useMutationQuery, Method } from './api/useMutationQuery';
|
|
126
|
-
export {
|
|
126
|
+
export {
|
|
127
|
+
default as useGraphQuery,
|
|
128
|
+
resourceTypeQueryParameter
|
|
129
|
+
} from './api/useGraphQuery';
|
|
127
130
|
export { default as QueryProvider } from './api/QueryProvider';
|
|
128
131
|
export {
|
|
129
132
|
default as FileDropZone,
|