From 5b15ef46f4d03e7ed9a7e567c1597341369263a9 Mon Sep 17 00:00:00 2001 From: slerena Date: Fri, 22 Jun 2007 12:00:04 +0000 Subject: [PATCH] 2007-06-22 Sancho Lerena This commit should finish Pandora FMS Console 1.3 beta 1 :-) * pandoradb_data.sql: Added default news for new instalation. * include/styles/op.css: Changed icon for Visual Console. * include/config.inc.php: Some minimal changes for skeleton. * include/languages/language_en.php: Added final strings (hope!). * index.php: Adjusted some issues for production. * operation/incidents/incident_statistics.php: Added titles. * operation/events/event_statistics.php: Added titles. * operation/agentes/tactical.php: DivZero bug fixed. * images/image_problem.png: Updated image with new logo. * reporting/fgraph.php: Added generic_bar_graph and, at least, no more jpgraph graph usage !. All graphs are using GD/Pear Graph now. * general/logon_ok.php: Fixed the same bug that in tactical. * godmode/db/db_info.php: Added titles. * godmode/db/db_purge.php: Now render detailed info in graph for each agent selected. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@534 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 34 ++ pandora_console/general/logon_ok.php | 16 +- pandora_console/godmode/db/db_info.php | 8 +- pandora_console/godmode/db/db_purge.php | 24 +- pandora_console/images/image_problem.png | Bin 10814 -> 13958 bytes pandora_console/include/config.inc.php | 26 +- .../include/languages/language_en.php | 9 + pandora_console/include/styles/op.css | 2 +- pandora_console/index.php | 10 +- .../operation/agentes/tactical.php | 102 +----- .../operation/events/event_statistics.php | 12 +- .../incidents/incident_statistics.php | 31 +- pandora_console/pandoradb_data.sql | 1 + pandora_console/reporting/fgraph.php | 306 +++++++----------- 14 files changed, 236 insertions(+), 345 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index d3b357227a..eaea204e62 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,37 @@ +2007-06-22 Sancho Lerena + + This commit should finish Pandora FMS Console 1.3 beta 1 :-) + + * pandoradb_data.sql: Added default news for new instalation. + + * include/styles/op.css: Changed icon for Visual Console. + + * include/config.inc.php: Some minimal changes for skeleton. + + * include/languages/language_en.php: Added final strings (hope!). + + * index.php: Adjusted some issues for production. + + * operation/incidents/incident_statistics.php: Added titles. + + * operation/events/event_statistics.php: Added titles. + + * operation/agentes/tactical.php: DivZero bug fixed. + + * images/image_problem.png: Updated image with new logo. + + * reporting/fgraph.php: Added generic_bar_graph and, at least, no + more jpgraph graph usage !. All graphs are using GD/Pear Graph + now. + + * general/logon_ok.php: Fixed the same bug that in tactical. + + * godmode/db/db_info.php: Added titles. + + * godmode/db/db_purge.php: Now render detailed info in graph for + each agent selected. + + 2007-06-22 Raul Mateos * include/languages/language_en.php: More strings. diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 304e3df5f0..1fe1a391a6 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -76,9 +76,19 @@ $total_alerts = $data_alert_total + $monitor_alert_total; $total_checks = $data_checks + $monitor_checks; - $monitor_health = format_numeric ((($monitor_ok - $monitor_alert - $monitor_unknown) / $monitor_checks) * 100,1); - $data_health = format_numeric ( (($data_checks -($data_unknown + $data_alert)) / $data_checks ) * 100,1);; - $global_health = format_numeric( ((($monitor_ok - $monitor_alert - $monitor_unknown)+($data_checks -($data_unknown + $data_alert))) / ($data_checks + $monitor_checks) ) * 100, 1); + if ($monitor_checks > 0){ + $monitor_health = format_numeric ((($monitor_ok - $monitor_alert - $monitor_unknown)/ $monitor_checks) * 100,1); + } else + $monitor_health = 100; + if ($data_checks > 0){ + $data_health = format_numeric ( (($data_checks -($data_unknown + $data_alert)) / $data_checks ) * 100,1);; + } else + $data_health = 100; + if (($data_checks != 0) OR ($data_checks != 0)){ + $global_health = format_numeric( ((($monitor_ok -$monitor_alert - $monitor_unknown )+($data_checks -($data_unknown + $data_alert))) / ($data_checks + $monitor_checks) ) * 100, 1); + } else + $global_health = 100; + echo "

".$lang_label["tactical_indicator"]."

"; echo ""; diff --git a/pandora_console/godmode/db/db_info.php b/pandora_console/godmode/db/db_info.php index 1777040171..b19d662f93 100644 --- a/pandora_console/godmode/db/db_info.php +++ b/pandora_console/godmode/db/db_info.php @@ -23,9 +23,13 @@ if (comprueba_login() == 0) echo "

