From b7e7d7fcd9e36d32568f0407441ce7c3395f4354 Mon Sep 17 00:00:00 2001 From: Alex Handley Date: Tue, 24 Sep 2013 18:15:59 +0100 Subject: [PATCH] floated Redis stats in the center of the page --- web/assets/stylesheets/application.css | 13 ++++++ web/views/dashboard.erb | 63 ++++++++++++++------------ 2 files changed, 46 insertions(+), 30 deletions(-) diff --git a/web/assets/stylesheets/application.css b/web/assets/stylesheets/application.css index 911cbb38..a6b1369a 100755 --- a/web/assets/stylesheets/application.css +++ b/web/assets/stylesheets/application.css @@ -291,6 +291,15 @@ img.smallogo { padding: 10px 0; } +.redis-wrapper { + width: 100%; + text-align: center; +} + +.stats-container { + display: inline-block; +} + .stat { float: left; text-align: center; @@ -301,6 +310,10 @@ img.smallogo { margin-bottom: 20px; } +.stat:last-child { + margin-right: 0; +} + .stat p { font-size: 0.9em; } diff --git a/web/views/dashboard.erb b/web/views/dashboard.erb index 39c3da05..2ddbb0d6 100644 --- a/web/views/dashboard.erb +++ b/web/views/dashboard.erb @@ -22,38 +22,41 @@
Redis
+
+
+ <% if @redis_info.fetch("redis_version", nil) %> +
+

<%= @redis_info.fetch("redis_version") %>

+

<%= t('Version') %>

+
+ <% end %> -<% if @redis_info.fetch("redis_version", nil) %> -
-

<%= @redis_info.fetch("redis_version") %>

-

<%= t('Version') %>

-
-<% end %> + <% if @redis_info.fetch("uptime_in_days", nil) %> +
+

<%= @redis_info.fetch("uptime_in_days") %>

+

<%= t('Uptime') %>

+
+ <% end %> -<% if @redis_info.fetch("uptime_in_days", nil) %> -
-

<%= @redis_info.fetch("uptime_in_days") %>

-

<%= t('Uptime') %>

-
-<% end %> + <% if @redis_info.fetch("connected_clients", nil) %> +
+

<%= @redis_info.fetch("connected_clients") %>

+

<%= t('Connections') %>

+
+ <% end %> -<% if @redis_info.fetch("connected_clients", nil) %> -
-

<%= @redis_info.fetch("connected_clients") %>

-

<%= t('Connections') %>

-
-<% end %> + <% if @redis_info.fetch("used_memory_human", nil) %> +
+

<%= @redis_info.fetch("used_memory_human") %>

+

<%= t('MemoryUsage') %>

+
+ <% end %> -<% if @redis_info.fetch("used_memory_human", nil) %> -
-

<%= @redis_info.fetch("used_memory_human") %>

-

<%= t('MemoryUsage') %>

+ <% if @redis_info.fetch("used_memory_peak_human", nil) %> +
+

<%= @redis_info.fetch("used_memory_peak_human") %>

+

<%= t('PeakMemoryUsage') %>

+
+ <% end %>
-<% end %> - -<% if @redis_info.fetch("used_memory_peak_human", nil) %> -
-

<%= @redis_info.fetch("used_memory_peak_human") %>

-

<%= t('PeakMemoryUsage') %>

-
-<% end %> +