[ARVADOS] updated: 84cfa5256d2e8caa6ceea8dd274f5c4b2c96cd87

git at public.curoverse.com git at public.curoverse.com
Wed Nov 5 03:17:34 EST 2014


Summary of changes:
 apps/workbench/app/assets/javascripts/tab_panes.js     | 4 ++--
 apps/workbench/app/views/application/_content.html.erb | 2 +-
 apps/workbench/app/views/projects/index.html.erb       | 8 ++------
 3 files changed, 5 insertions(+), 9 deletions(-)

  discards  36e465cf1e3ac1f250e923ddeea7adccecab231c (commit)
  discards  eeb0021ea778d4be06a03b2afaca03f3d3e38cfb (commit)
       via  84cfa5256d2e8caa6ceea8dd274f5c4b2c96cd87 (commit)
       via  3981c82b166c2b1475d703820fddf41303a04c39 (commit)
       via  1c41009911eb63c4b90f600ca851f0cf961003e1 (commit)
       via  6862544ea5ff9272c537672a7a9cc6c98d0192fe (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (36e465cf1e3ac1f250e923ddeea7adccecab231c)
            \
             N -- N -- N (84cfa5256d2e8caa6ceea8dd274f5c4b2c96cd87)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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 84cfa5256d2e8caa6ceea8dd274f5c4b2c96cd87
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Nov 5 03:16:33 2014 -0500

    4084: Fix dashboard refresh.

diff --git a/apps/workbench/app/views/projects/index.html.erb b/apps/workbench/app/views/projects/index.html.erb
index ea52024..dc70da8 100644
--- a/apps/workbench/app/views/projects/index.html.erb
+++ b/apps/workbench/app/views/projects/index.html.erb
@@ -1,11 +1,7 @@
-<div id="dashboard-content"
-     class="pane-anchor pane-loaded arv-log-event-listener arv-refresh-on-log-event"
-     href="#dashboard-content-pane"
+<div class="pane-loaded arv-log-event-listener arv-refresh-on-log-event"
      data-pane-content-url="<%= root_url tab_pane: "dashboard" %>"
      data-object-uuid="all"
      data-load-throttle="15000"
      >
-  <div id="dashboard-content-pane" class="active">
-    <%= render partial: 'show_dashboard' %>
-  </div>
+  <%= render partial: 'show_dashboard' %>
 </div>

commit 3981c82b166c2b1475d703820fddf41303a04c39
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Nov 5 02:58:20 2014 -0500

    4084: Remove excess loaded class.

diff --git a/apps/workbench/app/views/application/_content.html.erb b/apps/workbench/app/views/application/_content.html.erb
index 7afc824..782a6af 100644
--- a/apps/workbench/app/views/application/_content.html.erb
+++ b/apps/workbench/app/views/application/_content.html.erb
@@ -22,7 +22,7 @@
     <% pane_list.each_with_index do |pane, i| %>
       <% pane_name = (pane.is_a?(Hash) ? pane[:name] : pane) %>
       <div id="<%= pane_name %>"
-           class="tab-pane fade <%= 'in active loaded pane-loaded' if i==0 %> arv-log-event-listener arv-refresh-on-log-event arv-log-event-subscribe-to-pipeline-job-uuids"
+           class="tab-pane fade <%= 'in active pane-loaded' if i==0 %> arv-log-event-listener arv-refresh-on-log-event arv-log-event-subscribe-to-pipeline-job-uuids"
            <% if controller.action_name == "index" %>
              data-object-kind="arvados#<%= ArvadosApiClient.class_kind controller.model_class %>"
            <% else %>

commit 1c41009911eb63c4b90f600ca851f0cf961003e1
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Nov 5 02:17:56 2014 -0500

    4084: Update comments.

diff --git a/apps/workbench/app/assets/javascripts/tab_panes.js b/apps/workbench/app/assets/javascripts/tab_panes.js
index fc05fde..07e46fe 100644
--- a/apps/workbench/app/assets/javascripts/tab_panes.js
+++ b/apps/workbench/app/assets/javascripts/tab_panes.js
@@ -10,30 +10,33 @@ $(document).on('shown.bs.tab', '[data-toggle="tab"]', function(event) {
 
 // Ask a refreshable pane to reload via ajax.
 //
-// Target of this event is the anchor element that manages the pane.  A reload
-// consists of an AJAX call to load the "data-pane-content-url" and replace the
-// contents of the DOM node pointed to by "href".
+// Target of this event is the DOM element to be updated. A reload
+// consists of an AJAX call to load the "data-pane-content-url" and
+// replace the content of the target element with the retrieved HTML.
 //
-// There are four CSS classes set on the object to indicate its state:
+// There are four CSS classes set on the element to indicate its state:
 // pane-loading, pane-stale, pane-loaded, pane-reload-pending
 //
 // There are five states based on the presence or absence of css classes:
 //
-// 1. no pane-* states means the pane must be loaded when the pane becomes active
+// 1. Absence of any pane-* states means the pane is empty, and should
+// be loaded as soon as it becomes visible.
 //
-// 2. "pane-loading" means an AJAX call has been made to reload the pane and we are
-// waiting on a result
+// 2. "pane-loading" means an AJAX call has been made to reload the
+// pane and we are waiting on a result.
 //
-// 3. "pane-loading pane-stale" indicates a pane that is already loading has
-// been invalidated and should schedule a reload immediately when the current
-// load completes.  (This happens when there is a cluster of events, where the
-// reload is triggered by the first event, but we want ensure that we
-// eventually load the final quiescent state).
+// 3. "pane-loading pane-stale" means the pane is loading, but has
+// already been invalidated and should schedule a reload as soon as
+// possible after the current load completes. (This happens when there
+// is a cluster of events, where the reload is triggered by the first
+// event, but we want ensure that we eventually load the final
+// quiescent state).
 //
-// 4. "pane-loaded" means the pane is up to date
+// 4. "pane-loaded" means the pane is up to date.
 //
-// 5. "pane-loaded pane-reload-pending" indicates a reload is scheduled (but has
-// not started yet), suppressing scheduling of any further reloads.
+// 5. "pane-loaded pane-reload-pending" means a reload is needed, and
+// has been scheduled, but has not started because the pane's
+// minimum-time-between-reloads throttle has not yet been reached.
 //
 $(document).on('arv:pane:reload', '[data-pane-content-url]', function(e) {
     if (this != e.target) {

commit 6862544ea5ff9272c537672a7a9cc6c98d0192fe
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Nov 5 02:02:37 2014 -0500

    4084: Ignore bubbling arv-log-event events, just process each once at the original target.

diff --git a/apps/workbench/app/assets/javascripts/pipeline_instances.js b/apps/workbench/app/assets/javascripts/pipeline_instances.js
index 15134cb..761477e 100644
--- a/apps/workbench/app/assets/javascripts/pipeline_instances.js
+++ b/apps/workbench/app/assets/javascripts/pipeline_instances.js
@@ -48,6 +48,10 @@ $(document).on('ready ajax:complete', function() {
 });
 
 $(document).on('arv-log-event', '.arv-refresh-on-state-change', function(event, eventData) {
+    if (this != event.target) {
+        // Not interested in events sent to child nodes.
+        return;
+    }
     if (eventData.event_type == "update" &&
         eventData.properties.old_attributes.state != eventData.properties.new_attributes.state)
     {
@@ -56,6 +60,10 @@ $(document).on('arv-log-event', '.arv-refresh-on-state-change', function(event,
 });
 
 $(document).on('arv-log-event', '.arv-log-event-subscribe-to-pipeline-job-uuids', function(event, eventData){
+    if (this != event.target) {
+        // Not interested in events sent to child nodes.
+        return;
+    }
     if (!((eventData.object_kind == 'arvados#pipelineInstance') &&
           (eventData.event_type == "create" ||
            eventData.event_type == "update") &&
@@ -83,6 +91,10 @@ $(document).on('ready ajax:success', function() {
 });
 
 $(document).on('arv-log-event', '.arv-log-event-handler-append-logs', function(event, eventData){
+    if (this != event.target) {
+        // Not interested in events sent to child nodes.
+        return;
+    }
     var wasatbottom = ($(this).scrollTop() + $(this).height() >= this.scrollHeight);
 
     if (eventData.event_type == "stderr" || eventData.event_type == "stdout") {
diff --git a/apps/workbench/app/assets/javascripts/tab_panes.js b/apps/workbench/app/assets/javascripts/tab_panes.js
index 6c58a57..fc05fde 100644
--- a/apps/workbench/app/assets/javascripts/tab_panes.js
+++ b/apps/workbench/app/assets/javascripts/tab_panes.js
@@ -36,20 +36,21 @@ $(document).on('shown.bs.tab', '[data-toggle="tab"]', function(event) {
 // not started yet), suppressing scheduling of any further reloads.
 //
 $(document).on('arv:pane:reload', '[data-pane-content-url]', function(e) {
-    // $pane, the event target, is an element whose content is to be
-    // replaced. Pseudoclasses on $pane (pane-loading, etc) encode the
-    // current loading state.
-    var $pane = $(e.target);
-
-    var content_url = $pane.attr('data-pane-content-url');
-    if (!content_url) {
-        // When reloadable elements are nested, we can receive
-        // arv:pane:reload events even though the selector in .on()
-        // does not match e.target. Ignore such events.
+    if (this != e.target) {
+        // An arv:pane:reload event was sent to an element (e.target)
+        // which happens to have an ancestor (this) matching the above
+        // '[data-pane-content-url]' selector. This happens because
+        // events bubble up the DOM on their way to document. However,
+        // here we only care about events delivered directly to _this_
+        // selected element (i.e., this==e.target), not ones delivered
+        // to its children. The event "e" is uninteresting here.
         return;
     }
 
-    e.stopPropagation();
+    // $pane, the event target, is an element whose content is to be
+    // replaced. Pseudoclasses on $pane (pane-loading, etc) encode the
+    // current loading state.
+    var $pane = $(this);
 
     if ($pane.hasClass('pane-loading')) {
         // Already loading, mark stale to schedule a reload after this one.
@@ -99,6 +100,7 @@ $(document).on('arv:pane:reload', '[data-pane-content-url]', function(e) {
 
     $pane.addClass('pane-loading');
 
+    var content_url = $pane.attr('data-pane-content-url');
     $.ajax(content_url, {dataType: 'html', type: 'GET', context: $pane}).
         done(function(data, status, jqxhr) {
             // Preserve collapsed state
@@ -174,9 +176,13 @@ $(document).on('arv:pane:reload:all', function() {
     $('[data-pane-content-url]').trigger('arv:pane:reload');
 });
 
-$(document).on('arv-log-event', '.arv-refresh-on-log-event', function(e) {
+$(document).on('arv-log-event', '.arv-refresh-on-log-event', function(event) {
+    if (this != event.target) {
+        // Not interested in events sent to child nodes.
+        return;
+    }
     // Panes marked arv-refresh-on-log-event should be refreshed
-    $(e.target).trigger('arv:pane:reload');
+    $(event.target).trigger('arv:pane:reload');
 });
 
 // If there is a 'tab counts url' in the nav-tabs element then use it to get some javascript that will update them

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list