Commit 8f0b6403 authored by Leigh Stoller's avatar Leigh Stoller

Commit the rest of the linktest changes. Still not exposed to mere

users yet; to do that change $EXPOSELINKTEST in defs.php3.in to 1.
parent d6abe56b
......@@ -142,6 +142,7 @@ function SPITFORM($formfields, $errors)
{
global $TBDB_PIDLEN, $TBDB_GIDLEN, $TBDB_EIDLEN, $TBDOCBASE;
global $view, $view_style, $projlist, $linktest_levels;
global $EXPOSELINKTEST;
PAGEHEADER("Begin a Testbed Experiment");
......@@ -475,7 +476,7 @@ function SPITFORM($formfields, $errors)
#
# Run linktest, and level.
#
if (STUDLY()) {
if (STUDLY() || $EXPOSELINKTEST) {
echo "<tr>
<td><a href='$TBDOCBASE/doc/docwrapper.php3?".
"docname=linktest.html'>Linktest</a> Option:</td>
......@@ -492,10 +493,11 @@ function SPITFORM($formfields, $errors)
$linktest_levels[$i] . "</option>\n";
}
echo " </select>";
echo " (Experimental; will not affect swapin)";
echo " (<a href='$TBDOCBASE/doc/docwrapper.php3?".
"docname=linktest.html'><b>Whats this?</b></a>)";
echo " </td>
</tr>\n";
}
}
#
# Batch Experiment?
......
......@@ -30,6 +30,7 @@ $BUGDBCOOKIENAME= "FlysprayCookie";
$MAILMANURL = "http://${USERNODE}/mailman";
$OPSCVSURL = "http://${USERNODE}/cvsweb/cvsweb.cgi";
$OPSJETIURL = "http://${USERNODE}/jabber/jeti.php";
$EXPOSELINKTEST = 0;
$TBMAILADDR_OPS = "@TBOPSEMAIL_NOSLASH@";
$TBMAILADDR_WWW = "@TBWWWEMAIL_NOSLASH@";
......
......@@ -479,11 +479,20 @@ for ($i = 0; $i < $num; $i++) {
print "</table>\n" .
"<input type=checkbox value=\"1\" name=modbase>
&nbsp Save? (Check this box if you want to modify the base
experiment configuration)<br><br>\n".
&nbsp <b>Save?</b> (Check this box if you want these settings to
be used next time the experiment is swapped in)".
"<br><br>\n".
"<input type=submit value='Execute'>\n" .
"</form>\n";
if (STUDLY() || $EXPOSELINKTEST) {
echo "<br>
After you change the settings, you can run
<a href=linktest.php3?pid=$pid&eid=$eid>Linktest</a> to make sure the
links are configured properly,<br>
but <b><em>only</em></b> if you clicked the 'Save' box above!\n";
}
PAGEFOOTER();
?>
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -50,7 +50,7 @@ if (! TBExptAccessCheck($uid, $pid, $eid, $TB_EXPT_MODIFY)) {
#
function SPITFORM($formfields, $errors)
{
global $eid, $pid, $TBDOCBASE, $linktest_levels;
global $eid, $pid, $TBDOCBASE, $linktest_levels, $EXPOSELINKTEST;
#
# Standard Testbed Header
......@@ -264,7 +264,7 @@ function SPITFORM($formfields, $errors)
#
# Run linktest, and level.
#
if (STUDLY()) {
if (STUDLY() || $EXPOSELINKTEST) {
echo "<tr>
<td><a href='$TBDOCBASE/doc/docwrapper.php3?".
"docname=linktest.html'>Linktest</a> Option:</td>
......@@ -281,10 +281,11 @@ function SPITFORM($formfields, $errors)
$linktest_levels[$i] . "</option>\n";
}
echo " </select>";
echo " (Experimental; will not affect swapin)";
echo " (<a href='$TBDOCBASE/doc/docwrapper.php3?".
"docname=linktest.html'><b>Whats this?</b></a>)";
echo " </td>
</tr>\n";
}
}
echo "<tr>
<td colspan=2 align=center>
......
......@@ -198,16 +198,22 @@ if ($expstate == $TB_EXPTSTATE_ACTIVE) {
WRITESUBMENUBUTTON("Reboot All Nodes",
"boot.php3?pid=$exp_pid&eid=$exp_eid");
}
}
if (STUDLY()) {
WRITESUBMENUBUTTON(($linktest_running ?
"Stop LinkTest" : "Run LinkTest"),
"linktest.php3?pid=$exp_pid&eid=$exp_eid");
}
if (($expstate == $TB_EXPTSTATE_ACTIVE ||
$expstate == $TB_EXPTSTATE_ACTIVATING) &&
(STUDLY() || $EXPOSELINKTEST)) {
WRITESUBMENUBUTTON(($linktest_running ?
"Stop LinkTest" : "Run LinkTest"),
"linktest.php3?pid=$exp_pid&eid=$exp_eid".
($linktest_running ? "&kill=1" : ""));
}
if ($expstate == $TB_EXPTSTATE_ACTIVE) {
if (STUDLY() && $classes['pcvm']) {
WRITESUBMENUBUTTON("Record Feedback Data",
"feedback.php3?pid=$exp_pid&eid=$exp_eid&mode=record");
"feedback.php3?pid=$exp_pid&".
"eid=$exp_eid&mode=record");
}
}
......
......@@ -310,7 +310,7 @@ function SHOWGROUP($pid, $gid, $thisuid) {
if (ISADMIN()) {
$mmurl .= "&wantadmin=1";
echo "<A href='$mmurl'>(admin)</A>";
echo "<A href='$mmurl'>(admin page)</A>";
}
echo " </td>
</tr>\n";
......@@ -742,7 +742,8 @@ function SHOWEXP($pid, $eid, $short = 0, $sortby = "") {
$mem_usage = $exprow["mem_usage"];
$cpu_usage = $exprow["cpu_usage"];
$exp_slice = $exprow[slicename];
$linktest = $exprow["linktest_level"];
$linktest_level = $exprow["linktest_level"];
$linktest_pid = $exprow["linktest_pid"];
$usemodelnet = $exprow["usemodelnet"];
$mnet_cores = $exprow["modelnet_cores"];
$mnet_edges = $exprow["modelnet_edges"];
......@@ -872,6 +873,19 @@ function SHOWEXP($pid, $eid, $short = 0, $sortby = "") {
<td>Status: </td>
<td class=\"left\">$exp_state $expt_locked</td>
</tr>\n";
if ($linktest_pid) {
$linktest_running = "<b>(Linktest Running)</b>";
}
else {
$linktest_running = "";
}
echo "<tr>
<td><a href='doc/docwrapper.php3?docname=linktest.html'>".
"Linktest Level</a>: </td>
<td class=\"left\">$linktest_level $linktest_running</td>
</tr>\n";
}
if (count($nodecounts)) {
......@@ -993,12 +1007,6 @@ function SHOWEXP($pid, $eid, $short = 0, $sortby = "") {
<td class=\"left\">$syncserver</td>
</tr>\n";
}
if ($linktest) {
echo "<tr>
<td>Linktest Level: </td>
<td class=\"left\">$linktest</td>
</tr>\n";
}
}
echo "</table>\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