status.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. {% extends 'index.html' %}
  2. {% block title %} URLTeam Status {% end %}
  3. {% block main %}
  4. {% from terroroftinytown.tracker.model import MIN_VERSION_OVERRIDE, MIN_CLIENT_VERSION_OVERRIDE %}
  5. <div ng-controller="StatsController" class="container-fluid">
  6. <h2>Shortener Projects</h2>
  7. <p>Click on header to show project settings</p>
  8. {% for project in [project for project in projects if project.enabled] + [project for project in projects if not project.enabled] %}
  9. <div class="col-md-6">
  10. <div class="panel panel-default">
  11. <div class="panel-heading" ng-click="body['{{project.name}}']=!body['{{project.name}}']">
  12. {% if project.enabled %} ✦ {% end %} {{project.name}}
  13. </div>
  14. <table class="table table-bordered">
  15. <colgroup>
  16. <col style="width: 50%">
  17. <col style="width: 50%">
  18. </colgroup>
  19. <thead>
  20. <tr>
  21. <th>Found</th>
  22. <th>Scanned</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. <tr>
  27. <td class="table-number" ng-bind="stats.project['{{project.name}}'][0]|number">{{ project_stats.get(project.name, (0, 0))[0] }}</td>
  28. <td class="table-number" ng-bind="stats.project['{{project.name}}'][1]|number">{{ project_stats.get(project.name, (0, 0))[1] }}</td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. <div class="panel-body" ng-show="body['{{project.name}}']">
  33. {% if project.name in services %}
  34. <p class="text-success">This service use custom script.</p>
  35. {% end %}
  36. <dl>
  37. <dt>Minimum library version</dt>
  38. <dd>{{project.min_version}}</dd>
  39. <dt>Minimum pipeline version</dt>
  40. <dd>{{project.min_client_version}}</dd>
  41. <dt>URL</dt>
  42. <dd><code>{{project.url_template}}</code></dd>
  43. <dt>Method</dt>
  44. <dd>{{project.method}}</dd>
  45. <dt>Alphabet set</dt>
  46. <dd><code>{{project.alphabet}}</code></dd>
  47. <dt>Delay</dt>
  48. <dd>{{project.request_delay}}</dd>
  49. <dt>Parse regex</dt>
  50. <dd>{{project.body_regex}}</dd>
  51. <dt>Location regex</dt>
  52. <dd>{{project.location_anti_regex}}</dd>
  53. <dt>Redirect status</dt>
  54. <dd>{{' '.join([str(x) for x in project.redirect_codes])}}</dd>
  55. <dt>No redirect status</dt>
  56. <dd>{{' '.join([str(x) for x in project.no_redirect_codes])}}</dd>
  57. <dt>Unavailable status</dt>
  58. <dd>{{' '.join([str(x) for x in project.unavailable_codes])}}</dd>
  59. <dt>Banned status</dt>
  60. <dd>{{' '.join([str(x) for x in project.banned_codes])}}</dd>
  61. </dl>
  62. <a href="{{ '{0}?name={1}'.format(
  63. reverse_url('api.project_settings'), project.name) }}">json</a>
  64. </div>
  65. </div>
  66. </div>
  67. {% end %}
  68. </div>
  69. <div class="container-fluid">
  70. <h2>Tracker</h2>
  71. <div class="panel panel-body">
  72. <dl>
  73. <dt>Minimum library version:</td>
  74. <dd>{{ MIN_VERSION_OVERRIDE }}</dd>
  75. <dt>Minimum pipeline version:</td>
  76. <dd>{{ MIN_CLIENT_VERSION_OVERRIDE }}</dd>
  77. <dt>Git Hash</dt>
  78. <dd>{{ git_hash }}</dd>
  79. <dt>Your IP address</dt>
  80. <dd>{{ request.remote_ip }}</dd>
  81. </dl>
  82. </div>
  83. </div>
  84. {% end %}