diff options
author | Gareth Rees <gareth@mysociety.org> | 2015-05-12 17:26:32 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2015-05-12 17:35:52 +0100 |
commit | 486a1ef2c11cfd0a9063cc1b4638d8ff651d549e (patch) | |
tree | 7a99fda061f0307a610abc003c0b17d85512b5d6 | |
parent | 0b2b8f0c280777fc531ddfafc9df6dbab645ec49 (diff) |
Remove summary stats from admin summary page
They're duplicated on /admin/summary and a bit slow [1].
[1] https://wiki.postgresql.org/wiki/Slow_Counting
-rw-r--r-- | app/controllers/admin_general_controller.rb | 12 | ||||
-rw-r--r-- | app/views/admin_general/index.html.erb | 15 |
2 files changed, 4 insertions, 23 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb index c81b397a3..4927f631b 100644 --- a/app/controllers/admin_general_controller.rb +++ b/app/controllers/admin_general_controller.rb @@ -7,18 +7,6 @@ class AdminGeneralController < AdminController def index - # Overview counts of things - @public_body_count = PublicBody.count - - @info_request_count = InfoRequest.count - @outgoing_message_count = OutgoingMessage.count - @incoming_message_count = IncomingMessage.count - - @user_count = User.count - @track_thing_count = TrackThing.count - - @comment_count = Comment.count - # Tasks to do @requires_admin_requests = InfoRequest.find_in_state('requires_admin') @error_message_requests = InfoRequest.find_in_state('error_message') diff --git a/app/views/admin_general/index.html.erb b/app/views/admin_general/index.html.erb index 38f5eb7e0..8840bce74 100644 --- a/app/views/admin_general/index.html.erb +++ b/app/views/admin_general/index.html.erb @@ -2,17 +2,10 @@ <div class="row"> <div class="span12"> - <h1><%=@title%></h1> - - <ul> - <li><%=@public_body_count%> public authorities</li> - <li> - <%=@info_request_count%> requests, <%=@outgoing_message_count%> outgoing messages, - <%=@incoming_message_count%> incoming messages - </li> - <li><%=@user_count%> users, <%=@track_thing_count%> tracked things</li> - <li><%=@comment_count%> annotations</li> - </ul> + <h1><%= @title %></h1> + <p> + <%= link_to 'Summary stats have moved →', admin_stats_path %> + </p> </div> </div> |