Commit 17cc2489 authored by Robert Ricci's avatar Robert Ricci
Browse files

Strip down the moteleds page a bit using the 'view' options to

PAGEHEADER() and PAGEFOOTER(). Pop it up in a new window.
parent 944dc33e
......@@ -27,10 +27,19 @@ if (!isset($eid) ||
USERERROR("You must provide an Experiment ID.", 1);
}
#
# Define a stripped-down view of the web interface - less clutter
#
$view = array(
'hide_banner' => 1,
'hide_sidebar' => 1,
'hide_copyright' => 1
);
#
# Standard Testbed Header now that we have the pid/eid okay.
#
PAGEHEADER("View mote LEDs ($pid/$eid)");
PAGEHEADER("Mote LEDs ($pid/$eid)",$view);
#
# Make sure they have permission to view this experiment
......@@ -43,27 +52,26 @@ if (! TBExptAccessCheck($uid, $pid, $eid, $TB_EXPT_READINFO)) {
# Get a list of all nodes in this experiment of type 'garcia' or 'stargate'
#
$query_result =
DBQueryFatal("select r.node_id,t.type,t.class from reserved as r ".
DBQueryFatal("select r.vname, r.node_id,t.type,t.class from reserved as r ".
"left join nodes as n on ".
" r.node_id=n.node_id ".
"left join node_types as t on ".
" n.type=t.type ".
"where r.pid='$pid' and r.eid='$eid'");
"where r.pid='$pid' and r.eid='$eid' ".
"order by r.vname");
if (mysql_num_rows($query_result) == 0) {
echo "<h3>No nodes to display in this experiment!</h3>\n";
echo "<h3>No nodes to display in this experiment!</h3>\n";
} else {
echo "<center>
<h3>Blinky Lights</h3>
</center>
<table align=center cellpadding=2 border=1>
<tr><th>Node</th><th>LEDs</th>\n";
echo "<table align=center cellpadding=2 border=1>
<tr><th>Mote</th><th>Phys Name</th><th>LEDs</th>\n";
while ($row = mysql_fetch_array($query_result)) {
if ($row['type'] != "garcia" && $row['class'] != "sg") {
# Only the LEDs, mam
continue;
}
echo "<tr><th>$row[node_id]</th><td>";
echo "<tr><th>$row[vname]</th>";
echo "<td>$row[node_id]</td><td>";
SHOWBLINKENLICHTEN($uid,
$HTTP_COOKIE_VARS[$TBAUTHCOOKIE],
"ledpipe.php3?node=$row[node_id]");
......@@ -75,6 +83,6 @@ if (mysql_num_rows($query_result) == 0) {
#
# Standard Testbed Footer
#
PAGEFOOTER();
PAGEFOOTER($view);
?>
......@@ -218,7 +218,7 @@ WRITESUBMENUBUTTON("Show History",
# experiment
if ($types['garcia'] || $classes['sg']) {
WRITESUBMENUBUTTON("Show Blinky Lights",
"moteleds.php3?pid=$exp_pid&eid=$exp_eid");
"moteleds.php3?pid=$exp_pid&eid=$exp_eid","moteleds");
}
if ($isadmin) {
......
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