mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04:00
remove some debug msg
This commit is contained in:
parent
44bcd78f9a
commit
86492f6dad
@ -66,7 +66,6 @@ class Monitor extends BeanModel {
|
|||||||
bean.duration = dayjs(bean.time).diff(dayjs(previousBeat.time), 'second');
|
bean.duration = dayjs(bean.time).diff(dayjs(previousBeat.time), 'second');
|
||||||
} else {
|
} else {
|
||||||
bean.duration = 0;
|
bean.duration = 0;
|
||||||
console.log(previousBeat)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -167,7 +166,7 @@ class Monitor extends BeanModel {
|
|||||||
let avgPing = parseInt(await R.getCell(`
|
let avgPing = parseInt(await R.getCell(`
|
||||||
SELECT AVG(ping)
|
SELECT AVG(ping)
|
||||||
FROM heartbeat
|
FROM heartbeat
|
||||||
WHERE time > DATE('now', ? || ' hours')
|
WHERE time > DATETIME('now', ? || ' hours')
|
||||||
AND ping IS NOT NULL
|
AND ping IS NOT NULL
|
||||||
AND monitor_id = ? `, [
|
AND monitor_id = ? `, [
|
||||||
-duration,
|
-duration,
|
||||||
@ -189,7 +188,7 @@ class Monitor extends BeanModel {
|
|||||||
let downtimeList = await R.getAll(`
|
let downtimeList = await R.getAll(`
|
||||||
SELECT duration, time, status
|
SELECT duration, time, status
|
||||||
FROM heartbeat
|
FROM heartbeat
|
||||||
WHERE time > DATE('now', ? || ' hours')
|
WHERE time > DATETIME('now', ? || ' hours')
|
||||||
AND monitor_id = ? `, [
|
AND monitor_id = ? `, [
|
||||||
-duration,
|
-duration,
|
||||||
monitorID
|
monitorID
|
||||||
|
@ -124,7 +124,6 @@ class Notification {
|
|||||||
const client = new Discord.Client();
|
const client = new Discord.Client();
|
||||||
await client.login(notification.discordToken)
|
await client.login(notification.discordToken)
|
||||||
|
|
||||||
console.log(notification.discordChannelID)
|
|
||||||
const channel = await client.channels.fetch(notification.discordChannelID);
|
const channel = await client.channels.fetch(notification.discordChannelID);
|
||||||
await channel.send(msg);
|
await channel.send(msg);
|
||||||
|
|
||||||
|
@ -54,9 +54,9 @@
|
|||||||
<h2>Notifications</h2>
|
<h2>Notifications</h2>
|
||||||
<p v-if="$root.notificationList.length === 0">Not available, please setup.</p>
|
<p v-if="$root.notificationList.length === 0">Not available, please setup.</p>
|
||||||
|
|
||||||
<ul>
|
<ul class="list-group mb-3" style="border-radius: 1rem;">
|
||||||
<li v-for="notification in $root.notificationList">
|
<li class="list-group-item" v-for="notification in $root.notificationList">
|
||||||
{{ notification.name }}
|
{{ notification.name }}<br />
|
||||||
<a href="#" @click="$refs.notificationDialog.show(notification.id)">Edit</a>
|
<a href="#" @click="$refs.notificationDialog.show(notification.id)">Edit</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user