diff options
Diffstat (limited to 'app/helpers/projects/pipeline_helper.rb')
-rw-r--r-- | app/helpers/projects/pipeline_helper.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/helpers/projects/pipeline_helper.rb b/app/helpers/projects/pipeline_helper.rb index 0239253d8f0..caebbd5250e 100644 --- a/app/helpers/projects/pipeline_helper.rb +++ b/app/helpers/projects/pipeline_helper.rb @@ -24,6 +24,30 @@ module Projects tests_count: pipeline.test_report_summary.total[:count] } end + + def js_pipeline_details_header_data(project, pipeline) + { + full_path: project.full_path, + graphql_resource_etag: graphql_etag_pipeline_path(pipeline), + pipeline_iid: pipeline.iid, + pipelines_path: project_pipelines_path(project), + name: pipeline.name, + total_jobs: pipeline.total_size, + yaml_errors: pipeline.yaml_errors, + failure_reason: pipeline.failure_reason, + triggered_by_path: pipeline.child? ? pipeline_path(pipeline.triggered_by_pipeline) : '', + schedule: pipeline.schedule?.to_s, + child: pipeline.child?.to_s, + latest: pipeline.latest?.to_s, + merge_train_pipeline: pipeline.merge_train_pipeline?.to_s, + invalid: pipeline.has_yaml_errors?.to_s, + failed: pipeline.failure_reason?.to_s, + auto_devops: pipeline.auto_devops_source?.to_s, + detached: pipeline.detached_merge_request_pipeline?.to_s, + stuck: pipeline.stuck?, + ref_text: pipeline.ref_text + } + end end end |