feat: exec mode improvements
Use Bollard library to exec in pure Rust. `--use-cli` cli arg, will then only try to exec into containers using Docker. Only try to exec into a container if the state == Running.
This commit is contained in:
+7
-1
@@ -83,7 +83,7 @@ impl AppData {
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
#[allow(unused)]
|
||||
pub fn set_debug_string(&mut self, x: &str) {
|
||||
pub fn push_debug_string(&mut self, x: &str) {
|
||||
self.debug_string.push_str(x);
|
||||
}
|
||||
|
||||
@@ -506,6 +506,12 @@ impl AppData {
|
||||
self.get_selected_container().map(|i| i.id.clone())
|
||||
}
|
||||
|
||||
/// Get the Id and State for the currently selected container - used by the exec check method
|
||||
pub fn get_selected_container_id_state(&self) -> Option<(ContainerId, State)> {
|
||||
self.get_selected_container()
|
||||
.map(|i| (i.id.clone(), i.state))
|
||||
}
|
||||
|
||||
/// Update container mem, cpu, & network stats, in single function so only need to call .lock() once
|
||||
/// Will also, if a sort is set, sort the containers
|
||||
pub fn update_stats(
|
||||
|
||||
Reference in New Issue
Block a user