Commit c322e9ae authored by Leigh Stoller's avatar Leigh Stoller

Check "wirelesslan" count in the experiment_resource entry for the

experiment. If non-zero, then add a menu option point to the wireless
floormaps for that experiment.
parent 8668053f
...@@ -58,15 +58,17 @@ if (! TBExptAccessCheck($uid, $exp_pid, $exp_eid, $TB_EXPT_READINFO)) { ...@@ -58,15 +58,17 @@ if (! TBExptAccessCheck($uid, $exp_pid, $exp_eid, $TB_EXPT_READINFO)) {
# Need some DB info. # Need some DB info.
# #
$query_result = $query_result =
DBQueryFatal("select e.idx,e.state,e.batchmode,s.rsrcidx ". DBQueryFatal("select e.idx,e.state,e.batchmode,s.rsrcidx,r.wirelesslans ".
" from experiments as e ". " from experiments as e ".
"left join experiment_stats as s on s.exptidx=e.idx ". "left join experiment_stats as s on s.exptidx=e.idx ".
"left join experiment_resources as r on s.rsrcidx=r.idx ".
"where e.eid='$eid' and e.pid='$pid'"); "where e.eid='$eid' and e.pid='$pid'");
$row = mysql_fetch_array($query_result); $row = mysql_fetch_array($query_result);
$expindex = $row["idx"]; $expindex = $row["idx"];
$expstate = $row["state"]; $expstate = $row["state"];
$rsrcidx = $row["rsrcidx"]; $rsrcidx = $row["rsrcidx"];
$isbatch = $row["batchmode"]; $isbatch = $row["batchmode"];
$wireless = $row["wirelesslans"];
echo "<font size=+2>Experiment <b>". echo "<font size=+2>Experiment <b>".
"<a href='showproject.php3?pid=$pid'>$pid</a>/". "<a href='showproject.php3?pid=$pid'>$pid</a>/".
...@@ -158,6 +160,12 @@ if (TBExptAccessCheck($uid, $exp_pid, $exp_eid, $TB_EXPT_MODIFY)) { ...@@ -158,6 +160,12 @@ if (TBExptAccessCheck($uid, $exp_pid, $exp_eid, $TB_EXPT_MODIFY)) {
"boot.php3?pid=$exp_pid&eid=$exp_eid"); "boot.php3?pid=$exp_pid&eid=$exp_eid");
} }
# Wireless maps if experiment includes wireless lans.
if ($wireless) {
WRITESUBMENUBUTTON("Wireless Node Map",
"floormap.php3?pid=$exp_pid&eid=$exp_eid");
}
# History # History
WRITESUBMENUBUTTON("Show History", WRITESUBMENUBUTTON("Show History",
"showstats.php3?showby=expt&which=$expindex"); "showstats.php3?showby=expt&which=$expindex");
......
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