".$lang_label["dbmain_title"]." > "; echo $lang_label["db_info2"]." ".$lang_label["help"]."

"; echo ""; - echo "

"; + echo "
"; + echo '

'.$lang_label["db_agente_modulo"].'

'; + echo "
"; echo "

"; - echo "

"; + echo "
"; + echo '

'.$lang_label["db_agente_paquetes"].'

'; + echo "
"; echo "

".$lang_label["press_db_info"].""; echo "
"; } diff --git a/pandora_console/godmode/db/db_purge.php b/pandora_console/godmode/db/db_purge.php index 72aa13e8b0..fdc9a0bc72 100644 --- a/pandora_console/godmode/db/db_purge.php +++ b/pandora_console/godmode/db/db_purge.php @@ -19,12 +19,16 @@ if (comprueba_login() == 0) - A more powerful selection (by Agent, by Module, etc). */ - ?> -

> -  

-

-

- '.$lang_label["dbmain_title"].' >'.$lang_label["db_purge"]." ".$lang_label["help"].""; + echo ""; + echo "

"; + echo '

'.$lang_label["get_data_agent"].'

'; + // All data (now) $purge_all=date("Y-m-d H:i:s",time()); @@ -77,9 +81,7 @@ if (comprueba_login() == 0) # ====================================== # Purge data using dates - if (isset($_POST["agent"])){ - $id_agent =$_POST["agent"]; - } + # Purge data using dates if (isset($_POST["purgedb"])){ $from_date =$_POST["date_purge"]; @@ -148,8 +150,8 @@ if (comprueba_login() == 0) $sql_2='SELECT * FROM tagente_modulo WHERE id_agente = '.$id_agent; $result_t=mysql_query($sql_2); while ($row=mysql_fetch_array($result_t)){ - flush(); - ob_flush(); +/* flush(); + ob_flush(); */ $rango00=mysql_query('SELECT COUNT(*) FROM tagente_datos WHERE id_agente_modulo = '.$row["id_agente_modulo"].' and timestamp > "'.$d1.'"'); $rango0=mysql_query('SELECT COUNT(*) FROM tagente_datos WHERE id_agente_modulo = '.$row["id_agente_modulo"].' and timestamp > "'.$d3.'"'); $rango1=mysql_query('SELECT COUNT(*) FROM tagente_datos WHERE id_agente_modulo = '.$row["id_agente_modulo"].' and timestamp > "'.$week.'"'); diff --git a/pandora_console/images/image_problem.png b/pandora_console/images/image_problem.png index d29f481df6fb710918be77363c444494617cb3fd..1e0f86405298dd8238f350bba35cd288234217ed 100644 GIT binary patch literal 13958 zcmWk#WmFu^5}kzw7I$}dcM0wgSS+|hkidt#Et)`Z7I$|E7F-hCgC#(4hX4VB+vClg z>OQCc%ydo3z120*Pz@zaG%_>*05DaQ<+Weu(pNEoAis{-tzPJ_6S9?>l05M8|GS{O zJmqx-)m7Qh0|3zR|1TgQD~IHD5yeyGtpdtVWFmBY`fH$M0RU(K6?qw5-{q4aKe&mK z-&uXt>EZ+5Ly>9mf>1KY8TyD2GWG-g0Cy+}DTOR#Nm&GW8Wv6}BMVtk3qu8AXKzOC zT8fWYbd6VYj9<_#HP(0uJg86q3x43zJ4>irG->Iu^DiMa_WqYUr<9f1<5k^rzwlL` zu%A5k^yNf|-c+Qcf%_{xk4=xjyj6{ceCj)WY=QQWnL8QYmFw0w4Jl@=4v52~{tL=} z#h4?C{i6oftec;(*nV9!3+8bC8tobV{aq>eYF$c*Jh1xDc-?Oi`Vp$G8&*|_WxDgS zMSkdLwc1XcSVPG1lP=5Kp~byKld;HS;tfRHmOJU#me?Uf#n>YDyF%GHw+&S7{so zBi-!0jNkDdgJnOxb@c_~gnAX1!rRQ`%_hZZgTfjBP-D7D6$N!1OC|5O_j?eVE1pE0D(>5E);`c1tD{nxa=N_H~cPNieuk(Cx80F4?k*X3B8WLYGVA-;_v z-|W;7UB7&ARA^tNVHya-6+8YeE1Y=yjU&cN;CcYC_nZc6muh(o}!6Umz991=&t|-Vu@yB=-#}nTU`A zG_ife+MAzoD`YeXbH8>c_XOY)79^~`s834xZT8q5V29jef4*6n&N=>dw|95&K!0<_ zkg)b3@I;M0_R@B@C!AC3x6oP7<+|w#Sj5ud%;Hww$Y26koVPlGHN2UkMbTuoHu^5* z7vs;|b&>|Y-o>8Z00OJ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 100644 --- a/pandora_console/include/config.inc.php +++ b/pandora_console/include/config.inc.php @@ -1,15 +1,16 @@ +// Additions to code for Pandora FMS 1.2 graph code +// // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation version 2 +// as published by the Free Software Foundation for version 2. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -17,13 +18,16 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// This is the base config file + +// Pandora FMS 1.x uses icons from famfamfam, licensed under CC Atr. 2.5 +// Silk icon set 1.3 (cc) Mark James, http://www.famfamfam.com/lab/icons/silk/ +// Pandora FMS 1.x uses Pear Image::Graph code //Pandora Version if (!isset($build_version)) - $build_version="PC070602"; + $build_version="PC070622"; if (!isset($pandora_version)) - $pandora_version="v1.3 devel"; + $pandora_version="v1.3 Beta 1"; // Database configuration (default ones) //$dbname="pandora13"; // MySQL DataBase @@ -32,7 +36,7 @@ if (!isset($pandora_version)) //$dbhost="localhost"; // MySQL Host // This is used for reporting, please add "/" character at the end -//$config_homedir = "/var/www/pandora2/"; +//$config_homedir = "/var/www/pandora/"; // Do not display any ERROR //error_reporting(0); // Need to use active console at this moment @@ -123,4 +127,4 @@ if ($language_code == 'ast_es') { } else $help_code = substr($language_code,0,2); -?> +?> \ No newline at end of file diff --git a/pandora_console/include/languages/language_en.php b/pandora_console/include/languages/language_en.php index eca1b39932..3c50c722bd 100644 --- a/pandora_console/include/languages/language_en.php +++ b/pandora_console/include/languages/language_en.php @@ -876,6 +876,15 @@ $lang_label["map_item_add"] = "Add map item"; $lang_label["graph_event_total"] = "Event graph"; $lang_label["graph_event_group"] = "Event graph by group"; $lang_label["graph_event_user"] = "Event graph by user"; +$lang_label["db_agente_paquetes"] = "Packets per agent"; +$lang_label["db_agente_modulo"] = "Modules per agent"; + +$lang_label["inc_stat_status"] = "Incidents by status"; +$lang_label["inc_stat_priority"] = "Incidents by priority"; +$lang_label["inc_stat_user"] = "Incidents by user"; +$lang_label["inc_stat_source"] = "Incidents by source"; +$lang_label["inc_stat_group"] = "Incidents by group"; + $lang_label["no_layout_def"] = "There are no defined layouts"; $lang_label["no_reporting_def"] = "There are no defined reportings"; $lang_label["no_map_def"] = "There are no defined maps"; diff --git a/pandora_console/include/styles/op.css b/pandora_console/include/styles/op.css index 70bec7a2e4..1812bddddd 100644 --- a/pandora_console/include/styles/op.css +++ b/pandora_console/include/styles/op.css @@ -51,7 +51,7 @@ div#op7s>ul, div#op8s>ul, div#op9s>ul { background: url(../../images/reporting.png) no-repeat 4px 4px; } #op9 li, #op9 li:hover, #op9s li { - background: url(../../images/application.png) no-repeat 4px 3px; + background: url(../../images/monitor.png) no-repeat 4px 3px; } div.arrow>ul, div.arrows>ul, div#arrowl>ul, div#arrowls>ul { width: 75%; diff --git a/pandora_console/index.php b/pandora_console/index.php index d5346a8a39..6eaca337e3 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1,6 +1,6 @@ // Additions to code for Pandora FMS 1.2 graph code -// + // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation for version 2. @@ -25,13 +25,13 @@ // Pandora FMS 1.x uses Pear Image::Graph code //Pandora Version, if not defined here it would take from config.php -$build_version="PC070612"; -$pandora_version="v1.3 devel"; +$build_version="PC070622"; +$pandora_version="v1.3 Beta 1"; global $build_version; global $pandora_version; // Set to 1 to do not check for installer or config file (for development!). -$develop_bypass = 1; +$develop_bypass = 0; if ($develop_bypass != 1){ // If no config file, automatically try to install diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index b4eb4674b4..0c00351519 100644 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -35,106 +35,6 @@ echo "

