Files
threshold-ui/ui/admin/app/routes/onboarding/success.js
T
2024-05-31 11:29:24 -07:00

34 lines
731 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
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);
}
}