From b8d8fd70d53a90fba6631d9cce573fcfdc24a270 Mon Sep 17 00:00:00 2001 From: Markus Koller Date: Sat, 3 Dec 2016 16:59:24 +0100 Subject: Remove unused ProjectsHelper#round_commit_count --- app/helpers/projects_helper.rb | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'app/helpers/projects_helper.rb') diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index d2177f683a1..9c9e38c4ed7 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -396,20 +396,6 @@ module ProjectsHelper [@project.path_with_namespace, sha, "readme"].join('-') end - def round_commit_count(project) - count = project.commit_count - - if count > 10000 - '10000+' - elsif count > 5000 - '5000+' - elsif count > 1000 - '1000+' - else - count - end - end - def current_ref @ref || @repository.try(:root_ref) end -- cgit v1.2.1 From 3ef4f74b1acc9399db320b53dffc592542de0126 Mon Sep 17 00:00:00 2001 From: Markus Koller Date: Tue, 22 Nov 2016 17:58:10 +0100 Subject: Add more storage statistics This adds counters for build artifacts and LFS objects, and moves the preexisting repository_size and commit_count from the projects table into a new project_statistics table. The counters are displayed in the administration area for projects and groups, and also available through the API for admins (on */all) and normal users (on */owned) The statistics are updated through ProjectCacheWorker, which can now do more granular updates with the new :statistics argument. --- app/helpers/projects_helper.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'app/helpers/projects_helper.rb') diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 9c9e38c4ed7..fc9eccd2942 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -246,11 +246,6 @@ module ProjectsHelper end end - def repository_size(project = @project) - size_in_bytes = project.repository_size * 1.megabyte - number_to_human_size(size_in_bytes, delimiter: ',', precision: 2) - end - def default_url_to_repo(project = @project) case default_clone_protocol when 'ssh' -- cgit v1.2.1