Permalink
Browse files

Make it possible to turn off the message stats.

  • Loading branch information...
1 parent 7eb4499 commit 48004307d16706e63476c403ff1f55fef4d59b4d @clowder clowder committed May 10, 2012
Showing with 9 additions and 2 deletions.
  1. +6 −2 app/models/configuration.rb
  2. +2 −0 app/views/messages/_message_table_header.erb
  3. +1 −0 config/general.yml.example
@@ -37,6 +37,10 @@ def self.date_format
general_config :date_format, "%d.%m.%Y - %H:%M:%S"
end
+ def self.hide_message_stats?
+ general_config :hide_message_stats, false
+ end
+
def self.hoptoad_config(key, default = nil)
nested_general_config :hoptoad, key, default
end
@@ -88,7 +92,7 @@ def self.email_config(key = nil, default = nil)
@email_config[Rails.env]
end
end
-
+
def self.indexer_config(key = nil, default = nil)
if key
config_value @indexer_config, Rails.env, key, default
@@ -117,7 +121,7 @@ def self.email_smtp_settings
def self.indexer_host
indexer_config :url
end
-
+
def self.indexer_index_name
indexer_config :index_name
end
@@ -4,6 +4,7 @@
<%= render :partial => "version_check" %>
<% end %>
+<% unless ::Configuration.hide_message_stats? %>
Currently containing <span class="highlighted"><%= number_with_delimiter(@total_count, :delimiter => '.') %></span> messages.
<% if @total_count > 0 %>
@@ -15,5 +16,6 @@ Stored <span class="highlighted">
<%= number_with_delimiter(MessageCount.total_count_of_last_minutes(Setting.get_message_count_interval(current_user)), :delimiter => '.') %>
</span>
messages in the last <%= message_count_interval %> minutes.
+<% end %>
<br />
@@ -4,6 +4,7 @@ general:
allow_deleting: false # Allowing deleting of messages negatively impacts performance
allow_version_check: true # Enables manual (/versioncheck/index) and automatic (every 30min from overview page) version checking against graylog2.org via HTTP.
# 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
+ # hide_message_stats: false # Hide the message statistics at the top of the messages page.
# Settings for stream subscription emails.
subscriptions:

0 comments on commit 4800430

Please sign in to comment.