@centreon/ui 23.10.86 → 23.10.88
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
|
@@ -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,
|
|
@@ -4,7 +4,7 @@ import { always, cond, equals } from 'ramda';
|
|
|
4
4
|
import { refreshIntervalAtom } from '@centreon/ui-context';
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
|
-
globalRefreshInterval
|
|
7
|
+
globalRefreshInterval?: {
|
|
8
8
|
interval: number | null;
|
|
9
9
|
type: 'global' | 'manual';
|
|
10
10
|
};
|
|
@@ -15,7 +15,10 @@ interface Props {
|
|
|
15
15
|
export const useRefreshInterval = ({
|
|
16
16
|
refreshInterval,
|
|
17
17
|
refreshIntervalCustom,
|
|
18
|
-
globalRefreshInterval
|
|
18
|
+
globalRefreshInterval = {
|
|
19
|
+
interval: null,
|
|
20
|
+
type: 'global'
|
|
21
|
+
}
|
|
19
22
|
}: Props): number | false => {
|
|
20
23
|
const platformInterval = useAtomValue(refreshIntervalAtom);
|
|
21
24
|
|