Files
threshold-ui/ui/admin/app/routes/onboarding/quick-setup/choose-path.js
T
Randall MoreyandCameron Perera 15dc735322 chore: move onboarding to top level (#1131)
* chore: move onboarding to top level

* chore: add types

* Update ui/admin/app/routes/onboarding.js

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>

* fix: broken paths

* chore: fix broken success route and simplify error handling

* fix: tests

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2022-06-13 16:38:18 -04:00

25 lines
561 B
JavaScript

import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
export default class OnboardingQuickSetupChoosePathRoute extends Route {
// =services
@service router;
// =actions
@action
choosePath(path = 'guided') {
switch (path) {
case 'guided':
this.router.transitionTo('onboarding.quick-setup.create-resources');
break;
case 'manual':
default:
this.router.transitionTo('scopes.scope.new', 'global');
break;
}
}
}