Skip to content

Commit 0e40ab4

Browse files
feat: add job name to detail window (#42)
* add job name to details window Provide a way to check long names as the default space is quite small * fix: job detail list length --------- Co-authored-by: Karim Knaebel <7303830+karimknaebel@users.noreply.github.com>
1 parent 3dfe8dc commit 0e40ab4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/app.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ impl App {
333333

334334
let job_detail_log = Layout::default()
335335
.direction(Direction::Vertical)
336-
.constraints([Constraint::Length(7), Constraint::Min(3)].as_ref())
336+
.constraints([Constraint::Length(8), Constraint::Min(3)].as_ref())
337337
.split(master_detail[1]);
338338

339339
// Help
@@ -465,7 +465,11 @@ impl App {
465465
]);
466466
}
467467
let state = Line::from(state_spans);
468-
468+
let name = Line::from(vec![
469+
Span::styled("Name ", Style::default().fg(Color::Yellow)),
470+
Span::raw(" "),
471+
Span::raw(&j.name),
472+
]);
469473
let command = Line::from(vec![
470474
Span::styled("Command", Style::default().fg(Color::Yellow)),
471475
Span::raw(" "),
@@ -499,7 +503,7 @@ impl App {
499503
),
500504
]);
501505

502-
Text::from(vec![state, command, nodes, tres, stdout])
506+
Text::from(vec![state, name, command, nodes, tres, stdout])
503507
});
504508
let job_detail = Paragraph::new(job_detail.unwrap_or_default()).block(
505509
Block::default()

0 commit comments

Comments
 (0)