45 lines
932 B
Dart
45 lines
932 B
Dart
/// Aggregate summary of the current system state displayed on the dashboard.
|
|
class DashboardSummary {
|
|
final ServerSummary servers;
|
|
final AlertSummary alerts;
|
|
final int runningTasks;
|
|
final int totalTasks;
|
|
|
|
const DashboardSummary({
|
|
required this.servers,
|
|
required this.alerts,
|
|
required this.runningTasks,
|
|
required this.totalTasks,
|
|
});
|
|
}
|
|
|
|
/// Summary counts for server fleet status.
|
|
class ServerSummary {
|
|
final int total;
|
|
final int online;
|
|
final int warning;
|
|
final int offline;
|
|
|
|
const ServerSummary({
|
|
required this.total,
|
|
required this.online,
|
|
required this.warning,
|
|
required this.offline,
|
|
});
|
|
}
|
|
|
|
/// Summary counts for alert severities.
|
|
class AlertSummary {
|
|
final int critical;
|
|
final int warning;
|
|
final int info;
|
|
|
|
const AlertSummary({
|
|
required this.critical,
|
|
required this.warning,
|
|
required this.info,
|
|
});
|
|
|
|
int get total => critical + warning + info;
|
|
}
|