{% extends "layout.html" %}
{% from "_helper.html" import image_button %}g
{% block content %}


Choose the default image </br>

<form name="image" action="" method="POST">
<table>
  <tr>
    <th> Default </th>
    <th> Name </th>
    <th> Status </th>
    <th> Updated </th>
    <th> Created </th>
    <th> State </th>
    <th> Architecture </th>
    <th> user_id </th>
    <th> Cost </th>
  </tr>
  
  {% for name, cloud in clouds.iteritems() %}
  
  <tr> 
    <th colspan="8"> {{ name }} </th> 
  </tr>
  
  {% for id, image in cloud['images'].iteritems() %}
  
  <tr>

    <td> <input type="radio" name="{{ name }}" value="{{ id }}" id="{{ id }}"  {{ radioSelected[name][id] }} onclick="document.forms['image'].submit()" /></td>

    <td> {{ image.name }} </td>
    <td> {{ image.status }} </td>
    <td> {{ image.updated }} </td>
    <td> {{ image.created }} </td>
    <td> {{ image.metadata.image_state }} </td>
    <td> {{ image.metadata.architecture }} </td>
    <td> {{ image.metadata.user_id }} </td>
    <td> TBD </td>
  </tr>
  
  {% endfor %}
  
  {% endfor %}
  
</table>
</form>
{% endblock %}
