mirror of
https://github.com/amir20/dozzle.git
synced 2026-06-23 04:10:12 +00:00
a79ffdaf50
Co-authored-by: Dhaval Patel <dhavu262@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
63 lines
1.1 KiB
TypeScript
63 lines
1.1 KiB
TypeScript
export interface NotificationRule {
|
|
id: number;
|
|
name: string;
|
|
enabled: boolean;
|
|
containerExpression: string;
|
|
logExpression: string;
|
|
metricExpression?: string;
|
|
cooldown?: number;
|
|
triggerCount: number;
|
|
triggeredContainers: number;
|
|
lastTriggeredAt: string | null;
|
|
dispatcher: Dispatcher | null;
|
|
}
|
|
|
|
export interface Dispatcher {
|
|
id: number;
|
|
name: string;
|
|
type: string;
|
|
url?: string;
|
|
template?: string;
|
|
prefix?: string;
|
|
expiresAt?: string;
|
|
}
|
|
|
|
export interface NotificationRuleInput {
|
|
name: string;
|
|
enabled: boolean;
|
|
dispatcherId: number;
|
|
logExpression: string;
|
|
containerExpression: string;
|
|
metricExpression?: string;
|
|
cooldown?: number;
|
|
}
|
|
|
|
export interface PreviewResult {
|
|
containerError?: string;
|
|
logError?: string;
|
|
metricError?: string;
|
|
matchedContainers: {
|
|
id: string;
|
|
name: string;
|
|
image: string;
|
|
host: string;
|
|
}[];
|
|
matchedLogs: {
|
|
id: number;
|
|
t: string;
|
|
m: unknown;
|
|
rm: string;
|
|
ts: number;
|
|
l: string;
|
|
s: string;
|
|
}[];
|
|
totalLogs: number;
|
|
messageKeys?: string[];
|
|
}
|
|
|
|
export interface TestWebhookResult {
|
|
success: boolean;
|
|
statusCode?: number;
|
|
error?: string;
|
|
}
|