diff options
Diffstat (limited to 'app/helpers/builds_helper.rb')
-rw-r--r-- | app/helpers/builds_helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/builds_helper.rb b/app/helpers/builds_helper.rb index f3aaff9140d..9fc69e12266 100644 --- a/app/helpers/builds_helper.rb +++ b/app/helpers/builds_helper.rb @@ -5,4 +5,14 @@ module BuildsHelper build_class += ' retried' if build.retried? build_class end + + def javascript_build_options + { + page_url: namespace_project_build_url(@project.namespace, @project, @build), + build_url: namespace_project_build_url(@project.namespace, @project, @build, :json), + build_status: @build.status, + build_stage: @build.stage, + log_state: @build.trace_with_state[:state].to_s + } + end end |