Add CM Dashboard ASCII logo to rebuild tmux popup
All checks were successful
Build and Release / build-and-release (push) Successful in 2m9s

- Display branded CM Dashboard ASCII logo in green when rebuild starts
- Shows logo immediately when tmux popup opens for better UX
- Includes rebuild target hostname and visual separator
- Enhances rebuild process with professional branding
- Bump version to v0.1.39
This commit is contained in:
Christoffer Martinsson 2025-10-28 23:12:09 +01:00
parent 6509a2b91a
commit 783d233319
5 changed files with 25 additions and 10 deletions

6
Cargo.lock generated
View File

@ -270,7 +270,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
[[package]] [[package]]
name = "cm-dashboard" name = "cm-dashboard"
version = "0.1.37" version = "0.1.38"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@ -291,7 +291,7 @@ dependencies = [
[[package]] [[package]]
name = "cm-dashboard-agent" name = "cm-dashboard-agent"
version = "0.1.37" version = "0.1.38"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -314,7 +314,7 @@ dependencies = [
[[package]] [[package]]
name = "cm-dashboard-shared" name = "cm-dashboard-shared"
version = "0.1.37" version = "0.1.38"
dependencies = [ dependencies = [
"chrono", "chrono",
"serde", "serde",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "cm-dashboard-agent" name = "cm-dashboard-agent"
version = "0.1.38" version = "0.1.39"
edition = "2021" edition = "2021"
[dependencies] [dependencies]

View File

@ -1,6 +1,6 @@
[package] [package]
name = "cm-dashboard" name = "cm-dashboard"
version = "0.1.38" version = "0.1.39"
edition = "2021" edition = "2021"
[dependencies] [dependencies]

View File

@ -244,16 +244,31 @@ impl TuiApp {
KeyCode::Char('r') => { KeyCode::Char('r') => {
// System rebuild command - works on any panel for current host // System rebuild command - works on any panel for current host
if let Some(hostname) = self.current_host.clone() { if let Some(hostname) = self.current_host.clone() {
// Launch tmux popup with SSH using config values // Create command that shows CM Dashboard logo and then rebuilds
let ssh_command = format!( let logo_and_rebuild = format!(
"ssh -tt {}@{} 'bash -ic {}'", "echo ''; \
echo -e '\\033[1;32m _____ __ __ _____ _ _ _ \\033[0m'; \
echo -e '\\033[1;32m / ____| \\/ | | __ \\ | | | | | |\\033[0m'; \
echo -e '\\033[1;32m| | | \\ / | | | | | __ _ ___| |__ | |__ ___ __ _ _ __ __| |\\033[0m'; \
echo -e '\\033[1;32m| | | |\\/| | | | | |/ _` / __| \\'_ \\| \\'_ \\ / _ \\ / _` | \\'__/ _` |\\033[0m'; \
echo -e '\\033[1;32m| |____| | | | | |__| | (_| \\__ \\ | | | |_) | (_) | (_| | | | (_| |\\033[0m'; \
echo -e '\\033[1;32m \\_____|_| |_| |_____/ \\__,_|___/_| |_|_.__/ \\___/ \\__,_|_| \\__,_|\\033[0m'; \
echo ''; \
echo -e '\\033[1;33m NixOS System Rebuild\\033[0m'; \
echo -e '\\033[1;32m Target: {}\\033[0m'; \
echo ''; \
echo -e '\\033[1;90m\\033[0m'; \
echo ''; \
ssh -tt {}@{} 'bash -ic {}'",
hostname,
self.config.ssh.rebuild_user, self.config.ssh.rebuild_user,
hostname, hostname,
self.config.ssh.rebuild_alias self.config.ssh.rebuild_alias
); );
std::process::Command::new("tmux") std::process::Command::new("tmux")
.arg("display-popup") .arg("display-popup")
.arg(&ssh_command) .arg(&logo_and_rebuild)
.spawn() .spawn()
.ok(); // Ignore errors, tmux will handle them .ok(); // Ignore errors, tmux will handle them
} }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "cm-dashboard-shared" name = "cm-dashboard-shared"
version = "0.1.38" version = "0.1.39"
edition = "2021" edition = "2021"
[dependencies] [dependencies]