chore: merge release-v0.1.10 into main
This commit is contained in:
+12
-3
@@ -1,8 +1,17 @@
|
|||||||
### 2022-12-05
|
### 2022-12-25
|
||||||
|
|
||||||
|
### Chores
|
||||||
|
+ dependencies updated, [1525b3150293015c0fb2f2161da463b21ac2694c], [8d539ab14809136d743c49d60779687fc8eeef6d], [1774217a8a657d261397d213e5ecee667cf3b6b1]
|
||||||
|
+ Rust 1.66 linting, [bf9dcac7045c0d2314df147ec2744a3ad886564b]
|
||||||
|
|
||||||
|
### Features
|
||||||
|
+ Caching on github action, [a91c9aa45ffd5c998cd1b83d8e90d0912893c31f]
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
+ disallow commands to be sent to a dockerised oxker container, closes #19, [160b8021b1de898064756b53c127d49b8096ce4d]
|
+ comment typo, [7899b773569fed86343a035d3023bf34297fdabb]
|
||||||
+ if no container created time, use 0, instead of system_time(), [1adb61ce3b029d4fcf51961958d483b2fae8825a]
|
|
||||||
|
### Refactors
|
||||||
|
+ remove_ansi() to single liner, [57c3a6c186b916faba24bf7b5cdbbda31d636a7e]
|
||||||
|
|
||||||
|
|
||||||
see <a href='https://github.com/mrjackwills/oxker/blob/main/CHANGELOG.md'>CHANGELOG.md</a> for more details
|
see <a href='https://github.com/mrjackwills/oxker/blob/main/CHANGELOG.md'>CHANGELOG.md</a> for more details
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ jobs:
|
|||||||
- name: install rust
|
- name: install rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
# Setup caching - not sure if will have any effect
|
||||||
|
- name: Rust cache
|
||||||
|
uses: swatinem/rust-cache@v2
|
||||||
|
|
||||||
# Install cross-rs
|
# Install cross-rs
|
||||||
- name: install cross
|
- name: install cross
|
||||||
run: cargo install cross --git https://github.com/cross-rs/cross
|
run: cargo install cross --git https://github.com/cross-rs/cross
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
# <a href='https://github.com/mrjackwills/oxker/releases/tag/v0.1.10'>v0.1.10</a>
|
||||||
|
### 2022-12-25
|
||||||
|
|
||||||
|
### Chores
|
||||||
|
+ dependencies updated, [1525b315](https://github.com/mrjackwills/oxker/commit/1525b3150293015c0fb2f2161da463b21ac2694c), [8d539ab1](https://github.com/mrjackwills/oxker/commit/8d539ab14809136d743c49d60779687fc8eeef6d), [1774217a](https://github.com/mrjackwills/oxker/commit/1774217a8a657d261397d213e5ecee667cf3b6b1)
|
||||||
|
+ Rust 1.66 linting, [bf9dcac7](https://github.com/mrjackwills/oxker/commit/bf9dcac7045c0d2314df147ec2744a3ad886564b)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
+ Caching on github action, [a91c9aa4](https://github.com/mrjackwills/oxker/commit/a91c9aa45ffd5c998cd1b83d8e90d0912893c31f)
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
+ comment typo, [7899b773](https://github.com/mrjackwills/oxker/commit/7899b773569fed86343a035d3023bf34297fdabb)
|
||||||
|
|
||||||
|
### Refactors
|
||||||
|
+ remove_ansi() to single liner, [57c3a6c1](https://github.com/mrjackwills/oxker/commit/57c3a6c186b916faba24bf7b5cdbbda31d636a7e)
|
||||||
|
|
||||||
# <a href='https://github.com/mrjackwills/oxker/releases/tag/v0.1.9'>v0.1.9</a>
|
# <a href='https://github.com/mrjackwills/oxker/releases/tag/v0.1.9'>v0.1.9</a>
|
||||||
### 2022-12-05
|
### 2022-12-05
|
||||||
|
|
||||||
|
|||||||
Generated
+43
-52
@@ -4,9 +4,9 @@ version = 3
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anyhow"
|
name = "anyhow"
|
||||||
version = "1.0.66"
|
version = "1.0.68"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6"
|
checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "autocfg"
|
name = "autocfg"
|
||||||
@@ -84,9 +84,9 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.0.77"
|
version = "1.0.78"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
|
checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cfg-if"
|
name = "cfg-if"
|
||||||
@@ -96,9 +96,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "4.0.29"
|
version = "4.0.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4d63b9e9c07271b9957ad22c173bae2a4d9a81127680962039296abcd2f8251d"
|
checksum = "a7db700bc935f9e43e88d00b0850dae18a63773cfbec6d8e070fccf7fef89a39"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"clap_derive",
|
"clap_derive",
|
||||||
@@ -323,15 +323,6 @@ version = "0.4.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
|
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "hermit-abi"
|
|
||||||
version = "0.1.19"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hermit-abi"
|
name = "hermit-abi"
|
||||||
version = "0.2.6"
|
version = "0.2.6"
|
||||||
@@ -456,11 +447,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "is-terminal"
|
name = "is-terminal"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "927609f78c2913a6f6ac3c27a4fe87f43e2a35367c0c4b0f8265e8f49a104330"
|
checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hermit-abi 0.2.6",
|
"hermit-abi",
|
||||||
"io-lifetimes",
|
"io-lifetimes",
|
||||||
"rustix",
|
"rustix",
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
@@ -468,9 +459,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itoa"
|
name = "itoa"
|
||||||
version = "1.0.4"
|
version = "1.0.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
|
checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazy_static"
|
name = "lazy_static"
|
||||||
@@ -480,15 +471,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.138"
|
version = "0.2.139"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f"
|
checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lock_api"
|
name = "lock_api"
|
||||||
@@ -539,11 +530,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num_cpus"
|
name = "num_cpus"
|
||||||
version = "1.14.0"
|
version = "1.15.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5"
|
checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hermit-abi 0.1.19",
|
"hermit-abi",
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -676,18 +667,18 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.47"
|
version = "1.0.49"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
|
checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.21"
|
version = "1.0.23"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
|
checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
@@ -733,9 +724,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustix"
|
name = "rustix"
|
||||||
version = "0.36.4"
|
version = "0.36.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cb93e85278e08bb5788653183213d3a60fc242b10cb9be96586f5a73dcb67c23"
|
checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"errno",
|
"errno",
|
||||||
@@ -747,9 +738,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ryu"
|
name = "ryu"
|
||||||
version = "1.0.11"
|
version = "1.0.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
|
checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "scopeguard"
|
name = "scopeguard"
|
||||||
@@ -759,18 +750,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.148"
|
version = "1.0.151"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e53f64bb4ba0191d6d0676e1b141ca55047d83b74f5607e6d8eb88126c52c2dc"
|
checksum = "97fed41fc1a24994d044e6db6935e69511a1153b52c15eb42493b26fa87feba0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.148"
|
version = "1.0.151"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a55492425aa53521babf6137309e7d34c20bbfbbfcfe2c7f3a047fd1f6b92c0c"
|
checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -779,9 +770,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.89"
|
version = "1.0.91"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db"
|
checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
"ryu",
|
"ryu",
|
||||||
@@ -894,9 +885,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "1.0.105"
|
version = "1.0.107"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
|
checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -914,18 +905,18 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "1.0.37"
|
version = "1.0.38"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e"
|
checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror-impl",
|
"thiserror-impl",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror-impl"
|
name = "thiserror-impl"
|
||||||
version = "1.0.37"
|
version = "1.0.38"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
|
checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -958,9 +949,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
version = "1.22.0"
|
version = "1.23.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d76ce4a75fb488c605c54bf610f221cea8b0dafb53333c1a67e8ee199dcd2ae3"
|
checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -973,7 +964,7 @@ dependencies = [
|
|||||||
"signal-hook-registry",
|
"signal-hook-registry",
|
||||||
"socket2",
|
"socket2",
|
||||||
"tokio-macros",
|
"tokio-macros",
|
||||||
"winapi",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1101,9 +1092,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.5"
|
version = "1.0.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
|
checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-normalization"
|
name = "unicode-normalization"
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "oxker"
|
name = "oxker"
|
||||||
version = "0.1.9"
|
version = "0.1.10"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Jack Wills <email@mrjackwills.com>"]
|
authors = ["Jack Wills <email@mrjackwills.com>"]
|
||||||
description = "A simple tui to view & control docker containers"
|
description = "A simple tui to view & control docker containers"
|
||||||
@@ -19,7 +19,7 @@ clap={version="4.0", features = ["derive", "unicode", "color"] }
|
|||||||
crossterm = "0.25"
|
crossterm = "0.25"
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
parking_lot = {version= "0.12"}
|
parking_lot = {version= "0.12"}
|
||||||
tokio = {version = "1.22", features=["full"]}
|
tokio = {version = "1.23", features=["full"]}
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-subscriber = "0.3"
|
tracing-subscriber = "0.3"
|
||||||
tui = "0.19"
|
tui = "0.19"
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ impl<T> StatefulList<T> {
|
|||||||
.state
|
.state
|
||||||
.selected()
|
.selected()
|
||||||
.map_or(0, |value| if len > 0 { value + 1 } else { value });
|
.map_or(0, |value| if len > 0 { value + 1 } else { value });
|
||||||
format!("{}/{}", c, self.items.len())
|
format!("{c}/{}", self.items.len())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -191,7 +191,7 @@ impl fmt::Display for State {
|
|||||||
Self::Running => "✓ running",
|
Self::Running => "✓ running",
|
||||||
Self::Unknown => "? unknown",
|
Self::Unknown => "? unknown",
|
||||||
};
|
};
|
||||||
write!(f, "{}", disp)
|
write!(f, "{disp}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,7 +237,7 @@ impl fmt::Display for DockerControls {
|
|||||||
Self::Stop => "stop",
|
Self::Stop => "stop",
|
||||||
Self::Unpause => "unpause",
|
Self::Unpause => "unpause",
|
||||||
};
|
};
|
||||||
write!(f, "{}", disp)
|
write!(f, "{disp}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ impl Stats for CpuStats {
|
|||||||
impl fmt::Display for CpuStats {
|
impl fmt::Display for CpuStats {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
let disp = format!("{:05.2}%", self.0);
|
let disp = format!("{:05.2}%", self.0);
|
||||||
write!(f, "{:>x$}", disp, x = f.width().unwrap_or(1))
|
write!(f, "{disp:>x$}", x = f.width().unwrap_or(1))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,7 +346,7 @@ impl fmt::Display for ByteStats {
|
|||||||
x if x >= ONE_KB => format!("{y:.2} kB", y = as_f64 / ONE_KB),
|
x if x >= ONE_KB => format!("{y:.2} kB", y = as_f64 / ONE_KB),
|
||||||
_ => format!("{} B", self.0),
|
_ => format!("{} B", self.0),
|
||||||
};
|
};
|
||||||
write!(f, "{:>x$}", p, x = f.width().unwrap_or(1))
|
write!(f, "{p:>x$}", x = f.width().unwrap_or(1))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,7 +429,7 @@ impl ContainerItem {
|
|||||||
self.cpu_stats
|
self.cpu_stats
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.map(|i| (i.0 as f64, i.1 .0 as f64))
|
.map(|i| (i.0 as f64, i.1 .0))
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -51,7 +51,7 @@ impl fmt::Display for Header {
|
|||||||
Self::Rx => "↓ rx",
|
Self::Rx => "↓ rx",
|
||||||
Self::Tx => "↑ tx",
|
Self::Tx => "↑ tx",
|
||||||
};
|
};
|
||||||
write!(f, "{:>x$}", disp, x = f.width().unwrap_or(1))
|
write!(f, "{disp:>x$}", x = f.width().unwrap_or(1))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,9 +280,9 @@ impl AppData {
|
|||||||
let mut name = self.containers.items[index].name.clone();
|
let mut name = self.containers.items[index].name.clone();
|
||||||
name.truncate(32);
|
name.truncate(32);
|
||||||
if logs_len.is_empty() {
|
if logs_len.is_empty() {
|
||||||
format!("- {} ", name)
|
format!("- {name} ")
|
||||||
} else {
|
} else {
|
||||||
format!("{} - {}", logs_len, name)
|
format!("{logs_len} - {name}")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -17,13 +17,13 @@ pub enum AppError {
|
|||||||
impl fmt::Display for AppError {
|
impl fmt::Display for AppError {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::DockerCommand(s) => write!(f, "Unable to {} container", s),
|
Self::DockerCommand(s) => write!(f, "Unable to {s} container"),
|
||||||
Self::DockerConnect => write!(f, "Unable to access docker daemon"),
|
Self::DockerConnect => write!(f, "Unable to access docker daemon"),
|
||||||
Self::DockerInterval => write!(f, "Docker update interval needs to be greater than 0"),
|
Self::DockerInterval => write!(f, "Docker update interval needs to be greater than 0"),
|
||||||
Self::InputPoll => write!(f, "Unable to poll user input"),
|
Self::InputPoll => write!(f, "Unable to poll user input"),
|
||||||
Self::MouseCapture(x) => {
|
Self::MouseCapture(x) => {
|
||||||
let reason = if *x { "en" } else { "dis" };
|
let reason = if *x { "en" } else { "dis" };
|
||||||
write!(f, "Unbale to {}able mouse capture", reason)
|
write!(f, "Unable to {reason}able mouse capture")
|
||||||
}
|
}
|
||||||
Self::Terminal => write!(f, "Unable to draw to terminal"),
|
Self::Terminal => write!(f, "Unable to draw to terminal"),
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
// Wanring - These are indeed pedantic
|
// Wanring - These are indeed pedantic
|
||||||
// #![warn(clippy::pedantic)]
|
// #![warn(clippy::pedantic)]
|
||||||
// #![warn(clippy::nursery)]
|
// #![warn(clippy::nursery)]
|
||||||
// #![allow(clippy::module_name_repetitions, clippy::doc_markdown)]
|
// #![allow(clippy::module_name_repetitions, clippy::doc_markdown, clippy::similar_names)]
|
||||||
|
|
||||||
// Only allow when debugging
|
// Only allow when debugging
|
||||||
// #![allow(unused)]
|
// #![allow(unused)]
|
||||||
|
|||||||
@@ -41,11 +41,10 @@ pub mod log_sanitizer {
|
|||||||
|
|
||||||
/// Remove all ansi formatting from a given string and create tui-rs spans
|
/// Remove all ansi formatting from a given string and create tui-rs spans
|
||||||
pub fn remove_ansi<'a>(input: &str) -> Vec<Spans<'a>> {
|
pub fn remove_ansi<'a>(input: &str) -> Vec<Spans<'a>> {
|
||||||
let mut output = String::new();
|
raw(&categorise_text(input)
|
||||||
for i in categorise_text(input) {
|
.into_iter()
|
||||||
output.push_str(i.text);
|
.map(|i| i.text)
|
||||||
}
|
.collect::<String>())
|
||||||
raw(&output)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// create tui-rs spans that exactly match the given strings
|
/// create tui-rs spans that exactly match the given strings
|
||||||
|
|||||||
+16
-16
@@ -148,7 +148,7 @@ pub fn containers<B: Backend>(
|
|||||||
state_style,
|
state_style,
|
||||||
),
|
),
|
||||||
Span::styled(
|
Span::styled(
|
||||||
format!("{}{:>width$}", MARGIN, i.status, width = &widths.status.1),
|
format!("{MARGIN}{:>width$}", i.status, width = &widths.status.1),
|
||||||
state_style,
|
state_style,
|
||||||
),
|
),
|
||||||
Span::styled(
|
Span::styled(
|
||||||
@@ -161,7 +161,7 @@ pub fn containers<B: Backend>(
|
|||||||
state_style,
|
state_style,
|
||||||
),
|
),
|
||||||
Span::styled(
|
Span::styled(
|
||||||
format!("{}{:>width$}", MARGIN, mems, width = &widths.mem.1),
|
format!("{MARGIN}{mems:>width$}", width = &widths.mem.1),
|
||||||
state_style,
|
state_style,
|
||||||
),
|
),
|
||||||
Span::styled(
|
Span::styled(
|
||||||
@@ -174,19 +174,19 @@ pub fn containers<B: Backend>(
|
|||||||
blue,
|
blue,
|
||||||
),
|
),
|
||||||
Span::styled(
|
Span::styled(
|
||||||
format!("{}{:>width$}", MARGIN, i.name, width = widths.name.1),
|
format!("{MARGIN}{:>width$}", i.name, width = widths.name.1),
|
||||||
blue,
|
blue,
|
||||||
),
|
),
|
||||||
Span::styled(
|
Span::styled(
|
||||||
format!("{}{:>width$}", MARGIN, i.image, width = widths.image.1),
|
format!("{MARGIN}{:>width$}", i.image, width = widths.image.1),
|
||||||
blue,
|
blue,
|
||||||
),
|
),
|
||||||
Span::styled(
|
Span::styled(
|
||||||
format!("{}{:>width$}", MARGIN, i.rx, width = widths.net_rx.1),
|
format!("{MARGIN}{:>width$}", i.rx, width = widths.net_rx.1),
|
||||||
Style::default().fg(Color::Rgb(255, 233, 193)),
|
Style::default().fg(Color::Rgb(255, 233, 193)),
|
||||||
),
|
),
|
||||||
Span::styled(
|
Span::styled(
|
||||||
format!("{}{:>width$}", MARGIN, i.tx, width = widths.net_tx.1),
|
format!("{MARGIN}{:>width$}", i.tx, width = widths.net_tx.1),
|
||||||
Style::default().fg(Color::Rgb(205, 140, 140)),
|
Style::default().fg(Color::Rgb(205, 140, 140)),
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
@@ -220,7 +220,7 @@ pub fn logs<B: Backend>(
|
|||||||
let block = generate_block(app_data, area, gui_state, SelectablePanel::Logs);
|
let block = generate_block(app_data, area, gui_state, SelectablePanel::Logs);
|
||||||
let contains_init = gui_state.lock().status_contains(&[Status::Init]);
|
let contains_init = gui_state.lock().status_contains(&[Status::Init]);
|
||||||
if contains_init {
|
if contains_init {
|
||||||
let paragraph = Paragraph::new(format!("parsing logs {}", loading_icon))
|
let paragraph = Paragraph::new(format!("parsing logs {loading_icon}"))
|
||||||
.style(Style::default())
|
.style(Style::default())
|
||||||
.block(block)
|
.block(block)
|
||||||
.alignment(Alignment::Center);
|
.alignment(Alignment::Center);
|
||||||
@@ -309,7 +309,7 @@ fn make_chart<'a, T: Stats + Display>(
|
|||||||
Block::default()
|
Block::default()
|
||||||
.title_alignment(Alignment::Center)
|
.title_alignment(Alignment::Center)
|
||||||
.title(Span::styled(
|
.title(Span::styled(
|
||||||
format!(" {} {} ", name, current),
|
format!(" {name} {current} "),
|
||||||
Style::default()
|
Style::default()
|
||||||
.fg(title_color)
|
.fg(title_color)
|
||||||
.add_modifier(Modifier::BOLD),
|
.add_modifier(Modifier::BOLD),
|
||||||
@@ -327,7 +327,7 @@ fn make_chart<'a, T: Stats + Display>(
|
|||||||
.labels(vec![
|
.labels(vec![
|
||||||
Span::styled("", Style::default().fg(label_color)),
|
Span::styled("", Style::default().fg(label_color)),
|
||||||
Span::styled(
|
Span::styled(
|
||||||
format!("{}", max),
|
format!("{max}"),
|
||||||
Style::default()
|
Style::default()
|
||||||
.add_modifier(Modifier::BOLD)
|
.add_modifier(Modifier::BOLD)
|
||||||
.fg(label_color),
|
.fg(label_color),
|
||||||
@@ -355,7 +355,7 @@ pub fn heading_bar<B: Backend>(
|
|||||||
|
|
||||||
f.render_widget(block(Color::Black), area);
|
f.render_widget(block(Color::Black), area);
|
||||||
|
|
||||||
// Generate a bloack for the header, if the header is currently being used to sort a column, then highlight it white
|
// Generate a block for the header, if the header is currently being used to sort a column, then highlight it white
|
||||||
let header_block = |x: &Header| {
|
let header_block = |x: &Header| {
|
||||||
let mut color = Color::Black;
|
let mut color = Color::Black;
|
||||||
let mut suffix = "";
|
let mut suffix = "";
|
||||||
@@ -432,7 +432,7 @@ pub fn heading_bar<B: Backend>(
|
|||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
let suffix = if help_visible { "exit" } else { "show" };
|
let suffix = if help_visible { "exit" } else { "show" };
|
||||||
let info_text = format!("( h ) {} help {}", suffix, MARGIN,);
|
let info_text = format!("( h ) {suffix} help {MARGIN}",);
|
||||||
let info_width = info_text.chars().count();
|
let info_width = info_text.chars().count();
|
||||||
|
|
||||||
let column_width = usize::from(area.width) - info_width;
|
let column_width = usize::from(area.width) - info_width;
|
||||||
@@ -453,7 +453,7 @@ pub fn heading_bar<B: Backend>(
|
|||||||
.split(area);
|
.split(area);
|
||||||
if has_containers {
|
if has_containers {
|
||||||
// Draw loading icon, or not, and a prefix with a single space
|
// Draw loading icon, or not, and a prefix with a single space
|
||||||
let loading_icon = format!("{:>2}", loading_icon);
|
let loading_icon = format!("{loading_icon:>2}");
|
||||||
let loading_paragraph = Paragraph::new(loading_icon)
|
let loading_paragraph = Paragraph::new(loading_icon)
|
||||||
.block(block(Color::White))
|
.block(block(Color::White))
|
||||||
.alignment(Alignment::Center);
|
.alignment(Alignment::Center);
|
||||||
@@ -507,9 +507,9 @@ fn max_line_width(text: &str) -> usize {
|
|||||||
/// Draw the help box in the centre of the screen
|
/// Draw the help box in the centre of the screen
|
||||||
/// TODO should make every line it's own renderable span
|
/// TODO should make every line it's own renderable span
|
||||||
pub fn help_box<B: Backend>(f: &mut Frame<'_, B>) {
|
pub fn help_box<B: Backend>(f: &mut Frame<'_, B>) {
|
||||||
let title = format!(" {} ", VERSION);
|
let title = format!(" {VERSION} ");
|
||||||
|
|
||||||
let description_text = format!("\n{}", DESCRIPTION);
|
let description_text = format!("\n{DESCRIPTION}");
|
||||||
|
|
||||||
let mut help_text = String::from("\n ( tab ) or ( shift+tab ) to change panels");
|
let mut help_text = String::from("\n ( tab ) or ( shift+tab ) to change panels");
|
||||||
help_text
|
help_text
|
||||||
@@ -527,7 +527,7 @@ pub fn help_box<B: Backend>(f: &mut Frame<'_, B>) {
|
|||||||
help_text.push_str(format!("\n {}", REPO.trim()).as_str());
|
help_text.push_str(format!("\n {}", REPO.trim()).as_str());
|
||||||
|
|
||||||
// Find the maximum line widths & height
|
// Find the maximum line widths & height
|
||||||
let all_text = format!("{}{}{}", NAME_TEXT, description_text, help_text);
|
let all_text = format!("{NAME_TEXT}{description_text}{help_text}");
|
||||||
let mut max_line_width = max_line_width(&all_text);
|
let mut max_line_width = max_line_width(&all_text);
|
||||||
let mut lines = all_text.lines().count();
|
let mut lines = all_text.lines().count();
|
||||||
|
|
||||||
@@ -604,7 +604,7 @@ pub fn error<B: Backend>(f: &mut Frame<'_, B>, error: AppError, seconds: Option<
|
|||||||
_ => String::from("\n\n ( c ) to clear error\n ( q ) to quit oxker"),
|
_ => String::from("\n\n ( c ) to clear error\n ( q ) to quit oxker"),
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut text = format!("\n{}", error);
|
let mut text = format!("\n{error}");
|
||||||
|
|
||||||
text.push_str(to_push.as_str());
|
text.push_str(to_push.as_str());
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -169,7 +169,7 @@ impl fmt::Display for Loading {
|
|||||||
Self::Nine => '⠇',
|
Self::Nine => '⠇',
|
||||||
Self::Ten => '⠏',
|
Self::Ten => '⠏',
|
||||||
};
|
};
|
||||||
write!(f, "{}", disp)
|
write!(f, "{disp}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -67,7 +67,7 @@ pub async fn create_ui(
|
|||||||
terminal.show_cursor()?;
|
terminal.show_cursor()?;
|
||||||
|
|
||||||
if let Err(err) = res {
|
if let Err(err) = res {
|
||||||
println!("{}", err);
|
println!("{err}");
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user