Match Modification Of Pipeline API

This commit is contained in:
Aaron 2018-03-21 15:54:40 +08:00
parent 6c977bd82a
commit 1caa1a6f3d
4 changed files with 11 additions and 7 deletions

View File

@ -52,10 +52,13 @@
{{date-from-now inst.nextStart}} {{date-from-now inst.nextStart}}
{{/tooltip-element}} {{/tooltip-element}}
{{/if}} {{/if}}
{{#if inst.triggerWebhook}} {{#if inst.triggerWebhookPush}}
<p class="mt-5 mb-0">{{t 'pipelinesPage.awaitingWebhook'}}</p> <p class="mt-5 mb-0">{{t 'pipelinesPage.awaitingWebhookPush'}}</p>
{{/if}} {{/if}}
{{#unless (or inst.triggerWebhook inst.nextStart)}} {{#if inst.triggerWebhookPr}}
<p class="mt-5 mb-0">{{t 'pipelinesPage.awaitingWebhookPR'}}</p>
{{/if}}
{{#unless (or inst.triggerWebhookPush inst.triggerWebhookPr inst.nextStart)}}
{{t 'pipelinesPage.triggerManually'}} {{t 'pipelinesPage.triggerManually'}}
{{/unless}} {{/unless}}
</td> </td>

View File

@ -76,11 +76,11 @@ export default Component.extend({
}.observes('state.setCustomCron'), }.observes('state.setCustomCron'),
observeOptionsChange: function(){ observeOptionsChange: function(){
let trigger={ let trigger={
webhook: this.get('pipeline.triggerWebhook'), webhook: this.get('pipeline.triggerWebhookPush'),
cron: !!this.get('state.setCustomCron') cron: !!this.get('state.setCustomCron')
} }
this.sendAction('triggerOptionsChange', trigger); this.sendAction('triggerOptionsChange', trigger);
}.observes('pipeline.triggerWebhook', 'state.setCustomCron'), }.observes('pipeline.triggerWebhookPush', 'state.setCustomCron'),
didInsertElement(){ didInsertElement(){
this.initTimeZone(); this.initTimeZone();
this.cronObserve(); this.cronObserve();

View File

@ -3,7 +3,7 @@
<label>{{t 'newPipelineStep.stepType.scm.trigger'}}</label> <label>{{t 'newPipelineStep.stepType.scm.trigger'}}</label>
<div class="pt-10"></div> <div class="pt-10"></div>
<div class="inline-form"> <div class="inline-form">
{{input disabled=(or disabled webhookDisabled) type="checkbox" id="webhook" checked=pipeline.triggerWebhook}} {{input disabled=(or disabled webhookDisabled) type="checkbox" id="webhook" checked=pipeline.triggerWebhookPush}}
<label class="acc-label" for="webhook"> <label class="acc-label" for="webhook">
{{t 'newPipelineStage.trigger.webhook'}} {{t 'newPipelineStage.trigger.webhook'}}
</label> </label>

View File

@ -39,7 +39,8 @@ pipelinesPage:
inactive: Inactive inactive: Inactive
lastActivity: LastActivity lastActivity: LastActivity
nextRun: NextRun nextRun: NextRun
awaitingWebhook: Awaiting Webhook awaitingWebhookPush: Awaiting Push
awaitingWebhookPR: Awaiting PR
triggerManually: Trigger Manually triggerManually: Trigger Manually
notDeployed: Pipeline is not enabled, click <a href="{route}">here</a> to enable Pipline notDeployed: Pipeline is not enabled, click <a href="{route}">here</a> to enable Pipline
pipelinesSetting: pipelinesSetting: