chore: release v0.1.0
This commit is contained in:
@@ -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<Docker>,
|
||||
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<Docker>,
|
||||
id: String,
|
||||
|
||||
@@ -473,10 +473,8 @@ pub fn draw_heading_bar<B: Backend>(
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
+16
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user