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