summaryrefslogtreecommitdiff
path: root/app/helpers/jobs_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/jobs_helper.rb')
-rw-r--r--app/helpers/jobs_helper.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/helpers/jobs_helper.rb b/app/helpers/jobs_helper.rb
new file mode 100644
index 00000000000..46edba261dd
--- /dev/null
+++ b/app/helpers/jobs_helper.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module JobsHelper
+ def jobs_data
+ {
+ "endpoint" => project_job_path(@project, @build, format: :json),
+ "project_path" => @project.full_path,
+ "deployment_help_url" => help_page_path('user/project/clusters/index.html', anchor: 'troubleshooting-failed-deployment-jobs'),
+ "runner_help_url" => help_page_path('ci/runners/README.html', anchor: 'setting-maximum-job-timeout-for-a-runner'),
+ "runner_settings_url" => project_runners_path(@build.project, anchor: 'js-runners-settings'),
+ "variables_settings_url" => project_variables_path(@build.project, anchor: 'js-cicd-variables-settings'),
+ "page_path" => project_job_path(@project, @build),
+ "build_status" => @build.status,
+ "build_stage" => @build.stage,
+ "log_state" => '',
+ "build_options" => javascript_build_options
+ }
+ end
+end