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

Quickly add option to spew the event list.

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