Commit b311292f authored by Leigh Stoller's avatar Leigh Stoller

Change the error listing to use the memlane page if no longer

running.
parent 22cbd3ed
<?php
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -190,7 +190,8 @@ function Do_ExperimentErrors()
$clause = "where UNIX_TIMESTAMP(f.created) <= $stamp";
}
$query_result =
DBQueryFatal("select f.name,exitcode,f.created,f.public_url,f.uuid,".
DBQueryFatal("select f.name,exitcode,f.created,f.public_url,".
" IF(i.uuid,i.uuid,f.uuid) as uuid, ".
" IF(i.uuid,1,0) as active,f.exitmessage, ".
" p.uuid as profile_uuid,p.name as profile_name, ".
" IF(i.uuid,i.aggregate_urn,h.aggregate_urn) ".
......@@ -211,8 +212,8 @@ function Do_ExperimentErrors()
$exitcode = $row["exitcode"];
$url = $row["public_url"];
$logfileid = $row["logfileid"];
$active = $row["active"] ? 1 : 0;
$uuid = $row["uuid"];
$active = $row["active"] ? 1 : 0;
$created = DateStringGMT($row["created"]);
$creator = $row["creator"];
$message = $row["exitmessage"];
......@@ -221,7 +222,7 @@ function Do_ExperimentErrors()
$profile_uuid = $row["profile_uuid"];
$profile_name = $row["profile_name"];
$aggregate_urn= $row["aggregate_urn"];
$cluster = "N/A";
$cluster = null;
if ($exitcode >= 0 && $exitcode <= count($geni_response_codes)) {
$reason = $geni_response_codes[$exitcode];
......
......@@ -15,7 +15,7 @@
<th>Profile</th>
<th>Cluster</th>
<th>Reason (Code)</th>
<th>Log</th>
<th>View</th>
</tr>
</thead>
<tbody>
......@@ -32,7 +32,11 @@
<td class="format-date"><%- value.created %></td>
<td><a href="show-profile.php?uuid=<%- value.profile_uuid %>">
<%- value.profile_name %></a></td>
<td><%- value.cluster %></td>
<% if (value.cluster) { %>
<td><%- value.cluster %></td>
<% } else { %>
<td>N/A</td>
<% } %>
<% if (value.message && value.message != "") { %>
<td><span style="text-decoration: underline;"
data-toggle='popover'
......@@ -43,10 +47,18 @@
<% } else { %>
<td><%- value.reason %></td>
<% } %>
<% if (value.url) { %>
<% if (!value.cluster && value.url) { %>
<td><a href="<%- value.url%>" target="_blank">Log</a></td>
<% } else if (value.active) { %>
<td>
<a href='status.php?uuid=<%- value.uuid %>' target="_blank">
<span class="glyphicon glyphicon-eye-open"></span></a>
</td>
<% } else { %>
<td>N/A</td>
<td>
<a href='memlane.php?uuid=<%- value.uuid %>' target="_blank">
<span class="glyphicon glyphicon-eye-open"></span></a>
</td>
<% } %>
</tr>
<% }); %>
......
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