Changeset 1792

Show
Ignore:
Timestamp:
08/13/08 13:52:59 (3 months ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/ChangeLog

    r1791 r1792  
    112008-08-13  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * admin/ModuleBalancer.py (ModuleBalancerGeneric._op_render): Adds 
     4        the missing "removing" option to the host entries. Fixes the first 
     5        part of: http://code.google.com/p/cherokee/issues/detail?id=87. 
     6        It also improves the page layout a little bit. 
    27 
    38        * admin/ModuleMirror.py: The "Generic balancer" handler should not 
  • cherokee/trunk/admin/ModuleBalancer.py

    r1427 r1792  
    5656            # Host list 
    5757            if hosts: 
     58                txt += "<h3>Hosts list</h3>" 
    5859                t1 = Table(2,1) 
    5960                t1 += ('Host', '') 
     
    6465                    link_del = self.InstanceImage ("bin.png", "Delete", border="0", onClick=js) 
    6566                    t1 += (e_host, link_del) 
    66                 txt += str(t1) 
     67                txt += self.Indent(t1) 
    6768 
    6869            # New host 
     70            txt += "<h3>Add new host</h3>" 
     71 
    6972            t1  = Table(2,1) 
    7073            t1 += ('New host', '') 
    7174            en1 = self.InstanceEntry('new_host', 'text') 
    7275            t1 += (en1, SUBMIT_ADD) 
    73             txt += str(t1) 
     76            txt += self.Indent(t1) 
    7477 
    7578        elif self._type == 'interpreter': 
    7679            # Interpreter list 
    7780            if hosts: 
     81                txt += "<h3>Hosts list</h3>" 
    7882                for host in hosts: 
    7983                    pre = '%s!%s' % (self._prefix, host) 
     
    8286                    e_envs = self._render_envs('%s!env'%(pre)) 
    8387 
    84                     t2 = Table(2, title_left=1) 
    85                     t2 += ('Host', e_host) 
     88                    js = "post_del_key('/ajax/update', '%s');" % (pre) 
     89                    link_del = self.InstanceImage ("bin.png", "Delete", border="0", onClick=js) 
     90 
     91                    t2 = Table(3, title_left=1) 
     92                    t2 += ('Host', e_host, link_del) 
    8693                    t2 += ('Interpreter', e_inte) 
    8794                    t2 += ('Environment', e_envs) 
    88                     txt += str(t2) 
     95                    txt += self.Indent(t2) 
    8996                    txt += "<hr />" 
    9097 
    9198                if txt.endswith("<hr />"): 
    9299                    txt = txt[:-6] 
     100 
     101            txt += "<h3>Add new host</h3>" 
    93102 
    94103            # New Interpreter 
     
    98107            e_inte = self.InstanceEntry('new_interpreter', 'text', size=25) 
    99108            t2 += (e_host, e_inte, SUBMIT_ADD) 
    100             txt += str(t2) 
     109             
     110            txt += self.Indent(t2) 
    101111             
    102112        else: