Ignore:
Timestamp:
Apr 21, 2008, 9:13:53 PM (17 years ago)
Author:
ecprice
Message:

Support setting paravm/hvm for off, but already created, VMs.

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

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/templates/functions.tmpl

    r406 r440  
    1212  #end for
    1313</select>
     14#end def
     15
     16#def vmTypeList($default=None)
     17#for $vmtype in $sipb_xen_database.Type.select()
     18<label>
     19   <input #slurp
     20#if $default == $vmtype then 'checked' else ''
     21 type="radio" name="vmtype" value="${vmtype.type_id}">${vmtype.description}</input>
     22</label>
     23#end for
    1424#end def
    1525
  • trunk/packages/sipb-xen-www/code/templates/info.tmpl

    r436 r440  
    5959(To edit ram, disk size, or machine name, turn off the machine first.)
    6060#end if
    61 </p>
    6261<form action="modify" method="POST">
    6362  <input type="hidden" name="machine_id" value="$defaults.machine_id"/>
     
    7271    <tr><td>Machine Name:</td><td><input type="text" name="name" value="$defaults.name"/></td></tr>
    7372$errorRow('name', $err)
     73    <tr>
     74      <td>HVM/ParaVM$helppopup('hvm_paravm')</td>
     75      <td>$vmTypeList($defaults.type)</td>
     76    </tr>
    7477    <tr><td>Ram:</td><td><input type="text" size=3 name="memory" value="$defaults.memory"/>MiB (max $max_mem)</td></tr>
    7578$errorRow('memory', $err)
  • trunk/packages/sipb-xen-www/code/templates/list.tmpl

    r426 r440  
    3636        </tr>
    3737$errorRow('disk', $err)
    38         <tr>
    39           <td>HVM/ParaVM$helppopup('hvm_paravm')</td>
    40           <td>
    41 #for $value, $name in (('hvm', 'HVM'), ('paravm', 'ParaVM'))
    42    <input #slurp
    43 #if $defaults.vmtype == $value then 'checked' else ''
    44  type="radio" name="vmtype" value="$value">$name</input>
    45 #end for
    46           </td>
    47         </tr>
     38        <tr>
     39          <td>HVM/ParaVM$helppopup('hvm_paravm')</td>
     40          <td>$vmTypeList($defaults.type)</td>
     41        </tr>
    4842$errorRow('vmtype', $err)
    4943        <tr>
Note: See TracChangeset for help on using the changeset viewer.