-
Notifications
You must be signed in to change notification settings - Fork 6
/
options.html
266 lines (255 loc) · 12.2 KB
/
options.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Icinga Multi Status - Options</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 { min-width: 1000px; min-height: 1000px; }</style>
</head>
<body>
<nav class="navbar navbar-default" role="navigation" style="margin-bottom: 40px;">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#" style="font-size: 2rem;"><img src="img/icon_38.png" alt="Icinga Multi Status" class="pull-left" style="margin-right: 20px; height: 38px;"> Icinga Multi Status</a>
</div>
</div>
</nav>
<div class="container">
<h3>Instances</h3>
<table class="table table-hover table-sm" id="instances-table">
<thead>
<tr>
<th>Name</th>
<th width="450">Status</th>
<th width="150">Activated</th>
<th width="100"></th>
</tr>
</thead>
<tbody></tbody>
</table>
<button type="button" class="btn btn-light" id="instance-button-add">Add instance</button>
<div class="card card-default" style="margin-top: 50px">
<h5 class="card-header">Global Settings <a href="help.html" target="_blank" class="btn btn-sm float-right btn-outline-info">?</a></h5>
<div class="card-body">
<div class="form-group">
<label for="settings-refresh" class="col-sm-12 col-form-label">Refresh Rate:</label>
<div class="col-sm-10">
<select class="form-control" id="settings-refresh">
<option value="10">10 seconds</option>
<option value="30">30 seconds</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">60 minutes</option>
</select>
</div>
</div>
<div class="form-group">
<label for="settings-ack-expire" class="col-sm-12 col-form-label">Default Acknowledge Expiry</label>
<div class="col-sm-10">
<select class="form-control" id="settings-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>
<div class="form-group">
<label for="settings-ack-persistent" class="col-sm-12 col-form-label">Default Acknowledge Persistent</label>
<div class="col-sm-10">
<select class="form-control" id="settings-ack-persistent">
<option value="0">not persistent</option>
<option value="1">persistent</option>
</select>
</div>
</div>
<div class="form-group">
<label for="settings-ack-sticky" class="col-sm-12 col-form-label">Default Acknowledge Sticky</label>
<div class="col-sm-10">
<select class="form-control" id="settings-ack-sticky">
<option value="0">not sticky</option>
<option value="1">sticky</option>
</select>
</div>
</div>
<div class="form-group">
<label for="settings-ack-author" class="col-sm-12 col-form-label">Default Acknowledge Author</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="settings-ack-author">
</div>
</div>
<div class="form-group">
<label for="settings-alarm-file" class="col-form-label">Play Alarm Sound (<a href="https://github.com/bashgeek/icinga-multi-status/wiki/Alarm-Sounds" target="_blank">click here for examples</a>)</label>
<select class="form-control" id="settings-alarm-file">
<option value="">- do not play sound -</option>
<option value="dingding">Ding Ding</option>
<option value="horn">Horn</option>
<option value="laser">Laser</option>
</select>
</div>
<div class="form-group">
<label for="settings-alarm-repeat" class="col-form-label">Repeat Alarm Sound</label>
<select class="form-control" id="settings-alarm-repeat">
<option value="">- play only once when problem noticed -</option>
<option value="1">Every minute</option>
<option value="5">Every 5 minutes</option>
<option value="15">Every 15 minutes</option>
<option value="30">Every 30 minutes</option>
<option value="60">Every 60 minutes</option>
<option value="always">On every refresh</option>
</select>
</div>
<div class="form-group mt-4" style="margin-bottom:0">
<div class="col-sm-offset-2 col-sm-10 d-flex align-items-center gap-3">
<button class="btn btn-primary" id="settings-submit">Save Settings</button>
<div class="text-success" id="settings-submit-confirm" style="display: none;">Settings saved!</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modal_instance" tabindex="-1" role="dialog" aria-labelledby="modal_instance_label" 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_instance_title"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form role="form">
<input type="hidden" id="instance-id" value="">
<div class="form-group">
<label for="instance-url" class="col-form-label">Icinga Data URL (API URL for Icinga 2, Icinga Classic UI URL for Icinga 1):</label>
<input type="text" class="form-control" id="instance-url" placeholder="example: https://myicingaserver.com/icinga/ or https://myicingaserver.com:5665/">
</div>
<div class="form-group">
<label for="instance-url-web" class="col-form-label">Icingaweb 2 URL (URL to Icingaweb 2 to use for links), optional:</label>
<input type="text" class="form-control" id="instance-url-web" placeholder="example: https://myicingaserver.com/icingaweb2/">
</div>
<div class="form-group">
<label for="instance-title" class="col-form-label">Instance Title:</label>
<input type="text" class="form-control" id="instance-title" placeholder="example: My Icinga Instance">
</div>
<div class="form-group">
<label for="instance-icinga-type" class="col-form-label">Icinga Type:</label>
<select class="form-control" id="instance-icinga-type"><option value="icinga2_api">Icinga2 API</option><option value="">Icinga Classic UI</option></select>
</div>
<div class="form-group">
<label for="instance-user" class="col-form-label">Username:</label>
<input type="text" class="form-control" id="instance-user" placeholder="example: icinga">
</div>
<div class="form-group">
<label for="instance-pass" class="col-form-label">Password:</label>
<input type="password" class="form-control" id="instance-pass">
</div>
<div class="form-group">
<label for="instance-ack-expire" class="col-form-label">Default Acknowledge Expiry</label>
<select class="form-control" id="instance-ack-expire">
<option value="-1">- use global default -</option>
<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="form-group">
<label for="instance-ack-persistent" class="col-form-label">Default Acknowledge Persistent</label>
<select class="form-control" id="instance-ack-persistent">
<option value="-1">- use global default -</option>
<option value="0">not persistent</option>
<option value="1">persistent</option>
</select>
</div>
<div class="form-group">
<label for="instance-ack-sticky" class="col-form-label">Default Acknowledge Sticky</label>
<select class="form-control" id="instance-ack-sticky">
<option value="-1">- use global default -</option>
<option value="0">not sticky</option>
<option value="1">sticky</option>
</select>
</div>
<div class="form-group">
<label for="instance-ack-author" class="col-form-label">Default Acknowledge Author</label>
<input type="text" class="form-control" id="instance-ack-author" placeholder="Leave empty for global default">
</div>
<div class="form-group">
<label for="instance-hide-hosts" class="col-form-label">Hide and ignore hosts (regexp):</label>
<input type="text" class="form-control" id="instance-hide-hosts" placeholder="example: web[0-9]+">
</div>
<div class="form-group">
<label for="instance-hide-services" class="col-form-label">Hide and ignore services (regexp):</label>
<input type="text" class="form-control" id="instance-hide-services" placeholder="example: (imap|ssh)">
</div>
<div class="checkbox mt-4">
<label><input type="checkbox" id="instance-hide-ack"> Ignore acknowledged host & service problems</label>
</div>
<div class="checkbox">
<label><input type="checkbox" id="instance-hide-down"> Ignore hosts & services with downtimes</label>
</div>
<div class="checkbox">
<label><input type="checkbox" id="instance-hide-soft"> Ignore hosts & services with problems in SOFT state</label>
</div>
<div class="checkbox">
<label><input type="checkbox" id="instance-notf-nowarn"> No notifications for warnings</label>
</div>
</form>
<div class="alert" id="instance-alert" style="margin-top: 20px;"></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="instance-submit">Save instance</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modal_instance_delete" tabindex="-1" role="dialog" aria-labelledby="modal_instance_delete_label" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal_instance_delete_title">Delete Instance</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="hidden" id="instance-delete-id" value="">
Are you sure you want to delete the Icinga instance "<span id="instance-delete-title"></span>"?
<div class="alert" id="instance-delete-alert" style="margin-bottom:0"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger" id="instance-delete-submit">Yes, delete it!</button>
</div>
</div>
</div>
</div>
</div>
<script src="inc/icinga.js"></script>
<script src="inc/options.js"></script>
</body>
</html>