@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
|
@@ -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
|
},
|