mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
fix(helm): fix helm move to advance deployments issues [EE-5999] (#10453)
* fix helm move to adv deployments
This commit is contained in:
parent
7218eb0892
commit
ff5b311eee
17 changed files with 39 additions and 24 deletions
|
@ -41,6 +41,7 @@ export function HelmRepositoryDatatable() {
|
|||
|
||||
return (
|
||||
<Datatable
|
||||
getRowId={(row) => row.URL}
|
||||
dataset={helmRepos}
|
||||
settingsManager={tableState}
|
||||
columns={columns}
|
||||
|
|
|
@ -55,6 +55,10 @@ export function HelmRepositoryDatatableActions({ selectedItems }: Props) {
|
|||
return;
|
||||
}
|
||||
|
||||
deleteHelmRepoMutation.mutate(selectedItems);
|
||||
deleteHelmRepoMutation.mutate(selectedItems, {
|
||||
onSuccess: () => {
|
||||
router.stateService.reload();
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,11 +19,17 @@ export function CreateHelmRepositoryForm() {
|
|||
const createHelmRepositoryMutation = useCreateHelmRepositoryMutation();
|
||||
const helmReposQuery = useHelmRepositories(currentUser.user.Id);
|
||||
|
||||
const allRepositories =
|
||||
helmReposQuery.data?.UserRepositories.map((x) => x.URL) || [];
|
||||
if (helmReposQuery.data?.GlobalRepository) {
|
||||
allRepositories.push(helmReposQuery.data?.GlobalRepository);
|
||||
}
|
||||
|
||||
return (
|
||||
<HelmRepositoryForm
|
||||
isLoading={createHelmRepositoryMutation.isLoading}
|
||||
onSubmit={onSubmit}
|
||||
URLs={helmReposQuery.data?.UserRepositories.map((x) => x.URL) || []}
|
||||
URLs={allRepositories}
|
||||
/>
|
||||
);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue