debian-mirror-gitlab/app/views/projects/pipelines/charts/_pipelines.haml

38 lines
1,001 B
Text
Raw Normal View History

2019-09-30 21:07:59 +05:30
%h4.mt-4.mb-4= _("Pipelines charts")
2017-09-10 17:25:29 +05:30
%p
 
2018-03-17 18:26:18 +05:30
%span.legend-success
2017-09-10 17:25:29 +05:30
= icon("circle")
= s_("Pipeline|success")
 
2018-03-17 18:26:18 +05:30
%span.legend-all
2017-09-10 17:25:29 +05:30
= icon("circle")
= s_("Pipeline|all")
.prepend-top-default
%p.light
2018-03-17 18:26:18 +05:30
= _("Pipelines for last week")
2017-09-10 17:25:29 +05:30
(#{date_from_to(Date.today - 7.days, Date.today)})
2019-07-07 11:18:12 +05:30
%div
%canvas#weekChart{ height: 200 }
2017-09-10 17:25:29 +05:30
.prepend-top-default
%p.light
2018-03-17 18:26:18 +05:30
= _("Pipelines for last month")
2017-09-10 17:25:29 +05:30
(#{date_from_to(Date.today - 30.days, Date.today)})
2019-07-07 11:18:12 +05:30
%div
%canvas#monthChart{ height: 200 }
2017-09-10 17:25:29 +05:30
.prepend-top-default
%p.light
2018-03-17 18:26:18 +05:30
= _("Pipelines for last year")
2019-07-07 11:18:12 +05:30
%div
%canvas#yearChart.padded{ height: 250 }
2017-09-10 17:25:29 +05:30
2018-03-27 19:54:05 +05:30
-# haml-lint:disable InlineJavaScript
2017-09-10 17:25:29 +05:30
%script#pipelinesChartsData{ type: "application/json" }
- chartData = []
- [:week, :month, :year].each do |scope|
- chartData.push({ 'scope' => scope, 'labels' => @charts[scope].labels, 'totalValues' => @charts[scope].total, 'successValues' => @charts[scope].success })
= chartData.to_json.html_safe