Ops Alerts discoverability

This commit is contained in:
Oliver Kieselbach
2026-04-03 10:38:32 +02:00
parent 6214c9993d
commit 6cac2ba513
2 changed files with 21 additions and 9 deletions
@@ -1,6 +1,7 @@
"use client";
import { useState, useEffect } from "react";
import Link from "next/link";
import { api } from "@/lib/api";
import { authenticatedFetch, TokenExpiredError } from "@/lib/authenticatedFetch";
@@ -101,7 +102,7 @@ export function OpsEventsSection({
const [selectedEvent, setSelectedEvent] = useState<OpsEvent | null>(null);
const [categoryFilter, setCategoryFilter] = useState<string>("");
const [currentPage, setCurrentPage] = useState(0);
const pageSize = 20;
const pageSize = 15;
useEffect(() => {
fetchEvents();
@@ -162,13 +163,24 @@ export function OpsEventsSection({
</p>
</div>
</div>
<button
onClick={fetchEvents}
disabled={loading}
className="px-3 py-1.5 text-xs font-medium rounded-md border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-600 disabled:opacity-40 transition-colors"
>
{loading ? "Loading..." : "Refresh"}
</button>
<div className="flex items-center gap-2">
<Link
href="/admin/settings#alerts"
className="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors"
>
<svg className="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
</svg>
Configure Alerts
</Link>
<button
onClick={fetchEvents}
disabled={loading}
className="px-3 py-1.5 text-xs font-medium rounded-md border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-600 disabled:opacity-40 transition-colors"
>
{loading ? "Loading..." : "Refresh"}
</button>
</div>
</div>
</div>
File diff suppressed because one or more lines are too long