Add button for running a newly setup trigger
This allows users quick access to test their new trigger they just setup Fixes #125
This commit is contained in:
parent
c3a738c7c2
commit
16a205c108
3 changed files with 13 additions and 3 deletions
|
@ -189,7 +189,8 @@
|
|||
repository="repository"
|
||||
trigger="currentSetupTrigger"
|
||||
canceled="cancelSetupTrigger(trigger)"
|
||||
counter="showTriggerSetupCounter"></div>
|
||||
counter="showTriggerSetupCounter"
|
||||
trigger-runner="askRunTrigger(trigger)"></div>
|
||||
|
||||
<!-- Manual trigger dialog -->
|
||||
<div class="manual-trigger-build-dialog"
|
||||
|
|
|
@ -122,7 +122,10 @@
|
|||
ng-click="activate()"
|
||||
ng-show="currentView == 'analyzed'">Create Trigger</button>
|
||||
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ currentView == 'postActivation' ? 'Done' : 'Cancel' }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="runTriggerNow()"
|
||||
ng-if="currentView == 'postActivation'">Run Trigger Now</button>
|
||||
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ currentView == 'postActivation' ? 'Done' : 'Cancel' }}</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Reference in a new issue