diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 15:08:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 15:08:52 +0300 |
commit | 05b5c609cb8c260b10c2eb1b92b711dc82d32c3f (patch) | |
tree | 05253c66806b17c5b1f9f13addab59524d536fc4 /app/views/projects | |
parent | 1078b7bf25c2cb6e03c57da9ae25b0512858556f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/pipelines/charts.html.haml | 10 | ||||
-rw-r--r-- | app/views/projects/pipelines/charts/_pipelines.haml | 37 |
2 files changed, 5 insertions, 42 deletions
diff --git a/app/views/projects/pipelines/charts.html.haml b/app/views/projects/pipelines/charts.html.haml index 9542f8c9766..7496ca97d56 100644 --- a/app/views/projects/pipelines/charts.html.haml +++ b/app/views/projects/pipelines/charts.html.haml @@ -1,7 +1,7 @@ - page_title _('CI / CD Charts') -#js-project-pipelines-charts-app{ data: { counts: @counts, success_ratio: success_ratio(@counts), times_chart: { labels: @charts[:pipeline_times].labels, values: @charts[:pipeline_times].pipeline_times } } } - -#charts.ci-charts - %hr - = render 'projects/pipelines/charts/pipelines' +#js-project-pipelines-charts-app{ data: { counts: @counts, success_ratio: success_ratio(@counts), + times_chart: { labels: @charts[:pipeline_times].labels, values: @charts[:pipeline_times].pipeline_times }, + last_week_chart: { labels: @charts[:week].labels, totals: @charts[:week].total, success: @charts[:week].success }, + last_month_chart: { labels: @charts[:month].labels, totals: @charts[:month].total, success: @charts[:month].success }, + last_year_chart: { labels: @charts[:year].labels, totals: @charts[:year].total, success: @charts[:year].success } } } diff --git a/app/views/projects/pipelines/charts/_pipelines.haml b/app/views/projects/pipelines/charts/_pipelines.haml deleted file mode 100644 index afff9e82e45..00000000000 --- a/app/views/projects/pipelines/charts/_pipelines.haml +++ /dev/null @@ -1,37 +0,0 @@ -%h4.mt-4.mb-4= _("Pipelines charts") -%p - - %span.legend-success - = icon("circle") - = s_("Pipeline|success") - - %span.legend-all - = icon("circle") - = s_("Pipeline|all") - -.prepend-top-default - %p.light - = _("Pipelines for last week") - (#{date_from_to(Date.today - 7.days, Date.today)}) - %div - %canvas#weekChart{ height: 200 } - -.prepend-top-default - %p.light - = _("Pipelines for last month") - (#{date_from_to(Date.today - 30.days, Date.today)}) - %div - %canvas#monthChart{ height: 200 } - -.prepend-top-default - %p.light - = _("Pipelines for last year") - %div - %canvas#yearChart.padded{ height: 250 } - --# haml-lint:disable InlineJavaScript -%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 |