-
Notifications
You must be signed in to change notification settings - Fork 6
/
popup.html
421 lines (404 loc) · 18.1 KB
/
popup.html
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
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Icinga Multi Status - Popup</title>
<link href="inc/bootstrap.min.css" rel="stylesheet">
<script src="inc/jquery-3.7.1.min.js"></script>
<script src="inc/bootstrap.bundle.min.js"></script>
<style>
body { max-width: 100%; width: 700px; padding: 5px 5px 10px 5px; min-height: 200px; }
a:focus { outline: 0; }
.popup-tab { padding: 10px 10px 0;}
td, th { padding: 2px; font-size: .95rem; }
.alert { margin-top: 20px; }
.alert svg { height: 30px; float: left; margin-top: -4px; margin-right: 10px; }
table { margin-bottom: 0 !important; }
h4 { margin-bottom: 25px; }
h5.instance-title { font-size: 1rem; margin: 0.6rem 0 0.7rem 0; }
table.icinga-overview tr td:nth-of-type(1) {}
table.icinga-overview tr td:nth-of-type(2) { width: 170px; }
table.icinga-overview tr td:nth-of-type(3) { width: 170px; }
table.icinga-hosts-services { margin-top: 10px; }
table.icinga-hosts-services tr td:nth-of-type(1) {}
table.icinga-hosts-services tr td:nth-of-type(2) { width: 170px; }
table.icinga-hosts-services tr td:nth-of-type(3) { width: 150px; }
table.icinga-hosts-services tr td:nth-of-type(4) { width: 50px; }
table.icinga-hosts { margin-top: 10px; }
table.icinga-hosts tr td:nth-of-type(1) {}
table.icinga-hosts tr td:nth-of-type(2) { width: 150px; }
table.icinga-hosts tr td:nth-of-type(3) { width: 50px; }
#popup-tab-hosts-filter, #popup-tab-services-filter { width: 200px; }
.float-right.filter { float: right; }
.pull-right.filter:after { clear:right; content:''; display:block; margin-bottom:10px; }
@keyframes blink {
50% {
opacity: 0;
}
}
@keyframes blinkHalf {
50% {
opacity: 0.4;
}
}
@keyframes fade {
from {
filter: alpha(opacity=0);
opacity: 0;
}
to {
filter: alpha(opacity=100);
opacity: 1;
}
}
.animation-wrapper { margin-top: 30px; }
.animation-wrapper p,
.animation-wrapper i {
color: #cccccc;
}
.animation-wrapper ul {
padding-left: 0;
}
.animation-wrapper {
text-align: center;
width: 100%;
}
.animation-content {
height: 195px;
margin: auto;
position: relative;
width: 250px;
}
.animation-content aside {
background: #9e9d9d;
height: 175px;
position: absolute;
width: 20px;
z-index: 1;
}
.animation-content aside:nth-child(1) {
right: 5px;
}
.animation-content aside:nth-child(2) {
left: 5px;
}
.animation-content div {
background: #202730;
box-shadow: 3px 0 5px #757c83, -3px 0 5px #757c83;
height: 50px;
margin: 14px auto;
position: relative;
width: 100%;
z-index: 2;
}
.animation-content div span:nth-child(1) {
background: #80b941;
}
.animation-content div span:nth-child(2) {
background: #f49534;
animation: blinkHalf 0.2s linear alternate infinite;
}
.animation-content li {
background: #818993;
display: inline-block;
height: 30px;
left: -10px;
margin: 0 4px;
position: relative;
top: -36px;
width: 14px;
}
.animation-content li:last-child {
background-color: #80b941;
box-shadow: 0 0 15px #63883b;
color: white;
font-family: monospace;
font-size: 14px;
left: initial;
line-height: 30px;
position: absolute;
right: 4px;
text-align: center;
top: 10px;
width: 30px;
}
.animation-content span {
border-radius: 100%;
display: block;
height: 8px;
left: 10px;
margin: 0 0 15px 0;
position: relative;
top: 10px;
width: 8px;
}
.animation-content div:nth-child(3) li:nth-child(1) {
animation: fade 0.7s 1.1s infinite alternate backwards;
}
.animation-content div:nth-child(3) li:nth-child(2) {
animation: fade 1.14s 0.8s infinite alternate backwards;
}
.animation-content div:nth-child(3) li:nth-child(3) {
animation: fade 1.9s 0.2s infinite alternate backwards;
}
.animation-content div:nth-child(3) li:nth-child(4) {
animation: fade 1.7s 0.4s infinite alternate backwards;
}
.animation-content div:nth-child(3) li:nth-child(5) {
animation: fade 2s infinite alternate backwards;
}
.animation-content div:nth-child(3) li:nth-child(6) {
animation: fade 1.3s 0.6s infinite alternate backwards;
}
.animation-content div:nth-child(4) li:nth-child(1) {
animation: fade 1.88s 0.14s infinite alternate backwards;
}
.animation-content div:nth-child(4) li:nth-child(2) {
animation: fade 2.1s infinite alternate backwards;
}
.animation-content div:nth-child(4) li:nth-child(3) {
animation: fade 0.75s 1.2s infinite alternate backwards;
}
.animation-content div:nth-child(4) li:nth-child(4) {
animation: fade 1.58s 0.4s infinite alternate backwards;
}
.animation-content div:nth-child(4) li:nth-child(5) {
animation: fade 1.44s 0.8s infinite alternate backwards;
}
.animation-content div:nth-child(4) li:nth-child(6) {
animation: fade 1.08s 1s infinite alternate backwards;
}
.animation-content div:nth-child(5) li:nth-child(1) {
animation: fade 1.6s 0.3s infinite alternate backwards;
}
.animation-content div:nth-child(5) li:nth-child(2) {
animation: fade 1.2s 0.6s infinite alternate backwards;
}
.animation-content div:nth-child(5) li:nth-child(3) {
animation: fade 0.8s 1.2s infinite alternate backwards;
}
.animation-content div:nth-child(5) li:nth-child(4) {
animation: fade 1.8s 0.2s infinite alternate backwards;
}
.animation-content div:nth-child(5) li:nth-child(5) {
animation: fade 2s infinite alternate backwards;
}
.animation-content div:nth-child(5) li:nth-child(6) {
animation: fade 1.4s 0.68s infinite alternate backwards;
}
.animation-content div:nth-child(5) li:nth-child(7) {
animation: fade 1.11s 1.11s infinite alternate backwards;
}
.animation-content div:nth-child(6) li:nth-child(1) {
animation: fade 1.8s 0.2s infinite alternate backwards;
}
.animation-content div:nth-child(6) li:nth-child(2) {
animation: fade 1.6s 0.4s infinite alternate backwards;
}
.animation-content div:nth-child(6) li:nth-child(3) {
animation: fade 0.8s 1.2s infinite alternate backwards;
}
.animation-content div:nth-child(6) li:nth-child(4) {
animation: fade 1.2s 0.8s infinite alternate backwards;
}
.animation-content div:nth-child(6) li:nth-child(5) {
animation: fade 1s 1s infinite alternate backwards;
}
.animation-content div:nth-child(6) li:nth-child(6) {
animation: fade 2s infinite alternate backwards;
}
.animation-content div:nth-child(7) li:nth-child(1) {
animation: fade 1.6s 0.4s infinite alternate backwards;
}
.animation-content div:nth-child(7) li:nth-child(2) {
animation: fade 1.8s 0.2s infinite alternate backwards;
}
.animation-content div:nth-child(7) li:nth-child(3) {
animation: fade 1.2s 0.8s infinite alternate backwards;
}
.animation-content div:nth-child(7) li:nth-child(4) {
animation: fade 0.8s 1.2s infinite alternate backwards;
}
.animation-content div:nth-child(7) li:nth-child(5) {
animation: fade 1.4s 0.6s infinite alternate backwards;
}
.animation-content div:nth-child(7) li:nth-child(6) {
animation: fade 1s 1s infinite alternate backwards;
}
.animation-content div:nth-child(8) li:nth-child(1) {
animation: fade 2s infinite alternate backwards;
}
.animation-content div:nth-child(8) li:nth-child(2) {
animation: fade 1.6s 0.4s infinite alternate backwards;
}
.animation-content div:nth-child(8) li:nth-child(3) {
animation: fade 1.2s 0.8s infinite alternate backwards;
}
.animation-content div:nth-child(8) li:nth-child(4) {
animation: fade 1s 1s infinite alternate backwards;
}
.animation-content div:nth-child(8) li:nth-child(5) {
animation: fade 1.4s 0.6s infinite alternate backwards;
}
.animation-content div:nth-child(8) li:nth-child(6) {
animation: fade 0.8s 1.2s infinite alternate backwards;
}
</style>
</head>
<body>
<ul class="nav nav-tabs" id="popup-nav">
<li class="nav-item"><a class="nav-link" href="#" id="popup-nav-overview">Overview</a></li>
<li class="nav-item"><a class="nav-link" href="#" id="popup-nav-hosts">Hosts</a></li>
<li class="nav-item"><a class="nav-link" href="#" id="popup-nav-services">Services</a></li>
<li class="nav-item"><a class="nav-link" href="#" id="popup-nav-about">About & Help</a></li>
<li class="nav-item flex-fill"></li>
<li class="nav-item align-self-center">
<a href="#" class="btn btn-sm btn-light open-options"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 16px; height: 16px;"><path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg></a>
</li>
</ul>
<div class="popup-tab" id="popup-tab-overview">
<table class="table table-sm table-striped icinga-overview" id="popup-tab-overview-table">
<thead>
<tr>
<th>Instance</th>
<th>Hosts</th>
<th>Services</th>
</tr>
</thead>
<tbody></tbody>
</table>
<div class="alert alert-success" id="popup-tab-overview-alert-0" role="alert"><svg fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z" /></svg><b>Good job!</b> Looks like everything is working as it should. Coffee granted.</div>
<div class="alert alert-warning" id="popup-tab-overview-alert-1" role="alert"><svg fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" /></svg><b>Hmm...</b> We got a warning, maybe something is about to break.</div>
<div class="alert alert-info" id="popup-tab-overview-alert-new" role="alert"><svg fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15.182 15.182a4.5 4.5 0 01-6.364 0M21 12a9 9 0 11-18 0 9 9 0 0118 0zM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75zm-.375 0h.008v.015h-.008V9.75zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75zm-.375 0h.008v.015h-.008V9.75z" /></svg><b>Welcome!</b> Time to set up your first Icinga instance.<br><a href="#" class="open-options btn btn-sm btn-outline-dark mt-2">Click here to get to the options right away.</a></div>
<div class="alert alert-danger" id="popup-tab-overview-alert-2" role="alert"><svg fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z" />
<path stroke-linecap="round" stroke-linejoin="round" d="M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z" /></svg><b>Houston, we have a problem!</b> Something seems broken :-(</div>
<div class="animation-wrapper">
<div class="animation-content">
<aside></aside>
<aside></aside>
<div><span></span><span></span>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li>01</li>
</ul>
</div>
<div><span></span><span></span>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li>0A</li>
</ul>
</div>
<div><span></span><span></span>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li>1B</li>
</ul>
</div>
</div>
</div>
<div id="popup-tab-overview-downs" class="mt-4"></div>
</div>
<div class="popup-tab" id="popup-tab-hosts">
<div class="float-right filter"><input aria-label="Filter hostname" type="text" id="popup-tab-hosts-filter" placeholder="Filter hosts" class="form-control form-control-sm"></div>
<div id="popup-tab-hosts-tables"></div>
</div>
<div class="popup-tab" id="popup-tab-services">
<div class="float-right filter"><input aria-label="Filter service" type="text" id="popup-tab-services-filter" placeholder="Filter services" class="form-control form-control-sm"></div>
<div id="popup-tab-services-tables"></div>
</div>
<div class="popup-tab" id="popup-tab-about">
<h4 style="margin-top: 10px;"><img src="img/icon_38.png" alt="Icinga Multi Status" class="float-left" style="height: 20px; margin-right: 15px">Icinga Multi Status</h4>
<b>This extension comes without any guarantee.</b><br><br>
Icinga Multi Status helps you to monitor your (multiple or single) Icinga instances with comfortable alert badges and notifications about incidents right within your web browser.
<br><br>
The source-code of this extension is available at <a href="https://github.com/bashgeek/icinga-multi-status" target="_blank">GitHub</a>, please feel free to contribute or send in bugs or feature ideas. The layout is entirely based on the Bootstrap framework. Heavily inspired by IcingaChromedStatus.
<br><br>
Authored by Daniel Schmitz. The development was sponsored by <a href="https://blendbyte.com" target="_blank">Blendbyte Inc.</a>
<br><br>
<div class="row justify-content-between">
<div class="col-auto">
<a href="#" class="btn btn-sm btn-light open-options">Options</a>
<a href="help.html" target="_blank" class="btn btn-sm btn-light">Help</a>
</div>
<div class="col-auto">
<a href="https://github.com/bashgeek/icinga-multi-status" target="_blank"><img src="img/github.jpg" alt="GitHub" style="height: 30px; margin-right: 10px;"></a>
<a href="https://blendbyte.com" target="_blank"><img src="img/blendbyte.png" alt="blendbyte.com" style="height: 30px;"></a>
</div>
</div>
</div>
<div class="modal fade" id="modal_ack" tabindex="-1" role="dialog" aria-labelledby="modal_acknowledge" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal_iacknowledge_title"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="ack-comment" class="col-form-label">Comment</label>
<input type="text" class="form-control" id="ack-comment">
</div>
<div class="form-group">
<label for="ack-author" class="col-form-label">Author</label>
<input type="text" class="form-control" id="ack-author">
</div>
<div class="form-group mb-4">
<label for="ack-expire" class="col-form-label">Expiration</label>
<select class="form-control" id="ack-expire">
<option value="0">no expiration</option>
<option value="60">1 minute</option>
<option value="120">2 minutes</option>
<option value="300">5 minutes</option>
<option value="600">10 minutes</option>
<option value="900">15 minutes</option>
<option value="1800">30 minutes</option>
<option value="3600">1 hour</option>
<option value="7200">2 hours</option>
<option value="10800">3 hours</option>
<option value="21600">6 hours</option>
<option value="43200">12 hours</option>
<option value="86400">1 day</option>
<option value="172800">2 days</option>
<option value="259200">3 days</option>
</select>
</div>
<div class="checkbox">
<label><input type="checkbox" id="ack-services"> Apply for all services</label>
</div>
<div class="checkbox">
<label><input type="checkbox" id="ack-persistent"> Persistent</label>
</div>
<div class="checkbox">
<label><input type="checkbox" id="ack-sticky"> Sticky</label>
</div>
<div class="alert" id="ack-alert"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" id="ack-submit">ACK!</button>
</div>
</div>
</div>
</div>
<script src="inc/icinga.js"></script>
<script src="inc/popup.js"></script>
</body>
</html>