redis-stat 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,12 +39,12 @@
39
39
  </div>
40
40
  <div class="row">
41
41
  <div class="span12">
42
- <table id="stat_table" class="table table-striped table-bordered table-condensed">
42
+ <table id="stat_table" class="table table-striped table-bordered table-condensed <%= @verbose %>">
43
43
  <thead>
44
44
  <tr>
45
45
  <% @measures.each do |m| %>
46
46
  <th>
47
- <h5 class="text-info">
47
+ <h5 class="text-info <%= @verbose %>">
48
48
  <a href="#" rel="tooltip" title="<%= m %>">
49
49
  <%= RedisStat::LABELS[m] %>
50
50
  </a>
@@ -54,7 +54,7 @@
54
54
  </tr>
55
55
  </thead>
56
56
  <tbody id="info">
57
- <% 10.times do %>
57
+ <% RedisStat::Server::STAT_TABLE_ROWS.times do %>
58
58
  <tr><td colspan="<%= @measures.length %>">&nbsp;</td></tr>
59
59
  <% end %>
60
60
  </tbody>
@@ -100,7 +100,8 @@
100
100
  </div>
101
101
 
102
102
  <a href="https://github.com/junegunn/redis-stat">
103
- <img style="position: fixed; top: 0; right: 0; border: 0; z-index: 10000" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
103
+ <img style="position: fixed; top: 0; right: 0; border: 0; z-index: 10000" src="/forkme.png" alt="Fork me on GitHub">
104
+ </a>
104
105
 
105
106
  <div class="modal hide fade" id="fail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
106
107
  <div class="modal-header">
@@ -117,23 +118,27 @@
117
118
 
118
119
  <footer class="footer">
119
120
  <div class="container">
120
- <p>Designed and implemented by <a href="https://github.com/junegunn">Junegunn Choi</a>.</p>
121
121
  <p>Powered by <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>, <a href="http://jquery.com/">jQuery</a> and <a href="http://www.jqplot.com/">jqPlot</a>.</p>
122
-
123
122
  </div>
124
123
  </footer>
125
124
 
126
125
  <script>
127
126
  $(function() {
128
- initialize(
129
- <%= @measures.to_json %>,
130
- <%= Hash[@measures.map { |m| [m, RedisStat::COLORS[m].join(' ')] }].to_json %>)
127
+ initialize({
128
+ measures: <%= @measures.to_json %>,
129
+ colors: <%= Hash[@measures.map { |m| [m, RedisStat::COLORS[m].join(' ')] }].to_json %>,
130
+ history: <%= @history.to_json %>,
131
+ max: <%= RedisStat::Server::HISTORY_LENGTH %>,
132
+ fade_dur: <%= @interval < 1 ? 0 : 300 %>,
133
+ rows: <%= RedisStat::Server::STAT_TABLE_ROWS %>})
131
134
 
132
135
  $("#stat_table th a").tooltip()
133
136
 
134
137
  var source = new EventSource("/pull")
135
138
  source.onmessage = function(e) {
136
- update(JSON.parse(e.data))
139
+ appendToHistory(JSON.parse(e.data))
140
+ updateTable()
141
+ updatePlot()
137
142
  }
138
143
  source.onerror = function(e) {
139
144
  source.close()
@@ -1,3 +1,3 @@
1
1
  class RedisStat
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/redis-stat.gemspec CHANGED
@@ -4,8 +4,8 @@ require File.expand_path('../lib/redis-stat/version', __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ["Junegunn Choi"]
6
6
  gem.email = ["junegunn.c@gmail.com"]
7
- gem.description = %q{A Redis monitoring tool written in Ruby}
8
- gem.summary = %q{A Redis monitoring tool written in Ruby}
7
+ gem.description = %q{A real-time Redis monitoring tool written in Ruby}
8
+ gem.summary = %q{A real-time Redis monitoring tool written in Ruby}
9
9
  gem.homepage = "https://github.com/junegunn/redis-stat"
10
10
 
11
11
  gem.platform = 'java' if RUBY_PLATFORM == 'java'
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.0
4
+ version: 0.3.1
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: 2012-10-26 00:00:00.000000000 Z
12
+ date: 2012-10-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ansi
@@ -187,7 +187,7 @@ dependencies:
187
187
  - - ! '>='
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
- description: A Redis monitoring tool written in Ruby
190
+ description: A real-time Redis monitoring tool written in Ruby
191
191
  email:
192
192
  - junegunn.c@gmail.com
193
193
  executables:
@@ -213,6 +213,7 @@ files:
213
213
  - lib/redis-stat/server/public/css/site.css
214
214
  - lib/redis-stat/server/public/favicon.ico
215
215
  - lib/redis-stat/server/public/favicon.png
216
+ - lib/redis-stat/server/public/forkme.png
216
217
  - lib/redis-stat/server/public/jqplot/jqplot.canvasAxisLabelRenderer.min.js
217
218
  - lib/redis-stat/server/public/jqplot/jqplot.canvasAxisTickRenderer.min.js
218
219
  - lib/redis-stat/server/public/jqplot/jqplot.canvasTextRenderer.min.js
@@ -248,7 +249,7 @@ rubyforge_project:
248
249
  rubygems_version: 1.8.24
249
250
  signing_key:
250
251
  specification_version: 3
251
- summary: A Redis monitoring tool written in Ruby
252
+ summary: A real-time Redis monitoring tool written in Ruby
252
253
  test_files:
253
254
  - test/bin_helper.rb
254
255
  - test/test_redis-stat.rb