mirror of https://github.com/portainer/portainer
fix(wizard): return back to envs page EE-3419 (#7065)
parent
892fdbf60d
commit
66799a53f4
|
@ -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…
Reference in New Issue