Commit d29aa373 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Display the geni slice names when not in admin mode.

parent 818a1151
......@@ -1078,43 +1078,69 @@ class Experiment
echo " </td>
</tr>\n";
}
if (!$short && ISADMIN()) {
if (!$short) {
if ($this->geniflags()) {
$slice = GeniSlice::Lookup("geni-cm", $uuid);
if ($slice) {
$slice_hrn = $slice->hrn();
$url = CreateURL("showslice", "slice_idx", $slice->idx(),
"showtype", "cm");
if (ISADMIN()) {
$url = CreateURL("showslice", "slice_idx",
$slice->idx(), "showtype", "cm");
echo "<tr>
<td>Geni Slice (CM): </td>
<td class=\"left\"><a href='$url'>$slice_hrn</a></td>
</tr>\n";
echo "<tr>
<td>Geni Slice (CM): </td>
<td class=\"left\">
<a href='$url'>$slice_hrn</a></td>
</tr>\n";
}
else {
echo "<tr>
<td>Geni Slice (CM): </td>
<td class=\"left\">$slice_hrn</td>
</tr>\n";
}
}
}
else {
$slice = GeniSlice::LookupByExperiment("geni-sa", $this);
if ($slice) {
$slice_hrn = $slice->hrn();
$url = CreateURL("showslice", "slice_idx", $slice->idx(),
"showtype", "sa");
echo "<tr>
<td>Geni Slice (SA): </td>
<td class=\"left\"><a href='$url'>$slice_hrn</a></td>
</tr>\n";
$slice = GeniSlice::Lookup("geni-cm", $slice_hrn);
if ($slice) {
$url = CreateURL("showslice", "slice_idx", $slice->idx(),
"showtype", "cm");
if (ISADMIN()) {
$url = CreateURL("showslice", "slice_idx",
$slice->idx(), "showtype", "sa");
echo "<tr>
<td>Geni Slice (CM): </td>
<td class=\"left\"><a href='$url'>$slice_hrn</a></td>
<td>Geni Slice (SA): </td>
<td class=\"left\">
<a href='$url'>$slice_hrn</a></td>
</tr>\n";
}
else {
echo "<tr>
<td>Geni Slice (SA): </td>
<td class=\"left\">$slice_hrn</td>
</tr>\n";
}
$slice = GeniSlice::Lookup("geni-cm", $slice_hrn);
if ($slice) {
if (ISADMIN()) {
$url = CreateURL("showslice", "slice_idx",
$slice->idx(), "showtype", "cm");
echo "<tr>
<td>Geni Slice (CM): </td>
<td class=\"left\">
<a href='$url'>$slice_hrn</a></td>
</tr>\n";
}
else {
echo "<tr>
<td>Geni Slice (SA): </td>
<td class=\"left\">$slice_hrn</td>
</tr>\n";
}
}
}
}
}
......
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