1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

floated Redis stats in the center of the page

This commit is contained in:
Alex Handley 2013-09-24 18:15:59 +01:00
parent a8c0e28bba
commit b7e7d7fcd9
2 changed files with 46 additions and 30 deletions

View file

@ -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;
}

View file

@ -22,38 +22,41 @@
<br/>
<h5>Redis</h5>
<div class="redis-wrapper">
<div class="stats-container">
<% if @redis_info.fetch("redis_version", nil) %>
<div class="stat">
<h3 class="redis_version"><%= @redis_info.fetch("redis_version") %></h3>
<p><%= t('Version') %></p>
</div>
<% end %>
<% if @redis_info.fetch("redis_version", nil) %>
<div class="stat">
<h3 class="redis_version"><%= @redis_info.fetch("redis_version") %></h3>
<p><%= t('Version') %></p>
</div>
<% end %>
<% if @redis_info.fetch("uptime_in_days", nil) %>
<div class="stat">
<h3 class="uptime_in_days"><%= @redis_info.fetch("uptime_in_days") %></h3>
<p><%= t('Uptime') %></p>
</div>
<% end %>
<% if @redis_info.fetch("uptime_in_days", nil) %>
<div class="stat">
<h3 class="uptime_in_days"><%= @redis_info.fetch("uptime_in_days") %></h3>
<p><%= t('Uptime') %></p>
</div>
<% end %>
<% if @redis_info.fetch("connected_clients", nil) %>
<div class="stat">
<h3 class="connected_clients"><%= @redis_info.fetch("connected_clients") %></h3>
<p><%= t('Connections') %></p>
</div>
<% end %>
<% if @redis_info.fetch("connected_clients", nil) %>
<div class="stat">
<h3 class="connected_clients"><%= @redis_info.fetch("connected_clients") %></h3>
<p><%= t('Connections') %></p>
</div>
<% end %>
<% if @redis_info.fetch("used_memory_human", nil) %>
<div class="stat">
<h3 class="used_memory_human"><%= @redis_info.fetch("used_memory_human") %></h3>
<p><%= t('MemoryUsage') %></p>
</div>
<% end %>
<% if @redis_info.fetch("used_memory_human", nil) %>
<div class="stat">
<h3 class="used_memory_human"><%= @redis_info.fetch("used_memory_human") %></h3>
<p><%= t('MemoryUsage') %></p>
<% if @redis_info.fetch("used_memory_peak_human", nil) %>
<div class="stat">
<h3 class="used_memory_peak_human"><%= @redis_info.fetch("used_memory_peak_human") %></h3>
<p><%= t('PeakMemoryUsage') %></p>
</div>
<% end %>
</div>
<% end %>
<% if @redis_info.fetch("used_memory_peak_human", nil) %>
<div class="stat">
<h3 class="used_memory_peak_human"><%= @redis_info.fetch("used_memory_peak_human") %></h3>
<p><%= t('PeakMemoryUsage') %></p>
</div>
<% end %>
</div>