Files
threshold-ui/ui/admin/app/routes/onboarding/success.js
T

33 lines
730 B
JavaScript
Raw Normal View History

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
2023-01-31 12:05:52 -08:00
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;
2023-01-31 12:05:52 -08:00
// =methods
model() {
const model = this.modelFor('onboarding');
return {
...model,
clusterUrl: this.window.origin,
2023-01-31 12:05:52 -08:00
};
}
@action
showTargetList(scope) {
const {
project: { id: scopeID },
target: { id: targetID },
} = scope;
this.router.transitionTo('scopes.scope.targets.target', scopeID, targetID);
}
}