You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.7 KiB

  1. {% extends "base.html" %}
  2. {% load compress static hc_extras %}
  3. {% block title %}Status Badges - {% site_name %}{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-10">
  7. <h1>Status Badges</h1>
  8. <p id="badges-description">
  9. {% site_name %} provides status badges for each of the tags
  10. you have used. Additionally, the "{% site_name %}"
  11. badge shows the overall status of all checks in a
  12. project. The badges have public, but hard-to-guess
  13. URLs. You can use them in your READMEs,
  14. dashboards or status pages.
  15. </p>
  16. <div id="b-format" class="btn-group" data-toggle="buttons">
  17. <label id="show-svg" class="btn btn-default active">
  18. <input type="radio" autocomplete="off" checked> SVG
  19. </label>
  20. <label id="show-json" class="btn btn-default">
  21. <input type="radio" autocomplete="off"> JSON
  22. </label>
  23. </div>
  24. <table id="badges-svg" class="badges table">
  25. {% if have_tags %}
  26. <tr>
  27. <th colspan="2">Tags</th>
  28. </tr>
  29. {% endif %}
  30. {% for urldict in badges %}
  31. {% if urldict.tag == "*" %}
  32. <tr>
  33. <th colspan="2">Overall Status</th>
  34. </tr>
  35. {% endif %}
  36. <tr>
  37. <td>
  38. <img src="{{ urldict.svg }}" alt="" />
  39. </td>
  40. <td class="svg-url">
  41. <code>{{ urldict.svg }}</code>
  42. </td>
  43. </tr>
  44. {% endfor %}
  45. </table>
  46. <table id="badges-json" class="badges table">
  47. {% if have_tags %}
  48. <tr>
  49. <th colspan="2">Tags</th>
  50. </tr>
  51. {% endif %}
  52. {% for urldict in badges %}
  53. {% if urldict.tag == "*" %}
  54. <tr>
  55. <th colspan="2">Overall Status</th>
  56. </tr>
  57. {% endif %}
  58. <tr>
  59. <td class="json-response" data-url="{{ urldict.json }}">
  60. </td>
  61. <td class="json-url">
  62. <code>{{ urldict.json }}</code>
  63. </td>
  64. </tr>
  65. {% endfor %}
  66. </table>
  67. </div>
  68. </div>
  69. {% endblock %}
  70. {% block scripts %}
  71. {% compress js %}
  72. <script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
  73. <script src="{% static 'js/bootstrap.min.js' %}"></script>
  74. <script src="{% static 'js/badges.js' %}"></script>
  75. {% endcompress %}
  76. {% endblock %}