From 66799a53f4bba3bae4fb61e168d8340ba6a20e21 Mon Sep 17 00:00:00 2001 From: Ali <83188384+testA113@users.noreply.github.com> Date: Mon, 13 Jun 2022 14:59:41 +1200 Subject: [PATCH] fix(wizard): return back to envs page EE-3419 (#7065) --- .../datatables/endpoints-datatable/endpointsDatatable.html | 2 +- .../endpoints-datatable/endpointsDatatableController.js | 4 ++-- .../EnvironmentsCreationView/EnvironmentsCreationView.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/portainer/components/datatables/endpoints-datatable/endpointsDatatable.html b/app/portainer/components/datatables/endpoints-datatable/endpointsDatatable.html index 21d4ac8d0..ee619a1ff 100644 --- a/app/portainer/components/datatables/endpoints-datatable/endpointsDatatable.html +++ b/app/portainer/components/datatables/endpoints-datatable/endpointsDatatable.html @@ -14,7 +14,7 @@ > Remove - diff --git a/app/portainer/components/datatables/endpoints-datatable/endpointsDatatableController.js b/app/portainer/components/datatables/endpoints-datatable/endpointsDatatableController.js index bbb221c5a..04ebb9c0d 100644 --- a/app/portainer/components/datatables/endpoints-datatable/endpointsDatatableController.js +++ b/app/portainer/components/datatables/endpoints-datatable/endpointsDatatableController.js @@ -34,8 +34,8 @@ angular.module('portainer.app').controller('EndpointsDatatableController', [ this.paginationChanged(); }; - this.setRefferer = function () { - window.localStorage.setItem('wizardRefferer', 'environments'); + this.setReferrer = function () { + window.localStorage.setItem('wizardReferrer', 'environments'); }; /** diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/EnvironmentsCreationView.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/EnvironmentsCreationView.tsx index c7a4ffb24..b13b50bba 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/EnvironmentsCreationView.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/EnvironmentsCreationView.tsx @@ -118,8 +118,8 @@ export function EnvironmentCreationView() { ]) ), }); - if (localStorage.getItem('wizardRefferer') === 'environments') { - localStorage.removeItem('wizardRefferer'); + if (localStorage.getItem('wizardReferrer') === 'environments') { + localStorage.removeItem('wizardReferrer'); router.stateService.go('portainer.endpoints'); return; }