github.com/thomasobenaus/nomad@v0.11.1/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('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('clients', function() {
    29      this.route('client', { path: '/:node_id' });
    30    });
    31  
    32    this.route('servers', function() {
    33      this.route('server', { path: '/:agent_id' });
    34    });
    35  
    36    this.route('csi', function() {
    37      this.route('volumes', function() {
    38        this.route('volume', { path: '/:volume_name' });
    39      });
    40    });
    41  
    42    this.route('allocations', function() {
    43      this.route('allocation', { path: '/:allocation_id' }, function() {
    44        this.route('task', { path: '/:name' }, function() {
    45          this.route('logs');
    46          this.route('fs-root', { path: '/fs' });
    47          this.route('fs', { path: '/fs/*path' });
    48        });
    49      });
    50    });
    51  
    52    this.route('settings', function() {
    53      this.route('tokens');
    54    });
    55  
    56    this.route('not-found', { path: '/*' });
    57  });
    58  
    59  export default Router;