diff --git a/app/kubernetes/registries/kube-registry-access-view/kube-registry-access-view.controller.js b/app/kubernetes/registries/kube-registry-access-view/kube-registry-access-view.controller.js
index 97db67ae8..3eb4e1c85 100644
--- a/app/kubernetes/registries/kube-registry-access-view/kube-registry-access-view.controller.js
+++ b/app/kubernetes/registries/kube-registry-access-view/kube-registry-access-view.controller.js
@@ -44,7 +44,7 @@ export default class KubernetesRegistryAccessController {
await this.EndpointService.updateRegistryAccess(this.endpoint.Id, this.registry.Id, {
namespaces,
});
- this.$state.reload();
+ this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Failed saving registry access');
}
diff --git a/app/kubernetes/views/applications/applicationsController.js b/app/kubernetes/views/applications/applicationsController.js
index 36f91fc4f..dd5e089b0 100644
--- a/app/kubernetes/views/applications/applicationsController.js
+++ b/app/kubernetes/views/applications/applicationsController.js
@@ -45,7 +45,7 @@ class KubernetesApplicationsController {
} finally {
--actionCount;
if (actionCount === 0) {
- this.$state.reload();
+ this.$state.reload(this.$state.current);
}
}
}
@@ -79,7 +79,7 @@ class KubernetesApplicationsController {
} finally {
--actionCount;
if (actionCount === 0) {
- this.$state.reload();
+ this.$state.reload(this.$state.current);
}
}
}
diff --git a/app/kubernetes/views/applications/create/createApplicationController.js b/app/kubernetes/views/applications/create/createApplicationController.js
index c3903cf89..50bdc685f 100644
--- a/app/kubernetes/views/applications/create/createApplicationController.js
+++ b/app/kubernetes/views/applications/create/createApplicationController.js
@@ -169,7 +169,7 @@ class KubernetesCreateApplicationController {
this.state.updateWebEditorInProgress = true;
await this.StackService.updateKubeStack({ EndpointId: this.endpoint.Id, Id: this.application.StackId }, this.stackFileContent, null);
this.state.isEditorDirty = false;
- await this.$state.reload();
+ await this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Failed redeploying application');
} finally {
diff --git a/app/kubernetes/views/applications/edit/applicationController.js b/app/kubernetes/views/applications/edit/applicationController.js
index 935de40aa..eb3f88094 100644
--- a/app/kubernetes/views/applications/edit/applicationController.js
+++ b/app/kubernetes/views/applications/edit/applicationController.js
@@ -215,7 +215,7 @@ class KubernetesApplicationController {
const revision = _.nth(this.application.Revisions, -2);
await this.KubernetesApplicationService.rollback(this.application, revision);
this.Notifications.success('Application successfully rolled back');
- this.$state.reload();
+ this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to rollback the application');
}
@@ -236,7 +236,7 @@ class KubernetesApplicationController {
const promises = _.map(this.application.Pods, (item) => this.KubernetesPodService.delete(item));
await Promise.all(promises);
this.Notifications.success('Application successfully redeployed');
- this.$state.reload();
+ this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to redeploy the application');
}
@@ -259,7 +259,7 @@ class KubernetesApplicationController {
application.Note = this.formValues.Note;
await this.KubernetesApplicationService.patch(this.application, application, true);
this.Notifications.success('Application successfully updated');
- this.$state.reload();
+ this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to update application');
}
diff --git a/app/kubernetes/views/applications/helm/helm.controller.js b/app/kubernetes/views/applications/helm/helm.controller.js
index df889d4c2..431589398 100644
--- a/app/kubernetes/views/applications/helm/helm.controller.js
+++ b/app/kubernetes/views/applications/helm/helm.controller.js
@@ -20,7 +20,7 @@ export default class KubernetesHelmApplicationController {
if (releases.length > 0) {
this.state.release = releases[0];
} else {
- throw PortainerError(`Release ${this.state.params.name} not found`);
+ throw new PortainerError(`Release ${this.state.params.name} not found`);
}
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to retrieve helm application details');
diff --git a/app/kubernetes/views/cluster/node/nodeController.js b/app/kubernetes/views/cluster/node/nodeController.js
index 9a726add7..d08b949c5 100644
--- a/app/kubernetes/views/cluster/node/nodeController.js
+++ b/app/kubernetes/views/cluster/node/nodeController.js
@@ -253,7 +253,7 @@ class KubernetesNodeController {
await this.drainNode();
}
this.Notifications.success('Node updated successfully');
- this.$state.reload();
+ this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to update node');
}
diff --git a/app/kubernetes/views/configurations/configurationsController.js b/app/kubernetes/views/configurations/configurationsController.js
index 931a7fac6..2fa24c9dc 100644
--- a/app/kubernetes/views/configurations/configurationsController.js
+++ b/app/kubernetes/views/configurations/configurationsController.js
@@ -51,7 +51,7 @@ class KubernetesConfigurationsController {
} finally {
--actionCount;
if (actionCount === 0) {
- this.$state.reload();
+ this.$state.reload(this.$state.current);
}
}
}
diff --git a/app/kubernetes/views/configurations/edit/configurationController.js b/app/kubernetes/views/configurations/edit/configurationController.js
index cb2e16f45..9c8f5615f 100644
--- a/app/kubernetes/views/configurations/edit/configurationController.js
+++ b/app/kubernetes/views/configurations/edit/configurationController.js
@@ -107,7 +107,7 @@ class KubernetesConfigurationController {
} else {
await this.KubernetesConfigurationService.update(this.formValues, this.configuration);
this.Notifications.success('Configuration succesfully updated');
- this.$state.reload();
+ this.$state.reload(this.$state.current);
}
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to update configuration');
diff --git a/app/kubernetes/views/resource-pools/access/resourcePoolAccessController.js b/app/kubernetes/views/resource-pools/access/resourcePoolAccessController.js
index daed229d5..88748e92f 100644
--- a/app/kubernetes/views/resource-pools/access/resourcePoolAccessController.js
+++ b/app/kubernetes/views/resource-pools/access/resourcePoolAccessController.js
@@ -98,7 +98,7 @@ class KubernetesResourcePoolAccessController {
const accessConfigMap = KubernetesConfigMapHelper.modifiyNamespaceAccesses(angular.copy(this.accessConfigMap), this.pool.Namespace.Name, newAccesses);
await this.KubernetesConfigMapService.updateAccess(accessConfigMap);
this.Notifications.success('Access successfully created');
- this.$state.reload();
+ this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to create accesses');
}
@@ -118,7 +118,7 @@ class KubernetesResourcePoolAccessController {
const accessConfigMap = KubernetesConfigMapHelper.modifiyNamespaceAccesses(angular.copy(this.accessConfigMap), this.pool.Namespace.Name, newAccesses);
await this.KubernetesConfigMapService.updateAccess(accessConfigMap);
this.Notifications.success('Access successfully removed');
- this.$state.reload();
+ this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to remove accesses');
} finally {
diff --git a/app/kubernetes/views/resource-pools/edit/resourcePoolController.js b/app/kubernetes/views/resource-pools/edit/resourcePoolController.js
index f611a5b9d..d35600c32 100644
--- a/app/kubernetes/views/resource-pools/edit/resourcePoolController.js
+++ b/app/kubernetes/views/resource-pools/edit/resourcePoolController.js
@@ -176,7 +176,7 @@ class KubernetesResourcePoolController {
this.checkDefaults();
await this.KubernetesResourcePoolService.patch(oldFormValues, newFormValues);
this.Notifications.success('Namespace successfully updated', this.pool.Namespace.Name);
- this.$state.reload();
+ this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to create namespace');
} finally {
@@ -238,7 +238,7 @@ class KubernetesResourcePoolController {
await this.KubernetesResourcePoolService.toggleSystem(this.endpoint.Id, namespaceName, !this.isSystem);
this.Notifications.success('Namespace successfully updated', namespaceName);
- this.$state.reload();
+ this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to create namespace');
} finally {
diff --git a/app/kubernetes/views/resource-pools/resourcePoolsController.js b/app/kubernetes/views/resource-pools/resourcePoolsController.js
index 2ff466800..cd5403946 100644
--- a/app/kubernetes/views/resource-pools/resourcePoolsController.js
+++ b/app/kubernetes/views/resource-pools/resourcePoolsController.js
@@ -29,7 +29,7 @@ class KubernetesResourcePoolsController {
} finally {
--actionCount;
if (actionCount === 0) {
- this.$state.reload();
+ this.$state.reload(this.$state.current);
}
}
}
diff --git a/app/kubernetes/views/volumes/edit/volumeController.js b/app/kubernetes/views/volumes/edit/volumeController.js
index 332c58c84..8d52bb9a3 100644
--- a/app/kubernetes/views/volumes/edit/volumeController.js
+++ b/app/kubernetes/views/volumes/edit/volumeController.js
@@ -96,7 +96,7 @@ class KubernetesVolumeController {
this.Notifications.success('Applications successfully redeployed');
}
- this.$state.reload();
+ this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to update volume.');
}
diff --git a/app/kubernetes/views/volumes/volumesController.js b/app/kubernetes/views/volumes/volumesController.js
index cc8beb096..4d2b75dbe 100644
--- a/app/kubernetes/views/volumes/volumesController.js
+++ b/app/kubernetes/views/volumes/volumesController.js
@@ -68,7 +68,7 @@ class KubernetesVolumesController {
} finally {
--actionCount;
if (actionCount === 0) {
- this.$state.reload();
+ this.$state.reload(this.$state.current);
}
}
}
diff --git a/app/portainer/components/forms/kubernetes-app-git-form/kubernetes-app-git-form.controller.js b/app/portainer/components/forms/kubernetes-app-git-form/kubernetes-app-git-form.controller.js
index 68ab3d1bc..af7a8c691 100644
--- a/app/portainer/components/forms/kubernetes-app-git-form/kubernetes-app-git-form.controller.js
+++ b/app/portainer/components/forms/kubernetes-app-git-form/kubernetes-app-git-form.controller.js
@@ -55,7 +55,7 @@ class KubernetesAppGitFormController {
this.state.redeployInProgress = true;
await this.StackService.updateKubeGit(this.stack.Id, this.stack.EndpointId, this.namespace, this.formValues);
this.Notifications.success('Pulled and redeployed stack successfully');
- await this.$state.reload();
+ await this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Failed redeploying application');
} finally {
diff --git a/app/portainer/views/endpoints/access/endpointAccessController.js b/app/portainer/views/endpoints/access/endpointAccessController.js
index 6d7e2329e..77f414a31 100644
--- a/app/portainer/views/endpoints/access/endpointAccessController.js
+++ b/app/portainer/views/endpoints/access/endpointAccessController.js
@@ -33,7 +33,7 @@ class EndpointAccessController {
this.state.actionInProgress = true;
await this.EndpointService.updateEndpoint(this.$transition$.params().id, this.endpoint);
this.Notifications.success('Access successfully updated');
- this.$state.reload();
+ this.$state.reload(this.$state.current);
} catch (err) {
this.state.actionInProgress = false;
this.Notifications.error('Failure', err, 'Unable to update accesses');