~hatch/juju-gui/load-srv-db

« back to all changes in this revision

Viewing changes to app/views/topology/service.js

  • Committer: Gary Poster
  • Date: 2013-04-23 01:10:28 UTC
  • mfrom: (593.1.1 exposed)
  • Revision ID: gary.poster@canonical.com-20130423011028-5uan9ssl8ujd3h0x
Fix small issue with exposed rendering

If a service was already exposed when the GUI started, trying to unexpose it would not change the visual representation.  This was because we were rendering multiple instances of the exposed icon per service block, unnecessarily, and not always removing all of the ones we needed to.  Now we simply only add a single exposed icon at a time.

R=
CC=
https://codereview.appspot.com/8883048

Show diffs side-by-side

added added

removed removed

Lines of Context:
875
875
 
876
876
      // Show whether or not the service is exposed using an indicator.
877
877
      node.filter(function(d) {
878
 
        return d.exposed;
 
878
        return d.exposed &&
 
879
            d3.select(this)
 
880
                .select('.exposed-indicator').empty();
879
881
      })
880
882
        .append('image')
881
883
        .attr({'class': 'exposed-indicator on',