Bug 1108871 - improve uniqueness of exclusion items earlier

This commit is contained in:
Cameron Dawson 2014-12-09 09:57:52 -08:00 коммит произвёл mdoglio
Родитель d939f0a7fe
Коммит a2dcda4d23
1 изменённых файлов: 7 добавлений и 7 удалений

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

@ -74,7 +74,7 @@ treeherder.controller('SheriffCtrl', [
getJobComboField(data[i].platform, data[i].architecture)
);
}
$scope.master_platforms.sort();
$scope.master_platforms = _.uniq($scope.master_platforms.sort());
$scope.form_platforms = angular.copy($scope.master_platforms);
});
@ -87,7 +87,7 @@ treeherder.controller('SheriffCtrl', [
getJobComboField(data[i].name, data[i].symbol)
);
}
$scope.master_job_types.sort();
$scope.master_job_types = _.uniq($scope.master_job_types.sort());
$scope.form_job_types = angular.copy($scope.master_job_types);
});
@ -98,7 +98,7 @@ treeherder.controller('SheriffCtrl', [
for (var i = 0; i < data.length; i++) {
$scope.master_repos.push(data[i].name);
}
$scope.master_repos.sort();
$scope.master_repos = _.uniq($scope.master_repos.sort());
$scope.form_repos = angular.copy($scope.master_repos);
});
@ -163,10 +163,10 @@ treeherder.controller('SheriffCtrl', [
// reset the user choices
$scope.form_exclusion = angular.copy($scope.master_exclusion);
// and reset the available choices
$scope.form_platforms = angular.copy(_.uniq($scope.master_platforms));
$scope.form_job_types = angular.copy(_.uniq($scope.master_job_types));
$scope.form_option_collections = angular.copy(_.uniq($scope.master_option_collections));
$scope.form_repos = angular.copy(_.uniq($scope.master_repos));
$scope.form_platforms = angular.copy($scope.master_platforms);
$scope.form_job_types = angular.copy($scope.master_job_types);
$scope.form_option_collections = angular.copy($scope.master_option_collections);
$scope.form_repos = angular.copy($scope.master_repos);
};
$scope.save_exclusion = function(exclusion) {