Added delay patterns
This commit is contained in:
parent
eff3429f43
commit
d2e6812011
@ -2,6 +2,7 @@ $(function() {
|
|||||||
initDatePickers();
|
initDatePickers();
|
||||||
initCronType();
|
initCronType();
|
||||||
initSecretInputs();
|
initSecretInputs();
|
||||||
|
initDelayPattern();
|
||||||
});
|
});
|
||||||
|
|
||||||
function initDatePickers()
|
function initDatePickers()
|
||||||
@ -27,3 +28,12 @@ function initSecretInputs()
|
|||||||
$('.secrets-description').removeClass('hidden');
|
$('.secrets-description').removeClass('hidden');
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function initDelayPattern()
|
||||||
|
{
|
||||||
|
$('.delaypattern-item').on('click', function() {
|
||||||
|
let time = $(this).data('time');
|
||||||
|
$('#delay').val(time);
|
||||||
|
})
|
||||||
|
}
|
@ -11,8 +11,22 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="name">Delay (in seconds)</label>
|
<label for="name">Delay (in seconds)</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="dropdown input-group-prepend">
|
||||||
|
<button class="btn btn-outline-primary dropdown-toggle" type="button" id="delayButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
Patterns
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu" aria-labelledby="delayButton">
|
||||||
|
<a class="dropdown-item delaypattern-item" href="#" data-time="60">Every minute</a>
|
||||||
|
<a class="dropdown-item delaypattern-item" href="#" data-time="3600">Every hour</a>
|
||||||
|
<a class="dropdown-item delaypattern-item" href="#" data-time="86400">Every day</a>
|
||||||
|
<a class="dropdown-item delaypattern-item" href="#" data-time="604800">Every week</a>
|
||||||
|
<a class="dropdown-item delaypattern-item" href="#" data-time="2419200">Every 4 weeks</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<input type="number" class="form-control" id="delay" name="delay">
|
<input type="number" class="form-control" id="delay" name="delay">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="nextrun">Next run</label>
|
<label for="nextrun">Next run</label>
|
||||||
<input type="text" autocomplete="off" id="nextrunselector" class="form-control datetimepicker-input" data-target="#nextrunselector" data-toggle="datetimepicker" name="nextrun">
|
<input type="text" autocomplete="off" id="nextrunselector" class="form-control datetimepicker-input" data-target="#nextrunselector" data-toggle="datetimepicker" name="nextrun">
|
||||||
|
Loading…
Reference in New Issue
Block a user