2657: when displaying log in window, handle new lines
authorradhika <radhika@curoverse.com>
Thu, 22 May 2014 13:45:14 +0000 (09:45 -0400)
committerradhika <radhika@curoverse.com>
Thu, 22 May 2014 13:45:14 +0000 (09:45 -0400)
apps/workbench/app/helpers/pipeline_instances_helper.rb
apps/workbench/app/views/pipeline_instances/_show_components.html.erb

index db2a467b7e00bc2fee3675646ebd9e010bed7724..5a163c4c1a9a8c2f45fc09e5a639a7cbdc1755fe 100644 (file)
@@ -26,9 +26,13 @@ module PipelineInstancesHelper
     results = []
 
     log_history = Log.where(event_type: 'transient-log-entry',
-                            object_uuid: job_uuids).order('id DESC').limit(5).all
+                            object_uuid: job_uuids).order('id DESC').limit(20).all
     if !log_history.results.empty?
-      results = log_history.results.reverse
+      reversed_results = log_history.results.reverse
+      reversed_results.each do |entry|
+        summary = entry.summary
+        results = results.concat summary.split("\n")
+      end
     end
 
     return results
index c3a4edd51c4c75e77d38c6061d003ef7de8101f8..98049bfbebc3a500bb6659bae19e8fba7db0a1fe 100644 (file)
@@ -97,7 +97,7 @@ setInterval(function(){$('a.refresh').click()}, 15000);
       <% log_history = pipieline_log_history(pipeline_job_uuids) %>
       <div id="pipeline_event_log_history_div">
         <% log_history.each do |entry| %>
-          <%=entry.summary%><br/>
+          <%=entry%><br/>
         <% end %>
       </div>
       <div class="arv-log-event-listener arv-log-event-handler-append-logs" id="pipeline_event_log_div" data-object-uuids="<%=pipeline_job_uuids.join(" ")%>"/>