{% load static %} 
{% include "header.html" %}
{% include "navigation.html" with main_path='/main/' %}

<br/>
<br/>

<div class="container">
  <div class="dashboard">
    <div class="span8 offset2">
      <h1>Add container</h1> 
      <hr>

      {% if not data.added %}

          <h3>Set up the new container.</h3> 
          
          <br/>
          
          <form action="#" method="POST">
          {% csrf_token %}

          <table class="dashboard" style="width:360px">

           <tr>
            <td><b>Name</b></td>
            <td>
             <input type="text" name="container_name" value="" placeholder="" size="23" required />
            </td>
           </tr>

           <tr>
            <td><b>Description</b></td>
            <td>
             <!-- ><input type="text" name="container_description" value="" placeholder="" size="23" required /> -->
             ​<textarea name="container_description" rows="3" cols="22"></textarea>
            </td>
           </tr>
    
    

           <tr>
            <td><b>Registry</b></td><td>
             <input type="text" name="container_registry" value="docker.io" size="23" required />
            </td>
           </tr>

           <tr>
            <td><b>Image</b></td>
            <td>
             <input type="text" name="container_image" value="" placeholder="" size="23" required />
            </td>
           </tr>

           <tr>
            <td><b>Tag</b></td>
            <td>
             <input type="text" name="container_tag" value="latest" size="23" required />
            </td>
           </tr>

           </table>

          <table class="dashboard" style="width:360px">

           <tr>
            <td><b>Interface port</b></td>
             <td><input type="text" name="container_interface_port" value="" placeholder="" size="5" /></td>
           </tr>

           <tr>
            <td><b>Interface protocol</b></td>
            <td>
             <input type="text" value="http" name="container_interface_protocol" size="5" /> 
            </td>
           </tr>
           </table>
   
            <table class="dashboard" style="width:360px">

           <tr><td colspan=2><hr style="margin:5px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Advanced</td></tr>


           <tr>
            <td><b>Architecture</b></td><td>
              <select name="container_arch" >
              <option value="x86_64" selected>x86_64</option>
              </select>
            </td>
           </tr>

           <tr>
            <td><b>OS</b></td><td>
              <select name="container_os" >
              <option value="linux" selected>linux</option>
              </select>
            </td>
           </tr>

           <tr>
            <td><b>interface transport</b></td><td>
              <select name="container_interface_transport" >
              <option value="tcp/ip" selected>tcp/ip</option>
              </select>
            </td>
           </tr>

           <tr>
            <td colspan=2>
             <b>Supports custom interface port</b> &nbsp; 
             <input type="checkbox" name="container_supports_custom_interface_port" value="True" />
            </td>
           </tr>

           <tr>
            <td colspan=2>
             <b>Supports interface auth</b> &nbsp; 
             <input type="checkbox" name="container_supports_interface_auth" value="True" />
            </td>
           </tr>


           <tr>
           <td colspan=2 align=center style="padding:20px">
           <input type="submit" value="Add">
           </td>
           </tr>
          </table>
          </form>

          <br/>          
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          



 
      {% else %}
        Ok, Container added. Go back to your <a href="/containers">container list</a>.
        

      {% endif %} 
  
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      
    </div>
  </div>
</div>

{% include "footer.html" %}






