Subversion Repositories wimsdev

Rev

Rev 14407 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. !set wims_name_job = Modules Créés ou Actualisés par année
  3. !set wims_name_graph = Évolution des publications de modules par année
  4. !set wims_name_table = Fréquence de création ou d'actualisation des modules publiés
  5.  
  6.  
  7. !! Les informations ci-dessous ont été obtenues en parcourant l'ensemble des modules publiés.
  8. !! Les dates de creation et de mise à jour viennent de l'information "COPYRIGHT" de l'INDEX de chaque module.
  9.  
  10. !! Informations obtenues via le script python ModulesStats.py > statsWIMS.txt
  11.  
  12. <script src="scripts/js/external/chart.js/Chart.bundle.min.js"></script>
  13.  
  14. !set wims_menu_items=!append line back2,1,cmd=resume\
  15.  to $wims_menu_items
  16.  
  17. <div style="max-width: 50em;margin:auto;">
  18.   <h1 class="wims_title">$wims_name_job</h1>
  19.   <canvas id="canvas"></canvas>
  20. </div>
  21.  
  22. <p class="wimscenter">Pour les actualisations, nous prenons en compte la date de dernière  mise à jour de chaque module.</p>
  23.  
  24. $table_header
  25.   <caption>$wims_name_table</caption>
  26.   <thead>
  27.     <tr>
  28.       <th>&nbsp;</th>
  29.       !for _tmp= 1997 to 2016
  30.         <th scope="col">$_tmp</th>
  31.       !next
  32.       <th scope="col">Total</th>
  33.     </tr>
  34.   </thead>
  35.   <tbody>
  36.     <tr>
  37.       <th scope="row">
  38.         Cr&eacute;ations
  39.       </th>
  40.       !reset totmodules
  41.       !set modules_created = 54,133,155,103,71,135,198,116,75,121,208,69,32,18,74,36,23,22,21,9
  42.       !for _tmp in $modules_created
  43.         <td>$_tmp</td>
  44.         !set totmodules = $totmodules + $_tmp
  45.       !next
  46.       <td><strong>$[$totmodules]</strong></th>
  47.     </tr>
  48.     <tr>
  49.       <th scope="row">
  50.         Dernières Actualisations
  51.       </th>
  52.       !reset totmodules
  53.       !set modules_updated = 3,50,54,60,20,34,60,89,26,53,108,78,55,61,72,136,166,88,244,216
  54.       !for _tmp in $modules_updated
  55.         <td>$_tmp</td>
  56.         !set totmodules = $totmodules + $_tmp
  57.       !next
  58.       <td><strong>$[$totmodules]</strong></th>
  59.     </tr>
  60.   </tbody>
  61. $table_end
  62.  
  63. <script>
  64.   var barChartData = {
  65.     labels: ["1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016"],
  66.     datasets: [{
  67.       label: 'Créations',
  68.       backgroundColor: "rgba(54, 162, 235, 0.8)",
  69.       data: [$modules_created]
  70.     }, {
  71.       label: 'Dernières Actualisations',
  72.       backgroundColor: "rgba(75, 192, 192, 0.8)",
  73.       data: [$modules_updated]
  74.     }]
  75.  
  76.   };
  77.   window.onload = function() {
  78.     var ctx = document.getElementById("canvas").getContext("2d");
  79.     window.myBar = new Chart(ctx, {
  80.       type: 'bar',
  81.       data: barChartData,
  82.       options: {
  83.         title:{
  84.           display:true,
  85.           text:"$wims_name_graph"
  86.         },
  87.         tooltips: {
  88.           mode: 'label'
  89.         },
  90.         responsive: true,
  91.         scales: {
  92.           xAxes: [{
  93.             stacked: true,
  94.           }],
  95.           yAxes: [{
  96.             stacked: true
  97.           }]
  98.         }
  99.       }
  100.     });
  101.   };
  102. </script>
  103.  
  104.