From 4fdef153bf4da69511ceca29a368e946e4dd1f70 Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Sat, 23 Jul 2022 04:24:11 +0000 Subject: [PATCH] chore: release v0.1.0 --- .github/release-body.md | 20 ++++++-------------- CHANGELOG.md | 9 ++++++--- Cargo.toml | 2 +- src/docker_data/mod.rs | 4 ++-- src/ui/draw_blocks.rs | 6 ++---- src/ui/gui_state.rs | 26 ++++++++++++++++---------- 6 files changed, 33 insertions(+), 34 deletions(-) diff --git a/.github/release-body.md b/.github/release-body.md index bf70699..97a8a25 100644 --- a/.github/release-body.md +++ b/.github/release-body.md @@ -1,19 +1,11 @@ -### 2022-07-06 +### 2022-07-23 -### Docs -+ readme update, [f29e29ad151ddf424ba630e6d33edf19acfd7636] -+ comments improved, [1674db8a20aafa447732deb2e44ac8b97cf0471b] -+ readme logo size, [a733efa65865e04d9ec86c7ca8785dfbae635695] - -### Fixes -+ Remove unwraps(), [61db81ecfe5684ddb8a360715f43357a042162c0] -+ Help menu alt+tab > shift+tab typo, thanks [siph](https://github.com/siph), [04466803481b75feb7d7f275248279fdb8729862] - -### Refactors -+ tokio spawns, [1fd230f2f3cf4e376058359515e76f4fa6e425c2] -+ max_line_width(), [a5d7dabbd68dc15a081df33352ce3b55d9a9891c] -+ create_release dead code removed, [297979c197c2defd409053d8da724f922b0bba1b] +### Chores ++ dependencies updated, [cf7e02dde94f69832a2e485b99785afc66a5bc15] +### Features ++ Enable sorting of containers by each, and every, heading. Either via keyboard or mouse, closes [#3], [a6c296f2cde56cf241bcd696cab8bd477270e5f4] ++ Spawn & track docker information update requests, multiple identical requests cannot be executed, [740c059b276f35acd1cb03f1030134646bf8a07d] see CHANGELOG.md for more details diff --git a/CHANGELOG.md b/CHANGELOG.md index 907e3c5..6bf452f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,12 @@ +# v0.1.0 +### 2022-07-23 + ### Chores -+ dependencies updated, [cf7e02dde94f69832a2e485b99785afc66a5bc15] ++ dependencies updated, [cf7e02dd](https://github.com/mrjackwills/oxker/commit/cf7e02dde94f69832a2e485b99785afc66a5bc15), ### Features -+ Enable sorting of containers by each, and every, heading. Either via keyboard or mouse, closes [#3], [a6c296f2cde56cf241bcd696cab8bd477270e5f4] -+ Spawn & track docker information update requests, multiple identical requests cannot be executed, [740c059b276f35acd1cb03f1030134646bf8a07d] ++ Enable sorting of containers by each, and every, heading. Either via keyboard or mouse, closes [#3](https://github.com/mrjackwills/oxker/issues/3), [a6c296f2](https://github.com/mrjackwills/oxker/commit/a6c296f2cde56cf241bcd696cab8bd477270e5f4), ++ Spawn & track docker information update requests, multiple identical requests cannot be executed, [740c059b](https://github.com/mrjackwills/oxker/commit/740c059b276f35acd1cb03f1030134646bf8a07d), # v0.0.6 ### 2022-07-06 diff --git a/Cargo.toml b/Cargo.toml index 079ed90..44f4180 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxker" -version = "0.0.6" +version = "0.1.0" edition = "2021" authors = ["Jack Wills "] description = "a simple tui to view & control docker containers" diff --git a/src/docker_data/mod.rs b/src/docker_data/mod.rs index 83c51e9..6cfe776 100644 --- a/src/docker_data/mod.rs +++ b/src/docker_data/mod.rs @@ -63,7 +63,7 @@ impl DockerData { /// Get a single docker stat in order to update mem and cpu usage /// don't take &self, so that can tokio::spawn into it's own thread - /// remove if from spawns hashmap when complete + /// remove if from spawns hashmap when complete async fn update_container_stat( docker: Arc, id: String, @@ -183,7 +183,7 @@ impl DockerData { /// Update single container logs /// don't take &self, so that can tokio::spawn into it's own thread - /// remove if from spawns hashmap when complete + /// remove if from spawns hashmap when complete async fn update_log( docker: Arc, id: String, diff --git a/src/ui/draw_blocks.rs b/src/ui/draw_blocks.rs index 565881e..3e4b86c 100644 --- a/src/ui/draw_blocks.rs +++ b/src/ui/draw_blocks.rs @@ -473,10 +473,8 @@ pub fn draw_heading_bar( // draw the actual header blocks for (index, (paragraph, header, _)) in header_data.into_iter().enumerate() { - let rect = headers_section[index]; - gui_state - .lock() - .update_map(Region::Header(header), rect); + let rect = headers_section[index]; + gui_state.lock().update_map(Region::Header(header), rect); f.render_widget(paragraph, rect); } } diff --git a/src/ui/gui_state.rs b/src/ui/gui_state.rs index d95515e..34add3e 100644 --- a/src/ui/gui_state.rs +++ b/src/ui/gui_state.rs @@ -10,10 +10,9 @@ pub enum SelectablePanel { Logs, } - pub enum Region { - Panel(SelectablePanel), - Header(Header) + Panel(SelectablePanel), + Header(Header), } #[allow(unused)] @@ -225,13 +224,20 @@ impl GuiState { .map(|data| data.0.to_owned()) } - /// Insert, or updatem header area panel into heading_map - pub fn update_map(&mut self, region: Region, area: Rect) { - match region { - Region::Header(header) => - self.heading_map.entry(header).and_modify(|w|*w =area).or_insert(area), - Region::Panel(panel) => self.panel_map.entry(panel).and_modify(|w|*w =area).or_insert(area), - }; + /// Insert, or updatem header area panel into heading_map + pub fn update_map(&mut self, region: Region, area: Rect) { + match region { + Region::Header(header) => self + .heading_map + .entry(header) + .and_modify(|w| *w = area) + .or_insert(area), + Region::Panel(panel) => self + .panel_map + .entry(panel) + .and_modify(|w| *w = area) + .or_insert(area), + }; } /// Change to next selectable panel