Warn if the docker file directory entered does not match any of those found

This commit is contained in:
Joseph Schorr 2014-02-25 00:42:33 -05:00
parent e6a8b84ff3
commit 77c2e7fa5e
2 changed files with 10 additions and 1 deletions

View file

@ -2693,11 +2693,13 @@ quayApp.directive('triggerSetupGithub', function () {
$scope.handleLocationInput = function(location) {
$scope.trigger['config']['subdir'] = location || '';
$scope.isInvalidLocation = $scope.locations.indexOf(location) < 0;
};
$scope.setLocation = function(location) {
$scope.currentLocation = location;
$scope.trigger['config']['subdir'] = location || '';
$scope.isInvalidLocation = false;
};
$scope.selectRepo = function(repo, org) {
@ -2735,16 +2737,19 @@ quayApp.directive('triggerSetupGithub', function () {
$scope.locationError = resp['message'] || 'Could not load Dockerfile locations';
$scope.locations = null;
$scope.trigger.$ready = false;
$scope.isInvalidLocation = false;
return;
}
$scope.locationError = null;
$scope.locations = resp['subdir'] || [];
$scope.trigger.$ready = true;
$scope.isInvalidLocation = resp['subdir'].indexOf('') < 0;
}, function(resp) {
$scope.locationError = resp['message'] || 'Could not load Dockerfile locations';
$scope.locations = null;
$scope.trigger.$ready = false;
$scope.isInvalidLocation = false;
});
}
};