Adding heartbeats to the unified data
This commit is contained in:
parent
7270249ef6
commit
1c4077ffc3
2 changed files with 24 additions and 2 deletions
12
src/main.rs
12
src/main.rs
|
|
@ -60,6 +60,18 @@ fn main() -> Result<()> {
|
|||
"Uptime Service: {}",
|
||||
monitor.uptime_data.expect("Formgen?").get_perc_formated()
|
||||
);
|
||||
println!(
|
||||
"Status atual: {}",
|
||||
monitor
|
||||
.heartbeats
|
||||
.last()
|
||||
.map(|h| if h.status == 1 {
|
||||
"✅ Online"
|
||||
} else {
|
||||
"❌ Offline"
|
||||
})
|
||||
.unwrap_or("❓ Sem dados")
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue