Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/ci/pipeline_schedules_helper.rb')
-rw-r--r--app/helpers/ci/pipeline_schedules_helper.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/helpers/ci/pipeline_schedules_helper.rb b/app/helpers/ci/pipeline_schedules_helper.rb
new file mode 100644
index 00000000000..e5125353b99
--- /dev/null
+++ b/app/helpers/ci/pipeline_schedules_helper.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module Ci
+ module PipelineSchedulesHelper
+ def js_pipeline_schedules_form_data(project, schedule)
+ {
+ full_path: project.full_path,
+ daily_limit: schedule.daily_limit,
+ timezone_data: timezone_data.to_json,
+ project_id: project.id,
+ default_branch: project.default_branch,
+ settings_link: project_settings_ci_cd_path(project),
+ schedules_path: pipeline_schedules_path(project)
+ }
+ end
+ end
+end
+
+Ci::PipelineSchedulesHelper.prepend_mod_with('Ci::PipelineSchedulesHelper')