* chore: 🤖 deprecate window object service Deprecate `browser-object` service in favor of `ember-browser-services` ✅ Closes: ICU-7152 * refactor: 💡 cluster-url test fail commit with cluster-url test failing ✅ Closes: ICU-7152 * refactor: 💡 refactor test to reflect changes Refactor test to reflect `browser/window` service in `cluster-url` route ✅ Closes: ICU-7152 * refactor: 💡 refactor cluster url test change logic of mockIPC to a function call ✅ Closes: ICU-7152
34 lines
730 B
JavaScript
34 lines
730 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import Route from '@ember/routing/route';
|
|
import { inject as service } from '@ember/service';
|
|
import { action } from '@ember/object';
|
|
|
|
export default class OnboardingSuccessRoute extends Route {
|
|
// =services
|
|
@service router;
|
|
@service session;
|
|
@service('browser/window') window;
|
|
|
|
// =methods
|
|
model() {
|
|
const model = this.modelFor('onboarding');
|
|
return {
|
|
...model,
|
|
clusterUrl: this.window.origin,
|
|
};
|
|
}
|
|
|
|
@action
|
|
showTargetList(scope) {
|
|
const {
|
|
project: { id: scopeID },
|
|
target: { id: targetID },
|
|
} = scope;
|
|
this.router.transitionTo('scopes.scope.targets.target', scopeID, targetID);
|
|
}
|
|
}
|