3030 <span class =" icon" >
3131 <i class =" fa fa-certificate" ></i >
3232 </span >
33- <span >Addcredentials </span >
33+ <span >AddCredentials </span >
3434 </a >
3535 <a class =" button is-primary" v-on:click =" showGitHubWebHookModal" >
3636 <span class =" icon" >
3939 <span >Add GitHub WebHook</span >
4040 </a >
4141 </p >
42- <hr class =" dotted-line" >
42+ </div >
43+ </article >
44+
45+ <article class =" tile is-child notification content-article" >
46+ <div class =" content" >
47+ <p class =" control" >
48+ <label class =" label" >Define custom pipeline options here.</label >
49+ <a class =" button is-primary" v-on:click =" showPeriodicalPipelineScheduleModal" >
50+ <span class =" icon" >
51+ <i class =" fa fa-calendar" ></i >
52+ </span >
53+ <span >Add Pipeline Trigger</span >
54+ </a >
55+ </p >
56+ <span style =" color :red " v-if =" periodicSchedulesErr" >Periodic schedules invalid: {{ periodicSchedulesErrMsg }}</span >
57+ </div >
58+ </article >
59+
60+ <article class =" tile is-child notification content-article" >
61+ <div class =" content" >
4362 <label class =" label" >Type the name of your pipeline here.</label >
4463 <p class =" control has-icons-left" v-bind:class =" { 'has-icons-right': pipelineNameSuccess }" >
4564 <input class =" input is-medium input-bar" v-model =" pipelinename" v-on:input =" checkPipelineNameAvailableDebounce" type =" text" placeholder =" Pipeline name ..." >
5170 </span >
5271 </p >
5372 <span style =" color :red " v-if =" pipelineErrorMsg" >Pipeline Name incorrect: {{ pipelineErrorMsg }}</span >
54- <hr class =" dotted-line" >
55- <a class =" button is-green-button" v-on:click =" startCreatePipeline" v-bind:class =" { 'is-disabled': !gitSuccess || !pipelineNameSuccess }" >
56- <span class =" icon" >
57- <i class =" fa fa-plus" ></i >
58- </span >
59- <span >Create Pipeline</span >
60- </a >
6173 </div >
6274 </article >
6375 </div >
88100 </div >
89101 </div >
90102
103+ <div class =" tile is-parent" >
104+ <article class =" is-child notification content-article" >
105+ <a class =" button is-green-button" style =" margin-left :13px ;" v-on:click =" startCreatePipeline" v-bind:class =" { 'is-disabled': !gitSuccess || !pipelineNameSuccess || periodicSchedulesErr }" >
106+ <span class =" icon" >
107+ <i class =" fa fa-plus" ></i >
108+ </span >
109+ <span >Create Pipeline</span >
110+ </a >
111+ </article >
112+ </div >
113+
91114 <div class =" tile is-parent is-10" >
92115 <article class =" tile is-child notification content-article box" >
93116 <vue-good-table
214237 </div >
215238 </modal >
216239
240+ <!-- periodical pipeline schedule modal-->
241+ <modal :visible =" periodicalPipelineScheduleModal" class =" modal-z-index" @close =" close" >
242+ <div class =" box credentials-modal" >
243+ <div class =" block credentials-modal-content" >
244+ <collapse accordion is-fullwidth >
245+ <collapse-item title =" Start pipeline periodically:" selected >
246+ <div class =" credentials-modal-content" >
247+ <p class =" control" >
248+ <textarea class =" textarea input-bar" v-model =" periodicSchedules" ></textarea >
249+ </p >
250+ </div >
251+ <label class =" label" style =" test-align :left ;" >
252+ Use the standard cron syntax. For example to start the pipeline every half hour:
253+ <br />0 30 * * * *<br />
254+ Please see <a href =" https://godoc.org/github.com/robfig/cron" target =" _blank" >here</a > for more information.
255+ </label >
256+ </collapse-item >
257+ </collapse >
258+ <div class =" modal-footer" >
259+ <div style =" float :left ;" >
260+ <button class =" button is-primary" v-on:click =" addPeriodicalSchedules" >Confirm</button >
261+ </div >
262+ <div style =" float :right ;" >
263+ <button class =" button is-danger" v-on:click =" cancel" >Cancel</button >
264+ </div >
265+ </div >
266+ </div >
267+ </div >
268+ </modal >
269+
217270<!-- status output modal-->
218271 <modal :visible =" statusOutputModal" class =" modal-z-index" @close =" closeStatusModal" >
219272 <div class =" box statusModal" >
@@ -268,11 +321,15 @@ export default {
268321 gitSuccess: false ,
269322 gitCredentialsModal: false ,
270323 gitWebHookModal: false ,
324+ periodicalPipelineScheduleModal: false ,
271325 gitBranches: [],
272326 giturl: ' ' ,
273327 pipelinename: ' ' ,
274328 pipelineNameSuccess: false ,
275329 pipelineErrorMsg: ' ' ,
330+ periodicSchedules: ' ' ,
331+ periodicSchedulesErrMsg: ' ' ,
332+ periodicSchedulesErr: false ,
276333 createPipeline: {
277334 id: ' ' ,
278335 output: ' ' ,
@@ -282,6 +339,7 @@ export default {
282339 pipeline: {
283340 name: ' ' ,
284341 type: ' golang' ,
342+ perodicschedules: [],
285343 repo: {
286344 url: ' ' ,
287345 user: ' ' ,
@@ -491,6 +549,7 @@ export default {
491549this .checkGitRepo ()
492550this .gitCredentialsModal = false
493551this .gitWebHookModal = false
552+ this .periodicalPipelineScheduleModal = false
494553this .$emit (' close' )
495554 },
496555
@@ -501,6 +560,7 @@ export default {
501560this .createPipeline .pipeline .repo .privatekey .key = ' '
502561this .createPipeline .pipeline .repo .privatekey .username = ' '
503562this .createPipeline .pipeline .repo .privatekey .password = ' '
563+ this .periodicSchedules = ' '
504564
505565this .close ()
506566 },
@@ -513,6 +573,35 @@ export default {
513573this .gitWebHookModal = true
514574 },
515575
576+ showPeriodicalPipelineScheduleModal () {
577+ this .periodicalPipelineScheduleModal = true
578+ },
579+
580+ addPeriodicalSchedules () {
581+ // Reset previous errors if there were some.
582+ this .periodicSchedulesErr = false
583+
584+ // Split string by line breaks.
585+ this .createPipeline .pipeline .periodicschedules = this .periodicSchedules .split (' \n ' )
586+
587+ // Check if periodic schedule entries are valid.
588+ this .$http
589+ .post (' /api/v1/pipeline/periodicschedules' ,this .createPipeline .pipeline .periodicschedules )
590+ .then (response => {
591+ openNotification ({
592+ title: ' Periodic schedules valid' ,
593+ message: ` All defined periodic schedules are valid!` ,
594+ type: ' success'
595+ })
596+ })
597+ .catch ((error )=> {
598+ this .periodicSchedulesErr = true
599+ this .periodicSchedulesErrMsg = error .response .data
600+ })
601+
602+ this .close ()
603+ },
604+
516605showStatusOutputModal (msg ) {
517606if (! msg) {
518607 msg= ' No output found.'