Implementing auto refresh

This commit is contained in:
Marco De Araujo 2025-12-24 19:05:20 -04:00
parent 4f9ced3e29
commit 2819df185e
7 changed files with 27 additions and 23 deletions

View file

@ -28,6 +28,7 @@ pub struct DashboardViewState {
pub monitors: Vec<MonitorViewState>,
pub is_loading: bool,
pub error_message: Option<String>,
pub auto_refresh_interval: u32,
}
impl DashboardViewState {
@ -38,6 +39,7 @@ impl DashboardViewState {
monitors: Vec::new(),
is_loading: true,
error_message: None,
auto_refresh_interval: 300,
}
}
@ -91,6 +93,7 @@ impl DashboardViewState {
monitors,
is_loading: false,
error_message: None,
auto_refresh_interval: data.audo_refresh_interval,
}
}
}