mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-20 18:55:49 +08:00
feat: Add a "manual" (static/fixed) monitor (#5897)
Co-authored-by: Maksim Kachynski <max.kachinsky@rocketdata.io> Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
@@ -1122,5 +1122,6 @@
|
||||
"Add Another Tag": "Add Another Tag",
|
||||
"Staged Tags for Batch Add": "Staged Tags for Batch Add",
|
||||
"Clear Form": "Clear Form",
|
||||
"pause": "Pause"
|
||||
"pause": "Pause",
|
||||
"Manual": "Manual"
|
||||
}
|
||||
|
@@ -55,6 +55,9 @@
|
||||
<option value="push">
|
||||
Push
|
||||
</option>
|
||||
<option value="manual">
|
||||
{{ $t("Manual") }}
|
||||
</option>
|
||||
</optgroup>
|
||||
|
||||
<optgroup :label="$t('Specific Monitor Type')">
|
||||
@@ -115,6 +118,18 @@
|
||||
<input id="name" v-model="monitor.name" type="text" class="form-control" data-testid="friendly-name-input" :placeholder="defaultFriendlyName">
|
||||
</div>
|
||||
|
||||
<!-- Manual Status switcher -->
|
||||
<div v-if="monitor.type === 'manual'" class="mb-3">
|
||||
<div class="btn-group w-100 mb-3">
|
||||
<button class="btn btn-success" @click="monitor.manual_status = 1">
|
||||
<i class="fas fa-check"></i> {{ $t("Up") }}
|
||||
</button>
|
||||
<button class="btn btn-danger" @click="monitor.manual_status = 0">
|
||||
<i class="fas fa-times"></i> {{ $t("Down") }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- URL -->
|
||||
<div v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'json-query' || monitor.type === 'real-browser' " class="my-3">
|
||||
<label for="url" class="form-label">{{ $t("URL") }}</label>
|
||||
|
Reference in New Issue
Block a user