<% if !@object.log %>
-<div id="log_graph_div" data-object-uuid="<%= @object.uuid %>"></div>
-
-<% log_history = stderr_log_history([@object.uuid]) %>
+<div id="log_graph_div"
+ class="arv-log-event-listener"
+ style="display:none"
+ data-object-uuid="<%= @object.uuid %>"></div>
<div id="event_log_div"
class="arv-log-event-listener arv-log-event-handler-append-logs arv-job-log-window"
data-object-uuid="<%= @object.uuid %>"
- ><%= log_history.join("\n") %></div>
+ ></div>
<%# Applying a long throttle suppresses the auto-refresh of this
partial that would normally be triggered by arv-log-event. %>
data-load-throttle="86486400000" <%# 1001 nights %>
></div>
-<%= javascript_tag do %>
- var jobGraphData = [];
- var jobGraphSeries = [];
- <% stderr_log_records([@object.uuid]).each.with_index do |log_record, index| %>
- <% puts log_record.to_yaml %>
- var logLine = '<%=j log_record.properties[:text] %>';
- processLogLineForChart( logLine, jobGraphSeries, jobGraphData );
- <% end %>
- var jobGraph = Morris.Line({
- element: 'log_graph_div',
- data: jobGraphData,
- xkey: 't',
- ykeys: jobGraphSeries,
- labels: jobGraphSeries
- });
-<% end %>
-
<% else %>
<script>
});
}
-<% if @object.log %>
+<% if @object.log and !@object.log.empty? %>
<% logcollection = Collection.find @object.log %>
<% if logcollection %>
log_size = <%= logcollection.files[0][2] %>