aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/computation/router.js
blob: 6d874801cd3410230005554b9588dcb5fa922ae0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
define(function () {

  return Backbone.Router.extend({
    routes: {
      '': 'index',
      'index': 'index',
      'current': 'current',
      'past': 'past'
    },

    initialize: function (options) {
      this.options = options;
    },

    index: function () {
      this.navigate('current');
      this.current();
    },

    current: function () {
      this.options.reports.fetch({ q: 'queue' });
    },

    past: function () {
      this.options.reports.fetch({ q: 'history' });
    }
  });

});