Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
a3fcacd3
Commit
a3fcacd3
authored
May 11, 2005
by
Leigh B. Stoller
Browse files
Look for experiments using robots and add links to the tracker and
node selector applets.
parent
179cf519
Changes
1
Show whitespace changes
Inline
Side-by-side
www/showexp.php3
View file @
a3fcacd3
...
...
@@ -81,13 +81,22 @@ $lockdown = $row["lockdown"];
# Get a list of node types and classes in this experiment
#
$query_result
=
DBQueryFatal
(
"select distinct 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.eid='
$eid
' and r.pid='
$pid
'"
);
DBQueryFatal
(
"select distinct v.type,t1.class,v.fixed,"
.
" t2.type as ftype,t2.class as fclass from virt_nodes as v "
.
"left join node_types as t1 on v.type=t1.type "
.
"left join nodes as n on v.fixed is not null and "
.
" v.fixed=n.node_id "
.
"left join node_types as t2 on t2.type=n.type "
.
"where v.eid='
$eid
' and v.pid='
$pid
'"
);
while
(
$row
=
mysql_fetch_array
(
$query_result
))
{
if
(
isset
(
$row
[
'ftype'
]))
{
$classes
[
$row
[
'fclass'
]]
=
1
;
$types
[
$row
[
'ftype'
]]
=
1
;
}
else
{
$classes
[
$row
[
'class'
]]
=
1
;
$types
[
$row
[
'type'
]]
=
1
;
}
}
...
...
@@ -222,16 +231,29 @@ if ($wireless) {
WRITESUBMENUBUTTON
(
"Show History"
,
"showstats.php3?showby=expt&which=
$expindex
"
);
if
(
$types
[
'garcia'
])
{
WRITESUBMENUBUTTON
(
"Robot Map"
,
if
(
$types
[
'garcia'
]
||
$types
[
'static-mica2'
])
{
SUBMENUSECTION
(
"Robot/Mote Options"
);
WRITESUBMENUBUTTON
(
"Robot/Mote Map"
,
"robotmap.php3"
.
(
$expstate
==
$TB_EXPTSTATE_ACTIVE
?
"?pid=
$exp_pid
&eid=
$exp_eid
"
:
""
));
if
(
$expstate
==
$TB_EXPTSTATE_SWAPPED
)
{
if
(
$types
[
'static-mica2'
])
{
WRITESUBMENUBUTTON
(
"Selector Applet"
,
"robotrack/selector.php3?"
.
"pid=
$exp_pid
&eid=
$exp_eid
"
);
}
}
elseif
(
$expstate
==
$TB_EXPTSTATE_ACTIVE
||
$expstate
==
$TB_EXPTSTATE_ACTIVATING
)
{
WRITESUBMENUBUTTON
(
"Tracker Applet"
,
"robotrack/robotrack.php3?"
);
}
}
# Blinky lights - but only if they have nodes of the correct type in their
# experiment
if
(
$classes
[
'mote'
])
{
if
(
$classes
[
'mote'
]
&&
$expstate
==
$TB_EXPTSTATE_ACTIVE
)
{
WRITESUBMENUBUTTON
(
"Show Blinky Lights"
,
"moteleds.php3?pid=
$exp_pid
&eid=
$exp_eid
"
,
"moteleds"
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment