aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-profiles/profiles.js
blob: 194004e905ea7834a78d9716ba73ab5e6ca17832 (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
import Backbone from 'backbone';
import Profile from './profile';

export default Backbone.Collection.extend({
  model: Profile,
  url: baseUrl + '/api/qualityprofiles/search',
  comparator: 'key',

  parse: function (r) {
    return r.profiles;
  },

  updateForLanguage: function (language) {
    this.fetch({
      data: {
        language: language
      },
      merge: true,
      reset: false,
      remove: false
    });
  }
});