Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Commit

Permalink
Merge pull request #83 from tojonmz/rename-bugsuggestions
Browse files Browse the repository at this point in the history
Rename bug suggestion tab to Failure summary (1030678)
  • Loading branch information
Mauro Doglio committed Jun 30, 2014
2 parents 7eaaacb + 8852649 commit b209d01
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion dist/css/help.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/index.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/logviewer.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/js/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/logviewer.min.js

Large diffs are not rendered by default.

@@ -1,5 +1,5 @@
<div class="full-height" class="bug-suggestions" ng-controller="BugsPluginCtrl">
<ul class="list-unstyled bug-suggestion-list">
<div class="full-height" ng-controller="BugsPluginCtrl">
<ul class="list-unstyled failure-summary-list">
<li ng-repeat="(error, bug_list) in bugs">
<strong>{{error}}</strong>
<span ng-repeat="visible in ['open','closed']">
Expand Down Expand Up @@ -27,7 +27,7 @@
</span>
</li>
</ul>
<div ng-if="tabs.bug_suggestions.is_loading" class="overlay">
<div ng-if="tabs.failure_summary.is_loading" class="overlay">
<div>
<span class="fa fa-refresh fa-spin"></span>
</div>
Expand Down
6 changes: 3 additions & 3 deletions webapp/app/css/treeherder.css
Expand Up @@ -502,18 +502,18 @@ div#bottom-panel.with-pinboard #bottom-center-panel{
border-top: none;
}

#bottom-center-panel ul.bug-suggestion-list{
#bottom-center-panel ul.failure-summary-list{
padding-left: 0px;
height:100%;
overflow: auto;
}

ul.bug-suggestion-list li{
ul.failure-summary-list li{
padding: 1px 0 1px 5px ;

}

ul.bug-suggestion-list li .btn-xs{
ul.failure-summary-list li .btn-xs{
font-size: 10px;
}

Expand Down
2 changes: 1 addition & 1 deletion webapp/app/index.html
Expand Up @@ -99,7 +99,7 @@
<script src="plugins/controller.js"></script>
<script src="plugins/pinboard.js"></script>
<script src="plugins/annotations/controller.js"></script>
<script src="plugins/bug_suggestions/controller.js"></script>
<script src="plugins/failure_summary/controller.js"></script>
<script src="plugins/similar_jobs/controller.js"></script>

<script src="js/filters.js"></script>
Expand Down
8 changes: 4 additions & 4 deletions webapp/app/plugins/controller.js
Expand Up @@ -227,9 +227,9 @@ treeherder.controller('PluginCtrl', [
thSocket.on("job_classification", updateClassification);

$scope.tabs = {
"bug_suggestions": {
title: "Bug suggestions",
content: "plugins/bug_suggestions/main.html",
"failure_summary": {
title: "Failure summary",
content: "plugins/failure_summary/main.html",
active: true
},
"annotations": {
Expand Down Expand Up @@ -300,4 +300,4 @@ treeherder.controller('JobDetailsPluginCtrl', [
};
$scope.$watch("job.id", update_job_info, true);
}
]);
]);
Expand Up @@ -24,7 +24,7 @@ treeherder.controller('BugsPluginCtrl', [

// fetch artifacts only if the job is finished
if(newValue){
$scope.tabs.bug_suggestions.is_loading = true;
$scope.tabs.failure_summary.is_loading = true;
// if there's a ongoing request, abort it
if(timeout_promise !== null){
timeout_promise.resolve();
Expand All @@ -36,21 +36,21 @@ treeherder.controller('BugsPluginCtrl', [
job_id: newValue
}, {timeout: timeout_promise})
.then(function(response){
// iterate to retrieve the total num of suggestions
// iterate to retrieve the total num of failures
angular.forEach(response, function(artifact){
var open_closed = artifact.name === "Open bugs" ? "open" : "closed";
angular.forEach(artifact.blob, function(suggestions, error){
angular.forEach(artifact.blob, function(failures, error){
if(!_.has($scope.bugs, error)){
var error_prefix_re = /^\d+:\d+:\d+[ ]+(?:DEBUG|INFO|WARNING|ERROR|CRITICAL|FATAL) - [ ]?/;
error = error.replace(error_prefix_re, '');
$scope.bugs[error] = {'open':[], 'closed':[]};
}
$scope.bugs[error][open_closed] = suggestions;
$scope.bugs[error][open_closed] = failures;
});
});
})
.finally(function(){
$scope.tabs.bug_suggestions.is_loading = false;
$scope.tabs.failure_summary.is_loading = false;
});
}
};
Expand Down
@@ -1,5 +1,5 @@
<div class="full-height" class="bug-suggestions" ng-controller="BugsPluginCtrl">
<ul class="list-unstyled bug-suggestion-list">
<div class="full-height" ng-controller="BugsPluginCtrl">
<ul class="list-unstyled failure-summary-list">
<li ng-repeat="(error, bug_list) in bugs">
<strong>{{error}}</strong>
<span ng-repeat="visible in ['open','closed']">
Expand Down Expand Up @@ -27,7 +27,7 @@
</span>
</li>
</ul>
<div ng-if="tabs.bug_suggestions.is_loading" class="overlay">
<div ng-if="tabs.failure_summary.is_loading" class="overlay">
<div>
<span class="fa fa-refresh fa-spin"></span>
</div>
Expand Down

0 comments on commit b209d01

Please sign in to comment.