<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="admin.html" />
<head>
    <title>仮想マシン作成</title>
</head>
<body>

   <h2>イーノックラウド(そんなクラウドで大丈夫か?)</h2>

    <py:for each="host in hosts">
    <form action="virtmonitor/${host.hostid}">

    <h2>${host.url}</h2>
    <table class="listing reports">
   	<thead>
        <tr>
           <th>名前</th><th width="80">状態</th><th
           width="80">VNCポート</th><th>IP(Macアドレス)</th><th       width="80">CPU数</th><th
           width="80">メモリ(Gbyte)</th><th
           width="100">操作</th>
	</tr>

	</thead>
	<py:for each="dom in host.doms">
        <tbody>
	<tr>
           <td><a href="${panel_href()}/${host.hostid}/${dom.name}">${dom.name}</a></td>
           <td>${dom.status}</td>
           <td>${dom.vncport}</td>
           <td>${dom.ip}(${dom.mac})</td>
           <td>${dom.vcpu}</td>
           <td>${dom.mem}</td>
           
           <!-- 仮想マシンの操作 -->
           <td>
           <select name="${dom.name}" py:if="dom.status==u'停止中'"
                   style="width:8em;">
               	<option value="-" selected="selected"></option>
           	<option value="boot">ブート</option>
           </select>
           <select name="${dom.name}" py:if="dom.status!=u'停止中'"
                   style="width:8em;">
              	<option value="-" selected="selected"></option>
           	<option value="shutdown">シャットダウン</option>
           	<option value="destroy">強制停止</option>
           </select>
           </td>
           
	</tr>

        </tbody>
       </py:for>
    </table>
    <input type="submit" value="操作を実行" />
    </form>
    <hr />
    </py:for>
  </body>              
</html>
