{% include "head.html" %}
{% if nodes is defined %}
<a href='/expose/kubeconfig/kubeconfig.{{ kube }}'>Get Kubeconfig</a><p>
Version: {{ version }}<p>
<table class="table table-striped table-bordered" cellspacing="0" width="100%">
  <tbody>
  <tr>
    <th>Name</th>
    <th>Status</th>
    <th>Role</th>
    <th>Age</th>
    <th>Version</th>
    <th>IP</th>
  </tr>
  <tr>
{% for node in nodes %}
  <td>{{ node[0]}}</td>
  <td>{{ node[1]}}</td>
  <td>{{ node[2]}}</td>
  <td>{{ node[3]}}</td>
  <td>{{ node[4]}}</td>
  <td>{{ node[5]}}</td>
  </tr>
{% endfor %}
  </tbody>
</table>
<b>
{% else %}
<div id="wheel"></div>
<table class="table table-striped table-bordered" cellspacing="0" width="100%">
  <tbody>
  <tr>
    <th>Plan name</th>
    <th>Client</th>
    <th>Creation Date</th>
  </tr>
  <tr>
  <td>{{ plan }}</td>
  <td>{{ client }}</td>
  <td>{{ creationdate|default('') }} {{ owner|default('') }}</th>
  </tr>
  <tr>
    <th>Vm name</th>
    <th>Status</th>
    <th>Ip</th>
  </tr>
{% for vm in vms %}
  <tr>
    <td>{{ vm['name'] }}</td>
    <td>{{ vm['status'] }}</td>
    <td>{{ vm['ip'] }}</td>
  </tr>
{% endfor %}
  </tbody>
</table>
{% endif %}
<br>
<p><a href="/">Back to listing</a>
</body>
</html>
