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

pull/7052/head
Ali 2022-06-13 14:59:41 +12:00 committed by GitHub
parent 892fdbf60d
commit 66799a53f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@
> >
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove <i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove
</button> </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 <i class="fa fa-plus-circle space-right" aria-hidden="true"></i>Add environment
</button> </button>
</div> </div>

View File

@ -34,8 +34,8 @@ angular.module('portainer.app').controller('EndpointsDatatableController', [
this.paginationChanged(); this.paginationChanged();
}; };
this.setRefferer = function () { this.setReferrer = function () {
window.localStorage.setItem('wizardRefferer', 'environments'); window.localStorage.setItem('wizardReferrer', 'environments');
}; };
/** /**

View File

@ -118,8 +118,8 @@ export function EnvironmentCreationView() {
]) ])
), ),
}); });
if (localStorage.getItem('wizardRefferer') === 'environments') { if (localStorage.getItem('wizardReferrer') === 'environments') {
localStorage.removeItem('wizardRefferer'); localStorage.removeItem('wizardReferrer');
router.stateService.go('portainer.endpoints'); router.stateService.go('portainer.endpoints');
return; return;
} }