Commit b0da07a3 authored by Leigh B Stoller's avatar Leigh B Stoller

Another tweak to recent activity list returned for reservations; current

experiments are recent too!
parent 50e68968
......@@ -1004,10 +1004,12 @@ sub Usage($$$)
my @results = ();
my $query_result =
DBQueryWarn("select s.eid,r.idx,s.nonlocal_id, ".
DBQueryWarn("select s.eid,r.idx,s.nonlocal_id,s.slice_uuid, ".
" r.swapin_time,r.swapout_time,r.pnodes,n.type, ".
" count(n.type) ".
" from experiment_resources as r ".
"left join experiments as e on ".
" e.idx=r.exptidx ".
"left join experiment_stats as s on ".
" s.exptidx=r.exptidx ".
"left join node_history as h on ".
......@@ -1021,8 +1023,9 @@ sub Usage($$$)
" ((r.swapin_time >= $start and ".
" r.swapin_time <= $end) or ".
" (r.swapout_time > $start and ".
" r.swapout_time < $end)) ".
"group by s.eid,r.idx,s.nonlocal_id, ".
" r.swapout_time < $end) or ".
" e.state='active') ".
"group by s.eid,r.idx,s.nonlocal_id,s.slice_uuid, ".
" r.swapin_time,r.swapout_time,r.pnodes,n.type ".
"order by r.swapin_time desc");
......@@ -1032,7 +1035,8 @@ sub Usage($$$)
my @summary = ();
my $lastin = 0;
while (my ($eid,$idx,$urn,$swapin_time,$swapout_time,$count,$type) =
while (my ($eid,$idx,$urn,$slice_uuid,
$swapin_time,$swapout_time,$count,$type) =
$query_result->fetchrow_array()) {
# No phys nodes.
next
......@@ -1042,6 +1046,7 @@ sub Usage($$$)
if ($swapin_time != $lastin) {
unshift(@summary, {"eid" => $eid,
"urn" => $urn || "",
"slice_uuid" => $slice_uuid || "",
"start" => $swapin_time,
"end" => $swapout_time || "",
"types" => {$type => {"count" => $count}}});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment