2020-05-18 17:02:09 -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-05-19 18:10:39 -04:00
|
|
|
Router.map(function () {
|
2020-07-27 14:12:19 -04:00
|
|
|
this.route('scopes', function () {
|
|
|
|
|
this.route('scope', { path: ':scope_id' }, function () {
|
2020-07-29 15:47:23 -04:00
|
|
|
this.route('authenticate', function () {
|
|
|
|
|
this.route('method', { path: ':auth_method_id' });
|
2020-07-24 17:05:55 -04:00
|
|
|
});
|
2020-08-14 17:40:31 -04:00
|
|
|
|
2020-09-16 14:33:04 -04:00
|
|
|
this.route('orgs', function () {
|
2020-08-14 17:40:31 -04:00
|
|
|
this.route('new');
|
|
|
|
|
});
|
|
|
|
|
|
2020-09-16 14:33:04 -04:00
|
|
|
this.route('projects', function () {
|
|
|
|
|
this.route('project', { path: ':project_id' }, function () {
|
|
|
|
|
this.route('host-catalogs', function () {
|
2020-08-14 17:40:31 -04:00
|
|
|
this.route('new');
|
2020-09-16 14:33:04 -04:00
|
|
|
this.route(
|
|
|
|
|
'host-catalog',
|
|
|
|
|
{ path: ':host_catalog_id' },
|
|
|
|
|
function () {
|
|
|
|
|
this.route('host-sets', function () {
|
|
|
|
|
this.route('host-set', { path: ':host_set_id' }, function () {
|
|
|
|
|
this.route('hosts');
|
|
|
|
|
this.route('add-hosts');
|
|
|
|
|
});
|
|
|
|
|
this.route('new');
|
2020-08-21 11:26:55 -04:00
|
|
|
});
|
2020-09-16 14:33:04 -04:00
|
|
|
this.route('hosts', function () {
|
|
|
|
|
this.route('host', { path: ':host_id' }, function () {});
|
|
|
|
|
this.route('new');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
);
|
2020-08-14 17:40:31 -04:00
|
|
|
});
|
2020-09-16 14:33:04 -04:00
|
|
|
this.route('targets', function () {
|
|
|
|
|
this.route('target', { path: ':target_id' }, function () {
|
|
|
|
|
this.route('host-sets', function () {
|
|
|
|
|
this.route(
|
|
|
|
|
'host-set',
|
|
|
|
|
{ path: ':host_set_id' },
|
|
|
|
|
function () {}
|
|
|
|
|
);
|
2020-08-25 14:50:26 -04:00
|
|
|
});
|
2020-08-27 16:38:49 -04:00
|
|
|
this.route('add-host-sets');
|
2020-08-25 14:50:26 -04:00
|
|
|
});
|
2020-08-21 13:14:21 -04:00
|
|
|
this.route('new');
|
2020-08-21 12:52:23 -04:00
|
|
|
});
|
2020-09-18 12:54:31 -04:00
|
|
|
this.route('sessions', function() {});
|
2020-08-14 17:40:31 -04:00
|
|
|
});
|
|
|
|
|
this.route('new');
|
|
|
|
|
});
|
|
|
|
|
|
2020-07-27 14:12:19 -04:00
|
|
|
this.route('users', function () {
|
|
|
|
|
this.route('user', { path: ':user_id' }, function () {});
|
2020-07-23 09:37:06 -04:00
|
|
|
this.route('new');
|
|
|
|
|
});
|
2020-08-14 17:40:31 -04:00
|
|
|
|
2020-07-27 16:42:02 -04:00
|
|
|
this.route('groups', function () {
|
2020-09-01 17:31:22 -04:00
|
|
|
this.route('group', { path: ':group_id' }, function () {
|
|
|
|
|
this.route('members');
|
2020-09-02 13:29:20 -04:00
|
|
|
this.route('add-members');
|
2020-09-01 17:31:22 -04:00
|
|
|
});
|
2020-07-27 16:42:02 -04:00
|
|
|
this.route('new');
|
|
|
|
|
});
|
2020-08-14 17:40:31 -04:00
|
|
|
|
2020-07-27 16:51:41 -04:00
|
|
|
this.route('roles', function () {
|
2020-08-07 18:56:21 -04:00
|
|
|
this.route('role', { path: ':role_id' }, function () {
|
|
|
|
|
this.route('grants');
|
2020-08-12 13:41:23 -04:00
|
|
|
this.route('principals');
|
2020-08-31 15:10:10 -04:00
|
|
|
this.route('add-principals');
|
2020-08-07 18:56:21 -04:00
|
|
|
});
|
2020-07-27 16:51:41 -04:00
|
|
|
this.route('new');
|
|
|
|
|
});
|
2020-08-14 17:40:31 -04:00
|
|
|
|
2020-09-16 14:33:04 -04:00
|
|
|
this.route('auth-methods', function () {
|
|
|
|
|
this.route('auth-method', { path: ':auth_method_id' }, function () {
|
|
|
|
|
this.route('accounts', function () {
|
|
|
|
|
this.route('account', { path: ':account_id' }, function () {
|
2020-09-16 12:52:24 -04:00
|
|
|
this.route('set-password');
|
2020-09-14 18:50:55 -04:00
|
|
|
});
|
2020-09-14 17:43:07 -04:00
|
|
|
this.route('new');
|
2020-09-14 16:50:17 -04:00
|
|
|
});
|
2020-09-14 15:58:06 -04:00
|
|
|
});
|
2020-08-13 16:08:45 -04:00
|
|
|
this.route('new');
|
2020-08-12 17:16:41 -04:00
|
|
|
});
|
2020-07-23 09:37:06 -04:00
|
|
|
});
|
2020-07-22 17:16:20 -04:00
|
|
|
});
|
2020-09-17 10:24:22 -04:00
|
|
|
|
|
|
|
|
this.route('account', function() {
|
|
|
|
|
this.route('change-password');
|
|
|
|
|
});
|
2020-05-19 18:10:39 -04:00
|
|
|
});
|