diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-06-22 15:37:59 +0300 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-06-23 12:46:55 +0300 |
commit | 13d39971f33e4064bd5c8da1865cc874e1005e52 (patch) | |
tree | 8f4563162e928b52eb638e7d9e3e0987c53a5115 /app/views/projects/pipelines | |
parent | 9c7bf123564ee3c045c2aa3625f8a691f91a23aa (diff) |
Improve performance for pipeline charts
Achieved by using another table, which both has better indexes and
is smaller. Now the data provided for the user is more valueable too.
Diffstat (limited to 'app/views/projects/pipelines')
-rw-r--r-- | app/views/projects/pipelines/charts/_overall.haml | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/views/projects/pipelines/charts/_overall.haml b/app/views/projects/pipelines/charts/_overall.haml index 0b7e3d22dd7..6ce26424050 100644 --- a/app/views/projects/pipelines/charts/_overall.haml +++ b/app/views/projects/pipelines/charts/_overall.haml @@ -2,18 +2,14 @@ %ul %li Total: - %strong= pluralize @project.builds.count(:all), 'job' + %strong= pluralize @counts[:total], 'job' %li Successful: - %strong= pluralize @project.builds.success.count(:all), 'job' + %strong= pluralize @counts[:success], 'job' %li Failed: - %strong= pluralize @project.builds.failed.count(:all), 'job' + %strong= pluralize @counts[:failed], 'job' %li Success ratio: %strong - #{success_ratio(@project.builds.success, @project.builds.failed)}% - %li - Commits covered: - %strong - = @project.pipelines.count(:all) + #{success_ratio(@counts)}% |