add ping and fix uptime

This commit is contained in:
LouisLam 2021-07-01 17:00:23 +08:00
parent 9c653c3d05
commit a6b5986dd6
9 changed files with 285 additions and 97 deletions

View file

@ -27,22 +27,19 @@
<input type="url" class="form-control" id="url" v-model="monitor.url" pattern="https?://.+" required>
</div>
<template v-if="monitor.type === 'port' ">
<div class="mb-3">
<label for="hostname" class="form-label">Hostname</label>
<input type="text" class="form-control" id="hostname" v-model="monitor.hostname" required>
</div>
<div class="mb-3">
<label for="port" class="form-label">Port</label>
<input type="number" class="form-control" id="port" v-model="monitor.port" required min="0" max="65535">
</div>
</template>
<div class="mb-3" v-if="monitor.type === 'port' || monitor.type === 'ping' ">
<label for="hostname" class="form-label">Hostname</label>
<input type="text" class="form-control" id="hostname" v-model="monitor.hostname" required>
</div>
<div class="mb-3" v-if="monitor.type === 'port' ">
<label for="port" class="form-label">Port</label>
<input type="number" class="form-control" id="port" v-model="monitor.port" required min="0" max="65535" step="1">
</div>
<div class="mb-3">
<label for="interval" class="form-label">Heartbeat Interval (Every {{ monitor.interval }} seconds)</label>
<input type="number" class="form-control" id="interval" v-model="monitor.interval" required min="20">
<input type="number" class="form-control" id="interval" v-model="monitor.interval" required min="20" step="1">
</div>
<div>