github.com/manicqin/nomad@v0.9.5/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('run');
    12      this.route('job', { path: '/:job_name' }, function() {
    13        this.route('task-group', { path: '/:name' });
    14        this.route('definition');
    15        this.route('versions');
    16        this.route('deployments');
    17        this.route('evaluations');
    18        this.route('allocations');
    19      });
    20    });
    21  
    22    this.route('clients', function() {
    23      this.route('client', { path: '/:node_id' });
    24    });
    25  
    26    this.route('servers', function() {
    27      this.route('server', { path: '/:agent_id' });
    28    });
    29  
    30    this.route('allocations', function() {
    31      this.route('allocation', { path: '/:allocation_id' }, function() {
    32        this.route('task', { path: '/:name' }, function() {
    33          this.route('logs');
    34          this.route('fs-root', { path: '/fs' });
    35          this.route('fs', { path: '/fs/*path' });
    36        });
    37      });
    38    });
    39  
    40    this.route('settings', function() {
    41      this.route('tokens');
    42    });
    43  
    44    if (config.environment === 'development') {
    45      this.route('freestyle');
    46    }
    47  
    48    this.route('not-found', { path: '/*' });
    49  });
    50  
    51  export default Router;