sensu-dashboard 0.9.8.beta → 0.9.8.beta.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.
data/lib/sensu-dashboard/app.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
require 'sensu/base'
|
2
|
+
require 'thin'
|
3
|
+
require 'sinatra/async'
|
2
4
|
require 'em-http-request'
|
3
5
|
require 'em-websocket'
|
4
|
-
require 'sinatra/async'
|
5
6
|
require 'sass'
|
6
7
|
|
7
8
|
class Dashboard < Sinatra::Base
|
@@ -11,7 +12,9 @@ class Dashboard < Sinatra::Base
|
|
11
12
|
EM::run do
|
12
13
|
self.setup(options)
|
13
14
|
self.websocket_server
|
14
|
-
|
15
|
+
|
16
|
+
Thin::Logging.silent = true
|
17
|
+
Thin::Server.start(self, $settings[:dashboard][:port])
|
15
18
|
|
16
19
|
%w[INT TERM].each do |signal|
|
17
20
|
Signal.trap(signal) do
|
@@ -22,9 +25,9 @@ class Dashboard < Sinatra::Base
|
|
22
25
|
end
|
23
26
|
|
24
27
|
def self.setup(options={})
|
28
|
+
$logger = Cabin::Channel.get
|
25
29
|
base = Sensu::Base.new(options)
|
26
30
|
$settings = base.settings
|
27
|
-
$logger = base.logger
|
28
31
|
unless $settings[:dashboard].is_a?(Hash)
|
29
32
|
raise('missing dashboard configuration')
|
30
33
|
end
|
@@ -29,10 +29,10 @@
|
|
29
29
|
<div class="event_detail_group">
|
30
30
|
<div class="event_detail">
|
31
31
|
<div id="disable_client_alerts" class="action_btn" style="margin-right: 7px;">
|
32
|
-
<img src="/img/loading_circle.gif" style="vertical-align: middle; padding-right: 7px;"/><strong>Client</strong>
|
32
|
+
<img src="/img/loading_circle.gif" style="vertical-align: middle; padding-right: 7px;"/><strong>Silence Client</strong>
|
33
33
|
</div>
|
34
34
|
<div id="disable_client_check_alerts" class="action_btn" style="margin-right: 7px;">
|
35
|
-
<img src="/img/loading_circle.gif" style="vertical-align: middle; padding-right: 7px;"/><strong>Check</strong>
|
35
|
+
<img src="/img/loading_circle.gif" style="vertical-align: middle; padding-right: 7px;"/><strong>Silence Check</strong>
|
36
36
|
</div>
|
37
37
|
<div id="resolve_event" class="action_btn" style="margin-right: 7px;">
|
38
38
|
<img src="/img/cross.png" style="vertical-align: middle; padding-right: 7px;"/><strong>Resolve</strong>
|
@@ -53,6 +53,10 @@
|
|
53
53
|
<!-- all our JS is at the bottom of the page, except for Modernizr. -->
|
54
54
|
<script src="js/modernizr-1.7.min.js"></script>
|
55
55
|
|
56
|
+
<% if $settings['dashboard']['autorefresh'] %>
|
57
|
+
<!-- page autorefresh -->
|
58
|
+
<meta http-equiv="refresh" content="<%= $settings['dashboard']['autorefresh'] %>">
|
59
|
+
<% end %>
|
56
60
|
</head>
|
57
61
|
|
58
62
|
<body>
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-dashboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196337
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
9
|
- 8
|
10
10
|
- beta
|
11
|
-
|
11
|
+
- 1
|
12
|
+
version: 0.9.8.beta.1
|
12
13
|
platform: ruby
|
13
14
|
authors:
|
14
15
|
- Justin Kolberg
|
@@ -17,7 +18,7 @@ autorequire:
|
|
17
18
|
bindir: bin
|
18
19
|
cert_chain: []
|
19
20
|
|
20
|
-
date: 2012-
|
21
|
+
date: 2012-07-20 00:00:00 -07:00
|
21
22
|
default_executable:
|
22
23
|
dependencies:
|
23
24
|
- !ruby/object:Gem::Dependency
|