github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/router.js (about) 1 import EmberRouter from '@ember/routing/router'; 2 import config from 'nomad-ui/config/environment'; 3 4 export default class Router extends EmberRouter { 5 location = config.locationType; 6 rootURL = config.rootURL; 7 } 8 9 Router.map(function() { 10 this.route('exec', { path: '/exec/:job_name' }, function() { 11 this.route('task-group', { path: '/:task_group_name' }, function() { 12 this.route('task', { path: '/:task_name' }); 13 }); 14 }); 15 16 this.route('jobs', function() { 17 this.route('run'); 18 this.route('job', { path: '/:job_name' }, function() { 19 this.route('task-group', { path: '/:name' }); 20 this.route('definition'); 21 this.route('versions'); 22 this.route('deployments'); 23 this.route('evaluations'); 24 this.route('allocations'); 25 }); 26 }); 27 28 this.route('optimize', function() { 29 this.route('summary', { path: '*slug' }); 30 }); 31 32 this.route('clients', function() { 33 this.route('client', { path: '/:node_id' }, function() { 34 this.route('monitor'); 35 }); 36 }); 37 38 this.route('servers', function() { 39 this.route('server', { path: '/:agent_id' }, function() { 40 this.route('monitor'); 41 }); 42 }); 43 44 this.route('topology'); 45 46 this.route('csi', function() { 47 this.route('volumes', function() { 48 this.route('volume', { path: '/:volume_name' }); 49 }); 50 51 this.route('plugins', function() { 52 this.route('plugin', { path: '/:plugin_name' }, function() { 53 this.route('allocations'); 54 }); 55 }); 56 }); 57 58 this.route('allocations', function() { 59 this.route('allocation', { path: '/:allocation_id' }, function() { 60 this.route('fs-root', { path: '/fs' }); 61 this.route('fs', { path: '/fs/*path' }); 62 63 this.route('task', { path: '/:name' }, function() { 64 this.route('logs'); 65 this.route('fs-root', { path: '/fs' }); 66 this.route('fs', { path: '/fs/*path' }); 67 }); 68 }); 69 }); 70 71 this.route('settings', function() { 72 this.route('tokens'); 73 }); 74 75 this.route('not-found', { path: '/*' }); 76 });