chore: merge main into dev

This commit is contained in:
Jack Wills
2022-10-07 21:13:22 +00:00
4 changed files with 31 additions and 37 deletions
+12 -13
View File
@@ -1,22 +1,21 @@
### 2022-09-07
### 2022-10-07
### Chores
+ dependencies updated, [a3168daa3f769a6747dfbe61103073a7e80a1485], [78e59160bb6a978ee80e3a99eb72f051fb64e737]
+ Update clap to v4, [15597dbe6942ec053541398ce0e9dedc10a4d3ea]
### Docs
+ readme.md updated, [a05bf561cc6d96237f683ab0b3c782d6841974d9]
### Features
+ containerize self, github action to build and push to [Docker Hub](https://hub.docker.com/r/mrjackwills/oxker), [07f972022a69f22bac57925e6ad84234381f7890]
+ gui_state is_loading use a HashSet to enable multiple things be loading at the same time, [66583e1b037b7e2f3e47948d70d8a4c6f6a2f2d5]
+ github action publish to crates.io, [90b2e3f6db0d5f63840cd80888a30da6ecc22f20]
+ derive Eq where appropriate, [d7c2601f959bc12a64cd25cef59c837e1e8c2b2a]
+ ignore containers 'oxker' containers, [1be9f52ad4a68f93142784e9df630c59cdec0a79]
+ update container info if container is either running OR restarting, [5f12362db7cb61ca68f75b99ecfc9725380d87d2]
### Fixes
+ devcontainer updated, [3bde4f5629539cab3dbb57556663ab81685f9d7a]
+ Use Binate enum to enable two cycles of cpu/mem update to be executed (for each container) at the same time, refactor hashmap spawn insertions, [7ec58e79a1316ad1f7e50a2781dea0fe8422c588]
+ use newtype construct for container id, [41cbb84f2896f8be2c37eba87e390d998aff7382]
### Refactors
+ improved way to remove leading '/' of container name, [832e9782d7765872cbb84df6b3703fc08cb353c9]
+ Impl Copy where able to, [e76878f424d72b943713ef84e95e25fada77d79e]
+ replace async fn with just fn, [17dc604befac75cb9dc0311a0e43f9927fe0ca30]
+ remove pointless clone()'s & variable declarations, [6731002ee42c9460042c2c38aff5101b1bcebbe6]
+ replace String::from("") with String::new(), [62fb22478697cc9a7ab9fb562a724965b437233a]
+ replace map_or_else with map_or, [3e26f292c7dc5e13af4580952767ebe821aa5183], [5660b34d5149dce27706ff6daa90b854e6f84e14]
see <a href='https://github.com/mrjackwills/oxker/blob/main/CHANGELOG.md'>CHANGELOG.md</a> for more details
+11 -8
View File
@@ -1,19 +1,22 @@
# <a href='https://github.com/mrjackwills/oxker/releases/tag/v0.1.5'>v0.1.5</a>
### 2022-10-07
### Chores
+ Update clap to v4, [15597dbe6942ec053541398ce0e9dedc10a4d3ea]
+ Update clap to v4, [15597dbe](https://github.com/mrjackwills/oxker/commit/15597dbe6942ec053541398ce0e9dedc10a4d3ea),
### Docs
+ readme.md updated, [a05bf561cc6d96237f683ab0b3c782d6841974d9]
+ readme.md updated, [a05bf561](https://github.com/mrjackwills/oxker/commit/a05bf561cc6d96237f683ab0b3c782d6841974d9),
### Features
+ use newtype construct for container id, [41cbb84f2896f8be2c37eba87e390d998aff7382]
+ use newtype construct for container id, [41cbb84f](https://github.com/mrjackwills/oxker/commit/41cbb84f2896f8be2c37eba87e390d998aff7382),
### Refactors
+ Impl Copy where able to, [e76878f424d72b943713ef84e95e25fada77d79e]
+ replace async fn with just fn, [17dc604befac75cb9dc0311a0e43f9927fe0ca30]
+ remove pointless clone()'s & variable declarations, [6731002ee42c9460042c2c38aff5101b1bcebbe6]
+ replace String::from("") with String::new(), [62fb22478697cc9a7ab9fb562a724965b437233a]
+ replace map_or_else with map_or, [3e26f292c7dc5e13af4580952767ebe821aa5183], [5660b34d5149dce27706ff6daa90b854e6f84e14]
+ Impl Copy where able to, [e76878f4](https://github.com/mrjackwills/oxker/commit/e76878f424d72b943713ef84e95e25fada77d79e),
+ replace async fn with just fn, [17dc604b](https://github.com/mrjackwills/oxker/commit/17dc604befac75cb9dc0311a0e43f9927fe0ca30),
+ remove pointless clone()'s & variable declarations, [6731002e](https://github.com/mrjackwills/oxker/commit/6731002ee42c9460042c2c38aff5101b1bcebbe6),
+ replace String::from("") with String::new(), [62fb2247](https://github.com/mrjackwills/oxker/commit/62fb22478697cc9a7ab9fb562a724965b437233a),
+ replace map_or_else with map_or, [3e26f292](https://github.com/mrjackwills/oxker/commit/3e26f292c7dc5e13af4580952767ebe821aa5183),, [5660b34d](https://github.com/mrjackwills/oxker/commit/5660b34d5149dce27706ff6daa90b854e6f84e14),
# <a href='https://github.com/mrjackwills/oxker/releases/tag/v0.1.4'>v0.1.4</a>
### 2022-09-07
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "oxker"
version = "0.1.4"
version = "0.1.5"
edition = "2021"
authors = ["Jack Wills <email@mrjackwills.com>"]
description = "A simple tui to view & control docker containers"
+7 -15
View File
@@ -301,8 +301,7 @@ impl AppData {
}
}
/// Check if the initial parsing has been completed, by making sure that all ids given (which are running) have a non empty cpu_stats vecdec
/// Check if the initial parsing has been completed, by making sure that all ids given (which are running) have a non empty cpu_stats vecdec
pub fn initialised(&mut self, all_ids: &[(bool, ContainerId)]) -> bool {
let count_is_running = all_ids.iter().filter(|i| i.0).count();
let number_with_cpu_status = self
@@ -445,8 +444,8 @@ impl AppData {
}
}
}
// Trim a &String and return String
let trim_owned = |x: &String| x.trim().to_owned();
// Trim a &String and return String
let trim_owned = |x: &String| x.trim().to_owned();
for i in all_containers {
if let Some(id) = i.id.as_ref() {
@@ -459,15 +458,8 @@ impl AppData {
})
});
let state = State::from(
i.state
.as_ref()
.map_or("dead".to_owned(), trim_owned),
);
let status = i
.status
.as_ref()
.map_or("".to_owned(), trim_owned);
let state = State::from(i.state.as_ref().map_or("dead".to_owned(), trim_owned));
let status = i.status.as_ref().map_or("".to_owned(), trim_owned);
let image = i
.image
@@ -527,8 +519,8 @@ impl AppData {
container.logs.items.push(ListItem::new(lines));
}
// Set the logs selected row for each container
// Either when no long currently selected, or currently selected (before updated) is already at end
// Set the logs selected row for each container
// Either when no long currently selected, or currently selected (before updated) is already at end
if container.logs.state.selected().is_none()
|| container.logs.state.selected().map_or(1, |f| f + 1) == current_len
{