chore: merge main into dev

This commit is contained in:
Jack Wills
2023-08-28 13:32:44 +00:00
8 changed files with 50 additions and 25 deletions
+9 -7
View File
@@ -1,13 +1,15 @@
### 2023-06-04 ### 2023-08-28
### Chores ### Chores
+ github workflow ubuntu latest, build for x86 musl, [4fa841e6e74e3e10e3d3e82eac1a1ca1338814cf] + dependencies updated, [8ce5a1877a8c56d9bbab560c97e2596ea87cc4c0], [94a20584e6ef0701c9f36838b0dfbcd911698dbe], [29e02e0d1faae4a836c7e5cfd0d791338ff586e3], [8e4c2e686761df56920df2267b765ab1297c9972]
+ dependencies updated, [0caa92f6a4728d50d8b2d8f15d96a21112732ec5], [1fd1dfc75d6fa4e84451ebc845b9e1c730381f41] + `_typos.toml` added, [84ba1020939606abf4a287cbd1de1f3a10d3f0c0]
+ `Spans` -> `Line`, ratatui 0.21 update, [4679ddc885a9b35c901f3600b63fd9e86118264c], [0d37ac55018038363e5f92dc4215996f8cff7b2e]
+ `create_release.sh` updated, [7dec5f14a381d237c5e72fbf9551bcf398f93f3e]
### Fixes ### Features
+ workflow additional image fix, closes #29, [47cda44b8213cfb8c3807df6c43e3f5dc2452b57] + 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 <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
+8 -5
View File
@@ -1,13 +1,16 @@
# <a href='https://github.com/mrjackwills/oxker/releases/tag/v0.3.2'>v0.3.2</a>
### 2023-08-28
### Chores ### Chores
+ dependencies updated, [8ce5a1877a8c56d9bbab560c97e2596ea87cc4c0], [94a20584e6ef0701c9f36838b0dfbcd911698dbe], [29e02e0d1faae4a836c7e5cfd0d791338ff586e3], [8e4c2e686761df56920df2267b765ab1297c9972] + 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, [84ba1020939606abf4a287cbd1de1f3a10d3f0c0] + `_typos.toml` added, [84ba1020](https://github.com/mrjackwills/oxker/commit/84ba1020939606abf4a287cbd1de1f3a10d3f0c0)
### Features ### 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] + 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 ### Refactors
+ `set_error()` takes `gui_state` and error enum, to make sure app_data & gui_state is in sync [62c78dfaa50a8d8c084f7fbf7e203b50aaa731ae] + `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, [2e27462d1b3f0bdb27d7646511e36d0c9af07f3e] + `fn loading_spin` doesn't need to be async, [2e27462d](https://github.com/mrjackwills/oxker/commit/2e27462d1b3f0bdb27d7646511e36d0c9af07f3e)
# <a href='https://github.com/mrjackwills/oxker/releases/tag/v0.3.1'>v0.3.1</a> # <a href='https://github.com/mrjackwills/oxker/releases/tag/v0.3.1'>v0.3.1</a>
### 2023-06-04 ### 2023-06-04
Generated
+1 -1
View File
@@ -696,7 +696,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]] [[package]]
name = "oxker" name = "oxker"
version = "0.3.1" version = "0.3.2"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bollard", "bollard",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "oxker" name = "oxker"
version = "0.3.1" version = "0.3.2"
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"
+12 -4
View File
@@ -1,12 +1,20 @@
use bollard::models::ContainerSummary; use bollard::models::ContainerSummary;
use parking_lot::Mutex;
use core::fmt; use core::fmt;
use parking_lot::Mutex;
use ratatui::widgets::{ListItem, ListState}; use ratatui::widgets::{ListItem, ListState};
use std::{time::{SystemTime, UNIX_EPOCH}, sync::Arc}; use std::{
sync::Arc,
time::{SystemTime, UNIX_EPOCH},
};
mod container_state; mod container_state;
use crate::{app_error::AppError, parse_args::CliArgs, ui::{log_sanitizer, Status, GuiState}, ENTRY_POINT}; use crate::{
app_error::AppError,
parse_args::CliArgs,
ui::{log_sanitizer, GuiState, Status},
ENTRY_POINT,
};
pub use container_state::*; pub use container_state::*;
/// Global app_state, stored in an Arc<Mutex> /// Global app_state, stored in an Arc<Mutex>
@@ -391,7 +399,7 @@ impl AppData {
/// insert single app_state error /// insert single app_state error
pub fn set_error(&mut self, error: AppError, gui_state: &Arc<Mutex<GuiState>>, status: Status) { pub fn set_error(&mut self, error: AppError, gui_state: &Arc<Mutex<GuiState>>, status: Status) {
gui_state.lock().status_push(status); gui_state.lock().status_push(status);
self.error = Some(error); self.error = Some(error);
} }
+3 -1
View File
@@ -333,7 +333,9 @@ impl DockerData {
error: DockerControls, error: DockerControls,
gui_state: &Arc<Mutex<GuiState>>, gui_state: &Arc<Mutex<GuiState>>,
) { ) {
app_data.lock().set_error(AppError::DockerCommand(error), gui_state, Status::Error); app_data
.lock()
.set_error(AppError::DockerCommand(error), gui_state, Status::Error);
} }
/// Handle incoming messages, container controls & all container information update /// Handle incoming messages, container controls & all container information update
+10 -4
View File
@@ -93,16 +93,22 @@ impl InputHandler {
.lock() .lock()
.set_info_box("✖ mouse capture disabled".to_owned()); .set_info_box("✖ mouse capture disabled".to_owned());
} else { } else {
self.app_data self.app_data.lock().set_error(
.lock() AppError::MouseCapture(false),
.set_error(AppError::MouseCapture(false), &self.gui_state, Status::Error); &self.gui_state,
Status::Error,
);
} }
} else if Ui::enable_mouse_capture().is_ok() { } else if Ui::enable_mouse_capture().is_ok() {
self.gui_state self.gui_state
.lock() .lock()
.set_info_box("✓ mouse capture enabled".to_owned()); .set_info_box("✓ mouse capture enabled".to_owned());
} else { } else {
self.app_data.lock().set_error(AppError::MouseCapture(true), &self.gui_state, 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 // If the info box sleep handle is currently being executed, as in 'm' is pressed twice within a 4000ms window
+6 -2
View File
@@ -105,10 +105,14 @@ async fn docker_init(
is_running, is_running,
)); ));
} else { } else {
app_data.lock().set_error(AppError::DockerConnect, gui_state, Status::DockerConnect); app_data
.lock()
.set_error(AppError::DockerConnect, gui_state, Status::DockerConnect);
} }
} else { } else {
app_data.lock().set_error(AppError::DockerConnect, gui_state, Status::DockerConnect); app_data
.lock()
.set_error(AppError::DockerConnect, gui_state, Status::DockerConnect);
} }
} }