mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-07 08:34:15 +01:00
changed interval input to a select. select is autopopulated with options on load. default is 30 seconds
This commit is contained in:
parent
93b7220d5f
commit
f26dacaf22
@ -105,13 +105,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="row flex-row-reverse">
|
||||
<div class="col-2">
|
||||
<div class="input-group mb-3">
|
||||
<input type="number" id="refreshRate" class="form-control" value="10">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">Seconds</span>
|
||||
</div>
|
||||
<select class="custom-select" id="refreshRate">
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<label class="input-group-text" for="refreshRate">Seconds</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -316,6 +317,13 @@
|
||||
setRefreshInterval($(this).val() * 1000)
|
||||
});
|
||||
|
||||
for (var i = 5; i <= 600; i++) {
|
||||
if (i%5 == 0) {
|
||||
$("#refreshRate").append(new Option(i, i));
|
||||
}
|
||||
}
|
||||
$("#refreshRate").val(10);
|
||||
|
||||
setRefreshInterval(30000)
|
||||
</script>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user