report_projects.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {% extends '_layout.html' %}
  2. {% block title %}
  3. Rapport: Projets
  4. {% endblock %}
  5. {% block breadcrumb %}
  6. <li><a href="{% url 'index' %}">Accueil</a></li>
  7. <li><a href="{% url 'reports' %}">Rapports</a></li>
  8. <li><a>Revue de Projets</a></li>
  9. {% endblock %}
  10. {% block main %}
  11. {% load martortags %}
  12. <section id="backlog">
  13. <header>
  14. <div class="flex-row" style="margin-bottom: 20px;">
  15. <h2 class="flex-extend">Revue de Projets</h2>
  16. </div>
  17. </header>
  18. <canvas id="chart-activity" width="400" height="120"></canvas>
  19. <ul class="alt">
  20. {% for epic in epics %}
  21. <li class="epic-li">
  22. <div class="flex-col" style="margin-bottom: 20px;">
  23. <div class="flex-row">
  24. <h4>{{ epic.name }}</h4>
  25. </div>
  26. <div style="margin-bottom: 20px;">
  27. <div>Contributeurs: {{ epic.contributors }}</div>
  28. <div>Stories (Total / En cours / Terminées):
  29. {{ epic.nb_stories }} /
  30. <span class="valid">{{ epic.nb_active_stories }}</span> /
  31. <span class="disabled">{{ epic.nb_closed_stories }}</span></div>
  32. </div>
  33. {% if epic.description %}
  34. <div style="padding: 0 20px;">
  35. {{ epic.description|safe_markdown }}
  36. </div>
  37. {% endif %}
  38. </div>
  39. </li>
  40. {% endfor %}
  41. </ul>
  42. </section>
  43. <script>
  44. var ctx = document.getElementById("chart-activity").getContext('2d');
  45. var myChart = new Chart(ctx, {
  46. type: 'line',
  47. data: {
  48. labels: [{% for epic in epics|dictsort:"id" %}{% if not forloop.last %}"Sprint #{{ sprint.id }}",{% endif %}{% endfor %}],
  49. datasets: [{
  50. label: 'Vélocité réelle',
  51. data: [{% for sprint in sprints|dictsort:"id" %}{% if not forloop.last %}{{ sprint.real_velocity }},{% endif %}{% endfor %}],
  52. backgroundColor: [
  53. 'rgba(255, 255, 255, 0.2)'
  54. ],
  55. borderColor: [
  56. 'rgba(0,150,0,1)',
  57. ],
  58. borderWidth: 1
  59. },
  60. {
  61. label: 'Vélocité prévue',
  62. data: [{% for sprint in sprints|dictsort:"id" %}{% if not forloop.last %}{{ sprint.planned_velocity }},{% endif %}{% endfor %}],
  63. backgroundColor: [
  64. 'rgba(255, 255, 255, 0.2)'
  65. ],
  66. borderColor: [
  67. 'rgba(0,0,150,1)',
  68. ],
  69. borderWidth: 1
  70. }]
  71. },
  72. options: {
  73. scales: {
  74. yAxes: [{
  75. ticks: {
  76. beginAtZero:true
  77. }
  78. }]
  79. }
  80. }
  81. });
  82. </script>
  83. {% endblock %}