diff --git a/app/assets/stylesheets/request-for-comments.css.scss b/app/assets/stylesheets/request-for-comments.css.scss index 2cad6446..bf7f0cb4 100644 --- a/app/assets/stylesheets/request-for-comments.css.scss +++ b/app/assets/stylesheets/request-for-comments.css.scss @@ -53,64 +53,72 @@ } } -} + .testrun-assess-results { -.testrun-assess-results { + .testrun-container { + display: flex; + margin-bottom: 10px; - display: flex; + .testrun-output { + overflow-x: auto; + flex-grow: 1; + } + } + + .result { + margin-right: 10px; + margin-top: 20px; + width: 10px; + height: 10px; + } + + .passed { + border-radius: 50%; + background-color: #8efa00; + -webkit-box-shadow: 0 0 11px 1px rgba(44,222,0,1); + -moz-box-shadow: 0 0 11px 1px rgba(44,222,0,1); + box-shadow: 0 0 11px 1px rgba(44,222,0,1); + } + + .unknown { + border-radius: 50%; + background-color: #ffca00; + -webkit-box-shadow: 0 0 11px 1px rgb(255, 202, 0); + -moz-box-shadow: 0 0 11px 1px rgb(255, 202, 0); + box-shadow: 0 0 11px 1px rgb(255, 202, 0); + } + + .failed { + border-radius: 50%; + background-color: #ff2600; + -webkit-box-shadow: 0 0 11px 1px rgba(222,0,0,1); + -moz-box-shadow: 0 0 11px 1px rgba(222,0,0,1); + box-shadow: 0 0 11px 1px rgba(222,0,0,1); + } - .result { - margin-right: 10px; - width: 10px; - height: 10px; } - .passed { - border-radius: 50%; - background-color: #8efa00; - -webkit-box-shadow: 0 0 11px 1px rgba(44,222,0,1); - -moz-box-shadow: 0 0 11px 1px rgba(44,222,0,1); - box-shadow: 0 0 11px 1px rgba(44,222,0,1); + #mark-as-solved-button { + margin-top: 20px; } - .unknown { - border-radius: 50%; - background-color: #ffca00; - -webkit-box-shadow: 0 0 11px 1px rgb(255, 202, 0); - -moz-box-shadow: 0 0 11px 1px rgb(255, 202, 0); - box-shadow: 0 0 11px 1px rgb(255, 202, 0); + #thank-you-container { + display: none; + margin-top: 20px; + padding: 5px; + border: solid lightgrey 1px; + background-color: rgba(20, 180, 20, 0.2); + border-radius: 4px; + + button { + margin-right: 10px; + } } - .failed { - border-radius: 50%; - background-color: #ff2600; - -webkit-box-shadow: 0 0 11px 1px rgba(222,0,0,1); - -moz-box-shadow: 0 0 11px 1px rgba(222,0,0,1); - box-shadow: 0 0 11px 1px rgba(222,0,0,1); + #thank-you-note { + width: 100%; + height: 200px; } - -} - -#mark-as-solved-button { - margin-top: 20px; -} - -#thank-you-container { - display: none; - margin-top: 20px; - padding: 5px; - border: solid lightgrey 1px; - background-color: rgba(20, 180, 20, 0.2); - border-radius: 4px; - - button { - margin-right: 10px; - } -} - -#thank-you-note { - width: 100%; - height: 200px; } #commentitor { diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index d3751d0b..5f6a53f5 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -43,10 +43,20 @@ <% output_runs = testruns.select { |run| run.cause == 'run' } %> <% if output_runs.size > 0 %>
<%= testrun.try(:output) or t('request_for_comments.no_output') %>+ <% + output = testrun.try(:output) + if output + messages = output.scan(/{(?:(?:".+?":".+?")+?,?)+}/) + messages.map! {|el| JSON.parse(el)} + messages.keep_if {|message| message['cmd'] == 'write'} + messages.map! {|message| message['data']} + output = messages.join '' + end + %> +
<%= output or t('request_for_comments.no_output') %><% end %>
<%= testrun.output or t('request_for_comments.no_output')%>+