".$lang_label["ag_title"]." > "; echo $lang_label["tactical_view"]."

"; - - /* - // Get group list that user has access - $mis_grupos = list_group2 ($id_user); - $contador_grupo = 0; - $contador_agente = 0; - $array_index = 0; - - // Init final counters - $monitor_checks = 0; - $monitor_ok = 0; - $monitor_bad = 0; - $monitor_unknown =0; - $monitor_alert = 0; - $total_agents = 0; - $data_checks = 0; - $data_unknown =0; - $data_alert = 0; - $data_alert_total = 0; - $monitor_alert_total = 0; - - - $monitor->checks = 0; - $monitor->ok = 0; - $monitor->bad =0; - $monitor->unknown = 0; - $monitor->alert = 0; - $monitor->alert_total = 0; - - $total->agents = 0; - - $data->checks = 0; - $data->unknown = 0; - $data->alert = 0; - $data->alert_total= 0; - - $ahora=date("Y/m/d H:i:s"); - $ahora_sec = strtotime($ahora); - - // Prepare data to show - // For each valid group for this user, take data from agent and modules - foreach ($mis_grupos as $migrupo) { - if ($migrupo != "") { - $existen_agentes = 0; - $sql0 = "SELECT COUNT(id_agente) FROM tagente WHERE id_grupo = $migrupo AND disabled = 0"; - $result0 = mysql_query ($sql0); - $row0 = mysql_fetch_array ($result0); - $total_agents = $total_agents + $row0[0]; - if ($row0[0] > 0) - $existen_agentes = 1; - - // SQL Join to get monitor status for agents belong this group - $sql1 = "SELECT tagente.id_agente, tagente_estado.estado, tagente_estado.datos, tagente_estado.current_interval, tagente_estado.utimestamp, tagente_estado.id_agente_modulo FROM tagente, tagente_estado WHERE tagente.disabled = 0 AND tagente.id_grupo = $migrupo AND tagente.id_agente = tagente_estado.id_agente"; - if ($result1 = mysql_query ($sql1)){ - while ($row1 = mysql_fetch_array ($result1)) { - $id_agente = $row1[0]; - $estado = $row1[1]; - $datos = $row1[2]; - $module_interval = $row1[3]; - $seconds = $ahora_sec - $row1[4]; - $id_agente_modulo = $row1[5]; - if ($estado != 100){ - // Monitor check - $monitor_checks++; - if ($seconds >= ($module_interval*2)) - $monitor_unknown++; - elseif ($datos != 0) { - $monitor_ok++; - } else { - $monitor_bad++; - } - // Alert - $sql2 = "SELECT times_fired FROM talerta_agente_modulo WHERE id_agente_modulo = $id_agente_modulo"; - if ($result2 = mysql_query ($sql2)){ - if ($row2 = mysql_fetch_array ($result2)){ - $monitor_alert_total++; - if ($row2[0] > 0) - $monitor_alert++; - } - } - } else { - // Data check - if ($seconds >= ($module_interval*2)) - $data_unknown++; - $data_checks++; - // Alert - $sql2 = "SELECT times_fired FROM talerta_agente_modulo WHERE id_agente_modulo = $id_agente_modulo"; - if ($result2 = mysql_query ($sql2)){ - if ($row2 = mysql_fetch_array ($result2)) { - $data_alert_total++; - if ($row2[0] > 0) - $data_alert++; - } - } - } - } - } - } - } - */ $data = general_stats($id_user,0); $monitor_checks = $data[0]; $monitor_ok = $data[1]; @@ -226,7 +126,7 @@ $data_health = format_numeric ( (($data_checks -($data_unknown + $data_alert)) / $data_checks ) * 100,1);; } else $data_health = 100; - if (($data_checks == 0) && ($data_checks == 0)){ + if (($data_checks != 0) OR ($data_checks != 0)){ $global_health = format_numeric( ((($monitor_ok -$monitor_alert - $monitor_unknown )+($data_checks -($data_unknown + $data_alert))) / ($data_checks + $monitor_checks) ) * 100, 1); } else $global_health = 100; diff --git a/pandora_console/operation/events/event_statistics.php b/pandora_console/operation/events/event_statistics.php index 3395bafc69..0a6681a19c 100644 --- a/pandora_console/operation/events/event_statistics.php +++ b/pandora_console/operation/events/event_statistics.php @@ -26,15 +26,17 @@ if (comprueba_login() == 0) { echo "

