fix(wizard): return back to envs page EE-3419 (#7065)

pull/7052/head
Ali 2 years ago committed by GitHub
parent 892fdbf60d
commit 66799a53f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,7 +14,7 @@
>
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove
</button>
<button type="button" class="btn btn-sm btn-primary" ng-click="$ctrl.setRefferer()" ui-sref="portainer.wizard.endpoints" data-cy="endpoint-addEndpointButton">
<button type="button" class="btn btn-sm btn-primary" ng-click="$ctrl.setReferrer()" ui-sref="portainer.wizard.endpoints" data-cy="endpoint-addEndpointButton">
<i class="fa fa-plus-circle space-right" aria-hidden="true"></i>Add environment
</button>
</div>

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

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

Loading…
Cancel
Save