This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/directives/ui/trigger-setup-custom.js
2015-03-31 17:12:40 -04:00

40 lines
1 KiB
JavaScript

/**
* An element which displays custom git-specific setup information for its build triggers.
*/
angular.module('quay').directive('triggerSetupCustom', function() {
var directiveDefinitionObject = {
priority: 0,
templateUrl: '/static/directives/trigger-setup-custom.html',
replace: false,
transclude: false,
restrict: 'C',
scope: {
'repository': '=repository',
'trigger': '=trigger',
'nextStepCounter': '=nextStepCounter',
'currentStepValid': '=currentStepValid',
'analyze': '&analyze'
},
controller: function($scope, $element, ApiService) {
$scope.analyzeCounter = 0;
$scope.setupReady = false,
$scope.state = {
'gitURL': null,
'subdir': null,
};
$scope.stepsCompleted = function() {
$scope.analyze({'isValid': $scope.state.gitURL != null && $scope.subdir != null});
};
$scope.nopLoad = function(callback) {
callback();
};
}
};
return directiveDefinitionObject;
});