feat: unhealthy status, closes #43

Highlight an unhealthy container in Orange, and display "! running" as the state,

refactor: Move dev Docker files to docker directory
This commit is contained in:
Jack Wills
2024-08-01 14:46:58 +00:00
parent f408acfe9a
commit de87681816
11 changed files with 291 additions and 80 deletions
+7 -2
View File
@@ -18,7 +18,7 @@ use tokio::{
use tokio_util::sync::CancellationToken;
use crate::{
app_data::{AppData, ContainerId, State},
app_data::{AppData, ContainerId, RunningState, State},
app_error::AppError,
};
@@ -162,7 +162,12 @@ impl ExecMode {
let container = app_data.lock().get_selected_container_id_state_name();
if let Some((id, state, _)) = container {
if state == State::Running {
if [
State::Running(RunningState::Healthy),
State::Running(RunningState::Unhealthy),
]
.contains(&state)
{
if tty_readable() && !use_cli {
if let Ok(exec) = docker
.create_exec(