
{% extends "base.html" %}






{% block contents %}




<div class='section' >
      <div class='sectionheader'>
          <h2><a>Monitored Directories</a></h2>
          <div class='actionbar'>
              <div class='inner'>
                  <ul>
                        <li><a href="/do/track/rescan/"><span>Rescan Filesystem</span></a></li>
                        <li><a href="/do/track/track_all_sims">Track all Simulations</a></li>
                  </ul>
              </div>
          </div>
      </div>

      <div class='sectioncontents'>

    <table class='std'>
    <tr>
        <th>Directory</th>
        <th>Exists?</th>
        <th>Monitor Recursively?</th>
    </tr>

    {% for src_directory in src_directories %}
    <tr>
        <td> {{src_directory.directory_name }} </td>
        <td> {{src_directory.does_exist }} </td>
        <td> {{src_directory.should_recurse }} </td>
	<td> <a href='/do/track/untrack_src_dir/{{src_directory.id}}'> (Stop Monitoring) </a> </td>
    </tr>
    {% endfor %}
    </table>

    <form action="/do/track/add_src_dir" method="post">
    <div class='centerform'>
    {% csrf_token %}
    <input type="text" size=100 name="location" />
    <input type="checkbox" name="recurse" value="recurse" /> Monitor Directory Recursively<br />
    <input type="submit" value="Monitor Directory" />
    </div>
    </form>


      </div>
</div>






<div class='section' >
      <div class='sectionheader'>
          <h2><a>Untracked Simulations</a></h2>
          <div class='actionbar'>
              <div class='inner'>
                  <ul>
                        <li><a href="/do/track/track_all_sims">Track all Simulations</a></li>
                  </ul>
              </div>
          </div>
      </div>

      <div class='sectioncontents'>

         <form action="/do/track/track_sim" method="post">
        {% csrf_token %}

        <table class='std'>
        <tr>
            <th>  </th>
            <th> Filename </th>
        </tr>

        {% for untracked_file in untracked_simfiles %}
        <tr>
            <td> <input type="checkbox" name="untracked_sim_id_{{untracked_file.id}}"> </td>
            <td> {{untracked_file.full_filename}} </td>
        </tr>
        {%endfor %}
        </table>
        <input type="submit" value="Track Files"/>
        </form>

      </div>
</div>








<div class='section' >
      <div class='sectionheader'>
          <h2><a>Tracked Simulations</a></h2>
          <div class='actionbar'>
              <div class='inner'>
                  <ul>
                        <li><a href="/do/track/untrack_all_sims">Untrack all Simulations</a></li>
                  </ul>
              </div>
          </div>
      </div>

      <div class='sectioncontents'>

            <form action="/do/track/untrack_sim" method="post">
            {% csrf_token %}

            <table class='std' >
            <tr>
                <th>  </th>
                <th> Filename </th>
            </tr>

            {% for simfile in simfiles %}
            <tr>
                <td> <input type="checkbox" name="simid_{{simfile.id}}"> </td>
                <td> {{simfile.full_filename}} </td>
            </tr>
            {%endfor %}
            </table>
            <input type="submit" value="Untrack Files"/>
            </form>


      </div>
</div>


{% endblock %}
