sensu-dashboard 0.10.1 → 0.10.2

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.
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  A front-end dashboard for the Sensu monitoring framework.
4
4
 
5
5
  ## Documentation
6
- Please refer to the [Sensu Wiki](https://github.com/sensu/sensu/wiki).
6
+ Please refer to the Sensu documentation on [sensuapp.org/docs](http://sensuapp.org/docs) for more information.
7
7
 
8
8
  ## License
9
9
  Sensu is released under the [MIT license](https://raw.github.com/sensu/sensu-dashboard/master/MIT-LICENSE.txt).
@@ -8,4 +8,12 @@ Handlebars.registerHelper "truncate", (text, length) ->
8
8
  return truncated
9
9
 
10
10
  Handlebars.registerHelper "strip", (text) ->
11
- return text.toString().replace(/^\s\s*/, '').replace(/\s\s*$/, '')
11
+ return text.toString().replace(/^\s\s*/, '').replace(/\s\s*$/, '')
12
+
13
+ Handlebars.registerHelper "linkify", (text) ->
14
+ exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig
15
+ return text.toString().replace(exp,"<a href='$1'>$1</a>")
16
+
17
+ Handlebars.registerHelper "modalValue", (text) ->
18
+ linkified = Handlebars.helpers.linkify(text)
19
+ return Handlebars.helpers.strip(linkified)
@@ -10,7 +10,7 @@
10
10
  <div class="well">
11
11
  {{#each event}}
12
12
  {{#if this}}
13
- <strong>{{@key}}</strong> <span class="modal_value">{{strip this}}</span><br/>
13
+ <strong>{{@key}}</strong> <span class="modal_value">{{{modalValue this}}}</span><br/>
14
14
  {{/if}}
15
15
  {{/each}}
16
16
  </div>
@@ -19,7 +19,7 @@
19
19
  <div class="well">
20
20
  {{#each client}}
21
21
  {{#if this}}
22
- <strong>{{@key}}</strong> <span class="modal_value">{{this}}</span><br />
22
+ <strong>{{@key}}</strong> <span class="modal_value">{{{modalValue this}}}</span><br />
23
23
  {{/if}}
24
24
  {{/each}}
25
25
  </div>
@@ -1,7 +1,7 @@
1
1
  module Sensu
2
2
  module Dashboard
3
3
  unless defined?(Sensu::Dashboard::VERSION)
4
- VERSION = '0.10.1'
4
+ VERSION = '0.10.2'
5
5
  end
6
6
  end
7
7
  end
@@ -207,7 +207,9 @@ module Sensu::Dashboard
207
207
 
208
208
  multi.callback do
209
209
  empty_body = routes.detect do |route|
210
- multi.responses[:callback][route].response == ""
210
+ if multi.responses[:callback][route]
211
+ multi.responses[:callback][route].response == ""
212
+ end
211
213
  end
212
214
 
213
215
  unless multi.responses[:errback].keys.count > 0 || empty_body
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-dashboard
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
4
+ hash: 51
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 10
9
- - 1
10
- version: 0.10.1
9
+ - 2
10
+ version: 0.10.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Kolberg
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2013-10-23 00:00:00 -07:00
19
+ date: 2013-11-22 00:00:00 -08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency