aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-gates/gates-view.js
blob: 6864665239e6011372111d7b34068e613a281e68 (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
import Marionette from 'backbone.marionette';
import ItemView from './gate-view';
import Template from './templates/quality-gates-gates.hbs';

export default Marionette.CompositeView.extend({
  className: 'list-group',
  template: Template,
  childView: ItemView,
  childViewContainer: '.js-list',

  childViewOptions: function (model) {
    return {
      collectionView: this,
      highlighted: model.id === this.highlighted
    };
  },

  highlight: function (id) {
    this.highlighted = id;
    this.render();
  }
});