зеркало из https://github.com/mozilla/treeherder.git
Bug 1168453 - Switch default branches for perfherder
* Graphs: Defaults to m-i * Compare: Defaults to m-i for base, try for new
This commit is contained in:
Родитель
47d4e81a4f
Коммит
414e9dfe20
|
@ -6,16 +6,30 @@
|
|||
|
||||
perf.controller('CompareChooserCtrl', [
|
||||
'$state', '$stateParams', '$scope', 'ThRepositoryModel', 'ThResultSetModel',
|
||||
'phCompareDefaultNewRepo', 'phCompareDefaultOriginalRepo',
|
||||
function CompareChooserCtrl($state, $stateParams, $scope,
|
||||
ThRepositoryModel, ThResultSetModel) {
|
||||
ThRepositoryModel, ThResultSetModel,
|
||||
phCompareDefaultNewRepo,
|
||||
phCompareDefaultOriginalRepo) {
|
||||
ThRepositoryModel.get_list().success(function(projects) {
|
||||
$scope.projects = projects;
|
||||
$scope.originalTipList = [];
|
||||
$scope.newTipList = [];
|
||||
$scope.originalProject = _.findWhere(projects, { name: $stateParams.originalProject }) || projects[0];
|
||||
$scope.newProject = _.findWhere(projects, { name: $stateParams.newProject }) || projects[0];
|
||||
$scope.originalRevision = $stateParams.originalRevision ? $stateParams.originalRevision : '';
|
||||
$scope.newRevision = $stateParams.newRevision ? $stateParams.newRevision : '';
|
||||
|
||||
$scope.originalProject = _.findWhere(projects, {
|
||||
name: ($stateParams.originalProject ?
|
||||
$stateParams.originalProject : phCompareDefaultOriginalRepo)
|
||||
}) || projects[0];
|
||||
$scope.newProject = _.findWhere(projects, {
|
||||
name: ($stateParams.newProject ?
|
||||
$stateParams.newProject : phCompareDefaultNewRepo)
|
||||
}) || projects[0];
|
||||
|
||||
$scope.originalRevision = ($stateParams.originalRevision ?
|
||||
$stateParams.originalRevision : '');
|
||||
$scope.newRevision = ($stateParams.newRevision ?
|
||||
$stateParams.newRevision : '');
|
||||
|
||||
var getRevisionTips = function(projectName, list) {
|
||||
// due to we push the revision data into list,
|
||||
// so we need clear the data before we push new data into it.
|
||||
|
|
|
@ -729,15 +729,14 @@ perf.controller('GraphsCtrl', [
|
|||
perf.controller('TestChooserCtrl', function($scope, $modalInstance, $http,
|
||||
projects, optionCollectionMap,
|
||||
timeRange, thServiceDomain,
|
||||
PhSeries, defaultProjectName,
|
||||
defaultPlatform, testsDisplayed) {
|
||||
thDefaultRepo, PhSeries,
|
||||
defaultProjectName, defaultPlatform,
|
||||
testsDisplayed) {
|
||||
$scope.timeRange = timeRange;
|
||||
$scope.projects = projects;
|
||||
if (defaultProjectName) {
|
||||
$scope.selectedProject = _.findWhere(projects, {name: defaultProjectName});
|
||||
} else {
|
||||
$scope.selectedProject = projects[0];
|
||||
}
|
||||
$scope.selectedProject = _.findWhere(projects, {
|
||||
name: defaultProjectName ? defaultProjectName : thDefaultRepo
|
||||
});
|
||||
$scope.loadingTestData = false;
|
||||
|
||||
var series = [];
|
||||
|
|
|
@ -139,6 +139,10 @@ treeherder.value("thDefaultRepo", "mozilla-inbound");
|
|||
|
||||
treeherder.value("thDateFormat", "EEE MMM d, H:mm:ss");
|
||||
|
||||
treeherder.value("phCompareDefaultOriginalRepo", "mozilla-inbound");
|
||||
|
||||
treeherder.value("phCompareDefaultNewRepo", "try");
|
||||
|
||||
treeherder.value("phTimeRanges", [
|
||||
{ "value":86400, "text": "Last day" },
|
||||
{ "value":604800, "text": "Last 7 days" },
|
||||
|
|
Загрузка…
Ссылка в новой задаче