Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make it possible to turn off the message stats.

  • Loading branch information...
commit 48004307d16706e63476c403ff1f55fef4d59b4d 1 parent 7eb4499
Chris Lowder clowder authored
8 app/models/configuration.rb
@@ -37,6 +37,10 @@ def self.date_format
37 37 general_config :date_format, "%d.%m.%Y - %H:%M:%S"
38 38 end
39 39
  40 + def self.hide_message_stats?
  41 + general_config :hide_message_stats, false
  42 + end
  43 +
40 44 def self.hoptoad_config(key, default = nil)
41 45 nested_general_config :hoptoad, key, default
42 46 end
@@ -88,7 +92,7 @@ def self.email_config(key = nil, default = nil)
88 92 @email_config[Rails.env]
89 93 end
90 94 end
91   -
  95 +
92 96 def self.indexer_config(key = nil, default = nil)
93 97 if key
94 98 config_value @indexer_config, Rails.env, key, default
@@ -117,7 +121,7 @@ def self.email_smtp_settings
117 121 def self.indexer_host
118 122 indexer_config :url
119 123 end
120   -
  124 +
121 125 def self.indexer_index_name
122 126 indexer_config :index_name
123 127 end
2  app/views/messages/_message_table_header.erb
@@ -4,6 +4,7 @@
4 4 <%= render :partial => "version_check" %>
5 5 <% end %>
6 6
  7 +<% unless ::Configuration.hide_message_stats? %>
7 8 Currently containing <span class="highlighted"><%= number_with_delimiter(@total_count, :delimiter => '.') %></span> messages.
8 9
9 10 <% if @total_count > 0 %>
@@ -15,5 +16,6 @@ Stored <span class="highlighted">
15 16 <%= number_with_delimiter(MessageCount.total_count_of_last_minutes(Setting.get_message_count_interval(current_user)), :delimiter => '.') %>
16 17 </span>
17 18 messages in the last <%= message_count_interval %> minutes.
  19 +<% end %>
18 20
19 21 <br />
1  config/general.yml.example
@@ -4,6 +4,7 @@ general:
4 4 allow_deleting: false # Allowing deleting of messages negatively impacts performance
5 5 allow_version_check: true # Enables manual (/versioncheck/index) and automatic (every 30min from overview page) version checking against graylog2.org via HTTP.
6 6 # custom_cookie_name: graylog2_staging1 # Set an own cookie name - Useful for multiple deployments on same host like example.org/staging1/graylog2, example.org/staging2/graylog2
  7 + # hide_message_stats: false # Hide the message statistics at the top of the messages page.
7 8
8 9 # Settings for stream subscription emails.
9 10 subscriptions:

0 comments on commit 4800430

Please sign in to comment.
Something went wrong with that request. Please try again.