diff --git a/static/directives/repo-view/repo-panel-builds.html b/static/directives/repo-view/repo-panel-builds.html index 0e5e72172..435da1b85 100644 --- a/static/directives/repo-view/repo-panel-builds.html +++ b/static/directives/repo-view/repo-panel-builds.html @@ -189,7 +189,8 @@ repository="repository" trigger="currentSetupTrigger" canceled="cancelSetupTrigger(trigger)" - counter="showTriggerSetupCounter"> + counter="showTriggerSetupCounter" + trigger-runner="askRunTrigger(trigger)">
Create Trigger - + + +
diff --git a/static/js/directives/ui/setup-trigger-dialog.js b/static/js/directives/ui/setup-trigger-dialog.js index 6696d6cdd..46d0550bb 100644 --- a/static/js/directives/ui/setup-trigger-dialog.js +++ b/static/js/directives/ui/setup-trigger-dialog.js @@ -12,7 +12,8 @@ angular.module('quay').directive('setupTriggerDialog', function () { 'trigger': '=trigger', 'counter': '=counter', 'canceled': '&canceled', - 'activated': '&activated' + 'activated': '&activated', + 'triggerRunner': '&triggerRunner' }, controller: function($scope, $element, ApiService, UserService, TriggerService) { var modalSetup = false; @@ -55,6 +56,11 @@ angular.module('quay').directive('setupTriggerDialog', function () { $('#setupTriggerModal').modal('hide'); }; + $scope.runTriggerNow = function() { + $('#setupTriggerModal').modal('hide'); + $scope.triggerRunner({'trigger': $scope.trigger}); + }; + $scope.checkAnalyze = function(isValid) { $scope.currentView = 'analyzing'; $scope.pullInfo = {