diff --git a/.github/release-body.md b/.github/release-body.md
index fb102b3..a9b7b47 100644
--- a/.github/release-body.md
+++ b/.github/release-body.md
@@ -1,13 +1,15 @@
-### 2023-06-04
+### 2023-08-28
### Chores
-+ github workflow ubuntu latest, build for x86 musl, [4fa841e6e74e3e10e3d3e82eac1a1ca1338814cf]
-+ dependencies updated, [0caa92f6a4728d50d8b2d8f15d96a21112732ec5], [1fd1dfc75d6fa4e84451ebc845b9e1c730381f41]
-+ `Spans` -> `Line`, ratatui 0.21 update, [4679ddc885a9b35c901f3600b63fd9e86118264c], [0d37ac55018038363e5f92dc4215996f8cff7b2e]
-+ `create_release.sh` updated, [7dec5f14a381d237c5e72fbf9551bcf398f93f3e]
++ dependencies updated, [8ce5a1877a8c56d9bbab560c97e2596ea87cc4c0], [94a20584e6ef0701c9f36838b0dfbcd911698dbe], [29e02e0d1faae4a836c7e5cfd0d791338ff586e3], [8e4c2e686761df56920df2267b765ab1297c9972]
++ `_typos.toml` added, [84ba1020939606abf4a287cbd1de1f3a10d3f0c0]
-### Fixes
-+ workflow additional image fix, closes #29, [47cda44b8213cfb8c3807df6c43e3f5dc2452b57]
+### Features
++ Custom hostname. `oxker` will use `$DOCKER_HOST` env if set, or one can use the cli argument `--host`, which takes priority over the `$DOCKER_HOST`, closes #30, [10950787649d2b66fc1e8cd8b85526df51479857]
+
+### Refactors
++ `set_error()` takes `gui_state` and error enum, to make sure app_data & gui_state is in sync [62c78dfaa50a8d8c084f7fbf7e203b50aaa731ae]
++ `fn loading_spin` doesn't need to be async, [2e27462d1b3f0bdb27d7646511e36d0c9af07f3e]
see CHANGELOG.md for more details
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e64a09d..a9a4390 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,17 @@
+# v0.3.2
+### 2023-08-28
+
+### Chores
++ dependencies updated, [8ce5a187](https://github.com/mrjackwills/oxker/commit/8ce5a1877a8c56d9bbab560c97e2596ea87cc4c0), [94a20584](https://github.com/mrjackwills/oxker/commit/94a20584e6ef0701c9f36838b0dfbcd911698dbe), [29e02e0d](https://github.com/mrjackwills/oxker/commit/29e02e0d1faae4a836c7e5cfd0d791338ff586e3), [8e4c2e68](https://github.com/mrjackwills/oxker/commit/8e4c2e686761df56920df2267b765ab1297c9972)
++ `_typos.toml` added, [84ba1020](https://github.com/mrjackwills/oxker/commit/84ba1020939606abf4a287cbd1de1f3a10d3f0c0)
+
+### Features
++ Custom hostname. `oxker` will use `$DOCKER_HOST` env if set, or one can use the cli argument `--host`, which takes priority over the `$DOCKER_HOST`, closes [#30](https://github.com/mrjackwills/oxker/issues/30), [10950787](https://github.com/mrjackwills/oxker/commit/10950787649d2b66fc1e8cd8b85526df51479857)
+
+### Refactors
++ `set_error()` takes `gui_state` and error enum, to make sure app_data & gui_state is in sync [62c78dfa](https://github.com/mrjackwills/oxker/commit/62c78dfaa50a8d8c084f7fbf7e203b50aaa731ae)
++ `fn loading_spin` doesn't need to be async, [2e27462d](https://github.com/mrjackwills/oxker/commit/2e27462d1b3f0bdb27d7646511e36d0c9af07f3e)
+
# v0.3.1
### 2023-06-04
diff --git a/Cargo.lock b/Cargo.lock
index d2aa8bf..04fab78 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,6 +2,21 @@
# It is not intended for manual editing.
version = 3
+[[package]]
+name = "addr2line"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
[[package]]
name = "android-tzdata"
version = "0.1.1"
@@ -19,30 +34,29 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.3.2"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
+checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
- "is-terminal",
"utf8parse",
]
[[package]]
name = "anstyle"
-version = "1.0.0"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
+checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea"
[[package]]
name = "anstyle-parse"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee"
+checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
dependencies = [
"utf8parse",
]
@@ -53,24 +67,24 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
dependencies = [
- "windows-sys 0.48.0",
+ "windows-sys",
]
[[package]]
name = "anstyle-wincon"
-version = "1.0.1"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188"
+checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd"
dependencies = [
"anstyle",
- "windows-sys 0.48.0",
+ "windows-sys",
]
[[package]]
name = "anyhow"
-version = "1.0.71"
+version = "1.0.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"
+checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
[[package]]
name = "autocfg"
@@ -78,6 +92,21 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+[[package]]
+name = "backtrace"
+version = "0.3.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+]
+
[[package]]
name = "base64"
version = "0.13.1"
@@ -86,9 +115,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]]
name = "base64"
-version = "0.21.2"
+version = "0.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d"
+checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53"
[[package]]
name = "bitflags"
@@ -96,13 +125,19 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+[[package]]
+name = "bitflags"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
+
[[package]]
name = "bollard"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af254ed2da4936ef73309e9597180558821cb16ae9bba4cb24ce6b612d8d80ed"
dependencies = [
- "base64 0.21.2",
+ "base64 0.21.3",
"bollard-stubs",
"bytes",
"futures-core",
@@ -161,9 +196,12 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
[[package]]
name = "cc"
-version = "1.0.79"
+version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
+checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+dependencies = [
+ "libc",
+]
[[package]]
name = "cfg-if"
@@ -186,9 +224,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.3.1"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4ed2379f8603fa2b7509891660e802b88c70a79a6427a70abb5968054de2c28"
+checksum = "1d5f1946157a96594eb2d2c10eb7ad9a2b27518cb3000209dec700c35df9197d"
dependencies = [
"clap_builder",
"clap_derive",
@@ -197,13 +235,12 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.3.1"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72394f3339a76daf211e57d4bcb374410f3965dcc606dd0e03738c7888766980"
+checksum = "78116e32a042dd73c2901f0dc30790d20ff3447f3e3472fad359e8c3d282bcd6"
dependencies = [
"anstream",
"anstyle",
- "bitflags",
"clap_lex",
"strsim",
"unicase",
@@ -212,9 +249,9 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "4.3.1"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59e9ef9a08ee1c0e1f2e162121665ac45ac3783b0f897db7244ae75ad9a8f65b"
+checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a"
dependencies = [
"heck",
"proc-macro2",
@@ -224,9 +261,9 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.5.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
+checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961"
[[package]]
name = "colorchoice"
@@ -242,11 +279,11 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
[[package]]
name = "crossterm"
-version = "0.26.1"
+version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13"
+checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df"
dependencies = [
- "bitflags",
+ "bitflags 2.4.0",
"crossterm_winapi",
"libc",
"mio",
@@ -258,33 +295,27 @@ dependencies = [
[[package]]
name = "crossterm_winapi"
-version = "0.9.0"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c"
+checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
dependencies = [
"winapi",
]
[[package]]
-name = "errno"
-version = "0.3.1"
+name = "deranged"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
+checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946"
dependencies = [
- "errno-dragonfly",
- "libc",
- "windows-sys 0.48.0",
+ "serde",
]
[[package]]
-name = "errno-dragonfly"
-version = "0.1.2"
+name = "either"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
-dependencies = [
- "cc",
- "libc",
-]
+checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "fnv"
@@ -294,9 +325,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "form_urlencoded"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
+checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
dependencies = [
"percent-encoding",
]
@@ -355,9 +386,9 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.9"
+version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4"
+checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
dependencies = [
"cfg-if",
"libc",
@@ -365,10 +396,16 @@ dependencies = [
]
[[package]]
-name = "h2"
-version = "0.3.19"
+name = "gimli"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782"
+checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
+
+[[package]]
+name = "h2"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833"
dependencies = [
"bytes",
"fnv",
@@ -397,18 +434,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "hermit-abi"
-version = "0.2.6"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
-dependencies = [
- "libc",
-]
-
-[[package]]
-name = "hermit-abi"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
+checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b"
[[package]]
name = "hex"
@@ -446,15 +474,15 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
[[package]]
name = "httpdate"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "hyper"
-version = "0.14.26"
+version = "0.14.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4"
+checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468"
dependencies = [
"bytes",
"futures-channel",
@@ -467,7 +495,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
- "socket2",
+ "socket2 0.4.9",
"tokio",
"tower-service",
"tracing",
@@ -489,9 +517,9 @@ dependencies = [
[[package]]
name = "iana-time-zone"
-version = "0.1.56"
+version = "0.1.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c"
+checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
dependencies = [
"android_system_properties",
"core-foundation-sys",
@@ -512,9 +540,9 @@ dependencies = [
[[package]]
name = "idna"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
+checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
dependencies = [
"unicode-bidi",
"unicode-normalization",
@@ -532,39 +560,31 @@ dependencies = [
]
[[package]]
-name = "io-lifetimes"
-version = "1.0.11"
+name = "indoc"
+version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
-dependencies = [
- "hermit-abi 0.3.1",
- "libc",
- "windows-sys 0.48.0",
-]
+checksum = "2c785eefb63ebd0e33416dfcb8d6da0bf27ce752843a45632a67bf10d4d4b5c4"
[[package]]
-name = "is-terminal"
-version = "0.4.7"
+name = "itertools"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f"
+checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
dependencies = [
- "hermit-abi 0.3.1",
- "io-lifetimes",
- "rustix",
- "windows-sys 0.48.0",
+ "either",
]
[[package]]
name = "itoa"
-version = "1.0.6"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]]
name = "js-sys"
-version = "0.3.63"
+version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790"
+checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
dependencies = [
"wasm-bindgen",
]
@@ -577,21 +597,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
-version = "0.2.144"
+version = "0.2.147"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1"
-
-[[package]]
-name = "linux-raw-sys"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
[[package]]
name = "lock_api"
-version = "0.4.9"
+version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
+checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
dependencies = [
"autocfg",
"scopeguard",
@@ -599,9 +613,24 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.18"
+version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de"
+checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
+dependencies = [
+ "adler",
+]
[[package]]
name = "mio"
@@ -612,7 +641,7 @@ dependencies = [
"libc",
"log",
"wasi",
- "windows-sys 0.48.0",
+ "windows-sys",
]
[[package]]
@@ -627,28 +656,37 @@ dependencies = [
[[package]]
name = "num-traits"
-version = "0.2.15"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
dependencies = [
"autocfg",
]
[[package]]
name = "num_cpus"
-version = "1.15.0"
+version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
+checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
- "hermit-abi 0.2.6",
+ "hermit-abi",
"libc",
]
[[package]]
-name = "once_cell"
-version = "1.17.2"
+name = "object"
+version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b"
+checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "overload"
@@ -658,7 +696,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "oxker"
-version = "0.3.1"
+version = "0.3.2"
dependencies = [
"anyhow",
"bollard",
@@ -686,37 +724,43 @@ dependencies = [
[[package]]
name = "parking_lot_core"
-version = "0.9.7"
+version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
+checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
- "windows-sys 0.45.0",
+ "windows-targets",
]
[[package]]
-name = "percent-encoding"
-version = "2.2.0"
+name = "paste"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
+checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]]
name = "pin-project"
-version = "1.1.0"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead"
+checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
-version = "1.1.0"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07"
+checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
dependencies = [
"proc-macro2",
"quote",
@@ -725,9 +769,9 @@ dependencies = [
[[package]]
name = "pin-project-lite"
-version = "0.2.9"
+version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
[[package]]
name = "pin-utils"
@@ -743,18 +787,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "proc-macro2"
-version = "1.0.59"
+version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b"
+checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.28"
+version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
+checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [
"proc-macro2",
]
@@ -791,66 +835,68 @@ dependencies = [
[[package]]
name = "ratatui"
-version = "0.21.0"
+version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce841e0486e7c2412c3740168ede33adeba8e154a15107b879d8162d77c7174e"
+checksum = "2e2e4cd95294a85c3b4446e63ef054eea43e0205b1fd60120c16b74ff7ff96ad"
dependencies = [
- "bitflags",
+ "bitflags 2.4.0",
"cassowary",
"crossterm",
+ "indoc",
+ "itertools",
+ "paste",
+ "strum",
"unicode-segmentation",
"unicode-width",
]
[[package]]
name = "redox_syscall"
-version = "0.2.16"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
dependencies = [
- "bitflags",
+ "bitflags 1.3.2",
]
[[package]]
-name = "rustix"
-version = "0.37.19"
+name = "rustc-demangle"
+version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d"
-dependencies = [
- "bitflags",
- "errno",
- "io-lifetimes",
- "libc",
- "linux-raw-sys",
- "windows-sys 0.48.0",
-]
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+
+[[package]]
+name = "rustversion"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
[[package]]
name = "ryu"
-version = "1.0.13"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
[[package]]
name = "scopeguard"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
-version = "1.0.163"
+version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2"
+checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.163"
+version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e"
+checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
dependencies = [
"proc-macro2",
"quote",
@@ -859,9 +905,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.96"
+version = "1.0.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
+checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360"
dependencies = [
"itoa",
"ryu",
@@ -870,9 +916,9 @@ dependencies = [
[[package]]
name = "serde_repr"
-version = "0.1.12"
+version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab"
+checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00"
dependencies = [
"proc-macro2",
"quote",
@@ -917,9 +963,9 @@ dependencies = [
[[package]]
name = "signal-hook"
-version = "0.3.15"
+version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9"
+checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801"
dependencies = [
"libc",
"signal-hook-registry",
@@ -947,18 +993,18 @@ dependencies = [
[[package]]
name = "slab"
-version = "0.4.8"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
dependencies = [
"autocfg",
]
[[package]]
name = "smallvec"
-version = "1.10.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
+checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9"
[[package]]
name = "socket2"
@@ -970,6 +1016,16 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "socket2"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
+
[[package]]
name = "strsim"
version = "0.10.0"
@@ -977,10 +1033,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
-name = "syn"
-version = "2.0.18"
+name = "strum"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e"
+checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.25.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a"
dependencies = [
"proc-macro2",
"quote",
@@ -989,18 +1067,18 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "1.0.40"
+version = "1.0.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
+checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.40"
+version = "1.0.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
+checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b"
dependencies = [
"proc-macro2",
"quote",
@@ -1019,10 +1097,11 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.21"
+version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc"
+checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48"
dependencies = [
+ "deranged",
"itoa",
"serde",
"time-core",
@@ -1037,9 +1116,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
[[package]]
name = "time-macros"
-version = "0.2.9"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b"
+checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572"
dependencies = [
"time-core",
]
@@ -1061,11 +1140,11 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.28.2"
+version = "1.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2"
+checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9"
dependencies = [
- "autocfg",
+ "backtrace",
"bytes",
"libc",
"mio",
@@ -1073,9 +1152,9 @@ dependencies = [
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
- "socket2",
+ "socket2 0.5.3",
"tokio-macros",
- "windows-sys 0.48.0",
+ "windows-sys",
]
[[package]]
@@ -1123,9 +1202,9 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.24"
+version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74"
+checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
dependencies = [
"proc-macro2",
"quote",
@@ -1175,9 +1254,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
[[package]]
name = "unicase"
-version = "2.6.0"
+version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
+checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89"
dependencies = [
"version_check",
]
@@ -1190,9 +1269,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
[[package]]
name = "unicode-ident"
-version = "1.0.9"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
+checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
[[package]]
name = "unicode-normalization"
@@ -1217,9 +1296,9 @@ checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
[[package]]
name = "url"
-version = "2.3.1"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
+checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
dependencies = [
"form_urlencoded",
"idna",
@@ -1234,9 +1313,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "uuid"
-version = "1.3.3"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2"
+checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d"
dependencies = [
"getrandom",
"rand",
@@ -1256,11 +1335,10 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "want"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
dependencies = [
- "log",
"try-lock",
]
@@ -1272,9 +1350,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.86"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73"
+checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@@ -1282,9 +1360,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.86"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb"
+checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
dependencies = [
"bumpalo",
"log",
@@ -1297,9 +1375,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.86"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258"
+checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -1307,9 +1385,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.86"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8"
+checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
"proc-macro2",
"quote",
@@ -1320,9 +1398,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.86"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93"
+checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
[[package]]
name = "winapi"
@@ -1352,16 +1430,7 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
dependencies = [
- "windows-targets 0.48.0",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.45.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
-dependencies = [
- "windows-targets 0.42.2",
+ "windows-targets",
]
[[package]]
@@ -1370,119 +1439,62 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
- "windows-targets 0.48.0",
+ "windows-targets",
]
[[package]]
name = "windows-targets"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
- "windows_aarch64_gnullvm 0.42.2",
- "windows_aarch64_msvc 0.42.2",
- "windows_i686_gnu 0.42.2",
- "windows_i686_msvc 0.42.2",
- "windows_x86_64_gnu 0.42.2",
- "windows_x86_64_gnullvm 0.42.2",
- "windows_x86_64_msvc 0.42.2",
-]
-
-[[package]]
-name = "windows-targets"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
-dependencies = [
- "windows_aarch64_gnullvm 0.48.0",
- "windows_aarch64_msvc 0.48.0",
- "windows_i686_gnu 0.48.0",
- "windows_i686_msvc 0.48.0",
- "windows_x86_64_gnu 0.48.0",
- "windows_x86_64_gnullvm 0.48.0",
- "windows_x86_64_msvc 0.48.0",
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_i686_gnu"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_msvc"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
diff --git a/Cargo.toml b/Cargo.toml
index e799c31..9f84284 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "oxker"
-version = "0.3.1"
+version = "0.3.2"
edition = "2021"
authors = ["Jack Wills "]
description = "A simple tui to view & control docker containers"
@@ -15,15 +15,15 @@ categories = ["command-line-utilities"]
anyhow = "1.0"
bollard = "0.14"
cansi = "2.2"
-clap={version="4.3", features = ["derive", "unicode", "color"] }
-crossterm = "0.26"
+clap = { version = "4.3", features = ["derive", "unicode", "color"] }
+crossterm = "0.27"
futures-util = "0.3"
-parking_lot = {version= "0.12"}
-tokio = {version = "1.28", features=["full"]}
+parking_lot = { version= "0.12" }
+tokio = { version = "1.32", features = ["full"] }
tracing = "0.1"
tracing-subscriber = "0.3"
-ratatui = "0.21"
-uuid = {version = "1.3", features = ["v4", "fast-rng"]}
+ratatui = "0.23"
+uuid = { version = "1.4", features = ["v4", "fast-rng"] }
[dev-dependencies]
diff --git a/README.md b/README.md
index 11a9d48..6c1632f 100644
--- a/README.md
+++ b/README.md
@@ -106,6 +106,7 @@ Available command line arguments
| argument|result|
|--|--|
|```-d [number > 0]```| set the minimum update interval for docker information, in ms, defaults to 1000 (1 second) |
+|```--host [hostname]```| connect to Docker with a custom hostname, defaults to `/var/run/docker.sock`, will use `$DOCKER_HOST` env if set |
|```-r```| show raw logs, by default oxker will remove ANSI formatting (conflicts with -c) |
|```-c```| attempt to color the logs (conflicts with -r) |
|```-t```| remove timestamps from each log entry |
diff --git a/_typos.toml b/_typos.toml
new file mode 100644
index 0000000..54ddf6c
--- /dev/null
+++ b/_typos.toml
@@ -0,0 +1,2 @@
+[default.extend-words]
+ratatui = "ratatui"
\ No newline at end of file
diff --git a/create_release.sh b/create_release.sh
index 5cd9edb..297e54c 100755
--- a/create_release.sh
+++ b/create_release.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# rust create_release
-# v0.2.2
+# v0.3.0
STAR_LINE='****************************************'
CWD=$(pwd)
@@ -50,9 +50,7 @@ update_patch () {
# Get the url of the github repo, strip .git from the end of it
get_git_remote_url() {
- REMOTE_ORIGIN=$(git config --get remote.origin.url)
- TO_REMOVE=".git"
- GIT_REPO_URL="${REMOTE_ORIGIN//$TO_REMOVE}"
+ GIT_REPO_URL="$(git config --get remote.origin.url | sed 's/\.git$//')"
}
# Check that git status is clean
@@ -121,7 +119,7 @@ update_version_number_in_files () {
# create new semver version based on user input
# Set MAJOR MINOR PATCH
check_tag () {
- LATEST_TAG=$(git describe --tags --abbrev=0 --always)
+ LATEST_TAG=$(git describe --tags "$(git rev-list --tags --max-count=1)")
echo -e "\nCurrent tag: ${PURPLE}${LATEST_TAG}${RESET}\n"
echo -e "${YELLOW}Choose new tag version:${RESET}\n"
if [[ $LATEST_TAG =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]
diff --git a/src/app_data/mod.rs b/src/app_data/mod.rs
index fda6cbb..0d5db00 100644
--- a/src/app_data/mod.rs
+++ b/src/app_data/mod.rs
@@ -1,11 +1,20 @@
use bollard::models::ContainerSummary;
use core::fmt;
+use parking_lot::Mutex;
use ratatui::widgets::{ListItem, ListState};
-use std::time::{SystemTime, UNIX_EPOCH};
+use std::{
+ sync::Arc,
+ time::{SystemTime, UNIX_EPOCH},
+};
mod container_state;
-use crate::{app_error::AppError, parse_args::CliArgs, ui::log_sanitizer, ENTRY_POINT};
+use crate::{
+ app_error::AppError,
+ parse_args::CliArgs,
+ ui::{log_sanitizer, GuiState, Status},
+ ENTRY_POINT,
+};
pub use container_state::*;
/// Global app_state, stored in an Arc
@@ -389,7 +398,8 @@ impl AppData {
}
/// insert single app_state error
- pub fn set_error(&mut self, error: AppError) {
+ pub fn set_error(&mut self, error: AppError, gui_state: &Arc>, status: Status) {
+ gui_state.lock().status_push(status);
self.error = Some(error);
}
diff --git a/src/docker_data/mod.rs b/src/docker_data/mod.rs
index 92fd28c..51d5437 100644
--- a/src/docker_data/mod.rs
+++ b/src/docker_data/mod.rs
@@ -287,7 +287,7 @@ impl DockerData {
}
/// Animate the loading icon
- async fn loading_spin(loading_uuid: Uuid, gui_state: &Arc>) -> JoinHandle<()> {
+ fn loading_spin(loading_uuid: Uuid, gui_state: &Arc>) -> JoinHandle<()> {
let gui_state = Arc::clone(gui_state);
tokio::spawn(async move {
loop {
@@ -311,7 +311,7 @@ impl DockerData {
async fn initialise_container_data(&mut self) {
self.gui_state.lock().status_push(Status::Init);
let loading_uuid = Uuid::new_v4();
- let loading_spin = Self::loading_spin(loading_uuid, &Arc::clone(&self.gui_state)).await;
+ let loading_spin = Self::loading_spin(loading_uuid, &Arc::clone(&self.gui_state));
let all_ids = self.update_all_containers().await;
@@ -323,8 +323,8 @@ impl DockerData {
while !self.app_data.lock().initialised(&all_ids) {
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
}
- self.gui_state.lock().status_del(Status::Init);
Self::stop_loading_spin(&self.gui_state, &loading_spin, loading_uuid);
+ self.gui_state.lock().status_del(Status::Init);
}
/// Set the global error as the docker error, and set gui_state to error
@@ -333,8 +333,9 @@ impl DockerData {
error: DockerControls,
gui_state: &Arc>,
) {
- app_data.lock().set_error(AppError::DockerCommand(error));
- gui_state.lock().status_push(Status::Error);
+ app_data
+ .lock()
+ .set_error(AppError::DockerCommand(error), gui_state, Status::Error);
}
/// Handle incoming messages, container controls & all container information update
@@ -349,7 +350,7 @@ impl DockerData {
match message {
DockerMessage::Pause(id) => {
tokio::spawn(async move {
- let loading_spin = Self::loading_spin(uuid, &gui_state).await;
+ let loading_spin = Self::loading_spin(uuid, &gui_state);
if docker.pause_container(id.get()).await.is_err() {
Self::set_error(&app_data, DockerControls::Pause, &gui_state);
}
@@ -359,7 +360,7 @@ impl DockerData {
}
DockerMessage::Restart(id) => {
tokio::spawn(async move {
- let loading_spin = Self::loading_spin(uuid, &gui_state).await;
+ let loading_spin = Self::loading_spin(uuid, &gui_state);
if docker.restart_container(id.get(), None).await.is_err() {
Self::set_error(&app_data, DockerControls::Restart, &gui_state);
}
@@ -369,7 +370,7 @@ impl DockerData {
}
DockerMessage::Start(id) => {
tokio::spawn(async move {
- let loading_spin = Self::loading_spin(uuid, &gui_state).await;
+ let loading_spin = Self::loading_spin(uuid, &gui_state);
if docker
.start_container(id.get(), None::>)
.await
@@ -383,7 +384,7 @@ impl DockerData {
}
DockerMessage::Stop(id) => {
tokio::spawn(async move {
- let loading_spin = Self::loading_spin(uuid, &gui_state).await;
+ let loading_spin = Self::loading_spin(uuid, &gui_state);
if docker.stop_container(id.get(), None).await.is_err() {
Self::set_error(&app_data, DockerControls::Stop, &gui_state);
}
@@ -393,7 +394,7 @@ impl DockerData {
}
DockerMessage::Unpause(id) => {
tokio::spawn(async move {
- let loading_spin = Self::loading_spin(uuid, &gui_state).await;
+ let loading_spin = Self::loading_spin(uuid, &gui_state);
if docker.unpause_container(id.get()).await.is_err() {
Self::set_error(&app_data, DockerControls::Unpause, &gui_state);
}
@@ -403,7 +404,7 @@ impl DockerData {
}
DockerMessage::Delete(id) => {
tokio::spawn(async move {
- let loading_spin = Self::loading_spin(uuid, &gui_state).await;
+ let loading_spin = Self::loading_spin(uuid, &gui_state);
if docker
.remove_container(
id.get(),
@@ -448,7 +449,7 @@ impl DockerData {
gui_state: Arc>,
is_running: Arc,
) {
- let args = app_data.lock().args;
+ let args = app_data.lock().args.clone();
if app_data.lock().get_error().is_none() {
let mut inner = Self {
app_data,
diff --git a/src/input_handler/mod.rs b/src/input_handler/mod.rs
index 421f86a..4341e86 100644
--- a/src/input_handler/mod.rs
+++ b/src/input_handler/mod.rs
@@ -20,6 +20,7 @@ use crate::{
app_error::AppError,
docker_data::DockerMessage,
ui::{DeleteButton, GuiState, SelectablePanel, Status, Ui},
+ value_capture,
};
pub use message::InputMessages;
@@ -62,12 +63,11 @@ impl InputHandler {
match message {
InputMessages::ButtonPress(key) => self.button_press(key.0, key.1).await,
InputMessages::MouseEvent(mouse_event) => {
- let error_or_help = self.gui_state.lock().status_contains(&[
+ if !self.gui_state.lock().status_contains(&[
Status::Error,
Status::Help,
Status::DeleteConfirm,
- ]);
- if !error_or_help {
+ ]) {
self.mouse_press(mouse_event);
}
let delete_confirm = self
@@ -93,18 +93,22 @@ impl InputHandler {
.lock()
.set_info_box("✖ mouse capture disabled".to_owned());
} else {
- self.app_data
- .lock()
- .set_error(AppError::MouseCapture(false));
- self.gui_state.lock().status_push(Status::Error);
+ self.app_data.lock().set_error(
+ AppError::MouseCapture(false),
+ &self.gui_state,
+ Status::Error,
+ );
}
} else if Ui::enable_mouse_capture().is_ok() {
self.gui_state
.lock()
.set_info_box("✓ mouse capture enabled".to_owned());
} else {
- self.app_data.lock().set_error(AppError::MouseCapture(true));
- self.gui_state.lock().status_push(Status::Error);
+ self.app_data.lock().set_error(
+ AppError::MouseCapture(true),
+ &self.gui_state,
+ Status::Error,
+ );
};
// If the info box sleep handle is currently being executed, as in 'm' is pressed twice within a 4000ms window
@@ -160,13 +164,21 @@ impl InputHandler {
/// Handle any keyboard button events
#[allow(clippy::too_many_lines)]
async fn button_press(&mut self, key_code: KeyCode, key_modififer: KeyModifiers) {
- // TODO - refactor this to a single call, maybe return Error, Help or Normal
- let contains_error = self.gui_state.lock().status_contains(&[Status::Error]);
- let contains_help = self.gui_state.lock().status_contains(&[Status::Help]);
- let contains_delete = self
- .gui_state
- .lock()
- .status_contains(&[Status::DeleteConfirm]);
+ value_capture!(
+ contains_delete,
+ self.gui_state
+ .lock()
+ .status_contains(&[Status::DeleteConfirm])
+ );
+
+ value_capture!(
+ contains_error,
+ self.gui_state.lock().status_contains(&[Status::Error])
+ );
+ value_capture!(
+ contains_help,
+ self.gui_state.lock().status_contains(&[Status::Help])
+ );
// Always just quit on Ctrl + c/C or q/Q
let is_c = || key_code == KeyCode::Char('c') || key_code == KeyCode::Char('C');
@@ -208,10 +220,9 @@ impl InputHandler {
KeyCode::Char('m' | 'M') => self.m_key(),
KeyCode::Tab => {
// Skip control panel if no containers, could be refactored
- let has_containers = self.app_data.lock().get_container_len() == 0;
let is_containers =
self.gui_state.lock().selected_panel == SelectablePanel::Containers;
- let count = if has_containers && is_containers {
+ let count = if self.app_data.lock().get_container_len() == 0 && is_containers {
2
} else {
1
@@ -222,10 +233,9 @@ impl InputHandler {
}
KeyCode::BackTab => {
// Skip control panel if no containers, could be refactored
- let has_containers = self.app_data.lock().get_container_len() == 0;
let is_containers =
self.gui_state.lock().selected_panel == SelectablePanel::Logs;
- let count = if has_containers && is_containers {
+ let count = if self.app_data.lock().get_container_len() == 0 && is_containers {
2
} else {
1
@@ -236,7 +246,8 @@ impl InputHandler {
}
KeyCode::Home => {
let mut locked_data = self.app_data.lock();
- match self.gui_state.lock().selected_panel {
+ let selected_panel = self.gui_state.lock().selected_panel;
+ match selected_panel {
SelectablePanel::Containers => locked_data.containers_start(),
SelectablePanel::Logs => locked_data.log_start(),
SelectablePanel::Commands => locked_data.docker_command_start(),
@@ -244,7 +255,8 @@ impl InputHandler {
}
KeyCode::End => {
let mut locked_data = self.app_data.lock();
- match self.gui_state.lock().selected_panel {
+ let selected_panel = self.gui_state.lock().selected_panel;
+ match selected_panel {
SelectablePanel::Containers => locked_data.containers_end(),
SelectablePanel::Logs => locked_data.log_end(),
SelectablePanel::Commands => locked_data.docker_command_end(),
@@ -358,7 +370,8 @@ impl InputHandler {
/// Change state to next, depending which panel is currently in focus
fn next(&mut self) {
let mut locked_data = self.app_data.lock();
- match self.gui_state.lock().selected_panel {
+ let selected_panel = self.gui_state.lock().selected_panel;
+ match selected_panel {
SelectablePanel::Containers => locked_data.containers_next(),
SelectablePanel::Logs => locked_data.log_next(),
SelectablePanel::Commands => locked_data.docker_command_next(),
@@ -368,7 +381,8 @@ impl InputHandler {
/// Change state to previous, depending which panel is currently in focus
fn previous(&mut self) {
let mut locked_data = self.app_data.lock();
- match self.gui_state.lock().selected_panel {
+ let selected_panel = self.gui_state.lock().selected_panel;
+ match selected_panel {
SelectablePanel::Containers => locked_data.containers_previous(),
SelectablePanel::Logs => locked_data.log_previous(),
SelectablePanel::Commands => locked_data.docker_command_previous(),
diff --git a/src/main.rs b/src/main.rs
index 29db59b..125a333 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -17,17 +17,20 @@
use app_data::AppData;
use app_error::AppError;
-use bollard::Docker;
+use bollard::{Docker, API_DEFAULT_VERSION};
use docker_data::DockerData;
use input_handler::InputMessages;
use parking_lot::Mutex;
use parse_args::CliArgs;
-use std::sync::{
- atomic::{AtomicBool, Ordering},
- Arc,
+use std::{
+ process,
+ sync::{
+ atomic::{AtomicBool, Ordering},
+ Arc,
+ },
};
use tokio::sync::mpsc::{Receiver, Sender};
-use tracing::{info, Level};
+use tracing::{error, info, Level};
mod app_data;
mod app_error;
@@ -44,6 +47,7 @@ use crate::docker_data::DockerMessage;
const ENTRY_POINT: &str = "/app/oxker";
const ENV_KEY: &str = "OXKER_RUNTIME";
const ENV_VALUE: &str = "container";
+const DOCKER_HOST: &str = "DOCKER_HOST";
/// Enable tracing, only really used in debug mode, for now
/// write to file if `-g` is set?
@@ -62,6 +66,18 @@ fn check_if_containerised() -> bool {
}
}
+/// Read the optional docker_host path, the cli args take priority over the DOCKER_HOST env
+fn read_docker_host(args: &CliArgs) -> Option {
+ args.host.as_ref().map_or_else(
+ || {
+ std::env::vars()
+ .find(|x| x.0 == DOCKER_HOST)
+ .map(|(_, val)| val)
+ },
+ |x| Some(x.to_string()),
+ )
+}
+
/// Create docker daemon handler, and only spawn up the docker data handler if a ping returns non-error
async fn docker_init(
app_data: &Arc>,
@@ -69,8 +85,13 @@ async fn docker_init(
docker_rx: Receiver,
gui_state: &Arc>,
is_running: &Arc,
+ host: Option,
) {
- if let Ok(docker) = Docker::connect_with_socket_defaults() {
+ let connection = host.map_or_else(Docker::connect_with_socket_defaults, |host| {
+ Docker::connect_with_socket(&host, 120, API_DEFAULT_VERSION)
+ });
+
+ if let Ok(docker) = connection {
if docker.ping().await.is_ok() {
let app_data = Arc::clone(app_data);
let gui_state = Arc::clone(gui_state);
@@ -84,12 +105,14 @@ async fn docker_init(
is_running,
));
} else {
- app_data.lock().set_error(AppError::DockerConnect);
- gui_state.lock().status_push(Status::DockerConnect);
+ app_data
+ .lock()
+ .set_error(AppError::DockerConnect, gui_state, Status::DockerConnect);
}
} else {
- app_data.lock().set_error(AppError::DockerConnect);
- gui_state.lock().status_push(Status::DockerConnect);
+ app_data
+ .lock()
+ .set_error(AppError::DockerConnect, gui_state, Status::DockerConnect);
}
}
@@ -120,23 +143,36 @@ async fn main() {
setup_tracing();
let args = CliArgs::new();
- let app_data = Arc::new(Mutex::new(AppData::default(args)));
+ let host = read_docker_host(&args);
+
+ let app_data = Arc::new(Mutex::new(AppData::default(args.clone())));
let gui_state = Arc::new(Mutex::new(GuiState::default()));
let is_running = Arc::new(AtomicBool::new(true));
let (docker_sx, docker_rx) = tokio::sync::mpsc::channel(32);
- let (input_sx, input_rx) = tokio::sync::mpsc::channel(32);
- docker_init(&app_data, containerised, docker_rx, &gui_state, &is_running).await;
-
- handler_init(&app_data, &docker_sx, &gui_state, input_rx, &is_running);
+ docker_init(
+ &app_data,
+ containerised,
+ docker_rx,
+ &gui_state,
+ &is_running,
+ host,
+ )
+ .await;
if args.gui {
+ let (input_sx, input_rx) = tokio::sync::mpsc::channel(32);
+ handler_init(&app_data, &docker_sx, &gui_state, input_rx, &is_running);
Ui::create(app_data, docker_sx, gui_state, is_running, input_sx).await;
} else {
info!("in debug mode");
+ // Debug mode for testing, mostly pointless, doesn't take terminal
while is_running.load(Ordering::SeqCst) {
- // Debug mode for testing, mostly pointless, doesn't take terminal
loop {
+ if let Some(err) = app_data.lock().get_error() {
+ error!("{}", err);
+ process::exit(1);
+ }
docker_sx.send(DockerMessage::Update).await.ok();
tokio::time::sleep(std::time::Duration::from_millis(u64::from(
args.docker_interval,
diff --git a/src/parse_args/mod.rs b/src/parse_args/mod.rs
index d6c823d..7a69053 100644
--- a/src/parse_args/mod.rs
+++ b/src/parse_args/mod.rs
@@ -3,7 +3,7 @@ use std::process;
use clap::Parser;
use tracing::error;
-#[derive(Parser, Debug, Clone, Copy)]
+#[derive(Parser, Debug, Clone)]
#[allow(clippy::struct_excessive_bools)]
#[command(version, about)]
pub struct CliArgs {
@@ -19,6 +19,10 @@ pub struct CliArgs {
#[clap(short = 'c', conflicts_with = "raw")]
pub color: bool,
+ /// Docker host, defaults to `/var/run/docker.sock`
+ #[clap(long, short = None)]
+ pub host: Option,
+
/// Show raw logs, default is to remove ansi formatting, conflicts with "-c"
#[clap(short = 'r', conflicts_with = "color")]
pub raw: bool,
@@ -46,6 +50,7 @@ impl CliArgs {
Self {
color: args.color,
docker_interval: args.docker_interval,
+ host: args.host,
gui: !args.gui,
show_self: !args.show_self,
raw: args.raw,
diff --git a/src/ui/draw_blocks.rs b/src/ui/draw_blocks.rs
index 6e0586a..4080966 100644
--- a/src/ui/draw_blocks.rs
+++ b/src/ui/draw_blocks.rs
@@ -62,7 +62,6 @@ fn generate_block<'a>(
gui_state
.lock()
.update_region_map(Region::Panel(panel), area);
- let current_selected_panel = gui_state.lock().selected_panel;
let mut title = match panel {
SelectablePanel::Containers => {
format!("{} {}", panel.title(), app_data.lock().container_title())
@@ -79,7 +78,7 @@ fn generate_block<'a>(
.borders(Borders::ALL)
.border_type(BorderType::Rounded)
.title(title);
- if current_selected_panel == panel {
+ if gui_state.lock().selected_panel == panel {
block = block.border_style(Style::default().fg(Color::LightCyan));
}
block
@@ -819,6 +818,11 @@ pub fn delete_confirm(
let no_area = split_buttons[1];
let yes_area = split_buttons[3];
+ f.render_widget(Clear, area);
+ f.render_widget(block, area);
+ f.render_widget(confirm_para, split_popup[1]);
+ f.render_widget(no_para, no_area);
+ f.render_widget(yes_para, yes_area);
// Insert button areas into region map, so can interact with them on click
gui_state
.lock()
@@ -827,12 +831,6 @@ pub fn delete_confirm(
gui_state
.lock()
.update_region_map(Region::Delete(DeleteButton::Yes), yes_area);
-
- f.render_widget(Clear, area);
- f.render_widget(block, area);
- f.render_widget(confirm_para, split_popup[1]);
- f.render_widget(no_para, no_area);
- f.render_widget(yes_para, yes_area);
}
/// Draw an error popup over whole screen
diff --git a/src/ui/gui_state.rs b/src/ui/gui_state.rs
index 5a6c128..a08f3cc 100644
--- a/src/ui/gui_state.rs
+++ b/src/ui/gui_state.rs
@@ -1,8 +1,5 @@
use ratatui::layout::{Constraint, Rect};
-use std::{
- collections::{HashMap, HashSet},
- fmt,
-};
+use std::collections::{HashMap, HashSet};
use uuid::Uuid;
use crate::app_data::{ContainerId, Header};
@@ -145,60 +142,12 @@ impl BoxLocation {
}
}
-/// State for the loading animation
-#[derive(Debug, Default, Clone, Copy)]
-pub enum Loading {
- #[default]
- One,
- Two,
- Three,
- Four,
- Five,
- Six,
- Seven,
- Eight,
- Nine,
- Ten,
-}
-
-impl Loading {
- pub const fn next(self) -> Self {
- match self {
- Self::One => Self::Two,
- Self::Two => Self::Three,
- Self::Three => Self::Four,
- Self::Four => Self::Five,
- Self::Five => Self::Six,
- Self::Six => Self::Seven,
- Self::Seven => Self::Eight,
- Self::Eight => Self::Nine,
- Self::Nine => Self::Ten,
- Self::Ten => Self::One,
- }
- }
-}
-
-impl fmt::Display for Loading {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- let disp = match self {
- Self::One => '⠋',
- Self::Two => '⠙',
- Self::Three => '⠹',
- Self::Four => '⠸',
- Self::Five => '⠼',
- Self::Six => '⠴',
- Self::Seven => '⠦',
- Self::Eight => '⠧',
- Self::Nine => '⠇',
- Self::Ten => '⠏',
- };
- write!(f, "{disp}")
- }
-}
+// loading animation frames
+const FRAMES: [char; 10] = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
+const FRAMES_LEN: u8 = 9;
/// The application gui state can be in multiple of these four states at the same time
/// Various functions (e.g input handler), operate differently depending upon current Status
-// Copy
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
pub enum Status {
Init,
@@ -213,7 +162,7 @@ pub enum Status {
pub struct GuiState {
heading_map: HashMap,
is_loading: HashSet,
- loading_icon: Loading,
+ loading_index: u8,
panel_map: HashMap,
delete_map: HashMap,
status: HashSet,
@@ -327,24 +276,31 @@ impl GuiState {
self.selected_panel = self.selected_panel.prev();
}
- /// Insert a new loading_uuid into HashSet, and advance the animation by one frame
+ /// Insert a new loading_uuid into HashSet, and advance the loading_index by one frame, or reset to 0 if at end of array
pub fn next_loading(&mut self, uuid: Uuid) {
- self.loading_icon = self.loading_icon.next();
+ if self.loading_index == FRAMES_LEN {
+ self.loading_index = 0;
+ } else {
+ self.loading_index += 1;
+ }
self.is_loading.insert(uuid);
}
- /// If is_loading has any entries, return the current loading_icon, else an empty string, which needs to take up the same space, hence ' '
- pub fn get_loading(&mut self) -> String {
+ /// If is_loading has any entries, return the char at FRAMES[index], else an empty char, which needs to take up the same space, hence ' '
+ pub fn get_loading(&mut self) -> char {
if self.is_loading.is_empty() {
- String::from(" ")
+ ' '
} else {
- self.loading_icon.to_string()
+ FRAMES[usize::from(self.loading_index)]
}
}
- /// Remove a loading_uuid from the is_loading HashSet
+ /// Remove a loading_uuid from the is_loading HashSet, if empty, reset loading_index to 0
pub fn remove_loading(&mut self, uuid: Uuid) {
self.is_loading.remove(&uuid);
+ if self.is_loading.is_empty() {
+ self.loading_index = 0;
+ }
}
/// Set info box content
diff --git a/src/ui/mod.rs b/src/ui/mod.rs
index 35bd153..c8b8da6 100644
--- a/src/ui/mod.rs
+++ b/src/ui/mod.rs
@@ -197,28 +197,34 @@ impl Ui {
}
}
+#[macro_export]
+/// This macro simplifies the definition and evaluation of variables by capturing and immediately evaluating an expression.
+macro_rules! value_capture {
+ ($name:ident, $lock_expr:expr) => {
+ let $name = || $lock_expr;
+ let $name = $name();
+ };
+}
+
/// Draw the main ui to a frame of the terminal
-/// TODO add a single line area for debug message - if not in release mode, maybe with #[cfg(debug_assertions)] ?
+/// TODO add a single line area for debug message - if not in release mode?
fn draw_frame(
f: &mut Frame<'_, B>,
app_data: &Arc>,
gui_state: &Arc>,
) {
+ value_capture!(height, app_data.lock().get_container_len());
+ value_capture!(column_widths, app_data.lock().get_width());
+ value_capture!(has_containers, app_data.lock().get_container_len() > 0);
+ value_capture!(sorted_by, app_data.lock().get_sorted());
+ value_capture!(delete_confirm, gui_state.lock().get_delete_container());
+ value_capture!(has_error, app_data.lock().get_error());
+ value_capture!(info_text, gui_state.lock().info_box_text.clone());
+ value_capture!(loading_icon, gui_state.lock().get_loading().to_string());
+
// set max height for container section, needs +5 to deal with docker commands list and borders
- let height = app_data.lock().get_container_len();
let height = if height < 12 { height + 5 } else { 12 };
- let column_widths = app_data.lock().get_width();
- let has_containers = app_data.lock().get_container_len() > 0;
- let has_error = app_data.lock().get_error();
- let sorted_by = app_data.lock().get_sorted();
-
- let delete_confirm = gui_state.lock().get_delete_container();
-
- let show_help = gui_state.lock().status_contains(&[Status::Help]);
- let info_text = gui_state.lock().info_box_text.clone();
- let loading_icon = gui_state.lock().get_loading();
-
let whole_layout = Layout::default()
.direction(Direction::Vertical)
.constraints([Constraint::Min(1), Constraint::Min(100)].as_ref())
@@ -261,10 +267,6 @@ fn draw_frame(
draw_blocks::containers(app_data, top_panel[0], f, gui_state, &column_widths);
- if has_containers {
- draw_blocks::commands(app_data, top_panel[1], f, gui_state);
- }
-
draw_blocks::logs(app_data, lower_main[0], f, gui_state, &loading_icon);
draw_blocks::heading_bar(
@@ -290,8 +292,9 @@ fn draw_frame(
);
}
- // only draw charts if there are containers
+ // only draw commands + charts if there are containers
if has_containers {
+ draw_blocks::commands(app_data, top_panel[1], f, gui_state);
draw_blocks::chart(f, lower_main[1], app_data);
}
@@ -300,7 +303,7 @@ fn draw_frame(
}
// Check if error, and show popup if so
- if show_help {
+ if gui_state.lock().status_contains(&[Status::Help]) {
draw_blocks::help_box(f);
}