diff --git a/app/kubernetes/react/components/index.ts b/app/kubernetes/react/components/index.ts index 82fbe2ac8..bf0613ea2 100644 --- a/app/kubernetes/react/components/index.ts +++ b/app/kubernetes/react/components/index.ts @@ -15,6 +15,7 @@ export const componentsModule = angular 'onChangeAvailability', 'description', 'ingressControllers', + 'isLoading', 'noIngressControllerLabel', 'view', ]) diff --git a/app/kubernetes/views/configure/configure.html b/app/kubernetes/views/configure/configure.html index 7a5a16415..879a034cf 100644 --- a/app/kubernetes/views/configure/configure.html +++ b/app/kubernetes/views/configure/configure.html @@ -44,6 +44,7 @@ { const oldStorageClass = _.find(this.oldStorageClasses, { Name: storageClass.Name }); @@ -224,19 +224,7 @@ class KubernetesConfigureController { } configure() { - const toDel = _.filter(this.formValues.IngressClasses, { NeedsDeletion: true }); - if (toDel.length) { - this.ModalService.confirmUpdate( - `Removing ingress controllers may cause applications to be unaccessible. All ingress configurations from affected applications will be removed.

Do you wish to continue?`, - (confirmed) => { - if (confirmed) { - return this.$async(this.configureAsync); - } - } - ); - } else { - return this.$async(this.configureAsync); - } + return this.$async(this.configureAsync); } /* #endregion */ @@ -292,6 +280,7 @@ class KubernetesConfigureController { IngressAvailabilityPerNamespace: false, }; + this.isIngressControllersLoading = true; try { this.availableAccessModes = new KubernetesStorageClassAccessPolicies(); @@ -332,6 +321,7 @@ class KubernetesConfigureController { this.Notifications.error('Failure', err, 'Unable to retrieve environment configuration'); } finally { this.state.viewReady = true; + this.isIngressControllersLoading = false; } window.addEventListener('beforeunload', this.onBeforeOnload); diff --git a/app/kubernetes/views/resource-pools/create/createResourcePoolController.js b/app/kubernetes/views/resource-pools/create/createResourcePoolController.js index 319c66e74..ae139bd3a 100644 --- a/app/kubernetes/views/resource-pools/create/createResourcePoolController.js +++ b/app/kubernetes/views/resource-pools/create/createResourcePoolController.js @@ -109,7 +109,7 @@ class KubernetesCreateResourcePoolController { this.checkDefaults(); this.formValues.Owner = this.Authentication.getUserDetails().username; await this.KubernetesResourcePoolService.create(this.formValues); - await updateIngressControllerClassMap(this.endpoint.Id, this.ingressControllers, this.formValues.Name); + await updateIngressControllerClassMap(this.endpoint.Id, this.ingressControllers || [], this.formValues.Name); this.Notifications.success('Namespace successfully created', this.formValues.Name); this.$state.go('kubernetes.resourcePools'); } catch (err) { diff --git a/app/kubernetes/views/resource-pools/edit/resourcePoolController.js b/app/kubernetes/views/resource-pools/edit/resourcePoolController.js index 444c688fb..331082811 100644 --- a/app/kubernetes/views/resource-pools/edit/resourcePoolController.js +++ b/app/kubernetes/views/resource-pools/edit/resourcePoolController.js @@ -144,7 +144,7 @@ class KubernetesResourcePoolController { try { this.checkDefaults(); await this.KubernetesResourcePoolService.patch(oldFormValues, newFormValues); - await updateIngressControllerClassMap(this.endpoint.Id, this.ingressControllers, this.formValues.Name); + await updateIngressControllerClassMap(this.endpoint.Id, this.ingressControllers || [], this.formValues.Name); this.Notifications.success('Namespace successfully updated', this.pool.Namespace.Name); this.$state.reload(this.$state.current); } catch (err) { diff --git a/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatable.tsx b/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatable.tsx index 2d33de173..2412e0c29 100644 --- a/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatable.tsx +++ b/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatable.tsx @@ -19,6 +19,7 @@ interface Props { ) => void; // angular function to save the ingress class list description: string; ingressControllers: IngressControllerClassMap[] | undefined; + isLoading: boolean; noIngressControllerLabel: string; view: string; } @@ -27,6 +28,7 @@ export function IngressClassDatatable({ onChangeAvailability, description, ingressControllers, + isLoading, noIngressControllerLabel, view, }: Props) { @@ -42,7 +44,7 @@ export function IngressClassDatatable({ storageKey="ingressClasses" columns={columns} settingsStore={settings} - isLoading={!ingControllerFormValues} + isLoading={isLoading} emptyContentLabel={noIngressControllerLabel} titleOptions={{ icon: 'database',