Allow users to choose trigger or manual in the build dialog

Fixes #379
This commit is contained in:
Joseph Schorr 2015-08-20 19:24:51 -04:00
parent 9098e0a1fe
commit c0aca54e32
8 changed files with 116 additions and 44 deletions

View file

@ -24,11 +24,15 @@ angular.module('quay').directive('dockerfileBuildForm', function () {
var MEGABYTE = 1000000;
var MAX_FILE_SIZE = 100 * MEGABYTE;
$scope.hasDockerFile = false;
$scope.pullEntity = null;
$scope.dockerfileState = 'none';
$scope.privateBaseRepository = null;
$scope.isReady = false;
var resetState = function() {
$scope.hasDockerFile = false;
$scope.pullEntity = null;
$scope.dockerfileState = 'none';
$scope.privateBaseRepository = null;
$scope.isReady = false;
};
resetState();
$scope.handleFilesChanged = function(files) {
$scope.dockerfileError = '';
@ -259,6 +263,8 @@ angular.module('quay').directive('dockerfileBuildForm', function () {
$scope.$watch('pullEntity', checkReady);
$scope.$watch('dockerfileState', checkReady);
$scope.$watch('repository', resetState);
$scope.$watch('startNow', function() {
if ($scope.startNow && $scope.repository && !$scope.uploading && !$scope.building) {
startFileUpload();