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
6e11b74f
Commit
6e11b74f
authored
Mar 25, 2002
by
Leigh B. Stoller
Browse files
Change more/less verbose option to show/hide events, as per Jay's
request.
parent
b798592b
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/dbdefs.php3.in
View file @
6e11b74f
...
...
@@ -1009,6 +1009,22 @@ function TBNodeUidLastLogin($node_id)
return
$row
;
}
#
# Return number of events in an experiment.
#
function
TBEventCount
(
$pid
,
$eid
)
{
$query_result
=
DBQueryFatal
(
"select count(*) from eventlist "
.
"where pid='
$pid
' and eid='
$eid
'"
);
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
return
0
;
}
$row
=
mysql_fetch_row
(
$query_result
);
return
$row
[
0
];
}
#
# Return the last login for all of the nodes in an experiment, but only
# after the experiment was created (swapped in).
...
...
www/shownsfile.php3
View file @
6e11b74f
...
...
@@ -27,17 +27,6 @@ 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.
#
...
...
@@ -64,6 +53,17 @@ if (!$isadmin) {
}
}
if
(
$showevents
)
{
echo
"<b><a href='shownsfile.php3?pid=
$pid
&eid=
$eid
'>
Hide Event List</a>
</b><br><br>
\n
"
;
}
elseif
(
TBEventCount
(
$pid
,
$eid
))
{
echo
"<b><a href='shownsfile.php3?pid=
$pid
&eid=
$eid
&showevents=1'>
Show Event List</a>
</b><br><br>
\n
"
;
}
#
# Spit out an image that refers to a php script. That script will run and
# send back the GIF image contents.
...
...
@@ -97,7 +97,7 @@ echo "<br>
$output
=
array
();
$retval
=
0
;
if
(
$
verbose
)
{
if
(
$
showevents
)
{
$flags
=
"-v"
;
}
else
{
...
...
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