sensu-dashboard 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +0 -0
- data/README.md +9 -0
- data/bin/sensu-dashboard +8 -7
- data/lib/sensu-dashboard.rb +3 -0
- data/lib/sensu-dashboard/assets/javascripts/app.js +38 -0
- data/lib/sensu-dashboard/assets/javascripts/application.coffee +21 -0
- data/lib/sensu-dashboard/assets/javascripts/bootstrapper.coffee +39 -0
- data/lib/sensu-dashboard/assets/javascripts/collections/base.coffee +22 -0
- data/lib/sensu-dashboard/assets/javascripts/collections/checks.coffee +8 -0
- data/lib/sensu-dashboard/assets/javascripts/collections/clients.coffee +83 -0
- data/lib/sensu-dashboard/assets/javascripts/collections/events.coffee +184 -0
- data/lib/sensu-dashboard/assets/javascripts/collections/stashes.coffee +37 -0
- data/lib/sensu-dashboard/assets/javascripts/config/states.coffee +30 -0
- data/lib/sensu-dashboard/assets/javascripts/handlebars_helpers.coffee +2 -0
- data/lib/sensu-dashboard/assets/javascripts/libs/backbone-min.js +4 -0
- data/lib/sensu-dashboard/assets/javascripts/libs/bootstrap.min.js +7 -0
- data/lib/sensu-dashboard/assets/javascripts/libs/jquery-1.9.1.min.js +5 -0
- data/lib/sensu-dashboard/assets/javascripts/libs/liquid.metal.js +107 -0
- data/lib/sensu-dashboard/assets/javascripts/libs/lodash.underscore.min.js +34 -0
- data/lib/sensu-dashboard/assets/javascripts/libs/retina.js +3 -0
- data/lib/sensu-dashboard/assets/javascripts/libs/scroll.into.view.js +32 -0
- data/lib/sensu-dashboard/assets/javascripts/libs/toastr.min.js +1 -0
- data/lib/sensu-dashboard/assets/javascripts/libs/token.field.coffee +173 -0
- data/lib/sensu-dashboard/assets/javascripts/matcher.coffee +34 -0
- data/lib/sensu-dashboard/assets/javascripts/models/check.coffee +11 -0
- data/lib/sensu-dashboard/assets/javascripts/models/client.coffee +58 -0
- data/lib/sensu-dashboard/assets/javascripts/models/event.coffee +78 -0
- data/lib/sensu-dashboard/assets/javascripts/models/info.coffee +58 -0
- data/lib/sensu-dashboard/assets/javascripts/models/metadata/events.coffee +21 -0
- data/lib/sensu-dashboard/assets/javascripts/models/stash.coffee +34 -0
- data/lib/sensu-dashboard/assets/javascripts/namespace.coffee +17 -0
- data/lib/sensu-dashboard/assets/javascripts/state.coffee +33 -0
- data/lib/sensu-dashboard/assets/javascripts/state_manager.coffee +52 -0
- data/lib/sensu-dashboard/assets/javascripts/states/main_state.coffee +6 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/autocomplete/results_check_item.hbs +1 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/autocomplete/results_check_token.hbs +1 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/autocomplete/results_client_item.hbs +1 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/autocomplete/results_client_token.hbs +1 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/autocomplete/results_query_item.hbs +1 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/autocomplete/results_query_token.hbs +1 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/checks/index.hbs +10 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/checks/list.hbs +12 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/checks/list_item.hbs +5 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/clients/counts.hbs +6 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/clients/index.hbs +26 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/clients/list.hbs +12 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/clients/list_item.hbs +14 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/clients/modal.hbs +30 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/empty_list.hbs +4 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/error.hbs +5 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/events/counts.hbs +9 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/events/index.hbs +33 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/events/list.hbs +11 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/events/list_item.hbs +18 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/events/modal.hbs +47 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/info/index.hbs +54 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/modal.hbs +17 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/stashes/counts.hbs +6 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/stashes/index.hbs +22 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/stashes/list.hbs +10 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/stashes/list_item.hbs +5 -0
- data/lib/sensu-dashboard/assets/javascripts/templates/stashes/modal.hbs +25 -0
- data/lib/sensu-dashboard/assets/javascripts/views/auto_complete/auto_complete_field.coffee +133 -0
- data/lib/sensu-dashboard/assets/javascripts/views/auto_complete/auto_complete_results.coffee +135 -0
- data/lib/sensu-dashboard/assets/javascripts/views/auto_complete/auto_complete_token.coffee +31 -0
- data/lib/sensu-dashboard/assets/javascripts/views/base.coffee +16 -0
- data/lib/sensu-dashboard/assets/javascripts/views/checks/index.coffee +18 -0
- data/lib/sensu-dashboard/assets/javascripts/views/checks/list.coffee +48 -0
- data/lib/sensu-dashboard/assets/javascripts/views/checks/list_item.coffee +17 -0
- data/lib/sensu-dashboard/assets/javascripts/views/clients/counts.coffee +13 -0
- data/lib/sensu-dashboard/assets/javascripts/views/clients/index.coffee +83 -0
- data/lib/sensu-dashboard/assets/javascripts/views/clients/list.coffee +56 -0
- data/lib/sensu-dashboard/assets/javascripts/views/clients/list_item.coffee +20 -0
- data/lib/sensu-dashboard/assets/javascripts/views/clients/modal.coffee +83 -0
- data/lib/sensu-dashboard/assets/javascripts/views/error.coffee +17 -0
- data/lib/sensu-dashboard/assets/javascripts/views/events/counts.coffee +12 -0
- data/lib/sensu-dashboard/assets/javascripts/views/events/index.coffee +143 -0
- data/lib/sensu-dashboard/assets/javascripts/views/events/list.coffee +52 -0
- data/lib/sensu-dashboard/assets/javascripts/views/events/list_item.coffee +25 -0
- data/lib/sensu-dashboard/assets/javascripts/views/events/modal.coffee +129 -0
- data/lib/sensu-dashboard/assets/javascripts/views/info/index.coffee +13 -0
- data/lib/sensu-dashboard/assets/javascripts/views/list.coffee +44 -0
- data/lib/sensu-dashboard/assets/javascripts/views/list_item.coffee +14 -0
- data/lib/sensu-dashboard/assets/javascripts/views/modal.coffee +25 -0
- data/lib/sensu-dashboard/assets/javascripts/views/stashes/counts.coffee +13 -0
- data/lib/sensu-dashboard/assets/javascripts/views/stashes/index.coffee +49 -0
- data/lib/sensu-dashboard/assets/javascripts/views/stashes/list.coffee +45 -0
- data/lib/sensu-dashboard/assets/javascripts/views/stashes/list_item.coffee +28 -0
- data/lib/sensu-dashboard/assets/javascripts/views/stashes/modal.coffee +46 -0
- data/lib/sensu-dashboard/assets/stylesheets/app.css +5 -0
- data/lib/sensu-dashboard/assets/stylesheets/libs/bootstrap.min.css +717 -0
- data/lib/sensu-dashboard/assets/stylesheets/libs/font-awesome.less +537 -0
- data/lib/sensu-dashboard/assets/stylesheets/libs/toastr.min.css +1 -0
- data/lib/sensu-dashboard/assets/stylesheets/main.sass +414 -0
- data/lib/sensu-dashboard/constants.rb +7 -0
- data/lib/sensu-dashboard/public/favicon.ico +0 -0
- data/lib/sensu-dashboard/public/font/FontAwesome.otf +0 -0
- data/lib/sensu-dashboard/public/font/fontawesome-webfont.eot +0 -0
- data/lib/sensu-dashboard/public/font/fontawesome-webfont.svg +284 -0
- data/lib/sensu-dashboard/public/font/fontawesome-webfont.ttf +0 -0
- data/lib/sensu-dashboard/public/font/fontawesome-webfont.woff +0 -0
- data/lib/sensu-dashboard/public/img/favicon_114.png +0 -0
- data/lib/sensu-dashboard/public/img/favicon_144.png +0 -0
- data/lib/sensu-dashboard/public/img/favicon_57.png +0 -0
- data/lib/sensu-dashboard/public/img/favicon_64.png +0 -0
- data/lib/sensu-dashboard/public/img/favicon_72.png +0 -0
- data/lib/sensu-dashboard/public/img/glyphicons-halflings-white.png +0 -0
- data/lib/sensu-dashboard/public/img/glyphicons-halflings.png +0 -0
- data/lib/sensu-dashboard/public/img/loading.gif +0 -0
- data/lib/sensu-dashboard/public/img/logo.png +0 -0
- data/lib/sensu-dashboard/public/img/logo@2x.png +0 -0
- data/lib/sensu-dashboard/server.rb +337 -0
- data/lib/sensu-dashboard/views/layout.slim +49 -0
- data/lib/sensu-dashboard/views/main.slim +3 -0
- data/sensu-dashboard.gemspec +21 -11
- metadata +308 -120
- data/.gitignore +0 -6
- data/Gemfile +0 -4
- data/README.org +0 -4
- data/Rakefile +0 -1
- data/lib/sensu-dashboard/app.rb +0 -439
- data/lib/sensu-dashboard/public/css/autoSuggest.css +0 -217
- data/lib/sensu-dashboard/public/css/style.css +0 -177
- data/lib/sensu-dashboard/public/img/cross.png +0 -0
- data/lib/sensu-dashboard/public/img/footer_bg.png +0 -0
- data/lib/sensu-dashboard/public/img/header_bg.png +0 -0
- data/lib/sensu-dashboard/public/img/loading_circle.gif +0 -0
- data/lib/sensu-dashboard/public/img/main_content_bg.png +0 -0
- data/lib/sensu-dashboard/public/img/megaphone_icon.png +0 -0
- data/lib/sensu-dashboard/public/img/megaphone_icon_off.png +0 -0
- data/lib/sensu-dashboard/public/js/FABridge.js +0 -604
- data/lib/sensu-dashboard/public/js/functions.js +0 -367
- data/lib/sensu-dashboard/public/js/jquery-1.5.1.min.js +0 -16
- data/lib/sensu-dashboard/public/js/jquery.autoSuggest.js +0 -375
- data/lib/sensu-dashboard/public/js/jquery.leanModal.min.js +0 -1
- data/lib/sensu-dashboard/public/js/jquery.sortElements.js +0 -69
- data/lib/sensu-dashboard/public/js/jquery.tmpl.min.js +0 -1
- data/lib/sensu-dashboard/public/js/jquery.zclip.min.js +0 -12
- data/lib/sensu-dashboard/public/js/modernizr-1.7.min.js +0 -2
- data/lib/sensu-dashboard/public/js/swfobject.js +0 -4
- data/lib/sensu-dashboard/public/js/web_socket.js +0 -312
- data/lib/sensu-dashboard/public/js/webtoolkit.sha1.js +0 -174
- data/lib/sensu-dashboard/public/swf/WebSocketMain.swf +0 -0
- data/lib/sensu-dashboard/public/swf/ZeroClipboard.swf +0 -0
- data/lib/sensu-dashboard/version.rb +0 -5
- data/lib/sensu-dashboard/views/client_templates.erb +0 -67
- data/lib/sensu-dashboard/views/clients.erb +0 -36
- data/lib/sensu-dashboard/views/event_templates.erb +0 -185
- data/lib/sensu-dashboard/views/index.erb +0 -48
- data/lib/sensu-dashboard/views/layout.erb +0 -132
- data/lib/sensu-dashboard/views/sonian.sass +0 -213
- data/lib/sensu-dashboard/views/stash_templates.erb +0 -44
- data/lib/sensu-dashboard/views/stashes.erb +0 -32
Binary file
|
Binary file
|
@@ -1,67 +0,0 @@
|
|
1
|
-
<!-- Client template -->
|
2
|
-
<script id="clientTemplate" type="text/x-jquery-tmpl">
|
3
|
-
<tr id="${name}" rel="leanModal" href="#event_details_modal">
|
4
|
-
<td id="client_id">${name}</td>
|
5
|
-
<td id="public_ip">${address}</td>
|
6
|
-
<td id="timestamp">${timestamp}</td>
|
7
|
-
<td id="subscriptions">${subscriptions}</td>
|
8
|
-
</tr>
|
9
|
-
</script>
|
10
|
-
|
11
|
-
<!-- Client details row template -->
|
12
|
-
<script id="clientDetailsRowTemplate" type="text/x-jquery-tmpl">
|
13
|
-
{{each $data}}
|
14
|
-
<div class="event_detail_group">
|
15
|
-
<div class="event_detail">
|
16
|
-
<h1>${capitaliseFirstLetter($index)}</h1>
|
17
|
-
<p id="${$index}">${$value}</p>
|
18
|
-
</div>
|
19
|
-
<!--<div class="copy">Copy</div>-->
|
20
|
-
<div style="clear: both;"></div>
|
21
|
-
</div>
|
22
|
-
{{/each}}
|
23
|
-
</script>
|
24
|
-
|
25
|
-
<script type="text/javascript">
|
26
|
-
fetchClients();
|
27
|
-
|
28
|
-
ws = new WebSocket("ws://" + location.hostname + ":9000");
|
29
|
-
ws.onmessage = function(evt) {
|
30
|
-
fetchClients();
|
31
|
-
}
|
32
|
-
|
33
|
-
$("#remove_client").click(function() {
|
34
|
-
var client = $("#name").html();
|
35
|
-
var cross_img = $("#remove_client").children().first();
|
36
|
-
cross_img.attr("src", "/img/loading_circle.gif");
|
37
|
-
$.ajax({
|
38
|
-
type: 'DELETE',
|
39
|
-
contentType: 'application/json',
|
40
|
-
url: '/client/'+client+'.json',
|
41
|
-
success: function(data, textStatus, xhr) {
|
42
|
-
alert('Client '+client+' is being removed, resolving events...');
|
43
|
-
cross_img.attr("src", "/img/cross.png");
|
44
|
-
$("#lean_overlay").fadeOut(200);
|
45
|
-
$("#event_details_modal").css({'display':'none'});
|
46
|
-
fetchClients();
|
47
|
-
},
|
48
|
-
error: function(xhr, textStatus, errorThrown) {
|
49
|
-
cross_img.attr("src", "/img/cross.png");
|
50
|
-
alert('Client was not found in sensu. This may be due to a delay in a previous removal attempt.');
|
51
|
-
}
|
52
|
-
});
|
53
|
-
});
|
54
|
-
|
55
|
-
$("input[type=text]").autoSuggest(location.protocol + "//" + location.hostname + ":" + location.port + "/clients/autocomplete.json", {
|
56
|
-
startText: "Enter keywords to filter by",
|
57
|
-
selectedItemProp: "name",
|
58
|
-
searchObjProps: "name",
|
59
|
-
selectionAdded: function(elem) {
|
60
|
-
fetchClients();
|
61
|
-
},
|
62
|
-
selectionRemoved: function(elem) {
|
63
|
-
elem.fadeTo("fast", 0, function() { elem.remove(); });
|
64
|
-
fetchClients();
|
65
|
-
}
|
66
|
-
});
|
67
|
-
</script>
|
@@ -1,36 +0,0 @@
|
|
1
|
-
<h1>Current Clients <span class="clients_count">(<span id="client_count">0</span>)</span></h1>
|
2
|
-
|
3
|
-
<input type="text" id="autosuggest_filter" style="width: 300px;"/>
|
4
|
-
|
5
|
-
<table id="clients">
|
6
|
-
|
7
|
-
<thead>
|
8
|
-
|
9
|
-
<tr>
|
10
|
-
<th class="col_clients">Client</th>
|
11
|
-
<th class="col_public_ip">Public IP</th>
|
12
|
-
<th class="col_timestamp">Timestamp</th>
|
13
|
-
<th class="col_output">Subscriptions</th>
|
14
|
-
</tr>
|
15
|
-
|
16
|
-
</thead>
|
17
|
-
|
18
|
-
<tbody></tbody>
|
19
|
-
|
20
|
-
</table>
|
21
|
-
|
22
|
-
<div id="event_details_modal" class="event_details_modal">
|
23
|
-
<h1 class="section_title">Actions</h1>
|
24
|
-
<div id="event_actions">
|
25
|
-
<div class="event_detail_group">
|
26
|
-
<div class="event_detail">
|
27
|
-
<div id="remove_client" class="action_btn" style="margin-right: 7px;">
|
28
|
-
<img src="/img/cross.png" style="vertical-align: middle; padding-right: 7px;"/><strong>Remove</strong>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
<div style="clear: both;"></div>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
<h1 class="section_title">Client Data</h1>
|
35
|
-
<div id="client_data"></div>
|
36
|
-
</div>
|
@@ -1,185 +0,0 @@
|
|
1
|
-
<!-- Event template -->
|
2
|
-
<script id="eventTemplate" type="text/x-jquery-tmpl">
|
3
|
-
{{if is_unknown}}
|
4
|
-
<tr class="status3" id="${identifier}" rel="leanModal" href="#event_details_modal">
|
5
|
-
{{else}}
|
6
|
-
<tr class="status${status}" id="${identifier}" rel="leanModal" href="#event_details_modal">
|
7
|
-
{{/if}}
|
8
|
-
<td id="client">${client}</td>
|
9
|
-
<td id="check">${check}</td>
|
10
|
-
<td id="output">${output}</td>
|
11
|
-
<td id="status" style="display: none;">${status}</td>
|
12
|
-
</tr>
|
13
|
-
</script>
|
14
|
-
|
15
|
-
<!-- Event details row template -->
|
16
|
-
<script id="eventDetailsRowTemplate" type="text/x-jquery-tmpl">
|
17
|
-
<div class="event_detail_group">
|
18
|
-
<div class="event_detail">
|
19
|
-
<h1>Client</h1>
|
20
|
-
<p id="client_id_value">${client}</p>
|
21
|
-
</div>
|
22
|
-
<!--<div class="copy">Copy</div>-->
|
23
|
-
<div style="clear: both;"></div>
|
24
|
-
</div>
|
25
|
-
<div class="event_detail_group">
|
26
|
-
<div class="event_detail">
|
27
|
-
<h1>Check</h1>
|
28
|
-
<p id="check_name_value">${check}</p>
|
29
|
-
</div>
|
30
|
-
<!--<div class="copy">Copy</div>-->
|
31
|
-
<div style="clear: both;"></div>
|
32
|
-
</div>
|
33
|
-
<div class="event_detail_group">
|
34
|
-
<div class="event_detail">
|
35
|
-
<h1>Status</h1>
|
36
|
-
<p>${status}</p>
|
37
|
-
</div>
|
38
|
-
<!--<div class="copy">Copy</div>-->
|
39
|
-
<div style="clear: both;"></div>
|
40
|
-
</div>
|
41
|
-
<div class="event_detail_group">
|
42
|
-
<div class="event_detail">
|
43
|
-
<h1>Output</h1>
|
44
|
-
<p>${output}</p>
|
45
|
-
</div>
|
46
|
-
<!--<div class="copy">Copy</div>-->
|
47
|
-
<div style="clear: both;"></div>
|
48
|
-
</div>
|
49
|
-
<div class="event_detail_group">
|
50
|
-
<div class="event_detail">
|
51
|
-
<h1>Occurrences</h1>
|
52
|
-
<p>${occurrences}</p>
|
53
|
-
</div>
|
54
|
-
<!--<div class="copy">Copy</div>-->
|
55
|
-
<div style="clear: both;"></div>
|
56
|
-
</div>
|
57
|
-
</script>
|
58
|
-
|
59
|
-
<!-- Client details row template -->
|
60
|
-
<script id="clientDetailsRowTemplate" type="text/x-jquery-tmpl">
|
61
|
-
{{each $data}}
|
62
|
-
<div class="event_detail_group">
|
63
|
-
<div class="event_detail">
|
64
|
-
<h1>${capitaliseFirstLetter($index)}</h1>
|
65
|
-
<p>${$value}</p>
|
66
|
-
</div>
|
67
|
-
<!--<div class="copy">Copy</div>-->
|
68
|
-
<div style="clear: both;"></div>
|
69
|
-
</div>
|
70
|
-
{{/each}}
|
71
|
-
</script>
|
72
|
-
|
73
|
-
<script type="text/javascript">
|
74
|
-
fetchEvents();
|
75
|
-
|
76
|
-
$("#disable_client_alerts").click(function() {
|
77
|
-
var client_id = $("#client_id_value").html();
|
78
|
-
var alert_img = $("#disable_client_alerts").children().first();
|
79
|
-
|
80
|
-
if(alert_img.attr("src") == "/img/megaphone_icon_off.png") {
|
81
|
-
alert_img.attr("src", "/img/loading_circle.gif");
|
82
|
-
$.ajax({
|
83
|
-
type: 'DELETE',
|
84
|
-
contentType: 'application/json',
|
85
|
-
url: '/stash/silence/'+client_id+'.json',
|
86
|
-
success: function(data, textStatus, xhr) {
|
87
|
-
alert_img.attr("src", "/img/megaphone_icon.png");
|
88
|
-
},
|
89
|
-
error: function(xhr, textStatus, errorThrown) {
|
90
|
-
if(xhr.status == 404) {
|
91
|
-
alert_img.attr("src", "/img/megaphone_icon_off.png");
|
92
|
-
}
|
93
|
-
},
|
94
|
-
dataType: 'json'
|
95
|
-
});
|
96
|
-
} else if(alert_img.attr("src") == "/img/megaphone_icon.png") {
|
97
|
-
alert_img.attr("src", "/img/loading_circle.gif");
|
98
|
-
$.ajax({
|
99
|
-
type: 'POST',
|
100
|
-
contentType: 'application/json',
|
101
|
-
url: '/stash/silence/'+client_id+'.json',
|
102
|
-
success: function(data, textStatus, xhr) {
|
103
|
-
alert_img.attr("src", "/img/megaphone_icon_off.png");
|
104
|
-
},
|
105
|
-
error: function(xhr, textStatus, errorThrown) {
|
106
|
-
},
|
107
|
-
dataType: 'json'
|
108
|
-
});
|
109
|
-
}
|
110
|
-
});
|
111
|
-
|
112
|
-
$("#disable_client_check_alerts").click(function() {
|
113
|
-
var client_id = $("#client_id_value").html();
|
114
|
-
var check_name = $("#check_name_value").html();
|
115
|
-
var alert_img = $("#disable_client_check_alerts").children().first();
|
116
|
-
|
117
|
-
if(alert_img.attr("src") == "/img/megaphone_icon_off.png") {
|
118
|
-
alert_img.attr("src", "/img/loading_circle.gif");
|
119
|
-
$.ajax({
|
120
|
-
type: 'DELETE',
|
121
|
-
contentType: 'application/json',
|
122
|
-
url: '/stash/silence/'+client_id+'/'+check_name+'.json',
|
123
|
-
success: function(data, textStatus, xhr) {
|
124
|
-
alert_img.attr("src", "/img/megaphone_icon.png");
|
125
|
-
},
|
126
|
-
error: function(xhr, textStatus, errorThrown) {
|
127
|
-
if(xhr.status == 404) {
|
128
|
-
alert_img.attr("src", "/img/megaphone_icon_off.png");
|
129
|
-
}
|
130
|
-
},
|
131
|
-
dataType: 'json'
|
132
|
-
});
|
133
|
-
} else if(alert_img.attr("src") == "/img/megaphone_icon.png") {
|
134
|
-
alert_img.attr("src", "/img/loading_circle.gif");
|
135
|
-
$.ajax({
|
136
|
-
type: 'POST',
|
137
|
-
contentType: 'application/json',
|
138
|
-
url: '/stash/silence/'+client_id+'/'+check_name+'.json',
|
139
|
-
success: function(data, textStatus, xhr) {
|
140
|
-
alert_img.attr("src", "/img/megaphone_icon_off.png");
|
141
|
-
},
|
142
|
-
error: function(xhr, textStatus, errorThrown) {
|
143
|
-
},
|
144
|
-
dataType: 'json'
|
145
|
-
});
|
146
|
-
}
|
147
|
-
});
|
148
|
-
|
149
|
-
$("#resolve_event").click(function() {
|
150
|
-
var client = $("#client_id_value").html();
|
151
|
-
var check = $("#check_name_value").html();
|
152
|
-
$.ajax({
|
153
|
-
type: 'POST',
|
154
|
-
contentType: 'application/json',
|
155
|
-
url: '/event/resolve.json',
|
156
|
-
data: JSON.stringify({"client":client, "check":check}),
|
157
|
-
success: function(data, textStatus, xhr) {
|
158
|
-
$("#lean_overlay").fadeOut(200);
|
159
|
-
$("#event_details_modal").css({'display':'none'});
|
160
|
-
fetchEvents();
|
161
|
-
},
|
162
|
-
error: function(xhr, textStatus, errorThrown) {
|
163
|
-
alert('Failed to resolve event');
|
164
|
-
}
|
165
|
-
});
|
166
|
-
});
|
167
|
-
|
168
|
-
$("input[type=text]").autoSuggest(location.protocol + "//" + location.hostname + ":" + location.port + "/autocomplete.json", {
|
169
|
-
startText: "Enter keywords to filter by",
|
170
|
-
selectedItemProp: "name",
|
171
|
-
searchObjProps: "name",
|
172
|
-
selectionAdded: function(elem) {
|
173
|
-
fetchEvents();
|
174
|
-
},
|
175
|
-
selectionRemoved: function(elem) {
|
176
|
-
elem.fadeTo("fast", 0, function() { elem.remove(); });
|
177
|
-
fetchEvents();
|
178
|
-
}
|
179
|
-
});
|
180
|
-
|
181
|
-
$('#filter_unknown_checks').change(function() {
|
182
|
-
filter_unknown_checks = !filter_unknown_checks;
|
183
|
-
fetchEvents();
|
184
|
-
});
|
185
|
-
</script>
|
@@ -1,48 +0,0 @@
|
|
1
|
-
<h1>Current Events <span class="events_count">(<span id="event_count">0</span>)</span></h1>
|
2
|
-
|
3
|
-
<div style="padding-bottom: 7px;">
|
4
|
-
<input type="checkbox" checked="checked" id="filter_unknown_checks" style="margin-right: 7px;"/>Filter Unknown Checks
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<input type="text" id="autosuggest_client_filter" style="width: 300px;"/>
|
8
|
-
|
9
|
-
<table id="events">
|
10
|
-
|
11
|
-
<thead>
|
12
|
-
|
13
|
-
<tr>
|
14
|
-
<th class="col_clients">Client</th>
|
15
|
-
<th class="col_checks">Check</th>
|
16
|
-
<th class="col_output">Output</th>
|
17
|
-
<th class="col_status" style="display: none;">Status</th>
|
18
|
-
</tr>
|
19
|
-
|
20
|
-
</thead>
|
21
|
-
|
22
|
-
<tbody></tbody>
|
23
|
-
|
24
|
-
</table>
|
25
|
-
|
26
|
-
<div id="event_details_modal" class="event_details_modal">
|
27
|
-
<h1 class="section_title">Actions</h1>
|
28
|
-
<div id="event_actions">
|
29
|
-
<div class="event_detail_group">
|
30
|
-
<div class="event_detail">
|
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>Silence Client</strong>
|
33
|
-
</div>
|
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>Silence Check</strong>
|
36
|
-
</div>
|
37
|
-
<div id="resolve_event" class="action_btn" style="margin-right: 7px;">
|
38
|
-
<img src="/img/cross.png" style="vertical-align: middle; padding-right: 7px;"/><strong>Resolve</strong>
|
39
|
-
</div>
|
40
|
-
</div>
|
41
|
-
<div style="clear: both;"></div>
|
42
|
-
</div>
|
43
|
-
</div>
|
44
|
-
<h1 class="section_title">Event Data</h1>
|
45
|
-
<div id="event_data"></div>
|
46
|
-
<h1 class="section_title">Client Data</h1>
|
47
|
-
<div id="client_data"></div>
|
48
|
-
</div>
|
@@ -1,132 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
|
3
|
-
<!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="en"> <![endif]-->
|
4
|
-
<!--[if IE 7 ]> <html class="ie ie7 no-js" lang="en"> <![endif]-->
|
5
|
-
<!--[if IE 8 ]> <html class="ie ie8 no-js" lang="en"> <![endif]-->
|
6
|
-
<!--[if IE 9 ]> <html class="ie ie9 no-js" lang="en"> <![endif]-->
|
7
|
-
<!--[if gt IE 9]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
8
|
-
<!-- the "no-js" class is for Modernizr. -->
|
9
|
-
|
10
|
-
<head id="www-sitename-com" data-template-set="html5-reset">
|
11
|
-
|
12
|
-
<meta charset="utf-8">
|
13
|
-
|
14
|
-
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
|
15
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
16
|
-
|
17
|
-
<title>Sensu Dashboard</title>
|
18
|
-
|
19
|
-
<meta name="author" content="Justin Kolberg">
|
20
|
-
<meta name="Copyright" content="Copyright Sonian, Inc. 2011. MIT License.">
|
21
|
-
|
22
|
-
<!-- Mobile Viewport Fix
|
23
|
-
j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
|
24
|
-
device-width : Occupy full width of the screen in its current orientation
|
25
|
-
initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
|
26
|
-
maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width
|
27
|
-
-->
|
28
|
-
<!-- Uncomment to use; use thoughtfully!
|
29
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
30
|
-
-->
|
31
|
-
|
32
|
-
<!--<link rel="shortcut icon" href="img/favicon.ico">-->
|
33
|
-
<!-- This is the traditional favicon.
|
34
|
-
- size: 16x16 or 32x32
|
35
|
-
- transparency is OK
|
36
|
-
- see wikipedia for info on browser support: http://mky.be/favicon/ -->
|
37
|
-
|
38
|
-
<!--<link rel="apple-touch-icon" href="img/apple-touch-icon.png">-->
|
39
|
-
<!-- The is the icon for iOS's Web Clip.
|
40
|
-
- size: 57x57 for older iPhones, 72x72 for iPads, 114x114 for iPhone4's retina display (IMHO, just go ahead and use the biggest one)
|
41
|
-
- To prevent iOS from applying its styles to the icon name it thusly: apple-touch-icon-precomposed.png
|
42
|
-
- Transparency is not recommended (iOS will put a black BG behind the icon) -->
|
43
|
-
|
44
|
-
<!-- CSS: screen, mobile & print are all in the same file -->
|
45
|
-
<link rel="stylesheet" href="css/style.css">
|
46
|
-
<link rel="stylesheet" href="css/sonian.css">
|
47
|
-
<link rel="stylesheet" href="css/autoSuggest.css">
|
48
|
-
|
49
|
-
<!-- Favicon: Set the sensu fan image from github as the favicon -->
|
50
|
-
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
51
|
-
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
52
|
-
|
53
|
-
<!-- all our JS is at the bottom of the page, except for Modernizr. -->
|
54
|
-
<script src="js/modernizr-1.7.min.js"></script>
|
55
|
-
|
56
|
-
<% if $settings['dashboard']['autorefresh'] || $settings['dashboard']['auto_refresh'] %>
|
57
|
-
<!-- page autorefresh -->
|
58
|
-
<meta http-equiv="refresh" content="<%= $settings['dashboard']['autorefresh'] || $settings['dashboard']['auto_refresh'] %>">
|
59
|
-
<% end %>
|
60
|
-
</head>
|
61
|
-
|
62
|
-
<body>
|
63
|
-
|
64
|
-
<div class="wrapper"><!-- not needed? up to you: http://camendesign.com/code/developpeurs_sans_frontieres -->
|
65
|
-
|
66
|
-
<header>
|
67
|
-
|
68
|
-
<h1><a href="/">Sensu Dashboard</a></h1>
|
69
|
-
|
70
|
-
<nav>
|
71
|
-
|
72
|
-
<ol>
|
73
|
-
<li><a href="/clients">Clients</a></li>
|
74
|
-
<li><a href="/stashes">Stashes</a></li>
|
75
|
-
<li><a href="/">Current Events</a></li>
|
76
|
-
</ol>
|
77
|
-
|
78
|
-
</nav>
|
79
|
-
|
80
|
-
<div style="clear: both;"></div>
|
81
|
-
|
82
|
-
</header>
|
83
|
-
|
84
|
-
<section id="main_content">
|
85
|
-
|
86
|
-
<%= yield %>
|
87
|
-
|
88
|
-
</section>
|
89
|
-
|
90
|
-
<footer>
|
91
|
-
|
92
|
-
<p><small>©
|
93
|
-
Copyright <a href="http://www.sonian.com">Sonian, Inc.</a> 2011.
|
94
|
-
<a href="https://github.com/sonian/sensu-dashboard/blob/master/MIT-LICENSE.txt">License (MIT)</a>
|
95
|
-
</small></p>
|
96
|
-
|
97
|
-
</footer>
|
98
|
-
|
99
|
-
</div>
|
100
|
-
|
101
|
-
<!-- here comes the javascript -->
|
102
|
-
|
103
|
-
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
|
104
|
-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
|
105
|
-
<script>window.jQuery || document.write("<script src='js/jquery-1.5.1.min.js'>\x3C/script>")</script>
|
106
|
-
|
107
|
-
<!-- Javascript SHA1 -->
|
108
|
-
<script src="js/webtoolkit.sha1.js"></script>
|
109
|
-
|
110
|
-
<!-- jQuery templates -->
|
111
|
-
<script src="js/jquery.tmpl.min.js"></script>
|
112
|
-
|
113
|
-
<!-- jQuery lean modal -->
|
114
|
-
<script src="js/jquery.leanModal.min.js"></script>
|
115
|
-
|
116
|
-
<!-- jQuery zclip (clipboard support) -->
|
117
|
-
<script type="text/javascript" src="js/jquery.zclip.min.js"></script>
|
118
|
-
|
119
|
-
<!-- this is where we put our custom functions -->
|
120
|
-
<script src="js/functions.js"></script>
|
121
|
-
|
122
|
-
<!-- jQuery sort elements -->
|
123
|
-
<script src="js/jquery.sortElements.js"></script>
|
124
|
-
|
125
|
-
<!-- jQuery auto suggest -->
|
126
|
-
<script src="js/jquery.autoSuggest.js"></script>
|
127
|
-
|
128
|
-
<!-- include other js -->
|
129
|
-
<%= @js %>
|
130
|
-
|
131
|
-
</body>
|
132
|
-
</html>
|