Ignore:
Timestamp:
Oct 8, 2007, 4:44:14 AM (17 years ago)
Author:
ecprice
Message:

More updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/templates/list.tmpl

    r139 r144  
    2121        <td>Uptime</td>
    2222        <td>VNC</td>
    23         <td>Restart?</td>
     23        <td></td>
    2424      #for $machine in $machines:
    2525      <tr>
     
    3838#end if
    3939<td>#slurp
    40 #if $uptimes.get($machine.name)
    41 $uptimes[$machine.name]#slurp
     40#if $uptimes[$machine]
     41$uptimes[$machine]#slurp
    4242#else
    4343Off#slurp
     
    4545</td>
    4646        <td>#slurp
    47 #if $has_vnc.get($machine.name) == True
     47#if $has_vnc[$machine] == True
    4848<a href="vnc?machine_id=$machine.machine_id">Console</a>#slurp
    4949#else
    50 $has_vnc.get($machine.name)
     50$has_vnc[$machine]
    5151#end if
    5252</td>
     
    5555            <input type="hidden" name="machine_id"
    5656                   value="$machine.machine_id"/>
    57             <input type="submit" class="button"
    58                    value="Reboot"/>
     57#if $uptimes[$machine]
     58            <input type="submit" class="button" name="action" value="Shutdown"/>
     59#else
     60            <input type="submit" class="button" name="action" value="Power on"/>
     61#end if
    5962          </form>
    6063        </td>
     
    6366    </table>
    6467#end if
    65 
     68#if $can_add_vm
    6669    <p>Create a new VM:</p>
    6770    <form action="create" method="POST">
     
    7376        <tr>
    7477          <td>Memory</td>
    75           <td><input type="text" name="memory" value="$maxmem" size=3/> megabytes ($maxmem max)</td>
     78          <td><input type="text" name="memory" value="$default_mem" size=3/> megabytes ($max_mem max)</td>
    7679        </tr>
    7780        <tr>
    7881          <td>Disk</td>
    79           <td><input type="text" name="disk" value="$maxdisk" size=3/> gigabytes ($maxdisk max)</td>
     82          <td><input type="text" name="disk" value="$default_disk" size=3/> gigabytes (${"%0.1f" % ($max_disk-0.05)} max)</td>
    8083        </tr>
    8184        <tr>
     
    102105      <input type="submit" class="button" value="Create it!"/>
    103106    </form>
    104 
     107#else
     108<p>You are at the maximum number of VMs.</p>
     109#end if
    105110#end def
Note: See TracChangeset for help on using the changeset viewer.