mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-11-02 12:36:10 +08:00
Update clear stats (#4324)
This commit is contained in:
@@ -1491,6 +1491,14 @@ let needSetup = false;
|
|||||||
log.info("manage", `Clear Statistics User ID: ${socket.userID}`);
|
log.info("manage", `Clear Statistics User ID: ${socket.userID}`);
|
||||||
|
|
||||||
await R.exec("DELETE FROM heartbeat");
|
await R.exec("DELETE FROM heartbeat");
|
||||||
|
await R.exec("DELETE FROM stat_daily");
|
||||||
|
await R.exec("DELETE FROM stat_hourly");
|
||||||
|
await R.exec("DELETE FROM stat_minutely");
|
||||||
|
|
||||||
|
// Restart all monitors to reset the stats
|
||||||
|
for (let monitorID in server.monitorList) {
|
||||||
|
await restartMonitor(socket.userID, monitorID);
|
||||||
|
}
|
||||||
|
|
||||||
callback({
|
callback({
|
||||||
ok: true,
|
ok: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user