mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-19 18:56:48 +02:00
cleaned up empty lines + linting
This commit is contained in:
parent
94adf2c9d4
commit
b41d10ec27
3 changed files with 19 additions and 23 deletions
|
@ -100,7 +100,6 @@ router.get("/api/status-page/heartbeat/:slug", cache("1 minutes"), async (reques
|
|||
heartbeatList[monitorID] = aggregatedData;
|
||||
} else {
|
||||
// Fall back to raw heartbeat data (auto mode or no stat data)
|
||||
|
||||
if (heartbeatRange === "auto") {
|
||||
// Auto mode - use original LIMIT 100 logic
|
||||
list = await R.getAll(`
|
||||
|
@ -116,8 +115,7 @@ router.get("/api/status-page/heartbeat/:slug", cache("1 minutes"), async (reques
|
|||
const hours = parseRangeHours(heartbeatRange);
|
||||
const date = new Date();
|
||||
date.setHours(date.getHours() - hours);
|
||||
const dateFrom = date.toISOString().slice(0, 19).replace('T', ' ');
|
||||
|
||||
const dateFrom = date.toISOString().slice(0, 19).replace("T", " ");
|
||||
|
||||
list = await R.getAll(`
|
||||
SELECT * FROM heartbeat
|
||||
|
|
|
@ -48,7 +48,7 @@ async function getAggregatedHeartbeatData(monitorId, range) {
|
|||
SELECT * FROM stat_hourly
|
||||
WHERE monitor_id = ? AND timestamp >= ?
|
||||
ORDER BY timestamp ASC
|
||||
`, [monitorId, timestampKey]);
|
||||
`, [ monitorId, timestampKey ]);
|
||||
|
||||
// If no stat data, fall back to raw heartbeat data
|
||||
if (stats.length === 0) {
|
||||
|
@ -75,7 +75,7 @@ async function getAggregatedHeartbeatData(monitorId, range) {
|
|||
SELECT * FROM stat_daily
|
||||
WHERE monitor_id = ? AND timestamp >= ?
|
||||
ORDER BY timestamp ASC
|
||||
`, [monitorId, timestampKey]);
|
||||
`, [ monitorId, timestampKey ]);
|
||||
|
||||
// If no stat data, fall back to raw heartbeat data
|
||||
if (stats.length === 0) {
|
||||
|
|
|
@ -99,7 +99,6 @@ export default {
|
|||
},
|
||||
|
||||
shortBeatList() {
|
||||
|
||||
if (!this.beatList) {
|
||||
return [];
|
||||
}
|
||||
|
@ -130,7 +129,6 @@ export default {
|
|||
},
|
||||
|
||||
aggregatedBeatList() {
|
||||
|
||||
if (!this.beatList || this.beatList.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue