diff options
Diffstat (limited to 'app/assets/javascripts/pipeline_schedules/pipeline_schedule_form_bundle.js')
-rw-r--r-- | app/assets/javascripts/pipeline_schedules/pipeline_schedule_form_bundle.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/assets/javascripts/pipeline_schedules/pipeline_schedule_form_bundle.js b/app/assets/javascripts/pipeline_schedules/pipeline_schedule_form_bundle.js new file mode 100644 index 00000000000..c60e77decce --- /dev/null +++ b/app/assets/javascripts/pipeline_schedules/pipeline_schedule_form_bundle.js @@ -0,0 +1,21 @@ +import Vue from 'vue'; +import IntervalPatternInput from './components/interval_pattern_input'; +import TimezoneDropdown from './components/timezone_dropdown'; +import TargetBranchDropdown from './components/target_branch_dropdown'; + +document.addEventListener('DOMContentLoaded', () => { + const IntervalPatternInputComponent = Vue.extend(IntervalPatternInput); + const intervalPatternMount = document.getElementById('interval-pattern-input'); + const initialCronInterval = intervalPatternMount ? intervalPatternMount.dataset.initialInterval : ''; + + new IntervalPatternInputComponent({ + propsData: { + initialCronInterval, + }, + }).$mount(intervalPatternMount); + + const formElement = document.getElementById('new-pipeline-schedule-form'); + gl.timezoneDropdown = new TimezoneDropdown(); + gl.targetBranchDropdown = new TargetBranchDropdown(); + gl.pipelineScheduleFieldErrors = new gl.GlFieldErrors(formElement); +}); |