showlogfile.php3 1.11 KB
Newer Older
1 2 3
<?php
#
# EMULAB-COPYRIGHT
4
# Copyright (c) 2005, 2006, 2007 University of Utah and the Flux Group.
5 6 7 8 9
# All rights reserved.
#
include("defs.php3");

#
10
# Only known and logged in users.
11
#
12 13 14
$this_user = CheckLoginOrDie();
$uid       = $this_user->uid();
$isadmin   = ISADMIN();
15

16 17
# This will not return if its a sajax request.
include("showlogfile_sup.php3");
Timothy Stack's avatar
 
Timothy Stack committed
18

19 20 21 22 23 24 25 26 27
$reqargs = RequiredPageArguments("experiment", PAGEARG_EXPERIMENT);

# Need these below.
$pid = $experiment->pid();
$eid = $experiment->eid();

if (! $experiment->AccessCheck($this_user, $TB_EXPT_READINFO)) {
    USERERROR("You do not have permission to view the log for $pid/$eid!", 1);
}
28

29 30 31 32
#
# Check for a logfile. This file is transient, so it could be gone by
# the time we get to reading it.
#
33 34
$logfile = $experiment->GetLogfile();
if (! $logfile) {
35 36 37
    USERERROR("Experiment $pid/$eid is no longer in transition!", 1);
}

38 39 40 41 42
#
# Standard Testbed Header
#
PAGEHEADER("Experiment Activity Log");

43
echo $experiment->PageHeader();
44 45
echo "<br /><br />\n";

46
STARTWATCHER($experiment);
47
# This spits out the frame.
48
STARTLOG($logfile);
49 50 51 52 53 54

#
# Standard Testbed Footer
# 
PAGEFOOTER();
?>