blob: fabaadda4241438ac3faf1eaa82b747d0a7239e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import _ from 'underscore';
import BaseFacet from './base-facet';
import Template from '../templates/facets/coding-rules-severity-facet.hbs';
export default BaseFacet.extend({
template: Template,
severities: ['BLOCKER', 'MINOR', 'CRITICAL', 'INFO', 'MAJOR'],
sortValues: function (values) {
var order = this.severities;
return _.sortBy(values, function (v) {
return order.indexOf(v.val);
});
}
});
|