github.com/emate/nomad@v0.8.2-wo-binpacking/ui/app/router.js (about)

     1  import EmberRouter from '@ember/routing/router';
     2  import config from './config/environment';
     3  
     4  const Router = EmberRouter.extend({
     5    location: config.locationType,
     6    rootURL: config.rootURL,
     7  });
     8  
     9  Router.map(function() {
    10    this.route('jobs', function() {
    11      this.route('job', { path: '/:job_name' }, function() {
    12        this.route('task-group', { path: '/:name' });
    13        this.route('definition');
    14        this.route('versions');
    15        this.route('deployments');
    16      });
    17    });
    18  
    19    this.route('clients', function() {
    20      this.route('client', { path: '/:node_id' });
    21    });
    22  
    23    this.route('servers', function() {
    24      this.route('server', { path: '/:agent_id' });
    25    });
    26  
    27    this.route('allocations', function() {
    28      this.route('allocation', { path: '/:allocation_id' }, function() {
    29        this.route('task', { path: '/:name' }, function() {
    30          this.route('logs');
    31        });
    32      });
    33    });
    34  
    35    this.route('settings', function() {
    36      this.route('tokens');
    37    });
    38  
    39    if (config.environment === 'development') {
    40      this.route('freestyle');
    41    }
    42  
    43    this.route('not-found', { path: '/*' });
    44  });
    45  
    46  export default Router;