Commit 6ca653cc authored by Leigh Stoller's avatar Leigh Stoller

Change the Activity Log to use an "iframe" in a plain Emulab window,

rather then popping up a blank text window. Much nicer this way.
Thanks to Tim for pointing me to iframe construct, which appears to be
supported in all browsers these days.
parent df1f4479
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -190,7 +190,7 @@ echo "<br>\n";
echo $results[message];
echo "<br><br>\n";
echo "While you are waiting, you can watch the log
in <a target=_blank href=spewlogfile.php3?pid=$exp_pid&eid=$exp_id>
in <a href=showlogfile.php3?pid=$exp_pid&eid=$exp_id>
realtime</a>.\n";
echo "<br>
</font>\n";
......
......@@ -156,7 +156,7 @@ else {
echo "<br><br>
If you are the morbid type, you can watch the experiment die in
<a target=_blank href=spewlogfile.php3?pid=$exp_pid&eid=$exp_eid>
<a href=showlogfile.php3?pid=$exp_pid&eid=$exp_eid>
realtime</a>.\n";
}
......
......@@ -29,7 +29,7 @@ if ($justsuccess) {
whether nodes were added to the experiments, and whether
disk images had to be loaded.</p>
<p>While you are waiting, you can watch the log
in <a target=_blank href=spewlogfile.php3?pid=$pid&eid=$eid>
in <a href=showlogfile.php3?pid=$pid&eid=$eid>
realtime</a>.</p></font>\n";
PAGEFOOTER();
return;
......@@ -277,7 +277,7 @@ else {
"<br><br>".
"While you are waiting, you can watch the log of experiment ".
"modification in ".
"<a target=_blank href=spewlogfile.php3?pid=$pid&eid=$eid> ".
"<a href=showlogfile.php3?pid=$pid&eid=$eid> ".
"realtime</a>.\n";
# the following line is required for Netbuild.
......
......@@ -170,7 +170,7 @@ else {
"<br><br>".
"While you are waiting, you can watch the log of experiment ".
"modification in ".
"<a target=_blank href=spewlogfile.php3?pid=$pid&eid=$eid> ".
"<a href=showlogfile.php3?pid=$pid&eid=$eid> ".
"realtime</a>.\n";
}
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
include("showstuff.php3");
#
# Standard Testbed Header
#
PAGEHEADER("Experiment Activity Log");
#
# Only known and logged in users can end experiments.
#
$uid = GETLOGIN();
LOGGEDINORDIE($uid);
$isadmin = ISADMIN($uid);
#
# Verify page arguments.
#
if (!isset($pid) ||
strcmp($pid, "") == 0) {
USERERROR("You must provide a Project ID.", 1);
}
if (!isset($eid) ||
strcmp($eid, "") == 0) {
USERERROR("You must provide an Experiment ID.", 1);
}
#
# Check to make sure this is a valid PID/EID tuple.
if (! TBValidExperiment($pid, $eid)) {
USERERROR("The experiment $pid/$eid is not a valid experiment!", 1);
}
#
# Verify permission.
#
if (! TBExptAccessCheck($uid, $pid, $eid, $TB_EXPT_READINFO)) {
USERERROR("You do not have permission to view the log for $pid/$eid!", 1);
}
#
# Check for a logfile. This file is transient, so it could be gone by
# the time we get to reading it.
#
if (! TBExptLogFile($pid, $eid)) {
USERERROR("Experiment $pid/$eid is no longer in transition!", 1);
}
echo "<font size=+2>Experiment <b>".
"<a href='showproject.php3?pid=$pid'>$pid</a>/".
"<a href='showexp.php3?pid=$pid&eid=$eid'>$eid</a></b></font>\n";
echo "<br /><br />\n";
echo "<center>
<iframe src=spewlogfile.php3?pid=$pid&eid=$eid
width=90% height=500 scrolling=auto frameborder=1>
Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href=spewlogfile.php3?pid=$pid&eid=$eid>the log file directly.</A>
</iframe></center>\n";
#
# Standard Testbed Footer
#
PAGEFOOTER();
?>
......@@ -307,7 +307,7 @@ else {
echo "<br><br>
While you are waiting, you can watch the log in
<a target=_blank href=spewlogfile.php3?pid=$exp_pid&eid=$exp_eid>
<a href=showlogfile.php3?pid=$exp_pid&eid=$exp_eid>
realtime</a>.\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