forked from chriscareycode/nagiostv-ndoutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.htm
397 lines (279 loc) · 12.7 KB
/
index.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale = 1.0,maximum-scale = 2.0" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<title>NagiosTV</title>
<link href="lib/bootstrap/css/bootstrap.css" rel="stylesheet">
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="style.css">
<style type="text/css">
</style>
</head>
<body>
<div class="navbar" style="display:none;">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li>
<img src="" style="height:30px;position:relative;top:5px;margin-right:4px;" />
<span style="font-size:24px;font-weight:bold;color:white;position:relative;top:11px;">
Nagios Monitor 2.1</span>
</li>
</ul>
</div>
</div>
</div>
<script type="text/x-handlebars">
<div class="wait graybg" style="display:none;margin-top:20px;opacity:1;">
My FIRST TEMPLATE<br />
Hello, <strong>{{firstName}} {{lastName}}</strong>!
<div>
<nav>
</nav>
</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="bar-chart">
<div class="wait graybg" style="opacity:1;">
<div style="position:absolute;left:4px;font-size:14px;margin-bottom:5px;color:#999;display:none;">Refresh every {{view.howManySeconds}} seconds</div>
<div class="progress" style="margin-bottom:5px;color:#fff;">
<div {{bindAttr class="view.bgColor :bar"}} {{bindAttr style="view.timerWidth"}}></div>
</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="main-view">
<div class="environment">
<img id="config_icon" style="height:25px;width:25px;position:relative;top:-3px;" />
{{App.applicationController.name}}
</div>
{{#if App.applicationController.versionMismatch}}
<div class="versionMismatch">
<span style="font-size:14px;color:red;">Software out of date: Current Build: {{App.applicationController.version}} Latest: {{App.applicationController.versionServer}}</span><br />
<span style="font-size:14px;color:red;">Upgrade instructions: <a href="https://github.com/chriscareycode/NagiosTV#upgrading" target="_blank">https://github.com/chriscareycode/NagiosTV#upgrading</a></span>
</div>
{{else}}
<div class="versionMismatch" style="">
<span style="font-size:14px;">Current Build: {{App.applicationController.version}} Latest: {{App.applicationController.versionServer}}</span>
</div>
{{/if}}
<div id="remoteTimeDiv" class="remoteTimeDiv" style="font-weight:bold;">
Remote Time: {{App.applicationController.remoteTime}}
</div>
<div id="clockinfo" style="display:block;">
<div style="margin-left:5px;font-size:14px;">
<span style="font-size:14px;">Remote Time Zone: <span id="remoteTimeZone">{{unbound App.applicationController.remoteTimeZone}}</span></span>
</div>
<div class="localTimeDiv" style="font-weight:bold;">
Local Time: <span id="localTime">00:00:00</span>
</div>
<div style="margin-left:5px;font-size:14px;">Local Time Zone: <span id="localTimeZone">{{unbound App.applicationController.localTimeZone}}</span></div>
<div class="diffTimeDiv" style="">
<span style="font-size:14px;">Time Difference: {{App.applicationController.timeZoneDiffHours}} hours</span>
</div>
</div>
<div style="margin-bottom:5px;"></div>
<div class="section" style="margin-bottom:5px;">Current Services
<span id="current-spinner" style="display:none;"><img src="images/ajax-loader.gif" alt="ajax-loader" /></span>
</div>
{{#if App.applicationController.currentDisconnected}}
{{view App.currentDisconnectedView}}
{{/if}}
{{#if view.currentEmpty}}
{{view App.currentOkView}}
{{/if}}
{{#each App.applicationController.current}}
{{view App.currentItemView contentBinding="App.applicationController"}}
{{/each}}
<div id="barAreaCurrent"></div>
{{view App.barCurrent}}
<div class="section" style="margin-bottom:5px;">ACKed Services
<span id="acked-spinner" style="display:none;"><img src="images/ajax-loader.gif" alt="ajax-loader" /></span>
</div>
{{#if view.ackedEmpty}}
{{view App.ackedOkView}}
{{/if}}
{{#each App.applicationController.acked}}
{{view App.ackedItemView contentBinding="App.applicationController"}}
{{/each}}
<div class="section" style="margin-top:10px;">Notification History
<span id="notifications-spinner" style="display:none;"><img src="images/ajax-loader.gif" alt="ajax-loader" /></span>
</div>
{{#unless App.applicationController.history}}
<div class="nagalert graybg">
<div style="text-align:center;font-size:18px;margin-bottom:5px;">No History</div>
</div>
{{/unless}}
{{#each App.applicationController.history}}
{{view App.historyItemView contentBinding="App.applicationController"}}
{{/each}}
<div id="container">{{output}}</div>
</script>
<script type="text/x-handlebars" data-template-name="current-ok">
<div class="nagalert graybg" style="">
<div style="font-size:1.5em;margin-bottom:5px;color:lime;">
All services are UP
</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="acked-ok">
<div class="nagalert graybg" style="">
<div style="font-size:1.5em;margin-bottom:5px;color:lime;">
No ACKed services
</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="current-disconnected">
<div class="nagalert graybg">
<div style="font-size:1.5em;margin-bottom:5px;color:brown;">
Disconnected From Server
</div>
</div>
</script>
<!-- ============================================== -->
<!-- History Item -->
<!-- ============================================== -->
<script type="text/x-handlebars" data-template-name="history-item">
{{#if view.firstTimespan}}
<div class="largetimespan" style="float:none;margin-left:5px;margin-top:10px;margin-bottom:10px;">
<div class="quiet">Quiet for <span>{{minutes_ago}}</span> minutes</div>
<div class="quiet">{{view.stringAgo}}</div>
</div>
{{/if}}
<div id="history-{{unbound notification_id}}" class="graybg nagalert border{{unbound view.stateClass}}" style="display:block;opacity:0.5;">
<div class="ago" style="">
{{minutes_ago}}
<div style="font-size:0.5em;position:relative;top:-1px;">min ago</div>
</div>
<div class="datetime">
<span style="color:lime;">(</span>{{start_time}}<span style="color:lime;">)</span>
</div>
{{view.stringAgo}} ago<br />
{{#if name2}}
<span class="alertname2"><a target="_blank" href="/cgi-bin/nagios3/extinfo.cgi?type=2&host={{name1}}&service={{name2}}">{{name2}}</a></span>
{{/if}}
on
{{#if name1}}
<span class="alertname1"><a target="_blank" href="/cgi-bin/nagios3/extinfo.cgi?type=1&host={{name1}}">{{name1}}</a></span>
{{/if}}
<div class="state{{unbound state}}">{{output}}</div>
<div class="since">{{since}} minutes since previous event</div>
</div>
{{#if view.largeTimespan}}
<div class="largetimespan" style="float:none;margin-left:5px;margin-top:12px;margin-bottom:1px;">
<div class="quiet">Quiet for <span>{{since}}</span> minutes</div>
</div>
{{/if}}
</script>
<!-- ============================================== -->
<!-- Current Item -->
<!-- ============================================== -->
<script type="text/x-handlebars" data-template-name="current-item">
<div id="current-{{unbound servicestatus_id}}" class="graybg nagalert critical currentitem border{{unbound view.currentStateClass}}" style="display:block;">
<div style="float:right;font-size:1.3em;margin:0 4px 0 0;padding:3px 5px 0 0;width:50px;height:30px;text-align:right;color:#FF7256;">
{{view.downForMinutes}}m
</div>
{{status_update_time}}
{{#if name2}}
<span class="alertname2"><a target="_blank" href="/cgi-bin/nagios3/extinfo.cgi?type=2&host={{unbound name1}}&service={{unbound name2}}">{{unbound name2}}</a></span>
{{/if}}
on
{{#if name1}}
<span class="alertname1"><a target="_blank" href="/cgi-bin/nagios3/extinfo.cgi?type=1&host={{unbound name1}}">{{unbound name1}}</a></span>
{{/if}}
<br />
<span {{bindAttr class="view.currentStateClass"}} style="">
{{output}}
</span>
<div class="eventDetail" style="display:none">
{{#if view.isSoft}}
<div style="" {{bindAttr class="stateClass"}}>{{view.stateTypeName}} WARN @ {{last_state_change}}</div>
<div>{{view.stateTypeName}} WARN for {{view.downFor}}</div>
{{else}}
<div>{{view.stateTypeName}} DOWN for {{view.downFor}}</div>
<div style="" {{bindAttr class="stateClass"}}>{{view.stateTypeName}} DOWN @ {{last_state_change}}</div>
{{/if}}
<div>NEXT CHECK @ {{next_check}}</div>
</div>
{{#if view.isSoft}}
<div class="progress" style="margin-top:5px;margin-bottom:5px;color:#fff;">
<div {{bindAttr class="view.bgColor :bar"}} {{bindAttr style="view.softtimerWidth"}}>
<span style="color:black">Soft Warning</span>
</div>
</div>
{{else}}
{{/if}}
</div>
</script>
<!-- ============================================== -->
<!-- Acked Item -->
<!-- ============================================== -->
<script type="text/x-handlebars" data-template-name="acked-item">
<div id="acked-{{unbound servicestatus_id}}" class="graybg nagalert critical ackeditem border{{unbound view.currentStateClass}}" style="display:block;">
<div style="float:right;font-size:1.3em;margin:0 4px 0 0;padding:3px 5px 0 0;width:50px;height:30px;text-align:right;color:#FF7256;">
{{view.downForMinutes}}m
</div>
{{status_update_time}}
{{#if name2}}
<span class="alertname2"><a target="_blank" href="/cgi-bin/nagios3/extinfo.cgi?type=2&host={{unbound name1}}&service={{unbound name2}}">{{name2}}</a></span>
{{/if}}
on
{{#if name1}}
<span class="alertname1"><a target="_blank" href="/cgi-bin/nagios3/extinfo.cgi?type=1&host={{unbound name1}}">{{name1}}</a></span>
{{/if}}
<br />
<span {{bindAttr class="view.currentStateClass"}} style="">
{{output}}
</span>
<div class="eventDetail" style="display:none;">
{{#if view.isSoft}}
<div style="" {{bindAttr class="stateClass"}}>{{view.stateTypeName}} WARN @ {{last_state_change}}</div>
<div>{{view.stateTypeName}} WARN for {{view.downFor}}</div>
{{else}}
<div style="" {{bindAttr class="stateClass"}}>{{view.stateTypeName}} DOWN @ {{last_state_change}}</div>
<div>{{view.stateTypeName}} DOWN for {{view.downFor}}</div>
{{/if}}
<div>NEXT CHECK @ {{next_check}}</div>
</div>
{{#if view.isSoft}}
<div class="progress" style="margin-top:5px;margin-bottom:5px;color:#fff;">
<div {{bindAttr class="view.bgColor :bar"}} {{bindAttr style="view.softtimerWidth"}}></div>
</div>
{{else}}
{{/if}}
</div>
</script>
<div class="row-fluid" style="font-size:90%;">
<div class="span12 padme" id="col1" style="">
</div>
</div>
<div id="container"></div>
<div class="welcome outer">
<div class="inner graybg nagalert">
<div>NagiosTV</div>
<div>by Chris Carey</div>
<div>http://chriscarey.com</div>
</div>
</div>
<div id="audio"></div>
<script type="text/javascript" >
ENV = {
CP_DEFAULT_CACHEABLE: true,
VIEW_PRESERVES_CONTEXT: true,
RAISE_ON_DEPRECATION: true
};
</script>
<script type="text/javascript" src="lib/jquery-1.9.1.js"></script>
<script type="text/javascript" src="lib/handlebars.js"></script>
<script type="text/javascript" src="lib/ember-1.0.0-rc.1.js"></script>
<script type="text/javascript" src="lib/jstz.min.js"></script>
<script type="text/javascript" src="lib/date.js"></script>
<script type="text/javascript" src="lib/time.js"></script>
<script type="text/javascript" src="lib/timezone-js/src/date.js"></script>
<script type="text/javascript" src="lib/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="config.js"></script>
<script type="text/javascript" src="main.js"></script>
</body>
</html>