[ARVADOS] updated: a91b4932e602f6534a326b8aa794b99454364776

git at public.curoverse.com git at public.curoverse.com
Wed Jun 11 17:12:18 EDT 2014


Summary of changes:
 apps/workbench/app/views/jobs/_show_log.html.erb | 14 ++++++++++++++
 services/api/app/models/log.rb                   |  1 +
 2 files changed, 15 insertions(+)

       via  a91b4932e602f6534a326b8aa794b99454364776 (commit)
      from  0ac89aa2da962f381075e8924925bb7eb0982167 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit a91b4932e602f6534a326b8aa794b99454364776
Author: Peter Amstutz <tetron at swyman.shell.4xphq.arvadosapi.com>
Date:   Wed Jun 11 21:12:15 2014 +0000

    2883: Live updating log wip

diff --git a/apps/workbench/app/views/jobs/_show_log.html.erb b/apps/workbench/app/views/jobs/_show_log.html.erb
index 35c2baf..a3e73fa 100644
--- a/apps/workbench/app/views/jobs/_show_log.html.erb
+++ b/apps/workbench/app/views/jobs/_show_log.html.erb
@@ -63,6 +63,7 @@ var makeFilter = function() {
   });
 }
 
+<% if @object.log %>
 <% logcollection = Collection.find @object.log %>
 
 $.ajax('<%=j url_for logcollection %>/<%=j logcollection.files[0][1] %>').
@@ -72,6 +73,19 @@ $.ajax('<%=j url_for logcollection %>/<%=j logcollection.files[0][1] %>').
     logViewer.filter(makeFilter());
     $("#logloadspinner").detach();
   });
+<% else %>
+  <% backlog = ""
+     Log.filter([['object_uuid', '=', @object.uuid],
+                  ['event_type', '=', 'stderr']]).order(["id", "asc"]).each do |l|
+        backlog += l.properties["text"]
+     end
+   %>
+  var backlog = "<%=j backlog %>";
+    logViewer.filter();
+    addToLogViewer(logViewer, backlog.split("\n"));
+    logViewer.filter(makeFilter());
+
+<% end %>
 
 $(".toggle-filter").on("change", function() {
   logViewer.filter(makeFilter());
diff --git a/services/api/app/models/log.rb b/services/api/app/models/log.rb
index 6921eca..34e6dfa 100644
--- a/services/api/app/models/log.rb
+++ b/services/api/app/models/log.rb
@@ -7,6 +7,7 @@ class Log < ArvadosModel
   attr_accessor :object, :object_kind
 
   api_accessible :user, extend: :common do |t|
+    t.add :id
     t.add :object_uuid
     t.add :object_owner_uuid
     t.add :object_kind

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list