Bug 1221079 - make unclassified failures mode show "auto classified" jobs

Look for two values (id of 1 and id of 7, in this case).  Now, in
unclassified mode, it will show both unclassified and auto classified jobs.
This commit is contained in:
Cameron Dawson 2015-11-04 11:28:01 +00:00
Родитель edf7548545
Коммит 8d182343f1
3 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -52,5 +52,14 @@
"description": "",
"active_status": "active"
}
},
{
"pk": 7,
"model": "model.failureclassification",
"fields": {
"name": "autoclassified intermittent",
"description": "",
"active_status": "active"
}
}
]

Просмотреть файл

@ -53,6 +53,9 @@ treeherder.factory('thJobFilters', [
}
};
// failure classification ids that should be shown in "unclassified" mode
var UNCLASSIFIED_IDS = [1, 7];
// used with field-filters to determine how to match the value against the
// job field.
var MATCH_TYPE = {
@ -421,7 +424,7 @@ treeherder.factory('thJobFilters', [
};
var _isJobClassified = function(job) {
return job.failure_classification_id !== 1;
return !_.contains(UNCLASSIFIED_IDS, job.failure_classification_id);
};
var stripFiltersFromQueryString = function(locationSearch) {

Просмотреть файл

@ -37,7 +37,7 @@
<!-- Classified/Unclassified filters -->
<span class="panel panel-default th-option-group th-inline-option-group">
<div class="panel-heading th-option-heading">classified</div>
<div class="panel-heading th-option-heading">manual classification</div>
<div class="panel-body">
<label class="checkbox-inline">
<input type="checkbox"