Creation dashboard (graph chart.js) + tests
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export type AlertSeverity = 'low' | 'medium' | 'high' | 'critical';
|
||||
export type AlertType = 'spike' | 'threshold' | 'anomaly' | 'outage' | 'sensor';
|
||||
|
||||
export interface Alert {
|
||||
alert_id: string;
|
||||
timestamp: string;
|
||||
site_id: string;
|
||||
severity: AlertSeverity;
|
||||
type: AlertType;
|
||||
message: string;
|
||||
value: number;
|
||||
threshold: number;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
export interface SiteSummary {
|
||||
site_id: string;
|
||||
site_name: string;
|
||||
current_consumption_kw: number | null;
|
||||
capacity_kw: number;
|
||||
load_percent: number | null;
|
||||
data_quality: 'good' | 'partial' | 'degraded' | 'critical';
|
||||
}
|
||||
|
||||
export interface StatsSummary {
|
||||
timestamp: string;
|
||||
total_sites: number;
|
||||
total_consumption_kw: number;
|
||||
total_capacity_kw: number;
|
||||
average_load_percent: number;
|
||||
sites: SiteSummary[];
|
||||
}
|
||||
Reference in New Issue
Block a user