feat(ops): health-fail alerts, optional DB backup, admin UX polish
Wire jobs-worker health probes to Discord/email alerts with cooldown, optional mysqldump, rate-limit /api/health, mark-all-read alerts, ConfirmDialog on destructive admin actions, and raise coverage floors. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
3bd712e744
commit
725e1cb338
16 files changed
+327
-32
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { desc } from "drizzle-orm";
|
||||
import { redirect } from "next/navigation";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { sendHotelAlert } from "@/actions/admin-alerts";
|
||||
import { markAllAlertsRead, sendHotelAlert } from "@/actions/admin-alerts";
|
||||
import { StatusCard } from "@/components/admin/dashboard";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { AlertLogs, db } from "@/lib/db";
|
||||
@@ -125,7 +125,16 @@ export default async function AdminAlerts() {
|
||||
</form>
|
||||
|
||||
<section className="admin-card">
|
||||
<h3 className="mt-0">{t("recentAlerts", { count: alerts.length })}</h3>
|
||||
<div className="mb-3 flex flex-wrap items-center justify-between gap-2">
|
||||
<h3 className="m-0">{t("recentAlerts", { count: alerts.length })}</h3>
|
||||
{unread > 0 ? (
|
||||
<form action={markAllAlertsRead}>
|
||||
<Button type="submit" variant="outline" size="sm">
|
||||
{t("markAllRead")}
|
||||
</Button>
|
||||
</form>
|
||||
) : null}
|
||||
</div>
|
||||
{alerts.length === 0 ? (
|
||||
<div className="admin-empty">{t("noAlerts")}</div>
|
||||
) : (
|
||||
|
||||
Reference in new issue
Block a user