Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion coman/.config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
"""

Expand Down
3 changes: 3 additions & 0 deletions coman/src/app/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions coman/src/components/toolbar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 7 additions & 1 deletion coman/src/components/workload_details.rs
Original file line number Diff line number Diff line change
@@ -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},
Expand Down Expand Up @@ -110,6 +110,12 @@ impl MockComponent for WorkloadDetails {
impl Component<Msg, UserEvent> for WorkloadDetails {
fn on(&mut self, ev: Event<UserEvent>) -> Option<Msg> {
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));
}
Expand Down