Merge pull request #59 from mozilla/reftest-analyzer

Friday bugs
This commit is contained in:
Mauro Doglio 2014-04-01 11:17:48 +01:00
Родитель c6bd2a24a6 537d7c66ac
Коммит 2f7bc79c70
16 изменённых файлов: 100 добавлений и 32 удалений

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

@ -81,6 +81,10 @@ body {
color: #fb9910;
}
.treeUnavailable {
color: lightgray;
}
#platform-job-text-search-field {
height:28px;
}
@ -280,7 +284,7 @@ body {
.revision-link {
padding-top: 5px;
width: 115px;
width: 130px;
display: block;
overflow: hidden;
text-overflow: ellipsis;
@ -303,6 +307,7 @@ body {
.result-set .job-list-nopad {
padding-left: 0;
padding-right: 0;
display: block;
}
.selected-job {
@ -390,10 +395,10 @@ div.navbar-fixed-bottom dt {
}
#bottom-center-panel {
margin-right: 90px;
margin-right: 98px;
margin-left: 242px;
}
#bottom-menu {position: absolute; right:-5px; width: 100px}
#bottom-menu {position: absolute; right:0; width: 104px}
.result-status-shading-success {background-color: rgba(2, 131, 44, 0.24);}
.result-status-shading-testfailed {background-color: rgba(221, 102, 2, 0.25);}
@ -413,12 +418,12 @@ div.navbar-fixed-bottom dt {
}
.bottom-menu-group {
width: 90px;
width: 98px;
margin-bottom: 5px;
}
.save-btn {
width: 73px;
width: 81px;
}
.save-btn-dropdown {
@ -473,12 +478,12 @@ div.navbar-fixed-bottom dt {
}
.pinboard-classification-comment {
width: 185px;
width: 177px;
margin-top: 5px;
}
.pinboard-classification-select {
width: 185px;
width: 177px;
}
.pinned-job {

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

@ -60,6 +60,10 @@ treeherder.controller('MainCtrl',
// the repos the user has chosen to watch
$scope.watchedRepos = ThRepositoryModel.watchedRepos;
$scope.unwatchRepo = function(name) {
ThRepositoryModel.unwatch(name);
};
// update the repo status (treestatus) in an interval of every 2 minutes
$interval(ThRepositoryModel.updateAllWatchedRepoTreeStatus, 2 * 60 * 1000);

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

@ -46,12 +46,17 @@ treeherder.directive('thCloneJobs', function(
};
var getHoverText = function(job) {
var duration = Math.round((job.end_timestamp - job.submit_timestamp) / 60);
var jobStatus = job.result;
if (job.state !== "completed") {
jobStatus = job.state;
}
return job.job_type_name + " - " + jobStatus + " - " + duration + "mins";
var result = job.job_type_name + " - " + jobStatus;
$log.debug("job timestamps", job, job.end_timestamp, job.submit_timestamp);
if (job.end_timestamp && job.submit_timestamp) {
var duration = Math.round((job.end_timestamp - job.submit_timestamp) / 60);
result = result + " - " + duration + "mins";
}
return result;
};
//Global event listeners
@ -201,7 +206,7 @@ treeherder.directive('thCloneJobs', function(
jobStatus = thResultStatusInfo(resultState);
jobStatus.key = key;
if(parseInt(job.failure_classification_id) > 1){
if(parseInt(job.failure_classification_id, 10) > 1){
jobStatus.value = job.job_type_symbol + '*';
}else{
jobStatus.value = job.job_type_symbol;
@ -688,7 +693,7 @@ treeherder.directive('thCloneJobs', function(
if(startWatch){
if( (jobs[j].visible === true) &&
(classificationRequired[jobs[j].result] === 1) &&
( (parseInt(jobs[j].failure_classification_id) === 1) ||
( (parseInt(jobs[j].failure_classification_id, 10) === 1) ||
(jobs[j].failure_classification_id === null) )){
selectJob(jobs[j]);
@ -739,7 +744,7 @@ treeherder.directive('thCloneJobs', function(
if(startWatch){
if( (jobs[j].visible === true) &&
(classificationRequired[jobs[j].result] === 1) &&
( (parseInt(jobs[j].failure_classification_id) === 1) ||
( (parseInt(jobs[j].failure_classification_id, 10) === 1) ||
(jobs[j].failure_classification_id === null) )){
selectJob(jobs[j]);

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

@ -26,6 +26,10 @@ treeherder.directive('thWatchedRepo', function (ThLog, ThRepositoryModel) {
"closed": {
icon: "fa-times-circle",
color: "treeClosed"
},
"unavailable": {
icon: "fa-chain-broken",
color: "treeUnavailable"
}
};
@ -38,6 +42,10 @@ treeherder.directive('thWatchedRepo', function (ThLog, ThRepositoryModel) {
$log.debug("updated treeStatus", newVal.status);
scope.statusIcon = statusInfo[newVal.status].icon;
scope.statusColor = statusInfo[newVal.status].color;
scope.titleText = newVal.status;
if (newVal.message_of_the_day) {
scope.titleText = scope.titleText + ' - ' + newVal.message_of_the_day;
}
}
}, true);

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

@ -74,6 +74,13 @@ treeherder.factory('ThRepositoryModel',
}
};
var unwatch = function(name) {
if (!_.contains(repos, name)) {
repos[name].isWatched = false;
}
watchedReposUpdated();
};
var load = function(name) {
var storedWatchedRepos = localStorageService.get("watchedRepos");
@ -124,8 +131,14 @@ treeherder.factory('ThRepositoryModel',
if (repos[repoName].isWatched) {
$log.debug("updateTreeStatus", "updating", repoName);
treeStatus.get(repoName).then(function(data) {
repos[repoName].treeStatus = data.data;
});
repos[repoName].treeStatus = data.data;
}, function(data) {
repos[repoName].treeStatus = {
status: "unavailable",
message_of_the_day: repoName +
' is not supported in <a href="https://treestatus.mozilla.org">treestatus.mozilla.org</a>'
};
});
}
};
@ -153,6 +166,8 @@ treeherder.factory('ThRepositoryModel',
watchedReposUpdated: watchedReposUpdated,
unwatch: unwatch,
updateAllWatchedRepoTreeStatus: updateAllWatchedRepoTreeStatus,
repo_has_failures: repo_has_failures

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

@ -36,6 +36,7 @@ treeherder.factory('thJobFilters',
* means it must have a value set, ``false`` means it must be null.
*/
var checkFilter = function(field, job, resultStatusList) {
$log.debug("checkFilter", field, job, resultStatusList);
if (field === api.resultStatus) {
// resultStatus is a special case that spans two job fields
var filterList = resultStatusList || filters[field].values;
@ -141,6 +142,9 @@ treeherder.factory('thJobFilters',
removeWhenEmpty: true
};
}
filterKeys = _.keys(filters);
$log.debug("adding ", field, ": ", value);
$log.debug("filters", filters);
},
@ -162,6 +166,8 @@ treeherder.factory('thJobFilters',
if (filters[field].removeWhenEmpty && filters[field].values.length === 0) {
delete filters[field];
}
filterKeys = _.keys(filters);
$log.debug("filters", filters);
},
/**

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

@ -71,6 +71,8 @@ treeherder.factory('thPinboard',
$log.debug("adding bug ", bug);
relatedBugs[bug.id] = bug;
api.count.numRelatedBugs = _.size(relatedBugs);
$log.debug("related bugs", relatedBugs);
},
removeBug: function(id) {

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

@ -21,10 +21,7 @@ treeherder.factory('treeStatus', function($http, $q) {
var get = function(repoName) {
var url = urlBase + getTreeStatusName(repoName);
return $http.get(url, {params: {format: "json"}})
.then(function(data) {
return data;
});
return $http.get(url, {params: {format: "json"}});
};
return {

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

@ -6,7 +6,7 @@
<ul class="dropdown-menu pull-left">
<li><a target="_blank" href="https://tbpl.mozilla.org/mcmerge/?cset={{resultset.revision}}&tree={{repoName}}">m-mcMerge</a></li>
<li><a target="_blank" href="https://secure.pub.build.mozilla.org/buildapi/self-serve/{{repoName}}/rev/{{resultset.revision}}">BuildAPI</a></li>
<li><a target="_blank" href="" data-toggle="modal" data-target="#revisionListModal">Changeset URL List</a></li>
<li class="hidden"><a target="_blank" href="" data-toggle="modal" data-target="#revisionListModal">Changeset URL List</a></li>
<li class="hidden"><a href="" ng-disabled="true">Cancel All Jobs</a></li>
</ul>
</span>

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

@ -1,4 +1,5 @@
<div id="pinboard-panel"
ng-show="hasPinnedJobs()">
<div class="bottom-panel-title"><i class="glyphicon glyphicon-pushpin"></i> pinboard</div>
<div class="panel shadowed-panel pinboard-shadowed-panel">
@ -17,7 +18,7 @@
<form ng-submit="saveEnteredBugNumber()">
<input type="number"
ng-show="enteringBugNumber"
ng-model="newEnteredBugNumber"
ng-model="$parent.newEnteredBugNumber"
placeholder="enter bug number"
numbers-only="numbers-only"
focus-me="focusInput">

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

@ -1,11 +1,14 @@
<ul class="dropdown-menu" role="menu">
<li ng-show="message_of_the_day" class="watched-repo-dropdown-item">
<span ng-bind-html="message_of_the_day"></span>
</li>
<li ng-show="reason" class="watched-repo-dropdown-item">
<span ng-bind-html="reason"></span>
</li>
<li class="divider" ng-show="reason && message_of_the_day"></li>
<li ng-show="message_of_the_day" class="watched-repo-dropdown-item">
<span ng-bind-html="message_of_the_day"></span>
</li>
<li class="divider" ng-show="reason || message_of_the_day"></li>
<li class="watched-repo-dropdown-item">
@ -13,19 +16,23 @@
</li>
<li class="watched-repo-dropdown-item">
<a href="https://www.google.com/calendar/embed?src=aelh98g866kuc80d5nbfqo6u54%40group.calendar.google.com" target="_blank">Schedule</a>
<a href="https://www.google.com/calendar/embed?src=aelh98g866kuc80d5nbfqo6u54%40group.calendar.google.com" target="_blank">schedule</a>
</li>
<li class="watched-repo-dropdown-item">
<a href="https://treestatus.mozilla.org/{{name}}" target="_blank">Tree Status</a>
<a href="https://treestatus.mozilla.org/{{name}}" target="_blank">tree status</a>
</li>
<li class="watched-repo-dropdown-item">
<a href="{{pushlog}}" target="_blank">Pushlog: {{name}}</a>
<a href="{{pushlog}}" target="_blank">pushlog</a>
</li>
<li class="watched-repo-dropdown-item">
<a href="https://secure.pub.build.mozilla.org/clobberer/?branch={{name}}" target="_blank">Cobberer: {{name}}</a>
<a href="https://secure.pub.build.mozilla.org/clobberer/?branch={{name}}" target="_blank">clobberer</a>
</li>
<li class="watched-repo-dropdown-item">
<a href="" ng-click="unwatchRepo(name)">unwatch</a>
</li>
</ul>

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

@ -3,7 +3,7 @@
<button ng-class="{'active': name===repoName}"
ng-click="changeRepo(name)"
type="button"
title="{{repoData.treeStatus.message_of_the_day|stripHtml}}"
title="{{titleText|stripHtml}}"
class="btn btn-sm btn-view-nav">
<i class="fa {{statusIcon}} {{statusColor}}"></i> {{name}}
<span class="badge"

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

@ -6,6 +6,8 @@ treeherder.controller('PluginCtrl',
numberFilter, ThBugJobMapModel, thResultStatus, thSocket,
ThResultSetModel, ThLog) {
var $log = new ThLog("PluginCtrl");
$scope.job = {};
var selectJob = function(newValue, oldValue) {
@ -62,6 +64,17 @@ treeherder.controller('PluginCtrl',
};
};
/**
* Test whether or not the selected job is a reftest
*/
$scope.isReftest = function() {
if ($scope.selectedJob) {
return $scope.selectedJob.job_group_symbol === "R";
} else {
return false;
}
};
$rootScope.$on(thEvents.jobClick, function(event, job) {
selectJob(job, $rootScope.selectedJob);
$rootScope.selectedJob = job;

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

@ -46,6 +46,7 @@ treeherder.controller('PinboardCtrl',
}
$scope.classification.who = $scope.user.email;
thPinboard.save($scope.classification);
$rootScope.selectedJob = null;
} else {
thNotify.send("must be logged in to classify jobs", "danger");
}

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

@ -85,7 +85,11 @@
<li><a ng-click="saveBugsOnly()"><i class="fa fa-bug"></i> bugs only</a></li>
</ul>
</div>
<div class="btn-group-vertical">
<div class="btn-group-vertical bottom-menu-group">
<div class="btn btn-default btn-xs"
ng-show="isReftest()">
<a target="_blank" href="https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml">Reftest Analyzer</a>
</div>
<div class="btn btn-default btn-xs"
ng-show="logs"
ng-disabled="artifacts.length>0">

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

@ -3,17 +3,17 @@
<tr ng-repeat="line in tinderbox_lines_parsed">
<th>{{line.title}}</th>
<td ng-switch on="line.type">
<a ng-switch-when="link" href="{{line.link}}">{{line.value}}</a>
<a ng-switch-when="link" href="{{line.link}}" target="_blank">{{line.value}}</a>
<ul ng-switch-when="TalosResult">
<li>Datazilla:
<ul>
<li ng-repeat="(k,v) in line.value.datazilla"><a href="{{v.url}}">{{k}}</a></li>
<li ng-repeat="(k,v) in line.value.datazilla"><a href="{{v.url}}" target="_blank">{{k}}</a></li>
</ul>
</li>
<li>Graphserver:
<ul>
<li ng-repeat="(k,v) in line.value.graphserver">{{k}}:<a href="{{v.url}}">{{v.result}}</a></li>
<li ng-repeat="(k,v) in line.value.graphserver">{{k}}:<a href="{{v.url}}" target="_blank">{{v.result}}</a></li>
</ul>
</li>
</ul>