fix: resolve pre-existing TypeScript errors in alerts and page

Add missing checkInterval to AlertConfig, targetAgents to AlertRule,
and replace invalid SVG title prop with aria-label.
This commit is contained in:
xmanrui
2026-02-25 13:54:08 +08:00
parent 12e43f5983
commit 74b50975b9
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -16,6 +16,7 @@ interface AlertConfig {
enabled: boolean;
receiveAgent: string;
rules: AlertRule[];
checkInterval?: number;
}
interface Agent {
+1
View File
@@ -10,6 +10,7 @@ interface AlertRule {
name: string;
enabled: boolean;
threshold?: number;
targetAgents?: string[];
}
interface AlertConfig {
+1 -1
View File
@@ -274,7 +274,7 @@ function MiniSparkline({ data, width = 120, height = 24, color: fixedColor }: {
const id = `spark-${Math.random().toString(36).slice(2, 8)}`;
return (
<span className="inline-flex items-center gap-1">
<svg width={width} height={height} className="inline-block align-middle" title={data.map(v => v ? formatMs(v) : '-').join(' → ')}>
<svg width={width} height={height} className="inline-block align-middle" aria-label={data.map(v => v ? formatMs(v) : '-').join(' → ')}>
<defs>
<linearGradient id={id} x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stopColor={color} stopOpacity={0.3} />