Fix user-stopped service display and flag timing issues
All checks were successful
Build and Release / build-and-release (push) Successful in 2m10s
All checks were successful
Build and Release / build-and-release (push) Successful in 2m10s
Improve user-stopped service tracking behavior: Service Display Fix: - Services widget now shows actual systemctl status (active/inactive) - Use info.status instead of hardcoded text based on widget_status - User-stopped services correctly display 'inactive' with green OK icon - Prevents misleading 'active' display for stopped services User-Stopped Flag Timing Fix: - Clear user-stopped flag AFTER successful service start, not when command sent - Prevents warnings during service startup transition period - Service remains Status::OK during 'activating' state for user-stopped services - Flag only cleared when systemctl start command actually succeeds - Failed start attempts preserve user-stopped flag Result: Clean service state tracking with accurate display and no false alerts during intentional user operations. Bump version to v0.1.45
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard"
|
||||
version = "0.1.44"
|
||||
version = "0.1.45"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -113,13 +113,10 @@ impl ServicesWidget {
|
||||
name.to_string()
|
||||
};
|
||||
|
||||
// Parent services always show active/inactive status
|
||||
// Parent services always show actual systemctl status
|
||||
let status_str = match info.widget_status {
|
||||
Status::Ok => "active".to_string(),
|
||||
Status::Pending => "pending".to_string(),
|
||||
Status::Warning => "inactive".to_string(),
|
||||
Status::Critical => "failed".to_string(),
|
||||
Status::Unknown => "unknown".to_string(),
|
||||
_ => info.status.clone(), // Use actual status from agent (active/inactive/failed)
|
||||
};
|
||||
|
||||
format!(
|
||||
|
||||
Reference in New Issue
Block a user