Commit 9726d5c4 authored by Leigh Stoller's avatar Leigh Stoller

Quickly add option to spew the event list.

parent 16e06c82
......@@ -63,7 +63,7 @@ my $hasplab = 0;
my %ipmap;
my %membermap;
getopts('hnmdlevbrf',\%opt);
getopts('hnmdlevbrfa',\%opt);
if ($opt{h}) {
exit &usage;
......@@ -98,6 +98,9 @@ if ($opt{l}) {
}
if ($opt{e}) {
$showevents = 1;
if ($opt{a}) {
$verbose = 1;
}
}
if ($opt{r}) {
$showroutes = 1;
......
......@@ -78,12 +78,13 @@ function Show($which, $arg1, $arg2)
ob_end_clean();
}
elseif ($which == "details") {
$showevents = $arg1;
$output = array();
$retval = 0;
$html = "";
# Show event summary and firewall info.
$flags = "-b -e -f";
$flags = ($showevents ? "-e -a" : "-b -e -f");
$result = exec("$TBSUEXEC_PATH $uid $TBADMINGROUP ".
"webreport $flags $pid $eid",
......@@ -97,9 +98,15 @@ function Show($which, $arg1, $arg2)
}
$html .= "</div></pre>\n";
$html .= "<button name=showevents type=button value=1";
$html .= " onclick=\"ShowEvents();\">";
$html .= "Show Events</button>\n";
$html .= "&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp ";
$html .= "<button name=savedetails type=button value=1";
$html .= " onclick=\"SaveDetails();\">";
$html .= "Save</button>\n";
$html .= "Save to File</button>\n";
}
elseif ($which == "graphs") {
$graphtype = $arg1;
......@@ -588,6 +595,10 @@ echo "<script type='text/javascript' language='javascript'>
x_Show('graphs', which, 0, Show_cb);
return false;
}
function ShowEvents() {
x_Show('details', 1, 0, Show_cb);
return false;
}
function SaveDetails() {
window.open('spitreport.php?pid=$pid&eid=$eid',
'_blank','width=700,height=400,toolbar=no,".
......
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