custom trigger: build trigger config
This commit is contained in:
parent
d2f9a8838c
commit
4e097c1f9d
2 changed files with 19 additions and 10 deletions
|
@ -19,17 +19,26 @@ angular.module('quay').directive('triggerSetupCustom', function() {
|
|||
},
|
||||
controller: function($scope, $element, ApiService) {
|
||||
$scope.analyzeCounter = 0;
|
||||
$scope.setupReady = false,
|
||||
$scope.setupReady = false;
|
||||
|
||||
$scope.state = {
|
||||
'gitURL': null,
|
||||
'subdir': null,
|
||||
'build_source': null,
|
||||
'subdir': null
|
||||
};
|
||||
|
||||
$scope.stepsCompleted = function() {
|
||||
$scope.analyze({'isValid': $scope.state.gitURL != null && $scope.subdir != null});
|
||||
$scope.analyze({'isValid': $scope.state.build_source != null && $scope.state.subdir != null});
|
||||
};
|
||||
|
||||
$scope.$watch('state.build_source', function(build_source) {
|
||||
$scope.trigger['config']['build_source'] = build_source;
|
||||
});
|
||||
|
||||
$scope.$watch('state.subdir', function(subdir) {
|
||||
$scope.trigger['config']['subdir'] = subdir;
|
||||
$scope.trigger.$ready = subdir != null;
|
||||
});
|
||||
|
||||
$scope.nopLoad = function(callback) {
|
||||
callback();
|
||||
};
|
||||
|
|
Reference in a new issue