Merge pull request #165 from openHPI/parse-rfc-run-output
Parse rfc run output
This commit is contained in:
@ -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 {
|
#mark-as-solved-button {
|
||||||
border-radius: 50%;
|
margin-top: 20px;
|
||||||
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 {
|
#thank-you-container {
|
||||||
border-radius: 50%;
|
display: none;
|
||||||
background-color: #ffca00;
|
margin-top: 20px;
|
||||||
-webkit-box-shadow: 0 0 11px 1px rgb(255, 202, 0);
|
padding: 5px;
|
||||||
-moz-box-shadow: 0 0 11px 1px rgb(255, 202, 0);
|
border: solid lightgrey 1px;
|
||||||
box-shadow: 0 0 11px 1px rgb(255, 202, 0);
|
background-color: rgba(20, 180, 20, 0.2);
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
button {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.failed {
|
#thank-you-note {
|
||||||
border-radius: 50%;
|
width: 100%;
|
||||||
background-color: #ff2600;
|
height: 200px;
|
||||||
-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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#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 {
|
#commentitor {
|
||||||
|
@ -43,10 +43,20 @@
|
|||||||
<% output_runs = testruns.select { |run| run.cause == 'run' } %>
|
<% output_runs = testruns.select { |run| run.cause == 'run' } %>
|
||||||
<% if output_runs.size > 0 %>
|
<% if output_runs.size > 0 %>
|
||||||
<h5><%= t('request_for_comments.runtime_output') %></h5>
|
<h5><%= t('request_for_comments.runtime_output') %></h5>
|
||||||
<div class="testrun-output text">
|
<div class="collapsed testrun-output text">
|
||||||
<span class="fa fa-chevron-up collapse-button"></span>
|
<span class="fa fa-chevron-down collapse-button"></span>
|
||||||
<% output_runs.each do |testrun| %>
|
<% output_runs.each do |testrun| %>
|
||||||
<pre><%= testrun.try(:output) or t('request_for_comments.no_output') %></pre>
|
<%
|
||||||
|
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
|
||||||
|
%>
|
||||||
|
<pre><%= output or t('request_for_comments.no_output') %></pre>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
@ -56,7 +66,13 @@
|
|||||||
<h5><%= t('request_for_comments.test_results') %></h5>
|
<h5><%= t('request_for_comments.test_results') %></h5>
|
||||||
<div class="testrun-assess-results">
|
<div class="testrun-assess-results">
|
||||||
<% assess_runs.each do |testrun| %>
|
<% assess_runs.each do |testrun| %>
|
||||||
<div class="result <%= testrun.passed ? 'passed' : 'failed' %>" title="<%= testrun.output %>"></div>
|
<div class="testrun-container">
|
||||||
|
<div class="result <%= testrun.passed ? 'passed' : 'failed' %>"></div>
|
||||||
|
<div class="collapsed testrun-output text">
|
||||||
|
<span class="fa fa-chevron-down collapse-button"></span>
|
||||||
|
<pre><%= testrun.output or t('request_for_comments.no_output')%></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Reference in New Issue
Block a user