Commit 004a9087 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add project and expires to table.

parent 7db69b49
<?php <?php
# #
# Copyright (c) 2000-2014 University of Utah and the Flux Group. # Copyright (c) 2000-2015 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -62,9 +62,12 @@ echo "<link rel='stylesheet' ...@@ -62,9 +62,12 @@ echo "<link rel='stylesheet'
href='css/tablesorter.css'>\n"; href='css/tablesorter.css'>\n";
$query_result = $query_result =
DBQueryFatal("select * from apt_instances ". DBQueryFatal("select a.*,s.expires from apt_instances as a ".
"left join geni.geni_slices as s on ".
" s.uuid=a.slice_uuid ".
(isset($all) && ISADMIN() ? (isset($all) && ISADMIN() ?
"order by creator" : "where creator_uuid='$target_uuid'")); "order by a.creator" :
"where a.creator_uuid='$target_uuid'"));
if (mysql_num_rows($query_result) == 0) { if (mysql_num_rows($query_result) == 0) {
$message = "<b>No experiments to show you. Maybe you want to ". $message = "<b>No experiments to show you. Maybe you want to ".
...@@ -78,10 +81,10 @@ if (mysql_num_rows($query_result) == 0) { ...@@ -78,10 +81,10 @@ if (mysql_num_rows($query_result) == 0) {
exit(); exit();
} }
echo "<div class='row'> echo "<div class='row'>
<div class='col-lg-6 col-lg-offset-3 <div class='col-lg-8 col-lg-offset-2
col-md-6 col-md-offset-3 col-md-8 col-md-offset-2
col-sm-6 col-sm-offset-3 col-sm-10 col-sm-offset-1
col-xs-4 col-xs-offset-4'>\n"; col-xs-12 col-xs-offset-0'>\n";
echo "<input class='form-control search' type='search' echo "<input class='form-control search' type='search'
id='experiment_search' placeholder='Search'>\n"; id='experiment_search' placeholder='Search'>\n";
...@@ -92,9 +95,11 @@ echo " <table class='tablesorter'> ...@@ -92,9 +95,11 @@ echo " <table class='tablesorter'>
<th>Profile</th>\n"; <th>Profile</th>\n";
if (isset($all) && ISADMIN()) { if (isset($all) && ISADMIN()) {
echo " <th>Creator</th>"; echo " <th>Creator</th>";
echo " <th>Project</th>";
} }
echo " <th>Status</th> echo " <th>Status</th>
<th>Created</th> <th>Created</th>
<th>Expires</th>
</tr> </tr>
</thead> </thead>
<tbody>\n"; <tbody>\n";
...@@ -105,9 +110,11 @@ while ($row = mysql_fetch_array($query_result)) { ...@@ -105,9 +110,11 @@ while ($row = mysql_fetch_array($query_result)) {
$uuid = $row["uuid"]; $uuid = $row["uuid"];
$status = $row["status"]; $status = $row["status"];
$created = DateStringGMT($row["created"]); $created = DateStringGMT($row["created"]);
$expires = DateStringGMT($row["expires"]);
$creator_idx = $row["creator_idx"]; $creator_idx = $row["creator_idx"];
$profile_name = $profile_id; $profile_name = $profile_id;
$creator_uid = $row["creator"]; $creator_uid = $row["creator"];
$pid = $row["pid"];
$profile = Profile::Lookup($profile_id, $version); $profile = Profile::Lookup($profile_id, $version);
if ($profile) { if ($profile) {
...@@ -120,9 +127,11 @@ while ($row = mysql_fetch_array($query_result)) { ...@@ -120,9 +127,11 @@ while ($row = mysql_fetch_array($query_result)) {
</td>"; </td>";
if (isset($all) && ISADMIN()) { if (isset($all) && ISADMIN()) {
echo "<td>$creator_uid</td>"; echo "<td>$creator_uid</td>";
echo "<td>$pid</td>";
} }
echo " <td>$status</td> echo " <td>$status</td>
<td class='format-date'>$created</td> <td class='format-date'>$created</td>
<td class='format-date'>$expires</td>
</tr>\n"; </tr>\n";
} }
echo " </tbody> echo " </tbody>
......
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