only allow ip address for hostname when monitor type is steam

pull/492/head
Denis Freund 3 years ago
parent b67b4d5afd
commit efbadd0737

@ -50,12 +50,18 @@
</div> </div>
</div> </div>
<!-- TCP Port / Ping / DNS only --> <!-- Hostname Port / Ping / DNS only -->
<div v-if="monitor.type === 'port' || monitor.type === 'ping' || monitor.type === 'dns' || monitor.type === 'steam' " class="my-3"> <div v-if="monitor.type === 'port' || monitor.type === 'ping' || monitor.type === 'dns'" class="my-3">
<label for="hostname" class="form-label">{{ $t("Hostname") }}</label> <label for="hostname" class="form-label">{{ $t("Hostname") }}</label>
<input id="hostname" v-model="monitor.hostname" type="text" class="form-control" :pattern="`${ipRegexPattern}|${hostnameRegexPattern}`" required> <input id="hostname" v-model="monitor.hostname" type="text" class="form-control" :pattern="`${ipRegexPattern}|${hostnameRegexPattern}`" required>
</div> </div>
<!-- Hostname Steam only -->
<div v-if="monitor.type === 'steam' " class="my-3">
<label for="ipAddress" class="form-label">{{ $t("IP Address") }}</label>
<input id="ipAddress" v-model="monitor.hostname" type="text" class="form-control" :pattern="`${ipRegexPattern}`" required>
</div>
<!-- For TCP Port Type --> <!-- For TCP Port Type -->
<div v-if="monitor.type === 'port'" class="my-3"> <div v-if="monitor.type === 'port'" class="my-3">
<label for="port" class="form-label">{{ $t("Port") }}</label> <label for="port" class="form-label">{{ $t("Port") }}</label>

Loading…
Cancel
Save