Compare commits
No commits in common. "main" and "v0.38.0" have entirely different histories.
7 changed files with 17 additions and 23 deletions
18
Cargo.lock
generated
18
Cargo.lock
generated
|
|
@ -78,9 +78,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anyhow"
|
name = "anyhow"
|
||||||
version = "1.0.101"
|
version = "1.0.100"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea"
|
checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "atomic"
|
name = "atomic"
|
||||||
|
|
@ -249,9 +249,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "4.5.57"
|
version = "4.5.54"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6899ea499e3fb9305a65d5ebf6e3d2248c5fab291f300ad0a704fbe142eae31a"
|
checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap_builder",
|
"clap_builder",
|
||||||
"clap_derive",
|
"clap_derive",
|
||||||
|
|
@ -259,9 +259,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_builder"
|
name = "clap_builder"
|
||||||
version = "4.5.57"
|
version = "4.5.54"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7b12c8b680195a62a8364d16b8447b01b6c2c8f9aaf68bee653be34d4245e238"
|
checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstream",
|
"anstream",
|
||||||
"anstyle",
|
"anstyle",
|
||||||
|
|
@ -271,9 +271,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_derive"
|
name = "clap_derive"
|
||||||
version = "4.5.55"
|
version = "4.5.49"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
|
checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck",
|
"heck",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
|
|
@ -2668,7 +2668,7 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uptime-kuma-dashboard"
|
name = "uptime-kuma-dashboard"
|
||||||
version = "0.38.2"
|
version = "0.38.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "uptime-kuma-dashboard"
|
name = "uptime-kuma-dashboard"
|
||||||
version = "0.38.2"
|
version = "0.38.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.5.57", features = ["derive", "env"] }
|
clap = { version = "4.5.54", features = ["derive", "env"] }
|
||||||
reqwest = { version = "0.13.1", default-features = false, features = [
|
reqwest = { version = "0.13.1", default-features = false, features = [
|
||||||
"blocking",
|
"blocking",
|
||||||
"json",
|
"json",
|
||||||
"rustls",
|
"rustls",
|
||||||
] }
|
] }
|
||||||
anyhow = "1.0.101"
|
anyhow = "1.0"
|
||||||
fluent-templates = "0.13.2"
|
fluent-templates = "0.13.2"
|
||||||
unic-langid = "0.9.6"
|
unic-langid = "0.9.6"
|
||||||
sys-locale = "0.3.2"
|
sys-locale = "0.3.2"
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,6 @@
|
||||||
|
|
||||||
A terminal-based monitoring dashboard for Uptime Kuma that displays service status, uptime percentages, and historical performance data directly in your terminal. Built with Rust for performance and reliability.
|
A terminal-based monitoring dashboard for Uptime Kuma that displays service status, uptime percentages, and historical performance data directly in your terminal. Built with Rust for performance and reliability.
|
||||||
|
|
||||||
## Demo
|
|
||||||
|
|
||||||
<video width="800" controls>
|
|
||||||
<source src="assets/demo.webm" type="video/webm">
|
|
||||||
Your browser does not support the video tag.
|
|
||||||
</video>
|
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This personal project started as a way to monitor my home lab services without needing a web browser. It connects to your Uptime Kuma instance API and presents a clean, color-coded view of your services' status with real-time updates. The dashboard works great on servers, remote terminals, or anywhere you prefer a lightweight monitoring solution.
|
This personal project started as a way to monitor my home lab services without needing a web browser. It connects to your Uptime Kuma instance API and presents a clean, color-coded view of your services' status with real-time updates. The dashboard works great on servers, remote terminals, or anywhere you prefer a lightweight monitoring solution.
|
||||||
|
|
|
||||||
BIN
assets/demo.webm
BIN
assets/demo.webm
Binary file not shown.
|
|
@ -191,7 +191,7 @@ impl App {
|
||||||
}
|
}
|
||||||
|
|
||||||
let max_scroll = state
|
let max_scroll = state
|
||||||
.get_total_length()
|
.get_total_lenght()
|
||||||
.saturating_sub(area[0].height as usize)
|
.saturating_sub(area[0].height as usize)
|
||||||
.saturating_add(1);
|
.saturating_add(1);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ static STATUS_LINE_CACHE: OnceLock<RwLock<HashMap<u64, Line<'static>>>> = OnceLo
|
||||||
|
|
||||||
pub fn render_monitor_list(main_frame: &mut Frame, area: Rect, state: &mut DashboardViewState) {
|
pub fn render_monitor_list(main_frame: &mut Frame, area: Rect, state: &mut DashboardViewState) {
|
||||||
let available_height = area.height as usize;
|
let available_height = area.height as usize;
|
||||||
let max_scroll = state.get_total_length().saturating_sub(available_height);
|
let max_scroll = state.get_total_lenght().saturating_sub(available_height);
|
||||||
|
|
||||||
if state.scroll_state.get_position() > max_scroll {
|
if state.scroll_state.get_position() > max_scroll {
|
||||||
state.scroll_state = state.scroll_state.position(max_scroll);
|
state.scroll_state = state.scroll_state.position(max_scroll);
|
||||||
|
|
@ -48,7 +48,7 @@ pub fn render_monitor_list(main_frame: &mut Frame, area: Rect, state: &mut Dashb
|
||||||
let mut current_y = area.y as usize;
|
let mut current_y = area.y as usize;
|
||||||
let mut rendered_height = 0;
|
let mut rendered_height = 0;
|
||||||
let mut lines_skipped = 0;
|
let mut lines_skipped = 0;
|
||||||
let half = state.get_total_length().saturating_div(2);
|
let half = state.get_total_lenght().saturating_div(2);
|
||||||
|
|
||||||
for group in state.groups.iter() {
|
for group in state.groups.iter() {
|
||||||
let group_height = group.monitors.len() + BORDER_LINES_VIEW;
|
let group_height = group.monitors.len() + BORDER_LINES_VIEW;
|
||||||
|
|
@ -259,6 +259,7 @@ fn get_cached_status_line(status_history: &[MonitorStatus]) -> Line<'static> {
|
||||||
spans.extend(
|
spans.extend(
|
||||||
status_history
|
status_history
|
||||||
.iter()
|
.iter()
|
||||||
|
.rev()
|
||||||
.take(STATUS_LINE_LENGTH)
|
.take(STATUS_LINE_LENGTH)
|
||||||
.map(|status| get_status_span(status).clone()),
|
.map(|status| get_status_span(status).clone()),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ impl DashboardViewState {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_total_length(&self) -> usize {
|
pub fn get_total_lenght(&self) -> usize {
|
||||||
self.total_length
|
self.total_length
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue