Skip to content

Commit

Permalink
Merge branch 'donald/web'
Browse files Browse the repository at this point in the history
* donald/web:
  web: show some units and elapsed job time
  • Loading branch information
mariux committed Sep 24, 2015
2 parents f473c8c + 4991461 commit 6e354e1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions web/pages/mxq/mxq.in
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ user_group : $o{user_group}
job_command : $job_command
job_threads : $o{job_threads}
job_memory : $o{job_memory}
job_time : $o{job_time}
job_memory : $o{job_memory} MiB
job_time : $o{job_time} minutes
job_max_per_node : $o{job_max_per_node}
Expand Down Expand Up @@ -311,7 +311,7 @@ sub job {

$dbh or db_init();

my $sth=$dbh->prepare('SELECT * FROM mxq_job WHERE job_id=? LIMIT 1',undef);
my $sth=$dbh->prepare('SELECT *,timestampdiff(MINUTE,date_start,now()) as t FROM mxq_job WHERE job_id=? LIMIT 1',undef);
$sth->execute($job_id);
my %o=%{$sth->fetchrow_hashref('NAME_lc')};

Expand All @@ -325,6 +325,9 @@ sub job {
my $job_stdout=escapeHTML($o{job_stdout});
my $job_stderr=escapeHTML($o{job_stderr});


my $ago = defined $o{t} ? "($o{t} minutes ago)" : '';

defined $_ or $_='<null>' for values %o;

$out.=h2("Job Details $o{job_id}");
Expand Down Expand Up @@ -354,7 +357,7 @@ host_pid : $o{host_pid}
host_slots : $o{host_slots}
date_submit : $o{date_submit}
date_start : $o{date_start}
date_start : $o{date_start} $ago
date_end : $o{date_end}
job_id_new : $o{job_id_new}
Expand Down

0 comments on commit 6e354e1

Please sign in to comment.