[ARVADOS] created: 5c2372f1e53184a60d9e1366d26ce41bf405a0a9

git at public.curoverse.com git at public.curoverse.com
Tue May 13 16:35:51 EDT 2014


        at  5c2372f1e53184a60d9e1366d26ce41bf405a0a9 (commit)


commit 5c2372f1e53184a60d9e1366d26ce41bf405a0a9
Author: radhika <radhika at curoverse.com>
Date:   Tue May 13 16:34:28 2014 -0400

    2756: Display event log on pipeline_instance event log udpates.

diff --git a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
index d935b2d..933e015 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
@@ -106,3 +106,5 @@ setInterval(function(){$('a.refresh').click()}, 15000);
     <%= render partial: 'show_components_editable', locals: {editable: false} %>
   <% end %>
 <% end %>
+
+<%= render partial: 'show_event_log', locals: {object: @object} %>
diff --git a/apps/workbench/app/views/pipeline_instances/_show_event_log.html.erb b/apps/workbench/app/views/pipeline_instances/_show_event_log.html.erb
new file mode 100644
index 0000000..74806a5
--- /dev/null
+++ b/apps/workbench/app/views/pipeline_instances/_show_event_log.html.erb
@@ -0,0 +1,24 @@
+<span>
+  <h3>Log for pipeline</h3>
+  <img hidden=true id="pipeline_event_log_img" src="/favicon.ico" onload="subscribeToEventLogs()";></image>
+  <textarea row="10" cols="80" id="pipeline_event_log_area"></textarea>
+</span>
+
+<script>
+  $(function() {
+    displayEventLog = function (content) {
+      $("#pipeline_event_log_area").append(content + "<br>");
+    };
+
+    var dispatcher = new WebSocket('<%= $arvados_api_client.discovery[:websocketUrl] %>?api_token=<%= Thread.current[:arvados_api_token] %>');
+    dispatcher.onmessage = function(event) {
+      //displayEventLog(JSON.parse(event.data));
+      displayEventLog(event.data);
+    };
+
+    subscribeToEventLogs = function () {
+    alert ("got it");
+      dispatcher.send('{"method":"subscribe"}');
+    };
+  });
+</script>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list