diff --git a/app/assets/stylesheets/request-for-comments.css.scss b/app/assets/stylesheets/request-for-comments.css.scss index 8fb7bfea..e88ed573 100644 --- a/app/assets/stylesheets/request-for-comments.css.scss +++ b/app/assets/stylesheets/request-for-comments.css.scss @@ -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); + } + +} diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index b8a143f9..156543c1 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -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 @@
<%= t('request_for_comments.howto_title') %>
<%= render_markdown(t('request_for_comments.howto')) %>
+ + + <% if testruns.size > 0 %> +
+ <% output_runs = testruns.select { |run| run.cause == 'run' } %> + <% if output_runs.size > 0 %> +
<%= t('request_for_comments.runtime_output') %>
+
+ <% output_runs.each do |testrun| %> +

<%= testrun.try(:message) or t('request_for_comments.no_output') %>

+ <% end %> +
+ <% end %> + + <% assess_runs = testruns.select { |run| run.cause == 'assess' } %> + <% if assess_runs.size > 0 %> +
<%= t('request_for_comments.test_results') %>
+
+ <% assess_runs.each do |testrun| %> +
+ <% end %> +
+ <% end %> +
+ <% end %>
diff --git a/config/locales/de.yml b/config/locales/de.yml index 62fc76b5..88a3b1c0 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -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. diff --git a/config/locales/en.yml b/config/locales/en.yml index 1e13f929..5d9b78d8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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.