riemann-dash 0.2.10 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -187,12 +187,28 @@ dash = (function() {
187
187
  );
188
188
  }
189
189
 
190
+ var showconfig = function() {
191
+ stash();
192
+ var configTemplate = _.template("<div>{{- config }}</div>");
193
+ var rendered = configTemplate({config: JSON.stringify({
194
+ server: toolbar.server(),
195
+ server_type: toolbar.server_type(),
196
+ workspaces: workspaces
197
+ })});
198
+ var dialog = $(rendered);
199
+ dialog.modal({onClose: function() {
200
+ keys.enable();
201
+ $.modal.close();
202
+ }});
203
+ };
204
+
190
205
  var help = function() {
191
206
  var dialog = $(
192
207
  '<div><h1>Help</h1><ul>' +
193
208
  '<li><b>e</b>: edit the view</li>' +
194
209
  '<li><b>?</b>: display this help box</li>' +
195
210
  '<li><b>s</b>: save the dashboard</li>' +
211
+ '<li><b>c</b>: display the current config</li>' +
196
212
  '<li><b>r</b>: reload the dashboard from last saved config</li>' +
197
213
  '<li><b>+</b>: increase the size of the view</li>' +
198
214
  '<li><b>-</b>: decrease the size of the view</li>' +
@@ -221,6 +237,7 @@ dash = (function() {
221
237
  keys.bind(80, subs.toggle); // p
222
238
  keys.bind(82, reload); // r
223
239
  keys.bind(83, save); // s
240
+ keys.bind(67, showconfig); // c
224
241
  keys.bind(191, help); // ?
225
242
  keys.bind(49, function(e) { e.altKey && switchWorkspace(workspaces[0]) });
226
243
  keys.bind(50, function(e) { e.altKey && switchWorkspace(workspaces[1]) });
@@ -6,6 +6,7 @@
6
6
  this.query = json.query;
7
7
  this.title = json.title;
8
8
  this.max = json.max || null;
9
+ this.min = json.min || null;
9
10
  this.graphType = json.graphType || 'line';
10
11
  this.stackMode = json.stackMode || 'false';
11
12
  this.lineWidth = json.lineWidth || 1;
@@ -94,7 +95,7 @@
94
95
  },
95
96
  yaxis: {
96
97
  font: this.font,
97
- min: 0,
98
+ min: this.min,
98
99
  max: this.max
99
100
  },
100
101
  xaxis: {
@@ -241,6 +242,7 @@
241
242
  type: 'Flot',
242
243
  title: this.title,
243
244
  query: this.query,
245
+ min: this.min,
244
246
  max: this.max,
245
247
  timeRange: this.timeRange / 1000,
246
248
  graphType: this.graphType,
@@ -266,6 +268,10 @@
266
268
  '<textarea type="text" class="query" name="query">{{ query }}</textarea><br />' +
267
269
  '<label for="timeRange">Time range (s)</label>' +
268
270
  '<input type="text" name="timeRange" value="{{timeRange / 1000}}" />' +
271
+ '<br />' +
272
+ '<label for="min">Min</label>' +
273
+ '<input type="text" name="min" value="{{min}}" />' +
274
+ '<br />' +
269
275
  '<label for="max">Max</label>' +
270
276
  '<input type="text" name="max" value="{{max}}" />'
271
277
  );
@@ -37,7 +37,11 @@
37
37
  this.sub = subs.subscribe(this.query, function(e) {
38
38
  self.currentEvent = e;
39
39
  me.box.attr('class', 'box state ' + e.state);
40
- value.text(format.float(e.metric, 2, me.commaSeparateThousands));
40
+ if (e.metric != undefined) {
41
+ value.text(format.float(e.metric, 2, me.commaSeparateThousands));
42
+ } else if (e.state != undefined) {
43
+ value.text(e.state)
44
+ }
41
45
  value.attr('title', e.description);
42
46
 
43
47
  // The first time, do a full-height reflow.
@@ -8,7 +8,8 @@
8
8
  "<p>Need a refresher on the query language? See the <a href=\"https://github.com/aphyr/riemann/blob/master/test/riemann/query_test.clj\">query tests</a> for examples, or read the <a href=\"https://github.com/aphyr/riemann/blob/master/src/riemann/Query.g\">spec</a>.</p>" +
9
9
  "<p>Press <b>Control/Meta+click</b> to select a view. Escape unfocuses. Use the arrow keys to move a view. Use Control+arrow to <i>split</i> a view in the given direction.</p>" +
10
10
  "<p>To edit a view, hit e. Use enter, or click 'apply', to apply your changes. Escape cancels.</p>" +
11
- "<p>To save your changes to the server, press s. You can refresh the page, or press r to reload.</p>" +
11
+ "<p>To save your changes to the server, press s. To display the configuration, press c.</p>" +
12
+ "<p>You can refresh the page, or press r to reload.</p>" +
12
13
  "<p>Make views bigger and smaller with the +/- keys. Pageup selects the parent of the current view. To delete a view, use the delete key.</p>" +
13
14
  "<p>Switch between workspaces with alt-1, alt-2, etc.</p>" +
14
15
  "<p>View is an empty space. Title is an editable text title. Fullscreen and Balloon are top-level container views; you probably won't use them. HStack and VStack are the horizontal and vertical container views; they're implicitly created by splits, but you can create them yourself for fine control. Gauge shows a single event. Grid shows a table of events. Timeseries and Flot show metrics over time--Timeseries is deprecated; Flot will probably replace it.</p>" +
@@ -1,4 +1,4 @@
1
1
  module Riemann; end
2
2
  module Riemann::Dash
3
- VERSION = '0.2.10'
3
+ VERSION = '0.2.11'
4
4
  end
metadata CHANGED
@@ -1,32 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-dash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Kyle Kingsbury
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-01-06 00:00:00.000000000 Z
12
+ date: 2015-03-03 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: erubis
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: 2.7.0
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: 2.7.0
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: sinatra
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,20 +46,23 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: sass
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - '>='
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: 3.1.14
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - '>='
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: 3.1.14
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: webrick
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ~>
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ~>
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: multi_json
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - '='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - '='
81
92
  - !ruby/object:Gem::Version
@@ -190,26 +201,27 @@ files:
190
201
  - test/test_helper.rb
191
202
  homepage: https://github.com/aphyr/riemann-dash
192
203
  licenses: []
193
- metadata: {}
194
204
  post_install_message:
195
205
  rdoc_options: []
196
206
  require_paths:
197
207
  - lib
198
208
  required_ruby_version: !ruby/object:Gem::Requirement
209
+ none: false
199
210
  requirements:
200
- - - '>='
211
+ - - ! '>='
201
212
  - !ruby/object:Gem::Version
202
213
  version: '0'
203
214
  required_rubygems_version: !ruby/object:Gem::Requirement
215
+ none: false
204
216
  requirements:
205
- - - '>='
217
+ - - ! '>='
206
218
  - !ruby/object:Gem::Version
207
219
  version: '0'
208
220
  requirements: []
209
221
  rubyforge_project: riemann-dash
210
- rubygems_version: 2.0.14
222
+ rubygems_version: 1.8.25
211
223
  signing_key:
212
- specification_version: 4
224
+ specification_version: 3
213
225
  summary: HTTP dashboard for the distributed event system Riemann.
214
226
  test_files:
215
227
  - test/browser_config_test.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: c1c5f97ba41d86b262e340c7071d20d990dfacfd
4
- data.tar.gz: c93abeae7877cd6923002b3246e0a4e9fa31a38d
5
- SHA512:
6
- metadata.gz: 55a17113c9830e91dbcc85552727481ff483ecd949f098eb27b1d77919362e28f210edc71da6bc25b8e6ca2ad35c08203cc53c38100fc699ff207844b384471a
7
- data.tar.gz: 4008c69a5b998b36319fefdbb518768fafe1cdc88ec96bf6607aca622c8ec9cc0488c28a5630ee605b8a67732ba8c9b786e9e46acc501834191c5ce5782f7ee5