BigW Consortium Gitlab

Commit 438f0915 by Lin Jen-Shin

Use partials instead of simple switch case:

parent bf8c7dc3
%a{href: pipeline_build_url(pipeline, build), style: "color:#3777b0;text-decoration:none;"}
= build.name
Build #<%= build.id %> ( <%= pipeline_build_url(@pipeline, build) %> )
......@@ -158,12 +158,7 @@
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#8c8c8c;font-weight:500;font-size:15px;vertical-align:middle;"}
= build.stage
%td{align: "right", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:20px 0;color:#8c8c8c;font-weight:500;font-size:15px;"}
- case build
- when Ci::Build
%a{href: pipeline_build_url(@pipeline, build), style: "color:#3777b0;text-decoration:none;"}
= build.name
- when GenericCommitStatus
= build.name
= render "notify/#{build.to_partial_path}", pipeline: @pipeline, build: build
%tr.build-log
- if build.has_trace?
%td{colspan: "2", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:0 0 15px;"}
......
......@@ -19,7 +19,7 @@ Commit Author: <%= commit.author_name %>
Pipeline #<%= @pipeline.id %> ( <%= pipeline_url(@pipeline) %> ) had <%= failed.size %> failed <%= 'build'.pluralize(failed.size) %>.
<% failed.each do |build| -%>
Build #<%= build.id %><%= if build.kind_of?(Ci::Build) then " ( #{pipeline_build_url(@pipeline, build)} )" end %>
<%= render "notify/#{build.to_partial_path}", pipeline: @pipeline, build: build %>
Stage: <%= build.stage %>
Name: <%= build.name %>
<% if build.has_trace? -%>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment