report_list.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {% extends '_base.html' %}
  2. {% load helpers %}
  3. {% block content %}
  4. <h1>{% block title %}Reports{% endblock %}</h1>
  5. <div class="row">
  6. <div class="col-md-9">
  7. {% if reports %}
  8. {% for module, module_reports in reports %}
  9. <h3><a name="module.{{ module }}"></a>{{ module|bettertitle }}</h3>
  10. <table class="table table-hover table-headings reports">
  11. <thead>
  12. <tr>
  13. <th>Name</th>
  14. <th>Status</th>
  15. <th>Description</th>
  16. <th class="text-right">Last Run</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. {% for report in module_reports %}
  21. <tr>
  22. <td>
  23. <a href="{% url 'extras:report' name=report.full_name %}" name="report.{{ report.name }}"><strong>{{ report.name }}</strong></a>
  24. </td>
  25. <td>
  26. {% include 'extras/inc/report_label.html' %}
  27. </td>
  28. <td>{{ report.description|default:"" }}</td>
  29. {% if report.result %}
  30. <td class="text-right">{{ report.result.created }}</td>
  31. {% else %}
  32. <td class="text-right text-muted">Never</td>
  33. {% endif %}
  34. </tr>
  35. {% for method, stats in report.result.data.items %}
  36. <tr>
  37. <td colspan="3" class="method">
  38. {{ method }}
  39. </td>
  40. <td class="text-right stats">
  41. <label class="label label-success">{{ stats.success }}</label>
  42. <label class="label label-info">{{ stats.info }}</label>
  43. <label class="label label-warning">{{ stats.warning }}</label>
  44. <label class="label label-danger">{{ stats.failure }}</label>
  45. </td>
  46. </tr>
  47. {% endfor %}
  48. {% endfor %}
  49. </tbody>
  50. </table>
  51. {% endfor %}
  52. {% else %}
  53. <div class="alert alert-info">
  54. <strong>No reports found.</strong>
  55. </div>
  56. {% endif %}
  57. </div>
  58. <div class="col-md-3">
  59. {% if reports %}
  60. <div class="panel panel-default">
  61. {% for module, module_reports in reports %}
  62. <div class="panel-heading">
  63. <strong>{{ module|bettertitle }}</strong>
  64. </div>
  65. <ul class="list-group">
  66. {% for report in module_reports %}
  67. <a href="#report.{{ report.name }}" class="list-group-item">
  68. <i class="fa fa-list-alt"></i> {{ report.name }}
  69. <div class="pull-right">
  70. {% include 'extras/inc/report_label.html' %}
  71. </div>
  72. </a>
  73. {% endfor %}
  74. </ul>
  75. {% endfor %}
  76. </div>
  77. {% endif %}
  78. </div>
  79. </div>
  80. {% endblock %}