".$lang_label["events"]." > "; echo $lang_label["event_statistics"]." ".$lang_label["help"]."

"; echo "

"; + echo ""; + echo "
"; echo "

".$lang_label["graph_event_total"]."

"; - echo ''; - echo "

"; + echo ''; + echo "
"; echo "

".$lang_label["graph_event_user"]."

"; - echo ''; - echo "

"; + echo ''; + echo "
"; echo "

".$lang_label["graph_event_group"]."

"; echo ''; - echo "

"; + echo "
"; } else { audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access event viewer"); require ("general/noaccess.php"); diff --git a/pandora_console/operation/incidents/incident_statistics.php b/pandora_console/operation/incidents/incident_statistics.php index 01e29fcdb9..e52ecc497e 100644 --- a/pandora_console/operation/incidents/incident_statistics.php +++ b/pandora_console/operation/incidents/incident_statistics.php @@ -26,18 +26,25 @@ if (comprueba_login() == 0) { if (give_acl($id_user, 0, "IR")==1) { echo "

".$lang_label["incident_manag"]." > "; echo $lang_label["statistics"]." ".$lang_label["help"]."

"; -?> - -

- -

- -

- -

- -

-"; + echo ""; + echo '

'.$lang_label["inc_stat_status"].'

'; + echo ''; + echo ""; + echo '

'.$lang_label["inc_stat_priority"].'

'; + echo ''; + echo ""; + echo '

'.$lang_label["inc_stat_group"].'

'; + echo ''; + echo ""; + echo '

'.$lang_label["inc_stat_user"].'

'; + echo ''; + echo ""; + echo '

'.$lang_label["inc_stat_source"].'

'; + echo ''; + echo ""; + echo ""; } else { require ("general/noaccess.php"); audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Incident section"); diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 3109e70dd8..e1a15dd163 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -124,3 +124,4 @@ INSERT INTO `tusuario_perfil` VALUES (1,'demo',1,1,'admin'),(2,'admin',5,1,'admi INSERT INTO `tperfil` VALUES (1,'Operator (Read)',0,1,0,1,0,0,0,0,0,0),(2,'Operator (Write)',1,1,0,1,0,0,0,0,0,0),(3,'Chief Operator',1,1,1,1,0,0,0,0,0,0),(4,'Group coordinator',1,1,1,1,1,1,1,0,0,0),(5,'Pandora Administrator',1,1,1,1,1,1,1,1,1,1); +INSERT INTO `tnews` VALUES (1,'admin','Welcome to Pandora FMS 1.3 !','This is our new console, a lot of new features has been added from last version. Please read documentation about it and be free to test any option.\r\n\r\nPandora FMS team.','2007-06-22 13:03:20'); diff --git a/pandora_console/reporting/fgraph.php b/pandora_console/reporting/fgraph.php index 38977698f9..57ec8b3836 100644 --- a/pandora_console/reporting/fgraph.php +++ b/pandora_console/reporting/fgraph.php @@ -3,16 +3,15 @@ // Pandora FMS - the Free monitoring system // ======================================== // Copyright (c) 2004-2007 Sancho Lerena, slerena@gmail.com -// Main PHP/SQL code development and project architecture and management +// Main PHP/SQL code development, project architecture and management. // Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com -// CSS and some PHP additions -// Copyright (c) 2006 Jose Navarro -// Additions to Pandora FMS 1.2 graph code -// Copyright (c) 2005-2007 Artica Soluciones Tecnologicas, info@artica.es +// CSS and some PHP code additions +// Copyright (c) 2006 Jose Navarro +// Additions to code for Pandora FMS 1.2 graph code // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; version 2 +// as published by the Free Software Foundation for version 2. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -20,7 +19,11 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// Load global vars + +// Pandora FMS 1.x uses icons from famfamfam, licensed under CC Atr. 2.5 +// Silk icon set 1.3 (cc) Mark James, http://www.famfamfam.com/lab/icons/silk/ +// Pandora FMS 1.x uses Pear Image::Graph code + include ("../include/config.php"); include ("../include/functions.php"); include ("../include/functions_db.php"); @@ -642,7 +645,7 @@ function generic_pie_graph ($width=300, $height=200, $data, $legend) { // Merge data into a dataset object (sancho) $Dataset1 =& Image_Graph::factory('dataset'); for ($a=0;$a < sizeof($data); $a++){ - $Dataset1->addPoint($legend[$a], $data[$a]); + $Dataset1->addPoint(str_pad($legend[$a],15), $data[$a]); } $Plot =& $Plotarea->addNew('pie', $Dataset1); $Plotarea->hideAxis(); @@ -966,7 +969,7 @@ function graphic_incident_user() { generic_pie_graph (320, 200, $data, $legend); } -function graphic_user_activity($width=300, $height=200) { +function graphic_user_activity($width=350, $height=230) { include ("../include/config.php"); require ("../include/languages/language_".$language_code.".php"); @@ -980,7 +983,7 @@ function graphic_user_activity($width=300, $height=200) { $result2=mysql_query($sql1); $row2=mysql_fetch_array($result2); $data[] = $row2[0]; - $legend[] = substr($row[0],0,16)."(".$row2[0].")"; + $legend[] = str_pad(substr($row[0],0,16)."(".format_for_graph($row2[0],0).")", 15); } // Sort array by bubble method (yes, I study more methods in university, but if you want more speed, please, submit a patch :) @@ -1047,10 +1050,8 @@ function graphic_incident_source ($width=320, $height=200) { generic_pie_graph ($width, $height, $data, $legend); } -function grafico_db_agentes_modulos() { +function grafico_db_agentes_modulos($width, $height) { include ("../include/config.php"); - include ("jpgraph/jpgraph.php"); - include ("jpgraph/jpgraph_bar.php"); require ("../include/languages/language_".$language_code.".php"); $data = array(); @@ -1065,56 +1066,22 @@ function grafico_db_agentes_modulos() { $legend[] = $row["nombre"]; } // Sort array by bubble method (yes, I study more methods in university, but if you want more speed, please, submit a patch :) - // or much better, pay me to do a special version for you, highly optimized :-)))) - for ($a=0;$a < sizeof($data);$a++){ - for ($b=$a; $b $data[$a]){ - $temp = $data[$a]; - $temp_label = $legend[$a]; - $data[$a] = $data[$b]; - $legend[$a] = $legend[$b]; - $data[$b] = $temp; - $legend[$b] = $temp_label; - } - } - $mayor = 0; - $mayor_data =0; - for ($a=0;$a < sizeof($data); $a++) - if ($data[$a] > $mayor_data){ - $mayor = $a; - $mayor_data = $data[$a]; - } - - $ajuste_altura = sizeof($data) * 20; - //$graph = new PieGraph(400,140+$ajuste_altura,"auto"); - $graph = new Graph(400,140+$ajuste_altura,'auto'); - $graph->SetScale("textlin"); - $graph->SetMarginColor('white@0.2'); - $graph->title->Set($lang_label["modules_per_agent"]); - $graph->title->SetFont(FF_FONT1,FS_BOLD); - $graph->yaxis->scale->SetGrace(0); - $graph->yaxis->SetLabelAlign('center','bottom'); - $graph->SetAlphaBlending(); - $graph->SetFrame(true); - $graph->xaxis->SetLabelMargin(5); - $graph->Set90AndMargin(100,20,50,30); - $p1 = new BarPlot($data); - $p1->value->SetFormat('%.0f '); - $p1->value->Show(); - $p1->value->SetAlign('left','center'); - $p1->SetFillColor("#00bf00"); - $p1->SetWidth(0.6); - $p1->SetShadow(); - $graph->yaxis->SetLabelFormat('%d'); - $graph->xaxis->SetTickLabels($legend); - $graph->legend->Pos(0.05,0.49,"right","center"); - $graph->Add($p1); - $graph->img->SetAntiAliasing(); - $graph->Stroke(); - + // or much better, pay me to do a special version for you, highly optimized :-)))) + for ($a=0;$a < sizeof($data);$a++){ + for ($b=$a; $b $data[$a]){ + $temp = $data[$a]; + $temp_label = $legend[$a]; + $data[$a] = $data[$b]; + $legend[$a] = $legend[$b]; + $data[$b] = $temp; + $legend[$b] = $temp_label; + } + } + generic_bar_graph ($width, $height, $data, $legend); } -function grafico_eventos_usuario( $width=320, $height=200) { +function grafico_eventos_usuario( $width=420, $height=200) { include ("../include/config.php"); require ("../include/languages/language_".$language_code.".php"); @@ -1190,12 +1157,6 @@ function grafico_eventos_total() { $legend[$b] = $temp_label; } } - $mayor=0; $mayor_data=0; - for ($a=0;$a < sizeof($data); $a++) - if ($data[$a] > $mayor_data){ - $mayor = $a; - $mayor_data = $data[$a]; - } generic_pie_graph (320, 200, $data, $legend); } @@ -1240,10 +1201,50 @@ function grafico_eventos_grupo ($width = 300, $height = 200 ) { generic_pie_graph ($width, $height, $data, $legend); } -function grafico_db_agentes_paquetes() { + +function generic_bar_graph ( $width =380, $height = 300, $data, $legend) { + include ("../include/config.php"); + require_once 'Image/Graph.php'; + require ("../include/languages/language_".$language_code.".php"); + + $ajuste_altura = sizeof($data) * 20; + if (sizeof($data) > 10){ + $height = $height + $ajuste_altura; + } + + // create the graph + $Graph =& Image_Graph::factory('graph', array($width, $height)); + // add a TrueType font + $Font =& $Graph->addNew('font', $config_fontpath); + // set the font size to 11 pixels + $Font->setSize(8); + $Graph->setFont($Font); + $Graph->add( + Image_Graph::vertical ( + $Plotarea = Image_Graph::factory('plotarea',array('category', 'axis', 'horizontal')), + $Legend = Image_Graph::factory('legend'), + 100 + ) + ); + + $Legend->setPlotarea($Plotarea); + // Create the dataset + // Merge data into a dataset object (sancho) + $Dataset1 =& Image_Graph::factory('dataset'); + for ($a=0;$a < sizeof($data); $a++){ + $Dataset1->addPoint(str_pad($legend[$a],15), $data[$a]); + } + $Plot =& $Plotarea->addNew('bar', $Dataset1); + $GridY2 =& $Plotarea->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y_SECONDARY); + $GridY2->setLineColor('gray'); + $GridY2->setFillColor('lightgray@0.05'); + $Plot->setLineColor('gray'); + $Plot->setFillColor('blue@0.85'); + $Graph->done(); +} + +function grafico_db_agentes_paquetes ($width = 380, $height = 300) { include ("../include/config.php"); - include ("jpgraph/jpgraph.php"); - include ("jpgraph/jpgraph_bar.php"); require ("../include/languages/language_".$language_code.".php"); $data = array(); @@ -1256,59 +1257,27 @@ function grafico_db_agentes_paquetes() { $result3=mysql_query($sql1); if ($row3=mysql_fetch_array($result3)){ $data[]= $row3[0]; - $legend[] = dame_nombre_agente($row[0]); + $legend[] = str_pad(dame_nombre_agente($row[0]),15); } } } // Sort array by bubble method (yes, I study more methods in university, but if you want more speed, please, submit a patch :) - // or much better, pay me to do a special version for you, highly optimized :-)))) - for ($a=0;$a < sizeof($data);$a++){ - for ($b=$a; $b $data[$a]){ - $temp = $data[$a]; - $temp_label = $legend[$a]; - $data[$a] = $data[$b]; - $legend[$a] = $legend[$b]; - $data[$b] = $temp; - $legend[$b] = $temp_label; - } - } - $mayor = 0; - $mayor_data =0; - for ($a=0;$a < sizeof($data); $a++) - if ($data[$a] > $mayor_data){ - $mayor = $a; - $mayor_data = $data[$a]; - } - - $ajuste_altura = sizeof($data) * 20; - $graph = new Graph(400,140+$ajuste_altura,'auto'); - $graph->SetScale("textlin"); - $graph->SetMarginColor('white@0.2'); - $graph->title->Set($lang_label["packets_by_agent"]); - $graph->title->SetFont(FF_FONT1,FS_BOLD); - $graph->yaxis->scale->SetGrace(0); - $graph->yaxis->SetLabelAlign('center','bottom'); - $graph->SetAlphaBlending(); - $graph->SetFrame(true); - $graph->xaxis->SetLabelMargin(5); - $graph->Set90AndMargin(100,20,50,30); - $p1 = new BarPlot($data); - $p1->value->SetFormat('%.0f '); - $p1->value->Show(); - $p1->value->SetAlign('left','center'); - $p1->SetFillColor("#0000fd"); - $p1->SetWidth(0.6); - $p1->SetShadow(); - $graph->yaxis->SetLabelFormat('%d'); - $graph->xaxis->SetTickLabels($legend); - $graph->legend->Pos(0.05,0.49,"right","center"); - $graph->Add($p1); - $graph->img->SetAntiAliasing(); - $graph->Stroke(); + // or much better, pay me to do a special version for you, highly optimized :-)))) + for ($a=0;$a < sizeof($data);$a++){ + for ($b=$a; $b $data[$a]){ + $temp = $data[$a]; + $temp_label = $legend[$a]; + $data[$a] = $data[$b]; + $legend[$a] = $legend[$b]; + $data[$b] = $temp; + $legend[$b] = $temp_label; + } + } + generic_bar_graph ($width, $height, $data, $legend); } -function grafico_db_agentes_purge ($id_agente, $width, $height) { +function grafico_db_agentes_purge ($id_agent, $width, $height) { include ("../include/config.php"); require_once 'Image/Graph.php'; require ("../include/languages/language_".$language_code.".php"); @@ -1334,77 +1303,23 @@ function grafico_db_agentes_purge ($id_agente, $width, $height) { for ($a=0; $a < sizeof ($fechas); $a++){ // 4 x intervals will be enought, increase if your database is very very fast :) - if ($a==3) - $sql1="SELECT COUNT(id_agente_datos) FROM tagente_datos WHERE utimestamp >= ".$fechas[$a]; - else - $sql1="SELECT COUNT(id_agente_datos) FROM tagente_datos WHERE utimestamp >= ".$fechas[$a]." AND utimestamp < ".$fechas[$a+1]; + if ($a==3){ + if ($id_agent == -1) + $sql1="SELECT COUNT(id_agente_datos) FROM tagente_datos WHERE utimestamp >= ".$fechas[$a]; + else + $sql1="SELECT COUNT(id_agente_datos) FROM tagente_datos WHERE id_agente = $id_agent AND utimestamp >= ".$fechas[$a]; + } else { + if ($id_agent == -1) + $sql1="SELECT COUNT(id_agente_datos) FROM tagente_datos WHERE utimestamp >= ".$fechas[$a]." AND utimestamp < ".$fechas[$a+1]; + else + $sql1="SELECT COUNT(id_agente_datos) FROM tagente_datos WHERE id_agente = $id_agent AND utimestamp >= ".$fechas[$a]." AND utimestamp < ".$fechas[$a+1]; + } $result=mysql_query($sql1); $row=mysql_fetch_array($result); - $data[] = $row[0]; - $legend[]=$fechas_label[$a]." ( ".$row[0]." )"; + $data[] = $row[0]; + $legend[]=$fechas_label[$a]." ( ".format_for_graph($row[0],0)." )"; } - - $mayor = 0; - $mayor_data =0; - for ($a=0;$a < sizeof($data); $a++) - if ($data[$a] > $mayor_data){ - $mayor = $a; - $mayor_data = $data[$a]; - } - - if ($total> 1){ - // create the graph - $Graph =& Image_Graph::factory('graph', array($width, $height)); - // add a TrueType font - $Font =& $Graph->addNew('font', $config_fontpath); - // set the font size to 7 pixels - $Font->setSize(7); - $Graph->setFont($Font); - // create the plotarea - $Graph->add( - Image_Graph::horizontal( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 70 - ) - ); - $Legend->setPlotarea($Plotarea); - // Create the dataset - // Merge data into a dataset object (sancho) - $Dataset1 =& Image_Graph::factory('dataset'); - for ($a=0;$a < sizeof($data); $a++){ - $Dataset1->addPoint($legend[$a], $data[$a]); - } - $Plot =& $Plotarea->addNew('pie', $Dataset1); - $Plotarea->hideAxis(); - // create a Y data value marker - $Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_PCT_Y_TOTAL); - // create a pin-point marker type - $PointingMarker =& $Plot->addNew('Image_Graph_Marker_Pointing_Angular', array(1, &$Marker)); - // and use the marker on the 1st plot - $Plot->setMarker($PointingMarker); - // format value marker labels as percentage values - $Marker->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%')); - $Plot->Radius = 15; - $FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); - $Plot->setFillStyle($FillArray); - - $FillArray->addColor('green@0.7'); - $FillArray->addColor('yellow@0.7'); - $FillArray->addColor('red@0.7'); - $FillArray->addColor('orange@0.7'); - $FillArray->addColor('blue@0.7'); - $FillArray->addColor('purple@0.7'); - $FillArray->addColor('lightgreen@0.7'); - $FillArray->addColor('lightblue@0.7'); - $FillArray->addColor('lightred@0.7'); - $FillArray->addColor('grey@0.6', 'rest'); - $Plot->explode(6); - $Plot->setStartingAngle(145); - // output the Graph - $Graph->done(); - } else - graphic_error (); + generic_pie_graph ($width, $height, $data, $legend); } function drawWarning($width,$height) { @@ -1485,6 +1400,8 @@ function progress_bar($progress,$width,$height) { drawRating($progress,$width,$height); } +/*NOT USED ! + function graphic_test ($id, $period, $interval, $label, $width, $height){ require_once 'Image/Graph.php'; include ("../include/config.php"); @@ -1571,6 +1488,7 @@ function graphic_test ($id, $period, $interval, $label, $width, $height){ $Graph->done(); } +*/ function odo_tactic ($value1, $value2, $value3){ require_once 'Image/Graph.php'; @@ -1800,31 +1718,31 @@ if (isset($_GET["tipo"])){ elseif ($_GET["tipo"] =="prioridad_incidente") grafico_incidente_prioridad(); elseif ($_GET["tipo"]=="db_agente_modulo") - grafico_db_agentes_modulos(); + grafico_db_agentes_modulos($width, $height); elseif ($_GET["tipo"]=="db_agente_paquetes") - grafico_db_agentes_paquetes(); + grafico_db_agentes_paquetes($width, $height); elseif ($_GET["tipo"] =="db_agente_purge") - grafico_db_agentes_purge(-1, $width, $height); + grafico_db_agentes_purge($id, $width, $height); elseif ($_GET["tipo"] =="group_events") grafico_eventos_grupo($width, $height); elseif ($_GET["tipo"] =="user_events") - grafico_eventos_usuario(); + grafico_eventos_usuario($width, $height); elseif ($_GET["tipo"] =="total_events") grafico_eventos_total(); elseif ($_GET["tipo"] =="group_incident") graphic_incident_group(); elseif ($_GET["tipo"] =="user_incident") - graphic_incident_user(); + graphic_incident_user(); elseif ($_GET["tipo"] =="source_incident") - graphic_incident_source(); + graphic_incident_source(); elseif ($_GET["tipo"] =="user_activity") - graphic_user_activity($width,$height); + graphic_user_activity($width,$height); elseif ($_GET["tipo"] == "agentaccess") graphic_agentaccess($_GET["id"], $_GET["periodo"], $width, $height); elseif ($_GET["tipo"] == "agentmodules") graphic_agentmodules($_GET["id"], $width, $height); - elseif ($_GET["tipo"] == "gdirect") - graphic_test ($id, $period, $intervalo, $label, $width, $height); + //elseif ($_GET["tipo"] == "gdirect") +// graphic_test ($id, $period, $intervalo, $label, $width, $height); elseif ( $_GET["tipo"] =="progress"){ $percent= $_GET["percent"]; progress_bar($percent,$width,$height);