Merge ingest-api, collector-worker, admin-ui, database/error_reporting, deploy/lxc, docker-compose, and deployment docs into the dedicated repository. Paths updated for repo root (ER_REPO_ROOT, systemd WorkingDirectory). Root README documents layout. Co-Authored-By: Paperclip <[email protected]>
22 lines
536 B
TypeScript
22 lines
536 B
TypeScript
import type { Severity } from "@/lib/types";
|
|
|
|
const _labels: Record<Severity, string> = {
|
|
critical: "Crítico",
|
|
high: "Alto",
|
|
medium: "Médio",
|
|
low: "Baixo",
|
|
info: "Info",
|
|
};
|
|
|
|
const _class: Record<Severity, string> = {
|
|
critical: "text-bg-dark",
|
|
high: "text-bg-danger",
|
|
medium: "text-bg-warning",
|
|
low: "text-bg-info",
|
|
info: "text-bg-light text-dark border",
|
|
};
|
|
|
|
export function SeverityBadge({ severity }: { severity: Severity }) {
|
|
return <span className={`badge ${_class[severity]}`}>{_labels[severity]}</span>;
|
|
}
|