Commit c45317b4 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

First pass at making the showexp page a bit more logical and easy to

read. The impl (menu stuff) needs to be cleaned up for sure.
parent ac4502be
......@@ -43,55 +43,71 @@ if (! TBExptAccessCheck($uid, $exp_pid, $exp_eid, $TB_EXPT_READINFO)) {
USERERROR("You do not have permission to view experiment $exp_eid!", 1);
}
#
# Dump experiment record.
#
SHOWEXP($exp_pid, $exp_eid);
function WRITESIDEBARSUBBUTTON($text, $link) {
echo "<!-- Table row for button $text -->
<tr>
<td valign=center align=left nowrap>
<b>
<a class=sidebarbutton href='$link'>$text</a>\n";
#
# XXX these blanks look bad in lynx, but add required
# spacing between menu and body
#
echo " &nbsp;&nbsp;\n";
echo " </b>
</td>
</tr>\n";
}
# Terminate option.
echo "<p><center>
Do you want to terminate this experiment?
<A href='endexp.php3?pid=$exp_pid&eid=$exp_eid'>Yes</a>
</center>\n";
echo "<table cellspacing=2 cellpadding=2 width='85%' border=0>\n";
echo "<tr>\n";
echo " <td valign=top>\n";
echo " <table cellspacing=2 cellpadding=2 border=0 width=200>\n";
echo " <tr><td align=center><b>Experiment Options</b></td></tr>\n";
echo " <tr></tr>\n";
WRITESIDEBARSUBBUTTON("View NS File and Assignment",
"shownsfile.php3?pid=$exp_pid&eid=$exp_eid");
WRITESIDEBARSUBBUTTON("Terminate this experiment",
"endexp.php3?pid=$exp_pid&eid=$exp_eid");
# Swap option.
$expstate = TBExptState($exp_pid, $exp_eid);
if ($expstate) {
if (strcmp($expstate, $TB_EXPTSTATE_SWAPPED) == 0) {
echo "<p><center>
Do you want to swap this experiment in?
<A href='swapexp.php3?inout=in&pid=$exp_pid&eid=$exp_eid'>Yes</a>
<br>
<a href='$TBDOCBASE/faq.php3#UTT-Swapping'>
(Information on experiment swapping)</a>
</center>\n";
WRITESIDEBARSUBBUTTON("Swap this Experiment in",
"swapexp.php3?inout=in&pid=$exp_pid&eid=$exp_eid");
}
elseif (strcmp($expstate, $TB_EXPTSTATE_ACTIVE) == 0) {
echo "<p><center>
Do you want to swap this experiment out?
<A href='swapexp.php3?inout=out&pid=$exp_pid&eid=$exp_eid'>Yes</a>
<br>
<a href='$TBDOCBASE/faq.php3#UTT-Swapping'>
(Information on experiment swapping)</a>
</center>\n";
WRITESIDEBARSUBBUTTON("Swap this Experiment out",
"swapexp.php3?inout=out&pid=$exp_pid&eid=$exp_eid");
}
}
#
# Dump the node information.
#
SHOWNODES($exp_pid, $exp_eid);
#
# Admin folks get a swap request link to send email.
#
if (ISADMIN($uid)) {
echo "<p><center>
<A href='request_swapexp.php3?&pid=$exp_pid&eid=$exp_eid'>
Send a swap/terminate request</a>
</center>\n";
WRITESIDEBARSUBBUTTON("Send a swap/terminate request",
"request_swapexp.php3?&pid=$exp_pid&eid=$exp_eid");
}
echo " </table>\n";
echo " </td>\n";
echo " <td valign=top align=left width='85%'>\n";
#
# Dump experiment record.
#
SHOWEXP($exp_pid, $exp_eid);
echo " </td>\n";
echo "</table>\n";
#
# Dump the node information.
#
SHOWNODES($exp_pid, $exp_eid);
#
# Standard Testbed Footer
#
......
......@@ -92,6 +92,9 @@ if (!$confirmed) {
echo "<b><input type=submit name=confirmed value=Confirm></b>\n";
echo "<b><input type=submit name=canceled value=Cancel></b>\n";
echo "</form>\n";
echo "<p>
<a href='$TBDOCBASE/faq.php3#UTT-Swapping'>
(Information on experiment swapping)</a>\n";
echo "</center>\n";
PAGEFOOTER();
......
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