1
0
Fork 0
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:
Prabhat Khera 2023-10-12 11:02:09 +13:00 committed by GitHub
parent 7218eb0892
commit ff5b311eee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 39 additions and 24 deletions

View file

@ -41,6 +41,7 @@ export function HelmRepositoryDatatable() {
return (
<Datatable
getRowId={(row) => row.URL}
dataset={helmRepos}
settingsManager={tableState}
columns={columns}

View file

@ -55,6 +55,10 @@ export function HelmRepositoryDatatableActions({ selectedItems }: Props) {
return;
}
deleteHelmRepoMutation.mutate(selectedItems);
deleteHelmRepoMutation.mutate(selectedItems, {
onSuccess: () => {
router.stateService.reload();
},
});
}
}

View file

@ -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}
/>
);