Settings -> Alert tickets: switch it on, choose the osTicket integration (only ones with a ticket API set up can be chosen), who the tickets come from, help topic and priority, which severities and kinds, how long a problem must last, when many become one summary ticket, how long a return counts as the same problem, and what to do about problems already there. Buttons to send a test ticket and to check now, and a line saying what the last check did. Server messages (a missing integration, a refused key) are shown as they are. The Alerts page shows "Ticket #123" on an alert that has one, linking to it in osTicket, and a Ticket column in the CSV export. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
51 lines
2.0 KiB
TypeScript
51 lines
2.0 KiB
TypeScript
import type { CSSProperties } from "react";
|
|
import { NavLink, Outlet } from "react-router-dom";
|
|
|
|
const SUB_NAV = [
|
|
{ to: "/settings/notifications", label: "Notifications" },
|
|
{ to: "/settings/badges", label: "Badges" },
|
|
{ to: "/settings/display", label: "Display" },
|
|
{ to: "/settings/tags", label: "Tags" },
|
|
{ to: "/settings/alert-tickets", label: "Alert tickets" },
|
|
{ to: "/settings/names", label: "Names" },
|
|
{ to: "/settings/cache", label: "Cache" },
|
|
{ to: "/settings/logs", label: "Logs" },
|
|
{ to: "/settings/backup", label: "Backup" },
|
|
];
|
|
|
|
export default function Settings() {
|
|
return (
|
|
<>
|
|
<h2 className="page-title mb-3">Settings</h2>
|
|
<div className="row">
|
|
<div className="col-12 col-md-3 col-lg-2 mb-3 mb-md-0">
|
|
<div className="card">
|
|
{/* Tabler's default list-group-item padding (1.25rem) is sized for
|
|
standalone list cards, not a nav sidebar — at that padding the
|
|
first item's text sits ~12px below where the content column's
|
|
own heading/button row starts, even though the two boxes
|
|
themselves are top-aligned. Tightening just this list-group's
|
|
own padding (via its own CSS variable, verified pixel-for-pixel
|
|
against the real markup) brings the two back to the same
|
|
visual line instead of only the same box height. */}
|
|
<div className="list-group list-group-flush" style={{ "--tblr-list-group-item-padding-y": "0.5rem" } as CSSProperties}>
|
|
{SUB_NAV.map((item) => (
|
|
<NavLink
|
|
key={item.to}
|
|
to={item.to}
|
|
className={({ isActive }) => `list-group-item list-group-item-action ${isActive ? "active" : ""}`}
|
|
>
|
|
{item.label}
|
|
</NavLink>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div className="col-12 col-md-9 col-lg-10">
|
|
<Outlet />
|
|
</div>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|