зеркало из https://github.com/mozilla/treeherder.git
Bug 1066377 - Change how try repos are identified
This commit is contained in:
Родитель
084dec8c36
Коммит
a4a65ed594
|
@ -0,0 +1,20 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.10.5 on 2017-03-09 18:59
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('model', '0008_push_job_child_references'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='repository',
|
||||||
|
name='is_try_repo',
|
||||||
|
field=models.BooleanField(default=False),
|
||||||
|
),
|
||||||
|
]
|
|
@ -90,6 +90,7 @@ class Repository(models.Model):
|
||||||
active_status = models.CharField(max_length=7, blank=True, default='active', db_index=True)
|
active_status = models.CharField(max_length=7, blank=True, default='active', db_index=True)
|
||||||
performance_alerts_enabled = models.BooleanField(default=False)
|
performance_alerts_enabled = models.BooleanField(default=False)
|
||||||
expire_performance_data = models.BooleanField(default=True)
|
expire_performance_data = models.BooleanField(default=True)
|
||||||
|
is_try_repo = models.BooleanField(default=False)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = 'repository'
|
db_table = 'repository'
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<span class="result-set-buttons">
|
<span class="result-set-buttons">
|
||||||
<button class="btn btn-sm btn-resultset cancel-all-jobs-btn"
|
<button class="btn btn-sm btn-resultset cancel-all-jobs-btn"
|
||||||
ng-attr-title="{{getCancelJobsTitle()}}"
|
ng-attr-title="{{getCancelJobsTitle()}}"
|
||||||
ng-show="currentRepo.repository_group.name == 'try' || user.is_staff"
|
ng-show="currentRepo.is_try_repo || user.is_staff"
|
||||||
data-ignore-job-clear-on-click
|
data-ignore-job-clear-on-click
|
||||||
ng-disabled="!canCancelJobs()"
|
ng-disabled="!canCancelJobs()"
|
||||||
ng-click="confirmCancelAllJobs()">
|
ng-click="confirmCancelAllJobs()">
|
||||||
|
|
|
@ -443,7 +443,7 @@ treeherder.controller('PluginCtrl', [
|
||||||
// Can we backfill? At the moment, this only ensures we're not in a 'try' repo.
|
// Can we backfill? At the moment, this only ensures we're not in a 'try' repo.
|
||||||
$scope.canBackfill = function() {
|
$scope.canBackfill = function() {
|
||||||
return $scope.user.loggedin && $scope.currentRepo &&
|
return $scope.user.loggedin && $scope.currentRepo &&
|
||||||
$scope.currentRepo.repository_group.name !== 'try';
|
!$scope.currentRepo.is_try_repo;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.backfillButtonTitle = function() {
|
$scope.backfillButtonTitle = function() {
|
||||||
|
@ -459,7 +459,7 @@ treeherder.controller('PluginCtrl', [
|
||||||
title = title.concat("must be logged in to backfill a job / ");
|
title = title.concat("must be logged in to backfill a job / ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($scope.currentRepo.repository_group.name === 'try') {
|
if ($scope.currentRepo.is_try_repo) {
|
||||||
title = title.concat("backfill not available in this repository");
|
title = title.concat("backfill not available in this repository");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ treeherder.controller('PinboardCtrl', [
|
||||||
return $scope.hasPinnedJobs() && $scope.user.loggedin &&
|
return $scope.hasPinnedJobs() && $scope.user.loggedin &&
|
||||||
(thPinboard.hasRelatedBugs() ||
|
(thPinboard.hasRelatedBugs() ||
|
||||||
(thisClass.failure_classification_id !== 4 && thisClass.failure_classification_id !== 2) ||
|
(thisClass.failure_classification_id !== 4 && thisClass.failure_classification_id !== 2) ||
|
||||||
$rootScope.currentRepo.repository_group.name === "try" ||
|
$rootScope.currentRepo.is_try_repo ||
|
||||||
$rootScope.currentRepo.repository_group.name === "project repositories" ||
|
$rootScope.currentRepo.repository_group.name === "project repositories" ||
|
||||||
(thisClass.failure_classification_id === 4 && thisClass.text.length > 0) ||
|
(thisClass.failure_classification_id === 4 && thisClass.text.length > 0) ||
|
||||||
(thisClass.failure_classification_id === 2 && thisClass.text.length > 7));
|
(thisClass.failure_classification_id === 2 && thisClass.text.length > 7));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче