sensu-dashboard-sonian 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/.gitignore +6 -0
  2. data/Gemfile +4 -0
  3. data/MIT-LICENSE.txt +20 -0
  4. data/README.org +4 -0
  5. data/Rakefile +1 -0
  6. data/bin/sensu-dashboard +9 -0
  7. data/lib/sensu-dashboard/app.rb +449 -0
  8. data/lib/sensu-dashboard/public/css/autoSuggest.css +217 -0
  9. data/lib/sensu-dashboard/public/css/style.css +177 -0
  10. data/lib/sensu-dashboard/public/img/cross.png +0 -0
  11. data/lib/sensu-dashboard/public/img/footer_bg.png +0 -0
  12. data/lib/sensu-dashboard/public/img/header_bg.png +0 -0
  13. data/lib/sensu-dashboard/public/img/loading_circle.gif +0 -0
  14. data/lib/sensu-dashboard/public/img/main_content_bg.png +0 -0
  15. data/lib/sensu-dashboard/public/img/megaphone_icon.png +0 -0
  16. data/lib/sensu-dashboard/public/img/megaphone_icon_off.png +0 -0
  17. data/lib/sensu-dashboard/public/js/FABridge.js +604 -0
  18. data/lib/sensu-dashboard/public/js/functions.js +379 -0
  19. data/lib/sensu-dashboard/public/js/jquery-1.5.1.min.js +16 -0
  20. data/lib/sensu-dashboard/public/js/jquery.autoSuggest.js +375 -0
  21. data/lib/sensu-dashboard/public/js/jquery.leanModal.min.js +1 -0
  22. data/lib/sensu-dashboard/public/js/jquery.sortElements.js +69 -0
  23. data/lib/sensu-dashboard/public/js/jquery.tmpl.min.js +1 -0
  24. data/lib/sensu-dashboard/public/js/jquery.zclip.min.js +12 -0
  25. data/lib/sensu-dashboard/public/js/modernizr-1.7.min.js +2 -0
  26. data/lib/sensu-dashboard/public/js/swfobject.js +4 -0
  27. data/lib/sensu-dashboard/public/js/web_socket.js +312 -0
  28. data/lib/sensu-dashboard/public/js/webtoolkit.sha1.js +174 -0
  29. data/lib/sensu-dashboard/public/swf/WebSocketMain.swf +0 -0
  30. data/lib/sensu-dashboard/public/swf/ZeroClipboard.swf +0 -0
  31. data/lib/sensu-dashboard/version.rb +5 -0
  32. data/lib/sensu-dashboard/views/client_templates.erb +68 -0
  33. data/lib/sensu-dashboard/views/clients.erb +37 -0
  34. data/lib/sensu-dashboard/views/event_templates.erb +190 -0
  35. data/lib/sensu-dashboard/views/index.erb +48 -0
  36. data/lib/sensu-dashboard/views/layout.erb +124 -0
  37. data/lib/sensu-dashboard/views/sonian.sass +213 -0
  38. data/lib/sensu-dashboard/views/stash_templates.erb +44 -0
  39. data/lib/sensu-dashboard/views/stashes.erb +32 -0
  40. data/sensu-dashboard.gemspec +22 -0
  41. metadata +166 -0
@@ -0,0 +1,213 @@
1
+ body
2
+ background-color: #c0c0c0
3
+ background-image: url('../img/footer_bg.png')
4
+ z-index: 1
5
+
6
+ header
7
+ background-color: #992222
8
+ background-image: url('../img/header_bg.png')
9
+ padding: 15px 20px
10
+ font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", sans-serif
11
+ font-weight: 300
12
+ border-bottom: 1px solid #bbb
13
+ h1
14
+ font-family: Helvetica Neue Ultra Light
15
+ font-size: 18px
16
+ font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", sans-serif
17
+ font-weight: 300
18
+ a
19
+ color: #fafafa
20
+ text-decoration: none
21
+ float: left
22
+ text-shadow: 0 1px 0 #333
23
+ &:hover
24
+ color: #fa9999
25
+ text-shadow: 0 1px 0 #333
26
+ nav
27
+ float: right
28
+ margin-right: 30px
29
+ ol
30
+ list-style: none
31
+ margin: 0
32
+ padding: 0
33
+ li
34
+ margin: 0
35
+ padding: 0 0 0 30px
36
+ font-size: 14px
37
+ font-weight: 300
38
+ float: right
39
+ a
40
+ color: #fafafa
41
+ text-shadow: 0 1px 0 #333
42
+ &:hover
43
+ color: #fa9999
44
+ text-shadow: 0 1px 0 #333
45
+
46
+ section#main_content
47
+ background-color: #eee
48
+ background-image: url('../img/main_content_bg.png')
49
+ padding: 20px
50
+ border-bottom: 1px solid #a0a0a0
51
+ color: #333
52
+ h1
53
+ font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", sans-serif
54
+ font-weight: 300
55
+ font-size: 16px
56
+ margin-bottom: 20px
57
+ text-shadow: 0 1px 0 white
58
+ /*-webkit-box-shadow: 0 -1px 0 rgba(0,0,0,0.15);
59
+ *-moz-box-shadow: 0 -1px 0 rgba(0,0,0,0.15);
60
+ *box-shadow: 0 -1px 0 rgba(0,0,0,0.15);
61
+ table
62
+ //table-layout: fixed
63
+ width: 100%
64
+ thead tr
65
+ cursor: pointer
66
+ th
67
+ padding: 7px
68
+ font-weight: 600
69
+ font-size: 14px
70
+ text-shadow: 0 1px 0 white
71
+ text-align: left
72
+ tbody tr
73
+ background-color: #fff
74
+ cursor: pointer
75
+ border-bottom: 1px solid #ccc
76
+ &.status2
77
+ background-color: #b55
78
+ color: #fff
79
+ border-bottom: 1px solid #933
80
+ &.status1
81
+ background-color: #fff
82
+ border-bottom: 1px solid #ccc
83
+ &.status3
84
+ background-color: #ffffee
85
+ border-bottom: 1px solid #fffbb5
86
+ &:first-child
87
+ &.status2
88
+ border-top: 1px solid #933
89
+ &.status1
90
+ border-top: 1px solid #ccc
91
+ &.status3
92
+ border-top: 1px solid #fffbb5
93
+ &.status2:hover, &.status1:hover, &.status3:hover, &:hover
94
+ background-color: #992222
95
+ color: #fff
96
+ border-bottom: 1px solid #880000
97
+ border-top: 1px solid #880000
98
+ td
99
+ padding: 7px
100
+ white-space: nowrap
101
+ &#output
102
+ white-space: normal
103
+ word-break: break-all
104
+ width: 100%
105
+ &#subscriptions
106
+ white-space: normal
107
+ word-break: break-all
108
+ width: 100%
109
+ table#clients
110
+ table-layout: auto
111
+ tbody
112
+ tr:first-child
113
+ border-top: 1px solid #ccc
114
+ tr
115
+ border-bottom: 1px solid #ccc
116
+ tr:hover
117
+ background-color: #992222
118
+ color: #fff
119
+ border-bottom: 1px solid #880000
120
+ border-top: 1px solid #880000
121
+ div.event_details_modal
122
+ background-color: white
123
+ width: 600px
124
+ padding: 30px
125
+ display: none
126
+ border-radius: 5px
127
+ -moz-border-radius: 5px
128
+ -webkit-border-radius: 5px
129
+ box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.7)
130
+ -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.7)
131
+ -moz-box-shadow: 0 0px 4px rgba(0, 0, 0, 0.7)
132
+ h1.section_title
133
+ margin: 20px 0 10px 0
134
+ font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", sans-serif
135
+ font-weight: 300
136
+ font-size: 16px
137
+ -moz-user-select: none
138
+ -khtml-user-select: none
139
+ user-select: none
140
+ h1.section_title:first-child
141
+ margin-top: 0
142
+ div
143
+ &.event_detail_group
144
+ background-color: #f0f0f0
145
+ margin-bottom: 10px
146
+ padding: 7px
147
+ border-radius: 5px
148
+ -moz-border-radius: 5px
149
+ -webkit-border-radius: 5px
150
+ overflow: hidden
151
+ &:last-child
152
+ margin-bottom: 0
153
+ div.event_detail
154
+ float: left
155
+ h1
156
+ font-size: 13px
157
+ margin-bottom: 7px
158
+ color: #333
159
+ font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", sans-serif
160
+ font-weight: bold
161
+ margin-bottom: 4px
162
+ text-shadow: none
163
+ &.action_btn
164
+ float: left
165
+ margin-right: 7px
166
+ padding: 7px
167
+ background-color: #933
168
+ color: white
169
+ border: 1px solid #880000
170
+ border-radius: 5px
171
+ -moz-border-radius: 5px
172
+ -webkit-border-radius: 5px
173
+ cursor: pointer
174
+ -moz-user-select: none
175
+ -khtml-user-select: none
176
+ user-select: none
177
+ &.copy
178
+ float: right
179
+ margin-right: 0
180
+ &:hover
181
+ background-color: #b33
182
+ &:active
183
+ background-color: #733
184
+
185
+ footer
186
+ border-top: 1px solid #ccc
187
+ text-align: center
188
+ padding-top: 7px
189
+ color: #333
190
+ text-shadow: 0 1px 0 #ccc
191
+ a
192
+ color: #333
193
+ &:hover
194
+ color: #992222
195
+
196
+ span.events_count
197
+ color: #992222
198
+
199
+ #lean_overlay
200
+ position: fixed
201
+ z-index: 100
202
+ top: 0px
203
+ left: 0px
204
+ height: 100%
205
+ width: 100%
206
+ background: #000
207
+ display: none
208
+
209
+ a
210
+ color: #992222
211
+ text-decoration: none
212
+ &:hover
213
+ color: #550000
@@ -0,0 +1,44 @@
1
+ <!-- Stash template -->
2
+ <script id="stashTemplate" type="text/x-jquery-tmpl">
3
+ <tr id="${name}" rel="leanModal" href="#event_details_modal">
4
+ <td>${name}</td><td>${keys}</td>
5
+ </tr>
6
+ </script>
7
+
8
+ <!-- Stash details row template -->
9
+ <script id="stashDetailsTemplate" type="text/x-jquery-tmpl">
10
+ <h1 class="section_title">Actions</h1>
11
+ <div id="event_actions">
12
+ <div class="event_detail_group">
13
+ <div class="event_detail">
14
+ <div id="delete_stash" class="action_btn" style="margin-right: 7px;">
15
+ <img src="/img/cross.png" style="vertical-align: middle; padding-right: 7px;"/><strong>Delete Stash</strong>
16
+ </div>
17
+ </div>
18
+ <div style="clear: both;"></div>
19
+ </div>
20
+ </div>
21
+ <h1 class="section_title">Stash Information</h1>
22
+ <div class="event_detail_group">
23
+ <h1>Path</h1>
24
+ <p>${name}</p>
25
+ </div>
26
+ <div style="clear: both;"></div>
27
+ <h1 class="section_title">Stash Data</h1>
28
+ {{each values}}
29
+ <div class="event_detail_group">
30
+ <h1>${$value['name']}</h1>
31
+ <p>${$value['value']}</p>
32
+ </div>
33
+ {{/each}}
34
+ <div style="clear: both;"></div>
35
+ </script>
36
+
37
+ <script type="text/javascript">
38
+ fetchStashes();
39
+
40
+ ws = new WebSocket("ws://" + location.hostname + ":9000");
41
+ ws.onmessage = function(evt) {
42
+ fetchStashes();
43
+ }
44
+ </script>
@@ -0,0 +1,32 @@
1
+ <h1>Stashes</h1>
2
+
3
+ <table id="events">
4
+
5
+ <thead>
6
+
7
+ <tr>
8
+ <td class="col_clients">Path</td>
9
+ <td class="col_checks">Keys</td>
10
+ </tr>
11
+
12
+ </thead>
13
+
14
+ <tbody></tbody>
15
+
16
+ </table>
17
+
18
+ <div id="event_details_modal" class="event_details_modal">
19
+ <h1 class="section_title">Actions</h1>
20
+ <div id="event_actions">
21
+ <div class="event_detail_group">
22
+ <div class="event_detail">
23
+ <div id="delete_stash" class="action_btn" style="margin-right: 7px;">
24
+ <img src="/img/cross.png" style="vertical-align: middle; padding-right: 7px;"/><strong>Delete Stash</strong>
25
+ </div>
26
+ </div>
27
+ <div style="clear: both;"></div>
28
+ </div>
29
+ </div>
30
+ <h1 class="section_title">Stash Data</h1>
31
+ <div id="stash_data"></div>
32
+ </div>
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "sensu-dashboard/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "sensu-dashboard-sonian"
7
+ s.version = Sensu::Dashboard::VERSION
8
+ s.authors = ["Justin Kolberg", "Sean Porter"]
9
+ s.email = ["justin.kolberg@sonian.net", "sean.porter@sonian.net"]
10
+ s.homepage = "https://github.com/sonian/sensu-dashboard"
11
+ s.summary = %q{A web interface for sensu, a publish/subscribe server monitoring framework}
12
+ s.description = %q{Display current events and clients in sensu via a simple web interface. Please use the sensu-dashboard gem as this gem is for Sonian use only.}
13
+
14
+ s.add_dependency("sensu")
15
+ s.add_dependency("em-http-request", "0.3.0")
16
+ s.add_dependency("em-websocket")
17
+ s.add_dependency("sass")
18
+
19
+ s.files = `git ls-files`.split("\n")
20
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
+ s.require_paths = ["lib"]
22
+ end
metadata ADDED
@@ -0,0 +1,166 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sensu-dashboard-sonian
3
+ version: !ruby/object:Gem::Version
4
+ hash: 61
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 9
9
+ - 3
10
+ version: 0.9.3
11
+ platform: ruby
12
+ authors:
13
+ - Justin Kolberg
14
+ - Sean Porter
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+
19
+ date: 2011-12-27 00:00:00 -08:00
20
+ default_executable:
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
23
+ name: sensu
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 3
31
+ segments:
32
+ - 0
33
+ version: "0"
34
+ type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: em-http-request
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - "="
43
+ - !ruby/object:Gem::Version
44
+ hash: 19
45
+ segments:
46
+ - 0
47
+ - 3
48
+ - 0
49
+ version: 0.3.0
50
+ type: :runtime
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: em-websocket
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ hash: 3
61
+ segments:
62
+ - 0
63
+ version: "0"
64
+ type: :runtime
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ name: sass
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ type: :runtime
79
+ version_requirements: *id004
80
+ description: Display current events and clients in sensu via a simple web interface. Please use the sensu-dashboard gem as this gem is for Sonian use only.
81
+ email:
82
+ - justin.kolberg@sonian.net
83
+ - sean.porter@sonian.net
84
+ executables:
85
+ - sensu-dashboard
86
+ extensions: []
87
+
88
+ extra_rdoc_files: []
89
+
90
+ files:
91
+ - .gitignore
92
+ - Gemfile
93
+ - MIT-LICENSE.txt
94
+ - README.org
95
+ - Rakefile
96
+ - bin/sensu-dashboard
97
+ - lib/sensu-dashboard/app.rb
98
+ - lib/sensu-dashboard/public/css/autoSuggest.css
99
+ - lib/sensu-dashboard/public/css/style.css
100
+ - lib/sensu-dashboard/public/img/cross.png
101
+ - lib/sensu-dashboard/public/img/footer_bg.png
102
+ - lib/sensu-dashboard/public/img/header_bg.png
103
+ - lib/sensu-dashboard/public/img/loading_circle.gif
104
+ - lib/sensu-dashboard/public/img/main_content_bg.png
105
+ - lib/sensu-dashboard/public/img/megaphone_icon.png
106
+ - lib/sensu-dashboard/public/img/megaphone_icon_off.png
107
+ - lib/sensu-dashboard/public/js/FABridge.js
108
+ - lib/sensu-dashboard/public/js/functions.js
109
+ - lib/sensu-dashboard/public/js/jquery-1.5.1.min.js
110
+ - lib/sensu-dashboard/public/js/jquery.autoSuggest.js
111
+ - lib/sensu-dashboard/public/js/jquery.leanModal.min.js
112
+ - lib/sensu-dashboard/public/js/jquery.sortElements.js
113
+ - lib/sensu-dashboard/public/js/jquery.tmpl.min.js
114
+ - lib/sensu-dashboard/public/js/jquery.zclip.min.js
115
+ - lib/sensu-dashboard/public/js/modernizr-1.7.min.js
116
+ - lib/sensu-dashboard/public/js/swfobject.js
117
+ - lib/sensu-dashboard/public/js/web_socket.js
118
+ - lib/sensu-dashboard/public/js/webtoolkit.sha1.js
119
+ - lib/sensu-dashboard/public/swf/WebSocketMain.swf
120
+ - lib/sensu-dashboard/public/swf/ZeroClipboard.swf
121
+ - lib/sensu-dashboard/version.rb
122
+ - lib/sensu-dashboard/views/client_templates.erb
123
+ - lib/sensu-dashboard/views/clients.erb
124
+ - lib/sensu-dashboard/views/event_templates.erb
125
+ - lib/sensu-dashboard/views/index.erb
126
+ - lib/sensu-dashboard/views/layout.erb
127
+ - lib/sensu-dashboard/views/sonian.sass
128
+ - lib/sensu-dashboard/views/stash_templates.erb
129
+ - lib/sensu-dashboard/views/stashes.erb
130
+ - sensu-dashboard.gemspec
131
+ has_rdoc: true
132
+ homepage: https://github.com/sonian/sensu-dashboard
133
+ licenses: []
134
+
135
+ post_install_message:
136
+ rdoc_options: []
137
+
138
+ require_paths:
139
+ - lib
140
+ required_ruby_version: !ruby/object:Gem::Requirement
141
+ none: false
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ hash: 3
146
+ segments:
147
+ - 0
148
+ version: "0"
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ hash: 3
155
+ segments:
156
+ - 0
157
+ version: "0"
158
+ requirements: []
159
+
160
+ rubyforge_project:
161
+ rubygems_version: 1.3.7
162
+ signing_key:
163
+ specification_version: 3
164
+ summary: A web interface for sensu, a publish/subscribe server monitoring framework
165
+ test_files: []
166
+