|
From: Bob T. <bt...@us...> - 2003-12-12 19:14:32
|
Update of /cvsroot/benson/benson3/scripts/cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv22671/scripts/cgi
Modified Files:
alertview.cgi.tmpl
Log Message:
latest changes
Index: alertview.cgi.tmpl
===================================================================
RCS file: /cvsroot/benson/benson3/scripts/cgi/alertview.cgi.tmpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** alertview.cgi.tmpl 26 Nov 2003 23:01:03 -0000 1.1
--- alertview.cgi.tmpl 12 Dec 2003 19:14:28 -0000 1.2
***************
*** 17,20 ****
--- 17,50 ----
my $query = new CGI;
+ my $webserver_url = $queue->get("WebserverURL");
+ my $config_error = "false";
+ my $error;
+ if($webserver_url eq "http://changeme") {
+ $config_error = "true";
+ $error .= <<EOT
+ <b>WebserverURL Directive</b>
+ EOT
+ }
+
+ if($config_error eq "true") {
+ print <<EOT;
+ Content-type: text/html
+
+ <html>
+ <head><title>Benson Configuration Error</title></head>
+ <body bgcolor="#FFFFFF">
+ <h2>Configuration Error</h2>
+ You need to change some things here in the configuration file located here<br>
+ <hr>
+ $error
+ <hr>
+ <pre>
+ </body>
+ </html>
+ EOT
+ exit;
+ }
+
+
my $date_and_time = "null";
***************
*** 78,81 ****
--- 108,149 ----
<html>
+ <head>
+ <meta content="120" http-equiv="refresh">
+ <title>Benson 3.1 Alert View</title>
+ </head>
+ <script language="JavaScript">
+ var bChk = false;
+
+ function openregisterwindow()
+ {
+ window.open("$webserver_url/cgi-bin/register_host.cgi",
+ "Register",
+ "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=520,height=100")
+ }
+
+ function opensuppresswindow()
+ {
+ window.open("$webserver_url/cgi-bin/suppress.cgi",
+ "Suppress",
+ "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=520,height=250")
+ }
+
+ function toggle(btnSender)
+ {
+ bChk = !bChk;
+ var bOK = false;
+ var e=document.forms[0].elements;
+
+ for (var i=0;i<e.length;i++) {
+ if (!bOK && e[i] == btnSender)
+ bOK = true;
+ else if (bOK && e[i].type != "checkbox")
+ return;
+ else if (bOK && e[i].type == "checkbox" && e[i].name.substring(0,2) == "id")
+ e[i].checked = bChk;
+ }
+ }
+
+ </script>
<body bgcolor="#FFFFFF">
<map name="severity-sorted">
***************
*** 119,122 ****
--- 187,191 ----
foreach my $key (@sorted_rows) {
+ my $total = $#{$alertlist{$key}->{sub_alerts}} + 1;
my $identity = $alertlist{$key}->{first_id};
my ($timestamp, $alerthash, $sequence) = split /\./, $identity;
***************
*** 135,140 ****
<td align="center" bgcolor="$severity{$sev}->{color}"><font color="#FFFFFF"><b>$sev</b></font></td>
<td align="center">$subsystem</td>
! <td>$message</td>
! <td>-1</td>
</tr>
EOT
--- 204,209 ----
<td align="center" bgcolor="$severity{$sev}->{color}"><font color="#FFFFFF"><b>$sev</b></font></td>
<td align="center">$subsystem</td>
! <td align="left">$message</td>
! <td align="center">$total</td>
</tr>
EOT
***************
*** 143,145 ****
--- 212,216 ----
print <<EOT;
</table>
+ <input type="submit" value="Acknowledge/Suppress">
+ <hr>
EOT
|