зеркало из https://github.com/mozilla/treeherder.git
Merge branch 'performance-tuning' of ssh://github.com/mozilla/treeherder-ui into performance-tuning
This commit is contained in:
Коммит
89980aabee
|
@ -196,3 +196,14 @@ treeherder.provider('thEvents', function() {
|
|||
};
|
||||
});
|
||||
|
||||
/**
|
||||
* Create a hash for a job based on the resultset id, platform name, and
|
||||
* platform option
|
||||
*/
|
||||
treeherder.provider('thPlatformHash', function() {
|
||||
this.$get = function() {
|
||||
return function(job) {
|
||||
return job.resultset_id + job.platform + job.platform_opt;
|
||||
};
|
||||
};
|
||||
});
|
||||
|
|
|
@ -33,8 +33,8 @@ treeherder.factory('thResultSets',
|
|||
}]);
|
||||
|
||||
treeherder.factory('thResultSetModel',
|
||||
['$log', '$rootScope', 'thResultSets', 'thSocket', 'thJobs', 'thEvents',
|
||||
function($log, $rootScope, thResultSets, thSocket, thJobs, thEvents) {
|
||||
['$log', '$rootScope', 'thResultSets', 'thSocket', 'thJobs', 'thEvents', 'thPlatformHash',
|
||||
function($log, $rootScope, thResultSets, thSocket, thJobs, thEvents, thPlatformHash) {
|
||||
|
||||
/******
|
||||
* Handle updating the resultset datamodel based on a queue of jobs
|
||||
|
@ -363,8 +363,19 @@ treeherder.factory('thResultSetModel',
|
|||
*/
|
||||
var updateJobs = function(jobList) {
|
||||
$log.debug("number of jobs returned for add/update: " + jobList.length);
|
||||
jobList.forEach(updateJob);
|
||||
$rootScope.$broadcast(thEvents.jobsLoaded, jobList);
|
||||
|
||||
var platformHashes = [];
|
||||
for (var i = 0; i < jobList.length; i++) {
|
||||
updateJob(jobList[i]);
|
||||
var ph = thPlatformHash(jobList[i]);
|
||||
if (platformHashes.indexof(ph) < 0) {
|
||||
platformHashes.push(ph);
|
||||
}
|
||||
}
|
||||
|
||||
// coalesce the updated jobs into their
|
||||
|
||||
$rootScope.$broadcast(thEvents.jobsLoaded, platformHashes, jobList);
|
||||
};
|
||||
|
||||
/******
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="progress-bar" role="progressbar" style="width: 100%"></div>
|
||||
</div>
|
||||
|
||||
<div ng-repeat="resultset in result_sets track by resultset.id | orderBy:'-push_timestamp'"
|
||||
<div ng-repeat="resultset in result_sets track by resultset.id | orderBy:'-push_timestamp'"
|
||||
ng-controller="ResultSetCtrl"
|
||||
class="result-set col col-xs-12"
|
||||
data-id="{{resultset.id}}">
|
||||
|
|
Загрузка…
Ссылка в новой задаче