state_index.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. {% extends "base.html" %}
  2. {% load staticfiles %}
  3. {% load add_get_parameter %}
  4. {% block titlemore %}/States{% endblock %}
  5. {% block h1more %}/States{% endblock %}
  6. {% block body %}
  7. <form action="" method="get">
  8. <table border=1>
  9. <tr>
  10. <th colspan=5 style="text-align:center;">Filter States</th>
  11. <th style="text-align:center;">Statistics</th>
  12. <th style="text-align:center;">Links</th>
  13. </tr>
  14. <tr>
  15. {% for field in statefilter %}
  16. <th>{{ field.label_tag }}</th>{% endfor %}
  17. </tr>
  18. <tr>
  19. {% for field in statefilter %}
  20. <td>{{ field }}</td>{% endfor %}
  21. <td>
  22. <ul>
  23. {% if stats_states_active %}<li><a href="{% url "state_index" %}?stop_time=_NULL_">{{ stats_states_active }} active states</a></li>{% endif %}
  24. {% if stats_states_finished %}<li>{{ stats_states_finished }} finished states</li>{% endif %}
  25. {% if stats_states_weired %}<li><a href="{% url "state_index" %}?start_time=_NULL_">{{ stats_states_weired }} weired states</a></li>{% endif %}
  26. </ul>
  27. </td>
  28. <td>
  29. <ul>
  30. <li><a href="{% url "trap_index" %}">Traps</a></li>
  31. </ul>
  32. <ul>
  33. <li><a href="{% url "state_config_index" %}">State configurations</a></li>
  34. </ul>
  35. </td>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td colspan=4 style="text-align:center;"><input type="submit" value="Filter now"></td>
  40. <td colspan=4 style="text-align:center;"><a href="{% url "state_index" %}">Reset all</a>
  41. </tr>
  42. </table>
  43. </form>
  44. <table border=1 width="100%">
  45. <form action="{% url "state_modify" %}{% add_get %}" method="post">
  46. {% csrf_token %}
  47. <!-- Previous - Next -->
  48. <tr><td colspan=8>
  49. {% include "snippet_obj_prev_next.html" with objs=states objcount=statecount objname="States" %}
  50. </td></tr>
  51. <!-- Header line -->
  52. <tr>
  53. <th class="status" width="10%"></th>
  54. <th class="status" width="15%">Host</th>
  55. <th class="status" width="10%">Event</th>
  56. <th class="status" width="10%">Status</th>
  57. <th class="status" width="15%">Start</th>
  58. <th class="status" width="15%">Stop</th>
  59. <th class="status" width="15%">Duration</th>
  60. <th class="status" width="*">Sub</th>
  61. </tr>
  62. <!-- States as table row -->
  63. {% include "states/snippet_state_as_tr.html" %}
  64. <tr>
  65. <td colspan=3 class="linkBox">
  66. <!-- <img src="./images/dropline/arrow.png" border="0"> -->
  67. <!-- FIXME:#48 <input type="checkbox" name="checkbox" value="checkbox" onClick="checkAll('yes'); return true;"> -->
  68. <button type="submit" name="action" value="read"><img src="{% static "images/dropline/mark.png" %}" /></button>
  69. <button type="submit" name="action" value="delete"><img src="{% static "images/dropline/delete.png" %}" /></button>
  70. <!-- FIXME:#46 <button type="submit" name="action" value="archive"><img src="{% static "images/dropline/archive.png" %}" /></button> -->
  71. </td>
  72. </tr>
  73. <!-- Previous - Next -->
  74. <tr><td colspan=8>
  75. {% include "snippet_obj_prev_next.html" with objs=states objcount=statecount objname="States" %}
  76. </td></tr>
  77. </table>
  78. {% endblock %}