Commit 9423a510 authored by Leigh Stoller's avatar Leigh Stoller

A bunch of rather silly changes to showexp page, and a large scale

cleanup of tbreport.
parent fce5e8ee
......@@ -239,7 +239,7 @@ if (system("$tbdir/tbswapin $pid $eid") != 0) {
# So fatal errors run tbswapout,
$estate = EXPTSTATE_ACTIVE;
if (system("$tbdir/tbreport -v $pid $eid 2>&1 > $repfile") != 0) {
if (system("$tbdir/tbreport -b $pid $eid 2>&1 > $repfile") != 0) {
fatal("tbreport failed!\n");
}
......@@ -281,7 +281,7 @@ DBQueryWarn("update experiments set ".
# In batchmode, send the report to stdout for the batch daemon.
#
if ($batch) {
system("$tbdir/tbreport -v $pid $eid");
system("$tbdir/tbreport -b $pid $eid");
print STDOUT "\n\n";
}
......
......@@ -282,7 +282,7 @@ else {
fatal("Experiment is in the wrong state: $estate\n");
}
system("$tbdir/tbreport -v $pid $eid 2>&1 > $repfile");
system("$tbdir/tbreport -b $pid $eid 2>&1 > $repfile");
}
#
......
This diff is collapsed.
......@@ -15,6 +15,6 @@ my $TB = "@prefix@";
#
# Run the real thing, and never return.
#
exec "$TB/bin/tbreport", "-v", @ARGV;
exec "$TB/bin/tbreport", @ARGV;
die("webreport: Could not exec tbreport: $!");
......@@ -43,30 +43,38 @@ if (! TBExptAccessCheck($uid, $exp_pid, $exp_eid, $TB_EXPT_READINFO)) {
USERERROR("You do not have permission to view experiment $exp_eid!", 1);
}
$expstate = TBExptState($exp_pid, $exp_eid);
SUBPAGESTART();
SUBMENUSTART("Experiment Options");
WRITESUBMENUBUTTON("View NS File and Node Assignment",
"shownsfile.php3?pid=$exp_pid&eid=$exp_eid");
WRITESUBMENUBUTTON("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_ACTIVE) == 0) {
WRITESUBMENUBUTTON("Visualizaton, NS File, Mapping",
"shownsfile.php3?pid=$exp_pid&eid=$exp_eid");
}
elseif (strcmp($expstate, $TB_EXPTSTATE_SWAPPED) == 0) {
WRITESUBMENUBUTTON("Visualizaton and NS File",
"shownsfile.php3?pid=$exp_pid&eid=$exp_eid");
}
else {
WRITESUBMENUBUTTON("View NS File",
"shownsfile.php3?pid=$exp_pid&eid=$exp_eid");
}
# Swap option.
if (strcmp($expstate, $TB_EXPTSTATE_SWAPPED) == 0) {
WRITESUBMENUBUTTON("Swap this Experiment in",
"swapexp.php3?inout=in&pid=$exp_pid&eid=$exp_eid");
WRITESUBMENUBUTTON("Graphic Visualization of Topology",
"vistopology.php3?pid=$exp_pid&eid=$exp_eid");
}
elseif (strcmp($expstate, $TB_EXPTSTATE_ACTIVE) == 0) {
WRITESUBMENUBUTTON("Swap this Experiment out",
"swapexp.php3?inout=out&pid=$exp_pid&eid=$exp_eid");
WRITESUBMENUBUTTON("Graphic Visualization of Topology",
"vistopology.php3?pid=$exp_pid&eid=$exp_eid");
}
}
WRITESUBMENUBUTTON("Terminate this experiment",
"endexp.php3?pid=$exp_pid&eid=$exp_eid");
#
# Admin folks get a swap request link to send email.
#
......
......@@ -5,7 +5,7 @@ include("showstuff.php3");
#
# Standard Testbed Header
#
PAGEHEADER("Show me the NS File");
PAGEHEADER("Visualizaton, NS File, and Details");
#
# Only known and logged in users can end experiments.
......@@ -27,6 +27,17 @@ if (!isset($eid) ||
USERERROR("You must provide an Experiment ID.", 1);
}
if ($verbose) {
echo "<b><a href='shownsfile.php3?pid=$pid&eid=$eid'>
Be Less Verbose</a>
</b><br><br>\n";
}
else {
echo "<b><a href='shownsfile.php3?pid=$pid&eid=$eid&verbose=1'>
Be More Verbose</a>
</b><br><br>\n";
}
#
# Check to make sure this is a valid PID/EID tuple.
#
......@@ -38,6 +49,8 @@ if (mysql_num_rows($query_result) == 0) {
"in project $pid.", 1);
}
$expstate = TBExptState($pid, $eid);
#
# Verify that this uid is a member of the project for the experiment
# being displayed.
......@@ -51,6 +64,18 @@ if (!$isadmin) {
}
}
#
# Spit out an image that refers to a php script. That script will run and
# send back the GIF image contents.
#
if (strcmp($expstate, $TB_EXPTSTATE_ACTIVE) == 0 ||
strcmp($expstate, $TB_EXPTSTATE_SWAPPED) == 0) {
echo "<br>
<center>
<img src='top2image.php3?pid=$pid&eid=$eid' align=center>
</center>\n";
}
$query_result =
DBQueryFatal("SELECT nsfile from nsfiles where pid='$pid' and eid='$eid'");
if (mysql_num_rows($query_result) == 0) {
......@@ -59,18 +84,27 @@ if (mysql_num_rows($query_result) == 0) {
$row = mysql_fetch_array($query_result);
$nsfile = $row[nsfile];
echo "<br>
<h3>NS File:</h3>\n";
echo "<XMP>$nsfile</XMP>\n";
flush();
echo "<br>
<center><h3>
Here is the physical mapping for this experiment
</h3></center>\n";
<h3>
Experiment Details:
</h3>\n";
$output = array();
$retval = 0;
$result = exec("$TBSUEXEC_PATH nobody flux webreport $pid $eid",
if ($verbose) {
$flags = "-v";
}
else {
$flags = "-b";
}
$result = exec("$TBSUEXEC_PATH nobody flux webreport $flags $pid $eid",
$output, $retval);
echo "<XMP>\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