From 77c2e7fa5ef1113781819b7d20d67f5553ed729b Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 25 Feb 2014 00:42:33 -0500 Subject: [PATCH] Warn if the docker file directory entered does not match any of those found --- static/directives/trigger-setup-github.html | 6 +++++- static/js/app.js | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/static/directives/trigger-setup-github.html b/static/directives/trigger-setup-github.html index 46c6a29f5..89500bb26 100644 --- a/static/directives/trigger-setup-github.html +++ b/static/directives/trigger-setup-github.html @@ -31,7 +31,8 @@ diff --git a/static/js/app.js b/static/js/app.js index a830e570e..ef67850ea 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -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; }); } };