mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
feat(helm): auto refresh helm resources [r8s-298] (#672)
This commit is contained in:
parent
9a9373dd0f
commit
61d6ac035d
10 changed files with 120 additions and 50 deletions
|
@ -16,19 +16,22 @@ export function useHelmRelease<T = HelmRelease>(
|
|||
options: {
|
||||
select?: (data: HelmRelease) => T;
|
||||
showResources?: boolean;
|
||||
refetchInterval?: number;
|
||||
} = {}
|
||||
) {
|
||||
const { select, showResources, refetchInterval } = options;
|
||||
return useQuery(
|
||||
[environmentId, 'helm', 'releases', namespace, name, options.showResources],
|
||||
() =>
|
||||
getHelmRelease(environmentId, name, {
|
||||
namespace,
|
||||
showResources: options.showResources,
|
||||
showResources,
|
||||
}),
|
||||
{
|
||||
enabled: !!environmentId && !!name && !!namespace,
|
||||
...withGlobalError('Unable to retrieve helm application details'),
|
||||
select: options.select,
|
||||
select,
|
||||
refetchInterval,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue