Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_pipeline_times.haml « charts « pipelines « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1292f580a8171843aa3462cd9fbe7a44d5f0c592 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
%div
  %p.light
    = _("Commit duration in minutes for last 30 commits")

  %canvas#build_timesChart{ height: 200 }

:javascript
  var data = {
    labels : #{@charts[:pipeline_times].labels.to_json},
    datasets : [
      {
        fillColor : "rgba(220,220,220,0.5)",
        strokeColor : "rgba(220,220,220,1)",
        barStrokeWidth: 1,
        barValueSpacing: 1,
        barDatasetSpacing: 1,
        data : #{@charts[:pipeline_times].pipeline_times.to_json}
      }
    ]
  }
  var ctx = $("#build_timesChart").get(0).getContext("2d");
  var options = { scaleOverlay: true, responsive: true, maintainAspectRatio: false };
  if (window.innerWidth < 768) {
    // Scale fonts if window width lower than 768px (iPad portrait)
    options.scaleFontSize = 8
  }
  new Chart(ctx).Bar(data, options);