Display output and test results below RfC description
This commit is contained in:
@ -151,3 +151,39 @@ input#subscribe {
|
||||
color: #008cba;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.testrun-assess-results {
|
||||
|
||||
display: flex;
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
<%
|
||||
user = @request_for_comment.user
|
||||
submission = @request_for_comment.submission
|
||||
testruns = Testrun.where(:submission_id => @request_for_comment.submission)
|
||||
%>
|
||||
<%= user.displayname %> | <%= @request_for_comment.created_at.localtime %>
|
||||
|
||||
@ -37,6 +38,31 @@
|
||||
<h5>
|
||||
<u><%= t('request_for_comments.howto_title') %></u><br> <%= render_markdown(t('request_for_comments.howto')) %>
|
||||
</h5>
|
||||
|
||||
<!-- check cause: assess/run; display success, output (if any), make collapsible-->
|
||||
<% if testruns.size > 0 %>
|
||||
<div class="testrun-container">
|
||||
<% output_runs = testruns.select { |run| run.cause == 'run' } %>
|
||||
<% if output_runs.size > 0 %>
|
||||
<h5><%= t('request_for_comments.runtime_output') %></h5>
|
||||
<div class="testrun-output">
|
||||
<% output_runs.each do |testrun| %>
|
||||
<p><%= testrun.try(:message) or t('request_for_comments.no_output') %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% assess_runs = testruns.select { |run| run.cause == 'assess' } %>
|
||||
<% if assess_runs.size > 0 %>
|
||||
<h5><%= t('request_for_comments.test_results') %></h5>
|
||||
<div class="testrun-assess-results">
|
||||
<% assess_runs.each do |testrun| %>
|
||||
<div class="result <%= testrun.passed ? 'passed' : 'failed' %>" title="<%= testrun.output %>"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
@ -514,6 +514,9 @@ de:
|
||||
modal_title: "Einen Kommentar in Zeile ${line} hinzufügen"
|
||||
click_for_more_comments: "Klicken um ${numComments} weitere Kommentare zu sehen..."
|
||||
subscribe_to_author: "Bei neuen Kommentaren des Autors per E-Mail benachrichtigt werden"
|
||||
no_output: "Keine Ausgabe."
|
||||
runtime_output: "Programmausgabe"
|
||||
test_results: "Testergebnisse"
|
||||
sessions:
|
||||
create:
|
||||
failure: Fehlerhafte E-Mail oder Passwort.
|
||||
|
@ -514,6 +514,9 @@ en:
|
||||
modal_title: "Add a comment to line ${line}"
|
||||
click_for_more_comments: "Click to view ${numComments} more comments..."
|
||||
subscribe_to_author: "Receive E-Mail notifications for new comments of the original author"
|
||||
no_output: "No output."
|
||||
runtime_output: "Runtime Output"
|
||||
test_results: "Test Results"
|
||||
sessions:
|
||||
create:
|
||||
failure: Invalid email or password.
|
||||
|
Reference in New Issue
Block a user