2017-09-10 17:25:29 +05:30
|
|
|
%h4= _("Pipelines charts")
|
|
|
|
%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)})
|
|
|
|
%canvas#weekChart{ height: 200 }
|
|
|
|
|
|
|
|
.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)})
|
|
|
|
%canvas#monthChart{ height: 200 }
|
|
|
|
|
|
|
|
.prepend-top-default
|
|
|
|
%p.light
|
2018-03-17 18:26:18 +05:30
|
|
|
= _("Pipelines for last year")
|
2017-09-10 17:25:29 +05:30
|
|
|
%canvas#yearChart.padded{ height: 250 }
|
|
|
|
|
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
|