Changeset 424


Ignore:
Timestamp:
Apr 16, 2008, 11:13:41 PM (17 years ago)
Author:
price
Message:

improve display of VM list

Location:
trunk/packages/sipb-xen-www/code
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/main.py

    r421 r424  
    211211                        cdrom='gutsy-i386')
    212212    checkpoint.checkpoint('Got defaults')
     213    def sortkey(machine):
     214        return (machine.owner != user, machine.owner, machine.name)
     215    machines = sorted(machines, key=sortkey)
    213216    d = dict(user=user,
    214217             cant_add_vm=validation.cantAddVm(user),
  • trunk/packages/sipb-xen-www/code/templates/list.tmpl

    r423 r424  
    8585#if $machine.uptime
    8686$machine.uptime#slurp
    87 #else
    88 Off#slurp
    8987#end if
    9088</td>
     
    9290#if $has_vnc[$machine] == True
    9391<a href="vnc?machine_id=$machine.machine_id">Console</a>#slurp
    94 #else
     92#else if $has_vnc[$machine] != 'Off'
    9593$has_vnc[$machine]
    9694#end if
     
    112110    <table>
    113111      <tr>
    114         <td>Name</td>
    115         <td>Memory</td>
    116         <td>Owner</td>
    117         <td>Administrator</td>
    118         <td>IP</td>
    119         <td>Uptime</td>
    120         <td>VNC</td>
    121         <td></td>
     112        <th>Name</th>
     113        <th>Memory</th>
     114        <th>Owner</th>
     115        <th>Administrator</th>
     116        <th>IP</th>
     117        <th>Uptime</th>
     118        <th>VNC</th>
     119        <th></th>
     120      </tr>
    122121      #for $machine in $machines:
    123122        $machineRow($machine)
Note: See TracChangeset for help on using the changeset viewer.