diff --git a/coman/.config/config.toml b/coman/.config/config.toml index ae5e583..49f4537 100644 --- a/coman/.config/config.toml +++ b/coman/.config/config.toml @@ -20,7 +20,7 @@ sbatch_script_template = """ #!/bin/bash #SBATCH --job-name={{name}} #SBATCH --ntasks=1 -#SBATCH --time=10:00 +#SBATCH --time=1:00:00 srun {% if environment_file %}--environment={{environment_file}}{% endif %} {{command}} """ diff --git a/coman/src/app/model.rs b/coman/src/app/model.rs index 5151f1d..cecf77e 100644 --- a/coman/src/app/model.rs +++ b/coman/src/app/model.rs @@ -311,6 +311,9 @@ where .is_ok() ); } + if self.app.mounted(&Id::WorkloadDetails) { + assert!(self.app.umount(&Id::WorkloadDetails).is_ok()); + } if !self.app.mounted(&Id::WorkloadLogs) { assert!( self.app diff --git a/coman/src/components/toolbar.rs b/coman/src/components/toolbar.rs index 3f750b2..cb45978 100644 --- a/coman/src/components/toolbar.rs +++ b/coman/src/components/toolbar.rs @@ -5,8 +5,9 @@ use crate::app::{ messages::{Msg, View}, user_events::UserEvent, }; -const WORKLOAD_TOOLTIP: &str = "q: quit, Esc: close/back, l: logs, f: File view, x: menu, tab: switch view, ?: help"; -const FILETREE_TOOLTIP: &str = "q: quit, ↑↓: navigate,←→: collapse/expand, x: menu, ?: help"; +const WORKLOAD_TOOLTIP: &str = + "q: quit, Esc: close/back, Enter: details, l: logs, f: file view, x: menu, tab: switch view"; +const FILETREE_TOOLTIP: &str = "q: quit, ↑↓: navigate,←→: collapse/expand, w: workload view x: menu"; #[derive(MockComponent)] pub struct Toolbar { diff --git a/coman/src/components/workload_details.rs b/coman/src/components/workload_details.rs index cfd04f7..9f3fc3f 100644 --- a/coman/src/components/workload_details.rs +++ b/coman/src/components/workload_details.rs @@ -1,7 +1,7 @@ use tuirealm::{ AttrValue, Attribute, Component, Event, MockComponent, Props, State, command::{Cmd, CmdResult}, - event::{Key, KeyEvent}, + event::{Key, KeyEvent, KeyModifiers}, props::{BorderType, Borders, Layout}, ratatui::{ layout::{Constraint, Direction}, @@ -110,6 +110,12 @@ impl MockComponent for WorkloadDetails { impl Component for WorkloadDetails { fn on(&mut self, ev: Event) -> Option { let _ = match ev { + Event::Keyboard(KeyEvent { + code: Key::Char('l'), + modifiers: KeyModifiers::NONE, + }) => { + return Some(Msg::Job(JobMsg::Log(self.details.id))); + } Event::Keyboard(KeyEvent { code: Key::Esc, .. }) => { return Some(Msg::Job(JobMsg::Close)); }