Commit 857f0402 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Show remote creator/project in the reservations list, when remotely

created (on the command line at the remote cluster).
parent 9ec40616
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -351,11 +351,15 @@ sub DoList()
# be mapped of course, we leave those as is.
#
foreach my $details (values(%$list)) {
my $userhrn = GeniHRN->new($details->{'user'});
my $geniuser = GeniUser->Lookup($details->{'user'}, 1);
if (defined(($geniuser))) {
$details->{'uid'} = $geniuser->uid();
$details->{'uid_idx'} = $geniuser->uid_idx();
}
else {
$details->{'uid'} = $userhrn->id();
}
my $projhrn = GeniHRN->new($details->{'project'});
if ($projhrn->domain() eq $OURDOMAIN && defined($projhrn->project())) {
my $project = Project->Lookup($projhrn->project());
......@@ -364,6 +368,9 @@ sub DoList()
$details->{'pid_idx'} = $project->pid_idx();
}
}
else {
$details->{'pid'} = $projhrn->id();
}
}
#
# Strip out unwanted results if we asked as an admin for a specific
......
......@@ -59,15 +59,25 @@
</a>
</td>
<% } %>
<% if (showuser) { %>
<% if (showuser) { %>
<td style='white-space: nowrap;'>
<a href='user-dashboard.php?user=<%- value.creator_uid %>'>
<%- value.creator_uid %></a></td>
<% if (value.creator_idx) { %>
<a href='user-dashboard.php?user=<%- value.creator_uid %>'>
<%- value.creator_uid %></a>
<% } else { %>
<%- value.creator_uid %>
<% } %>
</td>
<% } %>
<% if (showproject) { %>
<td style='white-space: nowrap;'>
<a href='show-project.php?project=<%- value.pid %>'>
<%- value.pid %></a></td>
<% if (value.pid_idx) { %>
<a href='show-project.php?project=<%- value.pid %>'>
<%- value.pid %></a>
<% } else { %>
<%- value.pid %>
<% } %>
</td>
<% } %>
<td><%- value.type %></td>
<td><%- value.count %></td>
......
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