Ticket #1735: 1735-helper_banner_higlight.diff

File 1735-helper_banner_higlight.diff, 1.9 KB (added by kick, at 2012-08-31T09:20:40Z)
  • src/allmydata/web/root.py

    diff --git src/allmydata/web/root.py src/allmydata/web/root.py
    index 2cd315d..720b460 100644
    class Root(rend.Page): 
    212212            return None
    213213        furl, connected = uploader.get_helper_info()
    214214        return furl
     215
     216   
     217    def data_connected_to_helper_description(self,ctx,data):
     218                val = self.data_connected_to_helper(ctx,data)
     219                if val == "no-disabled":
     220                        return "no, enable for quicker uploads"
     221                return val
     222
    215223    def data_connected_to_helper(self, ctx, data):
    216224        try:
    217225            uploader = self.client.getServiceNamed("uploader")
    218226        except KeyError:
    219227            return "no" # we don't even have an Uploader
    220228        furl, connected = uploader.get_helper_info()
     229        if furl == 'None':
     230            return "no-disabled"
    221231        if connected:
    222232            return "yes"
    223233        return "no"
  • src/allmydata/web/static/tahoe.css

    diff --git src/allmydata/web/static/tahoe.css src/allmydata/web/static/tahoe.css
    index 297bbe4..2d82258 100644
    legend { 
    5252  border: 1px solid #F00;
    5353  background-color: #FBB;
    5454}
     55.connected-no-disabled {
     56  border: 1px solid #000;
     57  background-color: #EFE;
     58}
    5559
    5660.encoded, .nodeid {
    5761  font-family: monospace;
  • src/allmydata/web/welcome.xhtml

    diff --git src/allmydata/web/welcome.xhtml src/allmydata/web/welcome.xhtml
    index 16f2cb7..464a46b 100644
     
    4747  <div>
    4848    <n:attr name="class">connected-<n:invisible n:render="string" n:data="connected_to_helper" /></n:attr>
    4949    <div>Helper: <span n:render="string" n:data="helper_furl" /></div>
    50     <div>Connected to helper?: <span n:render="string" n:data="connected_to_helper" /></div>
     50    <div>Connected to helper?: <span n:render="string" n:data="connected_to_helper_description" /></div>
    5151  </div>
    5252
    5353  <p>Connected to <span n:render="string" n:data="connected_storage_servers" />