20032: Fix unnecessary race in test.
[arvados.git] / apps / workbench / app / views / jobs / _show_log.html.erb
index b4ede751183206e8259afd6df196f7a368c2bb7e..10b7fa1c4eec3090c47a7ce60bacaf87b22ec8b8 100644 (file)
@@ -9,11 +9,11 @@ SPDX-License-Identifier: AGPL-3.0 %>
      style="display:none"
      data-object-uuid="<%= @object.uuid %>"></div>
 
-<div id="event_log_div"
+<pre id="event_log_div"
      class="arv-log-event-listener arv-log-event-handler-append-logs arv-job-log-window"
      data-object-uuid="<%= @object.uuid %>"
-  ><%= @object.stderr_log_lines(Rails.configuration.running_job_log_records_to_fetch).join("\n") %>
-</div>
+  ><%= @object.stderr_log_lines(Rails.configuration.Workbench.RunningJobLogRecordsToFetch).join("\n") %>
+</pre>
 
 <%# Applying a long throttle suppresses the auto-refresh of this
     partial that would normally be triggered by arv-log-event. %>
@@ -68,13 +68,13 @@ var makeFilter = function() {
   <% logcollection = Collection.find @object.log %>
   <% if logcollection %>
     var log_size = <%= logcollection.files[0][2] %>
-    var log_maxbytes = <%= Rails.configuration.log_viewer_max_bytes %>;
+    var log_maxbytes = <%= Rails.configuration.Workbench.LogViewerMaxBytes %>;
     var logcollection_url = '<%=j url_for logcollection %>/<%=j logcollection.files[0][1] %>';
     $("#log-viewer-download-url").attr('href', logcollection_url);
     $("#log-viewer-download-pane").show();
     var headers = {};
     if (log_size > log_maxbytes) {
-      headers['Range'] = 'bytes=0-' + log_maxbytes;
+      headers['Range'] = 'bytes=0-' + (log_maxbytes - 1);
     }
     var ajax_opts = { dataType: 'text', headers: headers };
     load_log();