[prev in list] [next in list] [prev in thread] [next in thread]
List: os-sim-commits
Subject: [Os-sim-commits] os-sim/www/sem index.php, 1.15, 1.16 process.php,
From: Juan Manuel Albarracin <jmalbarracin () users ! sourceforge ! net>
Date: 2009-09-29 8:43:34
Message-ID: E1MsYJ4-0006Yq-E0 () 23jxhf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Update of /cvsroot/os-sim/os-sim/www/sem
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25208
Modified Files:
index.php process.php
Log Message:
Fixed Host Report context Menu in SEM
Index: process.php
===================================================================
RCS file: /cvsroot/os-sim/os-sim/www/sem/process.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- process.php 22 Sep 2009 17:42:18 -0000 1.16
+++ process.php 29 Sep 2009 08:43:32 -0000 1.17
@@ -34,6 +34,7 @@
* Function list:
* Classes list:
*/
+
require_once ("classes/Session.inc");
Session::logcheck("MenuEvents", "ControlPanelSEM");
require_once ("classes/Host.inc");
@@ -201,15 +202,19 @@
}
$src_port = $matches[8];
$dst_port = $matches[9];
+
+ $src_div = "<div id=\"$src_ip;$src_ip\" class=\"HostReportMenu\" \
style=\"display:inline\">"; + $dst_div = "<div id=\"$dst_ip;$dst_ip\" \
class=\"HostReportMenu\" style=\"display:inline\">"; +
$line = "<tr>
<td nowrap>" . "<a href=\"../incidents/newincident.php?" . "ref=Alarm&" . "title=" \
. urlencode($plugin . " Event") . "&" . "priority=1&" . "src_ips=$src_ip&" . \
"event_end=$date&" . "src_ports=$src_port&" . "dst_ips=$dst_ip&" . \
"dst_ports=$dst_port" . "\">" . "<img src=\"../pixmaps/incident.png\" width=\"12\" \
alt=\"i\" border=\"0\"/></a> " . $inc_counter . "</td> <td nowrap>" . \
htmlspecialchars($matches[2]) . "</td> <td><font color=\"$color\"><span \
onmouseover=\"this.style.color = 'green'; this.style.cursor='pointer';\" \
onmouseout=\"this.style.color = '$color'; this.style.cursor = \
document.forms[0].cursor.value;\" onclick=\"javascript:SetSearch('plugin_id=' + \
this.innerHTML)\"\">$plugin</span></td> <td>";
- $line.= "<font color=\"$color\"><span onmouseover=\"this.style.color = \
'green'; this.style.cursor='pointer';\" onmouseout=\"this.style.color = \
'$color';this.style.cursor = document.forms[0].cursor.value;\" \
onclick=\"javascript:SetSearch('src_ip=' + this.innerHTML)\"\">" . \
htmlspecialchars($matches[5]) . "</span></td><td nowrap>";
- $line.= "<font color=\"$color\"><span onmouseover=\"this.style.color = \
'green'; this.style.cursor='pointer';\" onmouseout=\"this.style.color = \
'$color';this.style.cursor = document.forms[0].cursor.value;\" \
onclick=\"javascript:SetSearch('src_ip=' + this.innerHTML)\"\">" . \
htmlspecialchars($matches[6]) . "</span>:";
- $line.= "<font color=\"$color\"><span onmouseover=\"this.style.color = \
'green'; this.style.cursor='pointer';\" onmouseout=\"this.style.color = \
'$color';this.style.cursor = document.forms[0].cursor.value;\" \
onclick=\"javascript:SetSearch('src_port=' + this.innerHTML)\"\">" . \
htmlspecialchars($matches[8]) . "</span>$country_img_src</td><td \
nowrap>";
- $line.= "<font color=\"$color\"><span onmouseover=\"this.style.color = \
'green'; this.style.cursor='pointer';\" onmouseout=\"this.style.color = \
'$color';this.style.cursor = document.forms[0].cursor.value;\" \
onclick=\"javascript:SetSearch('dst_ip=' + this.innerHTML)\"\">" . \
htmlspecialchars($matches[7]) . "</span>:"; + $line.= "<font \
color=\"$color\"><span onmouseover=\"this.style.color = 'green'; \
this.style.cursor='pointer';\" onmouseout=\"this.style.color = \
'$color';this.style.cursor = document.forms[0].cursor.value;\" \
onclick=\"javascript:SetSearch('src_ip=' + this.innerHTML)\"\">" . \
htmlspecialchars($matches[5]) . "</span></td><td nowrap>$src_div"; + $line.= \
"<font color=\"$color\"><span onmouseover=\"this.style.color = 'green'; \
this.style.cursor='pointer';\" onmouseout=\"this.style.color = \
'$color';this.style.cursor = document.forms[0].cursor.value;\" \
onclick=\"javascript:SetSearch('src_ip=' + this.innerHTML)\"\">" . \
htmlspecialchars($matches[6]) . "</span></div>:"; + $line.= "<font \
color=\"$color\"><span onmouseover=\"this.style.color = 'green'; \
this.style.cursor='pointer';\" onmouseout=\"this.style.color = \
'$color';this.style.cursor = document.forms[0].cursor.value;\" \
onclick=\"javascript:SetSearch('src_port=' + this.innerHTML)\"\">" . \
htmlspecialchars($matches[8]) . "</span>$country_img_src</td><td nowrap>$dst_div"; + \
$line.= "<font color=\"$color\"><span onmouseover=\"this.style.color = 'green'; \
this.style.cursor='pointer';\" onmouseout=\"this.style.color = \
'$color';this.style.cursor = document.forms[0].cursor.value;\" \
onclick=\"javascript:SetSearch('dst_ip=' + this.innerHTML)\"\">" . \
htmlspecialchars($matches[7]) . "</span></div>:"; $line.= "<font \
color=\"$color\"><span onmouseover=\"this.style.color = 'green'; \
this.style.cursor='pointer';\" onmouseout=\"this.style.color = \
'$color';this.style.cursor = document.forms[0].cursor.value;\" \
onclick=\"javascript:SetSearch('dst_port=' + this.innerHTML)\"\">" . \
htmlspecialchars($matches[9]) . "</span>$country_img_dst</td>"; if ($alt) {
$color = "grey";
Index: index.php
===================================================================
RCS file: /cvsroot/os-sim/os-sim/www/sem/index.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- index.php 23 Sep 2009 12:01:58 -0000 1.15
+++ index.php 29 Sep 2009 08:43:32 -0000 1.16
@@ -85,6 +85,10 @@
<head>
<link rel="stylesheet" href="../style/style.css"/>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
+<link href="../style/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
+<link rel="stylesheet" type="text/css" href="../style/greybox.css"/>
+<script src="../js/jquery.contextMenu.js" type="text/javascript"></script>
+<script type="text/javascript" src="../js/greybox.js"></script>
<style type="text/css">
@@ -161,6 +165,19 @@
success: function(msg) {
document.getElementById('loading').style.display = "none";
HandleResponse(msg);
+ $('.HostReportMenu').contextMenu({
+ menu: 'myMenu'
+ },
+ function(action, el, pos) {
+ var aux = $(el).attr('id').split(/;/);
+ var ip = aux[0];
+ var hostname = aux[1];
+ var url = "../report/host_report.php?host="+ip+"&hostname="+hostname+"&greybox=1";
+ if (hostname == ip) var title = "Host Report: "+ip;
+ else var title = "Host Report: "+hostname+"("+ip+")";
+ GB_show(title,url,450,'90%');
+ }
+ );
}
});
}
@@ -579,6 +596,9 @@
</script>
</head>
<body>
+<ul id="myMenu" class="contextMenu">
+<li class="report"><a href="#edit">Host Report</a></li>
+</ul>
<?php
include ("../hmenu.php"); ?>
<a href="javascript:toggleLayer('by_date');"><img src="<?php echo \
$config["toggle_graph"]; ?>" border="0" title="Toggle Graph by date"> <small><font \
color="black">Graphs by dates</font></small></a>
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Os-sim-commits mailing list
Os-sim-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/os-sim-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic