From 94fe457ee4b71662e6af8628636cde6359a81eb4 Mon Sep 17 00:00:00 2001
From: root <root@orion.zcu.cz>
Date: Mon, 9 Jul 2012 16:46:50 +0200
Subject: [PATCH] * oprava stylovani * total scale graf v megasearchi

---
 ..._HostnameServiceTypeActivityScale_html.php |  8 ++--
 ...graph_HostnameServiceTypeActivity_html.php |  4 +-
 .../show_HostnameServiceTypeActivity.php      | 38 ++++++++++++++-----
 3 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/src/warden-server/contrib/wardenweb/graph_HostnameServiceTypeActivityScale_html.php b/src/warden-server/contrib/wardenweb/graph_HostnameServiceTypeActivityScale_html.php
index ed4c686..ca20ed4 100644
--- a/src/warden-server/contrib/wardenweb/graph_HostnameServiceTypeActivityScale_html.php
+++ b/src/warden-server/contrib/wardenweb/graph_HostnameServiceTypeActivityScale_html.php
@@ -10,9 +10,9 @@
       function fetchData() {
 		<? #TODO: fuj
 		   if(!isSet($_GET['where'])) { ?>
-			$.getJSON('graph_HostnameServiceTypeActivity.php?per=<? print $_GET['per'];?>', drawChart);
+			$.getJSON('graph_HostnameServiceTypeActivityScale.php?per=<? print $_GET['per'];?>', drawChart);
 		<? } else { ?>
-			$.getJSON('graph_HostnameServiceTypeActivity.php?per=<? print $_GET['per'];?>&where=<?print $_GET['where'];?>', drawChart);
+			$.getJSON('graph_HostnameServiceTypeActivityScale.php?per=<? print $_GET['per'];?>&where=<?print $_GET['where'];?>', drawChart);
 		<? } ?>
         }
 
@@ -41,7 +41,7 @@
           vAxis: { logScale: true, title: "totalScale" },
           interpolateNulls: true,
           ___colors:['#008000','#ff0000','#FFA500','#FA8072','#AFEEEE','#00A5C6','#DEBDDE','#000000'],
-	  chartArea: {'width': '80%', 'height': '90%'},
+	  chartArea: {'width': '80%', 'height': '85%'},
           pointSize: 5
         };
 
@@ -51,7 +51,7 @@
     </script>
   </head>
   <body>
-    <div id="chart_div" style="width: 100%; height: 95%;"></div>
+    <div id="chart_div" style="width: 100%; height: 100%;"></div>
   </body>
 </html>
 
diff --git a/src/warden-server/contrib/wardenweb/graph_HostnameServiceTypeActivity_html.php b/src/warden-server/contrib/wardenweb/graph_HostnameServiceTypeActivity_html.php
index ef24b8d..a7e5215 100644
--- a/src/warden-server/contrib/wardenweb/graph_HostnameServiceTypeActivity_html.php
+++ b/src/warden-server/contrib/wardenweb/graph_HostnameServiceTypeActivity_html.php
@@ -41,7 +41,7 @@
           vAxis: { logScale: true, title: "events" },
           interpolateNulls: true,
           ___colors:['#008000','#ff0000','#FFA500','#FA8072','#AFEEEE','#00A5C6','#DEBDDE','#000000'],
-	  chartArea: {'width': '80%', 'height': '90%'},
+	  chartArea: {'width': '80%', 'height': '85%'},
           pointSize: 5
         };
 
@@ -51,7 +51,7 @@
     </script>
   </head>
   <body>
-    <div id="chart_div" style="width: 100%; height: 95%;"></div>
+    <div id="chart_div" style="width: 100%; height: 100%;"></div>
   </body>
 </html>
 
diff --git a/src/warden-server/contrib/wardenweb/show_HostnameServiceTypeActivity.php b/src/warden-server/contrib/wardenweb/show_HostnameServiceTypeActivity.php
index 18c12cb..080a94f 100644
--- a/src/warden-server/contrib/wardenweb/show_HostnameServiceTypeActivity.php
+++ b/src/warden-server/contrib/wardenweb/show_HostnameServiceTypeActivity.php
@@ -82,7 +82,6 @@ $renderer->display();
 
 ?>
 </td>
-<td width=50%>
 
 <?
 if( IsSet($_POST["btnSubmit"])) {
@@ -120,29 +119,50 @@ if( IsSet($_POST["btnSubmit"])) {
 }
 ?>
 
-
+<td width=50%>
 <?
 	if( IsSet($_POST["btnSubmit"]) and !empty($where)) {
 		print("<iframe src=\"graph_HostnameServiceTypeActivity_html.php?per=day&where=".base64_encode($where)."\" style=\"width:100%; height:500\"></iframe>");
 	}
 ?>
-
 </td>
+
 </tr>
-</table>
 
-<hr>
-<?
-
-#TODO: strip vsechny superznaky
+<tr>
+<td>
 
+<?
 if( IsSet($_POST["btnSubmit"]) and !empty($where)) {
-		var_dump($_POST);
 
 		$q = "SELECT * FROM events WHERE $where ORDER BY detected DESC LIMIT ".$_POST['limit'];
                 $res = mysql_query($q, $db);
 		print "Query: ".json_encode($q)."<br>";
                 print "Found: ".mysql_num_rows($res)."<br>";
+}
+?>
+
+</td>
+
+<td width=50%>
+<?
+	if( IsSet($_POST["btnSubmit"]) and !empty($where)) {
+		print("<iframe src=\"graph_HostnameServiceTypeActivityScale_html.php?per=day&where=".base64_encode($where)."\" style=\"width:100%; height:500\"></iframe>");
+	}
+?>
+</td>
+
+</tr>
+
+
+</table>
+
+<hr>
+<?
+
+#TODO: strip vsechny superznaky
+
+if( $res != FALSE) {
                 print("<pre>");
 		while ($tmp = mysql_fetch_assoc($res)) { 
 			#var_dump($tmp);
-- 
GitLab