@centreon/ui 25.9.2 → 25.9.3

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@centreon/ui",
3
- "version": "25.9.2",
3
+ "version": "25.9.3",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -36,6 +36,7 @@ interface UseMetricsQueryProps {
36
36
  start?: string | null;
37
37
  timePeriodType: number;
38
38
  };
39
+ isEnabled?: boolean;
39
40
  }
40
41
 
41
42
  interface UseMetricsQueryState {
@@ -101,7 +102,8 @@ const useGraphQuery = ({
101
102
  refreshInterval = false,
102
103
  refreshCount,
103
104
  bypassQueryParams = false,
104
- prefix
105
+ prefix,
106
+ isEnabled=true
105
107
  }: UseMetricsQueryProps): UseMetricsQueryState => {
106
108
  const timePeriodToUse = equals(timePeriod?.timePeriodType, -1)
107
109
  ? {
@@ -158,7 +160,7 @@ const useGraphQuery = ({
158
160
  refreshCount || 0
159
161
  ],
160
162
  queryOptions: {
161
- enabled: areResourcesFullfilled(resources) && !isEmpty(definedMetrics),
163
+ enabled: areResourcesFullfilled(resources) && !isEmpty(definedMetrics) && isEnabled,
162
164
  refetchInterval: refreshInterval,
163
165
  suspense: false
164
166
  },