redis-stat 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/redis-stat.rb CHANGED
@@ -244,7 +244,8 @@ private
244
244
  def output_static_info info
245
245
  tab = Tabularize.new(
246
246
  :unicode => false, :align => :right,
247
- :border_style => @style
247
+ :border_style => @style,
248
+ :screen_width => @term_width
248
249
  )
249
250
  tab << [nil] + @hosts.map { |h| ansi(:bold, :green) { h } }
250
251
  tab.separator!
@@ -38,14 +38,6 @@ body {
38
38
  font-size: 11px;
39
39
  }
40
40
 
41
- #info_table th {
42
- font-style: italic;
43
- }
44
-
45
- #info_table.table {
46
- margin: 0;
47
- }
48
-
49
41
  .footer {
50
42
  padding: 30px 0;
51
43
  margin-top: 30px;
@@ -68,12 +60,36 @@ body {
68
60
  margin-right: 10px;
69
61
  }
70
62
 
71
- .scrollable {
63
+ .info-wrapper {
72
64
  background-color: #fff;
73
65
  border: 1px solid #ddd;
74
66
  -webkit-border-radius: 4px;
75
67
  -moz-border-radius: 4px;
76
68
  border-radius: 4px;
77
69
  background-color: transparent;
70
+ padding: 0;
71
+ }
72
+
73
+ .info-wrapper div, .info-wrapper table.table {
74
+ margin: 0;
75
+ }
76
+
77
+ .info-wrapper th {
78
+ font-style: italic;
79
+ }
80
+
81
+ .info-wrapper .span2 {
82
+ width: 180px;
83
+ }
84
+
85
+ .info-wrapper .span2 table.table {
86
+ border-right: 1px solid #ddd;
87
+ }
88
+
89
+ .info-wrapper .span10 {
90
+ width: 760px;
91
+ }
92
+
93
+ .scrollable {
78
94
  overflow: auto;
79
95
  }
@@ -150,7 +150,7 @@ var updateTable = function() {
150
150
  // Instance information (mostly static)
151
151
  for (var stat in js) {
152
152
  $("#" + stat).replaceWith(
153
- "<tr id='" + stat + "'><th>" + stat + "</th>" +
153
+ "<tr id='" + stat + "'>" +
154
154
  js[stat].map(function(e) { return "<td>" + (e == null ? "" : e) + "</td>" }).join() +
155
155
  "</tr>"
156
156
  )
@@ -74,31 +74,45 @@
74
74
  </div>
75
75
 
76
76
  <div class="row">
77
- <div class="span12 scrollable">
78
- <table id="info_table" class="table table-striped table-condensed table-hover">
79
- <thead>
80
- <tr>
81
- <td width="1"></td>
82
- <% @hosts.each do |host| %>
83
- <th class="text-info"><%= host %></th>
77
+ <div class="span12 info-wrapper">
78
+ <div class="span2">
79
+ <table class="table table-striped table-condensed">
80
+ <thead>
81
+ <tr>
82
+ <th>&nbsp;</th>
83
+ </tr>
84
+ </thead>
85
+ <tbody>
86
+ <% @tab_measures.each do |stat| %>
87
+ <tr>
88
+ <th><%= stat %></th>
89
+ </tr>
84
90
  <% end %>
85
- </tr>
86
- </thead>
87
- <tbody>
88
- <% @tab_measures.each do |stat| %>
89
- <tr id="<%= stat %>">
90
- <th>
91
- <%= stat %>
92
- </th>
93
- <% @hosts.each_with_index do |host, idx| %>
94
- <td>
95
- <%= @info[stat][idx] %>
96
- </td>
91
+ </tbody>
92
+ </table>
93
+ </div>
94
+ <div class="span10 scrollable">
95
+ <table class="table table-striped table-condensed">
96
+ <thead>
97
+ <tr>
98
+ <% @hosts.each do |host| %>
99
+ <th class="text-info"><%= host %></th>
100
+ <% end %>
101
+ </tr>
102
+ </thead>
103
+ <tbody>
104
+ <% @tab_measures.each do |stat| %>
105
+ <tr id="<%= stat %>">
106
+ <% @hosts.each_with_index do |host, idx| %>
107
+ <td>
108
+ <%= @info[stat][idx] %>
109
+ </td>
110
+ <% end %>
111
+ </tr>
97
112
  <% end %>
98
- </tr>
99
- <% end %>
100
- </tbody>
101
- </table>
113
+ </tbody>
114
+ </table>
115
+ </div>
102
116
  </div>
103
117
  </div>
104
118
 
@@ -1,3 +1,3 @@
1
1
  class RedisStat
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-stat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-21 00:00:00.000000000 Z
12
+ date: 2013-03-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ansi