Every page is making an XMLHttpRequest every few seconds

Bug #1132588 reported by Kieran Spear
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
David Lyle

Bug Description

Every page is making an XHR to itself at the moment. Firebug tells me it is happening here:

horizon.networktopology.js

  init:function(){
    var self = this;
    $("#topologyCanvas").spin(horizon.conf.spinner_options.modal);
    self.retrieve_network_info();
    setInterval(horizon.network_topology.retrieve_network_info,
               horizon.network_topology.reload_duration);
  },
  retrieve_network_info: function(){
    var self = this;
    if(!$("#networktopology")) {
        return;
    }
    $.getJSON($("#networktopology").data('networktopology'), <--- this is running on every page
      function(data) {
        self.draw_graph(data);
      }
    );
  },

Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Bah. Good catch. Definitely needs to be fixed.

Changed in horizon:
milestone: none → grizzly-rc1
status: New → Confirmed
importance: Undecided → High
David Lyle (david-lyle)
Changed in horizon:
assignee: nobody → David Lyle (david-lyle)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/23105

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
Julie Pichon (jpichon) wrote :

Ah, I see. This will also fix the extra UnexpectedMethodCallError traces that are appearing in the Selenium test outputs.

e.g.
http://logs.openstack.org/21916/16/gate/gate-horizon-selenium/1079/console.html.gz
http://logs.openstack.org/23004/1/gate/gate-horizon-selenium/1183/console.html.gz

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/23105
Committed: http://github.com/openstack/horizon/commit/b5f4d63c7ca3f1dec87aa7fec1110e0bdc579e2b
Submitter: Jenkins
Branch: master

commit b5f4d63c7ca3f1dec87aa7fec1110e0bdc579e2b
Author: David Lyle <email address hidden>
Date: Wed Feb 27 11:27:33 2013 -0700

    Fix errant XHR request happening on every page

    The check of the jquery selector by name will always return a
    non-null object even if the object does not exist on the page,
    the check needs to make sure the object returned doesn't
    contain any items.

    Change-Id: I51367547a37a2ee72ed300853d35d3cc6d89df7d
    Fixes: bug #1132588

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: grizzly-rc1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.