Files
threshold-ui/ui/admin/app/routes/onboarding/success.js
T
Carlos Alcaide Corvo 007fc4960b chore: 🤖 Refactor onboarding (#1586)
* chore: 🤖 Refactor onboarding

Refactor onboarding

✅ Closes: ICU-7558
2023-01-31 12:05:52 -08:00

29 lines
655 B
JavaScript

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 browserObject;
// =methods
model() {
const model = this.modelFor('onboarding');
return {
...model,
clusterUrl: this.browserObject.window.origin,
};
}
@action
showTargetList(scope) {
const {
project: { id: scopeID },
target: { id: targetID },
} = scope;
this.router.transitionTo('scopes.scope.targets.target', scopeID, targetID);
}
}