chore: dependencies updated

This commit is contained in:
Jack Wills
2026-01-24 16:32:39 +00:00
parent 8b5899ca23
commit 4b7bf38a3f
5 changed files with 930 additions and 275 deletions
Generated
+896 -248
View File
File diff suppressed because it is too large Load Diff
+3 -5
View File
@@ -16,8 +16,6 @@ categories = ["command-line-utilities"]
unsafe_code = "forbid"
[lints.clippy]
nursery = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
expect_used = "warn"
todo = "warn"
unused_async = "warn"
@@ -28,7 +26,7 @@ similar_names = "allow"
[dependencies]
anyhow = "1.0"
bollard = "0.19"
bollard = "0.20"
cansi = "2.2"
clap = { version = "4.5", features = ["color", "derive", "unicode"] }
crossterm = "0.29"
@@ -36,11 +34,11 @@ directories = "6.0"
futures-util = "0.3"
jiff = { version = "0.2", features = ["tzdb-bundle-always"] }
parking_lot = { version = "0.12" }
ratatui = "0.29"
ratatui = "0.30"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_jsonc = "1.0"
tokio = { version = "1.48", features = ["full"] }
tokio = { version = "1.49", features = ["full"] }
tokio-util = "0.7"
toml = { version = "0.9", default-features = false, features = ["parse", "serde"] }
tracing = "0.1"
+11 -6
View File
@@ -5,7 +5,7 @@ use std::{
net::IpAddr,
};
use bollard::service::Port;
use bollard::secret::{ContainerSummaryHealthStatusEnum, PortSummary};
use jiff::{Timestamp, tz::TimeZone};
use ratatui::{
layout::Size,
@@ -121,8 +121,8 @@ pub struct ContainerPorts {
pub public: Option<u16>,
}
impl From<Port> for ContainerPorts {
fn from(value: Port) -> Self {
impl From<PortSummary> for ContainerPorts {
fn from(value: PortSummary) -> Self {
Self {
ip: value.ip.and_then(|i| i.parse::<IpAddr>().ok()),
private: value.private_port,
@@ -242,6 +242,7 @@ impl From<String> for ContainerStatus {
impl ContainerStatus {
/// Check if a container is unhealthy
/// TODO should have a healthy Option<X> part now, so no need to parse
pub fn unhealthy(&self) -> bool {
self.contains("(unhealthy)")
}
@@ -689,8 +690,8 @@ impl Logs {
if let Some(new_index) = match sd {
ScrollDirection::Next => current_position.checked_add(1),
ScrollDirection::Previous => current_position.checked_sub(1),
}
&& let Some(f) = self.search_results.get(new_index) {
} && let Some(f) = self.search_results.get(new_index)
{
self.lines.state.select(Some(*f));
return Some(());
}
@@ -922,7 +923,9 @@ impl Logs {
pub fn forward(&mut self, width: u16) {
let offset = usize::from(self.offset);
if self.horizontal_scroll_able(width)
&& self.adjusted_max_width > 0 && offset < self.adjusted_max_width {
&& self.adjusted_max_width > 0
&& offset < self.adjusted_max_width
{
self.offset = self.offset.saturating_add(1);
}
}
@@ -968,6 +971,7 @@ pub struct ContainerItem {
pub cpu_stats: VecDeque<CpuStats>,
pub created: u64,
pub docker_controls: StatefulList<DockerCommand>,
pub health: Option<ContainerSummaryHealthStatusEnum>,
pub id: ContainerId,
pub image: ContainerImage,
pub is_oxker: bool,
@@ -1017,6 +1021,7 @@ impl ContainerItem {
cpu_stats: VecDeque::with_capacity(60),
created,
docker_controls,
health: None,
id,
image: image.into(),
is_oxker,
+2
View File
@@ -203,6 +203,7 @@ impl DockerData {
if let std::collections::hash_map::Entry::Vacant(spawns) =
self.spawns.lock().entry(spawn_id.clone())
{
// TODO Replace this with toktio tokens
spawns.insert(tokio::spawn(Self::update_container_stat(
Arc::clone(&self.app_data),
Arc::clone(&self.docker),
@@ -478,6 +479,7 @@ mod tests {
fn gen_stats() -> ContainerStatsResponse {
ContainerStatsResponse {
read: None,
os_type: None,
preread: None,
num_procs: Some(1),
pids_stats: None,
+5 -3
View File
@@ -64,7 +64,8 @@ async fn docker_init(
});
if let Ok(docker) = connection
&& docker.ping().await.is_ok() {
&& docker.ping().await.is_ok()
{
tokio::spawn(DockerData::start(
Arc::clone(app_data),
docker,
@@ -153,7 +154,7 @@ mod tests {
use std::{str::FromStr, sync::Arc};
use bollard::service::{ContainerSummary, Port};
use bollard::service::{ContainerSummary, PortSummary};
use crate::{
app_data::{
@@ -232,13 +233,14 @@ mod tests {
pub fn gen_container_summary(index: usize, state: &str) -> ContainerSummary {
ContainerSummary {
image_manifest_descriptor: None,
health: None,
id: Some(format!("{index}")),
names: Some(vec![format!("container_{}", index)]),
image: Some(format!("image_{index}")),
image_id: Some(format!("{index}")),
command: None,
created: Some(i64::try_from(index).unwrap()),
ports: Some(vec![Port {
ports: Some(vec![PortSummary {
ip: None,
private_port: u16::try_from(index).unwrap_or(1) + 8000,
public_port: None,