2023-03-01 09:39:41 -06:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2020-06-29 18:11:11 -04:00
|
|
|
import EmberRouter from '@ember/routing/router';
|
|
|
|
|
import config from './config/environment';
|
|
|
|
|
|
|
|
|
|
export default class Router extends EmberRouter {
|
|
|
|
|
location = config.locationType;
|
|
|
|
|
rootURL = config.rootURL;
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-09 10:51:11 -05:00
|
|
|
Router.map(function () {
|
2020-11-16 15:08:59 -05:00
|
|
|
this.route('scopes', function () {
|
|
|
|
|
this.route('scope', { path: ':scope_id' }, function () {
|
|
|
|
|
this.route('authenticate', function () {
|
2021-04-12 18:10:08 -04:00
|
|
|
this.route('method', { path: ':auth_method_id' }, function () {
|
|
|
|
|
this.route('oidc');
|
|
|
|
|
});
|
2020-11-12 15:13:28 -05:00
|
|
|
});
|
2020-11-19 17:02:23 -05:00
|
|
|
this.route('projects', function () {
|
2021-02-02 11:47:00 -05:00
|
|
|
this.route('targets', function () {
|
2021-03-05 17:49:47 -05:00
|
|
|
this.route('target', { path: ':target_id' }, function () {
|
2021-02-03 11:20:38 -05:00
|
|
|
this.route('hosts');
|
2021-02-04 10:49:14 -05:00
|
|
|
this.route('sessions');
|
2021-02-03 11:20:38 -05:00
|
|
|
});
|
2021-02-02 11:47:00 -05:00
|
|
|
});
|
2021-03-05 17:49:47 -05:00
|
|
|
this.route('sessions', function () {});
|
2020-11-19 17:02:23 -05:00
|
|
|
});
|
2020-11-10 16:48:15 -05:00
|
|
|
});
|
2020-11-09 17:42:27 -05:00
|
|
|
});
|
2022-07-27 10:25:01 -07:00
|
|
|
this.route('cluster-url');
|
2020-11-09 10:51:11 -05:00
|
|
|
});
|