UI: Ember upgrade: Handle deprecation router service from host (#28603)

* use alias for router injection

* update @router declarations in engine files

* fix remaining pki router imports

* dynamically set router based on owner

* address replication routers

* update markdown docs

* use non-deprecated import for getOwner

* revert out of scope changes

* add transition-to test
This commit is contained in:
claire bontempo
2024-10-08 09:01:46 -07:00
committed by GitHub
parent b6145bc3bb
commit 7774261c15
90 changed files with 238 additions and 116 deletions

View File

@@ -24,7 +24,7 @@ interface LdapLibraryCheckOutController extends Controller {
export default class LdapLibraryCheckOutRoute extends Route {
@service declare readonly flashMessages: FlashMessageService;
@service declare readonly router: RouterService;
@service('app-router') declare readonly router: RouterService;
accountsRoute = 'vault.cluster.secrets.backend.ldap.libraries.library.details.accounts';

View File

@@ -9,7 +9,7 @@ import { service } from '@ember/service';
import type RouterService from '@ember/routing/router-service';
export default class LdapLibraryRoute extends Route {
@service declare readonly router: RouterService;
@service('app-router') declare readonly router: RouterService;
redirect() {
this.router.transitionTo('vault.cluster.secrets.backend.ldap.libraries.library.details.accounts');

View File

@@ -9,7 +9,7 @@ import { service } from '@ember/service';
import type RouterService from '@ember/routing/router-service';
export default class LdapLibraryRoute extends Route {
@service declare readonly router: RouterService;
@service('app-router') declare readonly router: RouterService;
redirect() {
this.router.transitionTo('vault.cluster.secrets.backend.ldap.libraries.library.details');