mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-24 23:09:39 -05:00
Chore: make sql monitors eazier to use (#3474)
* Fixed the sql monitor not having the query required * Apply suggestions from code review * added `redis` and `mongodb` to the connectionString as requested by @chakflying
This commit is contained in:
parent
eb6167aaf1
commit
149d08ecbb
@ -373,42 +373,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- SQL Server / PostgreSQL / MySQL / Redis / MongoDB -->
|
||||||
|
<template v-if="monitor.type === 'sqlserver' || monitor.type === 'postgres' || monitor.type === 'mysql' || monitor.type === 'redis' || monitor.type === 'mongodb'">
|
||||||
|
<div class="my-3">
|
||||||
|
<label for="connectionString" class="form-label">{{ $t("Connection String") }}</label>
|
||||||
|
<input id="connectionString" v-model="monitor.databaseConnectionString" type="text" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<!-- SQL Server / PostgreSQL / MySQL -->
|
<!-- SQL Server / PostgreSQL / MySQL -->
|
||||||
<template v-if="monitor.type === 'sqlserver' || monitor.type === 'postgres' || monitor.type === 'mysql'">
|
<template v-if="monitor.type === 'sqlserver' || monitor.type === 'postgres' || monitor.type === 'mysql'">
|
||||||
<div class="my-3">
|
|
||||||
<label for="sqlConnectionString" class="form-label">{{ $t("Connection String") }}</label>
|
|
||||||
|
|
||||||
<template v-if="monitor.type === 'sqlserver'">
|
|
||||||
<input id="sqlConnectionString" v-model="monitor.databaseConnectionString" type="text" class="form-control">
|
|
||||||
</template>
|
|
||||||
<template v-if="monitor.type === 'postgres'">
|
|
||||||
<input id="sqlConnectionString" v-model="monitor.databaseConnectionString" type="text" class="form-control">
|
|
||||||
</template>
|
|
||||||
<template v-if="monitor.type === 'mysql'">
|
|
||||||
<input id="sqlConnectionString" v-model="monitor.databaseConnectionString" type="text" class="form-control">
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
<div class="my-3">
|
<div class="my-3">
|
||||||
<label for="sqlQuery" class="form-label">{{ $t("Query") }}</label>
|
<label for="sqlQuery" class="form-label">{{ $t("Query") }}</label>
|
||||||
<textarea id="sqlQuery" v-model="monitor.databaseQuery" class="form-control" placeholder="Example: select getdate()"></textarea>
|
<textarea id="sqlQuery" v-model="monitor.databaseQuery" class="form-control" :placeholder="$t('Example:', [ 'select getdate()' ])" required></textarea>
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<!-- Redis -->
|
|
||||||
<template v-if="monitor.type === 'redis'">
|
|
||||||
<div class="my-3">
|
|
||||||
<label for="redisConnectionString" class="form-label">{{ $t("Connection String") }}</label>
|
|
||||||
<input id="redisConnectionString" v-model="monitor.databaseConnectionString" type="text" class="form-control">
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- MongoDB -->
|
|
||||||
<template v-if="monitor.type === 'mongodb'">
|
|
||||||
<div class="my-3">
|
|
||||||
<label for="sqlConnectionString" class="form-label">{{ $t("Connection String") }}</label>
|
|
||||||
|
|
||||||
<template v-if="monitor.type === 'mongodb'">
|
|
||||||
<input id="sqlConnectionString" v-model="monitor.databaseConnectionString" type="text" class="form-control">
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user