unsupported alert for robot selection

This commit is contained in:
Jimmy Zelinskie 2015-04-06 14:53:54 -04:00
parent 1b953c8cd6
commit c8b931609e
4 changed files with 16 additions and 6 deletions

View file

@ -373,6 +373,10 @@ class BuildTriggerAnalyze(RepositoryParamResource):
'status': 'error',
'message': rre.message
}
except NotImplementedError:
return {
'status': 'notimplemented',
}
raise NotFound()

View file

@ -66,14 +66,14 @@ class BuildTrigger(object):
"""
Returns the URL at which the Dockerfile for the trigger is found or None if none/not applicable.
"""
return None
raise NotImplementedError
def load_dockerfile_contents(self, auth_token, config):
"""
Loads the Dockerfile found for the trigger's config and returns them or None if none could
be found/loaded.
"""
return None
raise NotImplementedError
def list_build_sources(self, auth_token):
"""

View file

@ -35,11 +35,17 @@
<div class="trigger-option-section" ng-show="currentView == 'analyzed'">
<!-- Messaging -->
<div class="alert alert-danger" ng-if="pullInfo.analysis.status == 'error' && !(trigger.service == 'custom')">
<div class="alert alert-danger" ng-if="pullInfo.analysis.status == 'error'">
{{ pullInfo.analysis.message }}
</div>
<div class="alert alert-warning" ng-if="pullInfo.analysis.status == 'warning'">
{{ pullRequirements.message }}
{{ pullInfo.analysis.message }}
</div>
<div class="alert alert-info" ng-if="pullInfo.analysis.status == 'notimplemented'">
<p>
For {{ TriggerService.getTitle(trigger.service) }} triggers, we are unable to determine dependencies automatically.
If the git repository being built depends on a private base image, you must manually select a robot account with the proper permissions.
</p>
</div>
<div class="dockerfile-found" ng-if="pullInfo.analysis.is_public === false">
<div class="dockerfile-found-content">
@ -60,7 +66,6 @@
</div>
<div style="margin-bottom: 12px">
<p>Because Dockerfiles may depend on other private images, you may need to use a robot account to build this repository.</p>
Please select the credentials to use when pulling the base image:
</div>
<div ng-if="!isNamespaceAdmin(repository.namespace)" style="color: #aaa;">

View file

@ -14,12 +14,13 @@ angular.module('quay').directive('setupTriggerDialog', function () {
'canceled': '&canceled',
'activated': '&activated'
},
controller: function($scope, $element, ApiService, UserService) {
controller: function($scope, $element, ApiService, UserService, TriggerService) {
var modalSetup = false;
$scope.state = {};
$scope.nextStepCounter = -1;
$scope.currentView = 'config';
$scope.TriggerService = TriggerService
$scope.show = function() {
if (!$scope.trigger || !$scope.repository) { return; }