admin_tasks.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {% extends "layout.html" %}
  2. {% import 'utils.html' as utils %}
  3. {% block title %}Tasks - {{ config.NAME }}{% endblock %}
  4. {% block content %}
  5. {% include "header.html" %}
  6. <div style="margin:10%;margin-top:50px;margin-bottom:0;width:100%">
  7. <h3>Cron</h3>
  8. <table class="pure-table" style="width:100%">
  9. <thead>
  10. <tr>
  11. <th>#</th>
  12. <th>URL</th>
  13. <th>Payload</th>
  14. <th>Schedule</th>
  15. <th>Next run</th>
  16. <th>Response</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. {% for task in cron %}
  21. <tr>
  22. <td>{{ task.task_id }}</td>
  23. <td>{{ task.url }} ({{ task.expected }})</td>
  24. <td>{{ task.payload }}</td>
  25. <td>{{ task.schedule }}</td>
  26. <td>{{ task.next_run }}</td>
  27. <td>Tries #{{ task.tries }}: {{ task.last_error_body }} ({{ task.last_error_status_code }})</td>
  28. </tr>
  29. {% endfor %}
  30. </tbody>
  31. </table>
  32. <h3>Dead</h3>
  33. <table class="pure-table" style="width:100%">
  34. <thead>
  35. <tr>
  36. <th>#</th>
  37. <th>URL</th>
  38. <th>Payload</th>
  39. <th>Next run</th>
  40. <th>Response</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. {% for task in dead %}
  45. <tr>
  46. <td>{{ task.task_id }}</td>
  47. <td>{{ task.url }} ({{ task.expected }})</td>
  48. <td>{{ task.payload }}</td>
  49. <td>{{ task.next_run }}</td>
  50. <td>Tries #{{ task.tries }}: {{ task.last_error_body }} ({{ task.last_error_status_code }})</td>
  51. </tr>
  52. {% endfor %}
  53. </tbody>
  54. </table>
  55. <h3>Waiting</h3>
  56. <table class="pure-table" style="width:100%">
  57. <thead>
  58. <tr>
  59. <th>#</th>
  60. <th>URL</th>
  61. <th>Payload</th>
  62. <th>Next run</th>
  63. <th>Response</th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. {% for task in waiting %}
  68. <tr>
  69. <td>{{ task.task_id }}</td>
  70. <td>{{ task.url }} ({{ task.expected }})</td>
  71. <td>{{ task.payload }}</td>
  72. <td>{{ task.next_run }}</td>
  73. <td>Tries #{{ task.tries }}: {{ task.last_error_body }} ({{ task.last_error_status_code }})</td>
  74. </tr>
  75. {% endfor %}
  76. </tbody>
  77. </table>
  78. <h3>Success</h3>
  79. <table class="pure-table" style="width:100%">
  80. <thead>
  81. <tr>
  82. <th>#</th>
  83. <th>URL</th>
  84. <th>Payload</th>
  85. <th>Next run</th>
  86. <th>Response</th>
  87. </tr>
  88. </thead>
  89. <tbody>
  90. {% for task in success %}
  91. <tr>
  92. <td>{{ task.task_id }}</td>
  93. <td>{{ task.url }} ({{ task.expected }})</td>
  94. <td>{{ task.payload }}</td>
  95. <td>{{ task.next_run }}</td>
  96. <td>Tries #{{ task.tries }}: {{ task.last_error_body }} ({{ task.last_error_status_code }})</td>
  97. </tr>
  98. {% endfor %}
  99. </tbody>
  100. </table>
  101. </div>
  102. {% endblock %}