Statistics fixed

This commit is contained in:
Christoph Haas 2016-07-15 20:24:19 +02:00
parent 9024833921
commit f36683f9d4
2 changed files with 3 additions and 11 deletions

View file

@ -6,19 +6,12 @@ class WelcomeController < ApplicationController
# TODO: Use the actually most popular package and not just a random one
@most_popular_package = Package.with_screenshots.first
package_count
@package_count = Package.count
end
def about
@package_sources = Rails.configuration.package_sources
package_count
end
private
# TODO: show count depending on virtual host
def package_count
@package_count = Package.count
@screenshot_count = Screenshot.count
end
end

View file

@ -137,8 +137,7 @@
' There are currently #{@package_count} software packages in the database.
/ ' 3798 of them have screenshots.
/ ' That makes a total of 7.8%.
' #{@screenshot_count} screenshots have been uploaded which means that
' every package has an average number of #{@pkg_avg_screenshots} screenshots.
' And #{@screenshot_count} screenshots have been uploaded.
/ p
/ // TODO: Use plot about upload statistics