index.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. {% extends "base.html" %}
  2. {% load cycle from future %}
  3. {% load static from staticfiles %}
  4. {% load cache %}
  5. {% load package_extras %}
  6. {% load todolists %}
  7. {% block title %}{{ BRANDING_DISTRONAME }} - Hacker Dashboard{% endblock %}
  8. {% block content %}
  9. <div id="dev-dashboard" class="box">
  10. <h2>Developer Dashboard</h2>
  11. <h3>My Flagged Packages</h3>
  12. <table id="dash-myflagged" class="results">
  13. <thead>
  14. <tr>
  15. <th>Name</th>
  16. <th>Version</th>
  17. <th>Testing Version</th>
  18. <th>Repo</th>
  19. <th>Arch</th>
  20. <th>Flagged</th>
  21. <th>Last Updated</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. {% for pkg in flagged %}
  26. <tr class="{% cycle 'odd' 'even' %}">
  27. <td>{% pkg_details_link pkg %}</td>
  28. <td>{{ pkg.full_version }}</td>
  29. <td>{% with pkg.in_testing as tp %}{% if tp %}
  30. <a href="{{ tp.get_absolute_url }}"
  31. title="Testing package details for {{ tp.pkgname }}">{{ tp.full_version }}</a>
  32. {% endif %}{% endwith %}</td>
  33. <td>{{ pkg.repo.name }}</td>
  34. <td>{{ pkg.arch.name }}</td>
  35. <td>{{ pkg.flag_date|date }}</td>
  36. <td>{{ pkg.last_update|date }}</td>
  37. </tr>
  38. {% empty %}
  39. <tr class="empty"><td colspan="7"><em>No flagged packages to display</em></td></tr>
  40. {% endfor %}
  41. </tbody>
  42. </table>
  43. <h3>My Incomplete Todo List Packages</h3>
  44. <table id="dash-mytodolist" class="results">
  45. <thead>
  46. <tr>
  47. <th>Todo List</th>
  48. <th>Name</th>
  49. <th>Repo</th>
  50. <th>Arch</th>
  51. <th>Maintainer(s)</th>
  52. </tr>
  53. </thead>
  54. <tbody>
  55. {% for todopkg in todopkgs %}
  56. <tr class="{% cycle 'odd' 'even' %}">
  57. <td><a href="{{ todopkg.todolist.get_absolute_url }}"
  58. title="View todo list: {{ todopkg.todolist.name }}">{{ todopkg.todolist.name }}</a></td>
  59. <td>{% todopkg_details_link todopkg %}</td>
  60. <td>{{ todopkg.repo.name }}</td>
  61. <td>{{ todopkg.arch.name }}</td>
  62. <td>{{ todopkg.pkg.maintainers|join:', ' }}</td>
  63. </tr>
  64. {% empty %}
  65. <tr class="empty"><td colspan="5"><em>No incomplete todo list packages to display</em></td></tr>
  66. {% endfor %}
  67. </tbody>
  68. </table>
  69. <h3>Package Todo Lists</h3>
  70. <table id="dash-todo" class="results">
  71. <thead>
  72. <tr>
  73. <th>Name</th>
  74. <th>Creation Date</th>
  75. <th>Creator</th>
  76. <th>Description</th>
  77. <th>Package Count</th>
  78. <th>Incomplete Count</th>
  79. </tr>
  80. </thead>
  81. <tbody>
  82. {% for todo in todos %}
  83. <tr class="{% cycle 'odd' 'even' %}">
  84. <td><a href="{{ todo.get_absolute_url }}"
  85. title="View todo list: {{ todo.name }}">{{ todo.name }}</a></td>
  86. <td>{{ todo.created|date }}</td>
  87. <td>{{ todo.creator.get_full_name }}</td>
  88. <td class="wrap">{{ todo.description|urlize }}</td>
  89. <td>{{ todo.pkg_count }}</td>
  90. <td>{{ todo.incomplete_count }}</td>
  91. </tr>
  92. {% empty %}
  93. <tr class="empty"><td colspan="6"><em>No package todo lists to display</em></td></tr>
  94. {% endfor %}
  95. </tbody>
  96. </table>
  97. <h3>Signoff Status</h3>
  98. <table id="dash-signoffs" class="results">
  99. <thead>
  100. <tr>
  101. <th>Name</th>
  102. <th>Version</th>
  103. <th>Arch</th>
  104. <th>Target Repo</th>
  105. <th>Last Updated</th>
  106. <th>Approved</th>
  107. <th>Signoffs</th>
  108. </tr>
  109. </thead>
  110. <tbody>
  111. {% for group in signoffs %}
  112. <tr class="{% cycle 'odd' 'even' %}">
  113. <td>{% pkg_details_link group.package %}</td>
  114. <td>{{ group.version }}</td>
  115. <td>{{ group.arch.name }}</td>
  116. <td>{{ group.target_repo }}</td>
  117. <td>{{ group.last_update|date }}</td>
  118. {% if group.specification.known_bad %}
  119. <td class="approval signoff-bad">Bad</td>
  120. {% else %}
  121. {% if not group.specification.enabled %}
  122. <td class="approval signoff-disabled">Disabled</td>
  123. {% else %}
  124. <td class="approval signoff-{{ group.approved|yesno }}">{{ group.approved|yesno|capfirst }}</td>
  125. {% endif %}
  126. {% endif %}
  127. <td><ul class="signoff-list">
  128. {% for signoff in group.signoffs %}
  129. <li class="signed-username" title="Signed off by {{ signoff.user }}">{{ signoff.user }}{% if signoff.revoked %} (revoked){% endif %}</li>
  130. {% endfor %}
  131. </ul></td>
  132. </tr>
  133. {% empty %}
  134. <tr class="empty"><td colspan="7"><em>No packages you maintain or have packaged need signoffs</em></td></tr>
  135. {% endfor %}
  136. </tbody>
  137. </table>
  138. <h3>Developer Reports</h3>
  139. <ul>
  140. {% for report in reports %}
  141. <li><a href="reports/{{ report.slug }}/">{{ report.name }}</a>:
  142. {{ report.description }}
  143. {% if report.personal %}(<a href="reports/{{ report.slug }}/{{ user.username }}/">yours only</a>){% endif %}</li>
  144. {% endfor %}
  145. </ul>
  146. </div>{# #dev-dashboard #}
  147. <div id="stats-area">
  148. <div class="box">
  149. <h2>Developer Stats</h2>
  150. <p id="stats-message">Enable JavaScript to get more useful info here.</p>
  151. </div>
  152. </div>
  153. {% endblock %}
  154. {% block script_block %}
  155. {% load cdn %}{% jquery %}{% jquery_tablesorter %}
  156. <script type="text/javascript" src="{% static "archweb.js" %}"></script>
  157. <script type="text/javascript">
  158. $(document).ready(function() {
  159. $("#stats-message").html('Loading developer stats…');
  160. $("#stats-area").load('stats/', function(response, status, xhr) {
  161. if (status === 'error' || status === 'timeout') {
  162. $("#stats-message").html('Developer stats loading encountered an error. Sorry.');
  163. return;
  164. }
  165. var settings = {
  166. widgets: ['zebra'],
  167. sortList: [[0,0]],
  168. headers: { 1: { sorter: 'pkgcount' }, 2: { sorter: 'pkgcount' }, 3: { sorter: 'pkgcount' } }
  169. };
  170. $(".dash-stats").not($("#stats-by-maintainer")).tablesorter(settings);
  171. settings['sortLocaleCompare'] = true;
  172. $("#stats-by-maintainer").tablesorter(settings);
  173. });
  174. $("#dash-myflagged:not(:has(tbody tr.empty))").tablesorter(
  175. {widgets: ['zebra'], sortList: [[0,0]]});
  176. $("#dash-mytodolist:not(:has(tbody tr.empty))").tablesorter(
  177. {widgets: ['zebra'], sortList: [[0,0], [1,0]]});
  178. $("#dash-todo:not(:has(tbody tr.empty))").tablesorter(
  179. {widgets: ['zebra'], sortList: [[1,1]]});
  180. $("#dash-signoffs:not(:has(tbody tr.empty))").tablesorter({
  181. widgets: ['zebra'],
  182. sortList: [[0,0]],
  183. headers: { 6: {sorter: false } }
  184. });
  185. });
  186. </script>
  187. {% endblock %}