[ARVADOS] updated: 8a4b7ab667a30f883dfeb0892f9fe03defc47a8f

git at public.curoverse.com git at public.curoverse.com
Fri May 16 22:38:15 EDT 2014


Summary of changes:
 apps/workbench/app/assets/javascripts/collections.js     | 1 -
 apps/workbench/app/assets/javascripts/event_log.js       | 6 +++++-
 apps/workbench/app/controllers/collections_controller.rb | 1 +
 apps/workbench/app/views/application/index.html.erb      | 4 ----
 apps/workbench/app/views/layouts/application.html.erb    | 5 +++++
 5 files changed, 11 insertions(+), 6 deletions(-)

       via  8a4b7ab667a30f883dfeb0892f9fe03defc47a8f (commit)
       via  d07841a4b10d5677a6e4f80df1ba4f1a8bd13be9 (commit)
       via  90744f405977dcfac40d5dea3dbe79391080b80d (commit)
       via  471cc718e0cf5a1846feb444887c35c285f33cdf (commit)
      from  94abf66ab822425b025b8c88ebf9a2754b776ac3 (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 8a4b7ab667a30f883dfeb0892f9fe03defc47a8f
Merge: d07841a 90744f4
Author: radhika <radhika at curoverse.com>
Date:   Fri May 16 22:37:52 2014 -0400

    Merge branch 'master' into 2756-eventbus-in-workbench


commit d07841a4b10d5677a6e4f80df1ba4f1a8bd13be9
Author: radhika <radhika at curoverse.com>
Date:   Fri May 16 22:36:05 2014 -0400

    2756: use meta tag to provide websocket url to event_log js file

diff --git a/apps/workbench/app/assets/javascripts/event_log.js b/apps/workbench/app/assets/javascripts/event_log.js
index e62b6a4..9be2979 100644
--- a/apps/workbench/app/assets/javascripts/event_log.js
+++ b/apps/workbench/app/assets/javascripts/event_log.js
@@ -15,7 +15,11 @@ function subscribeToEventLog (elementId, listeningOn) {
   event_log_disp = $(window).data("arv-websocket");
   if (event_log_disp == null) {
     // create the event log dispatcher
-    event_log_disp = new WebSocket(sessionStorage.getItem("arv-websocket-url"));
+    websocket_url = $('meta[name=arv-websocket-url]').attr("content");
+    if (websocket_url == null)
+      return;
+
+    event_log_disp = new WebSocket(websocket_url);
 
     event_log_disp.onopen = onEventLogDispatcherOpen;
     event_log_disp.onmessage = onEventLogDispatcherMessage;
diff --git a/apps/workbench/app/views/application/index.html.erb b/apps/workbench/app/views/application/index.html.erb
index 013d35a..20af648 100644
--- a/apps/workbench/app/views/application/index.html.erb
+++ b/apps/workbench/app/views/application/index.html.erb
@@ -22,7 +22,3 @@
 <% end %>
 
 <%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.index_pane_list }%>
-
-<script>
-  sessionStorage.setItem("arv-websocket-url", "<%=$arvados_api_client.discovery[:websocketUrl]%>?api_token=<%=Thread.current[:arvados_api_token]%>");
-</script>
diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb
index 2d3c4c0..f009ffe 100644
--- a/apps/workbench/app/views/layouts/application.html.erb
+++ b/apps/workbench/app/views/layouts/application.html.erb
@@ -14,6 +14,11 @@
   <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
   <meta name="description" content="">
   <meta name="author" content="">
+
+  <% if current_user %>
+  <meta name="arv-websocket-url" content="<%=$arvados_api_client.discovery[:websocketUrl]%>?api_token=<%=Thread.current[:arvados_api_token]%>">
+  <% end %>
+
   <%= stylesheet_link_tag    "application", :media => "all" %>
   <%= javascript_include_tag "application" %>
   <%= csrf_meta_tags %>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list