From 3377a8e33b72e68e8c4fbbacc4226f213997580f Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 27 Jan 2015 00:01:10 +0100 Subject: [PATCH 01/13] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_console/pandoradb_data.sql | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 2819f4aa86..dadac3d556 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 6.0dev-150126 +Version: 6.0dev-150127 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 3151d0ec3e..3d3400b447 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="6.0dev-150126" +pandora_version="6.0dev-150127" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index bfb60ad661..47102d8581 100644 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '6.0dev'; -use constant AGENT_BUILD => '150126'; +use constant AGENT_BUILD => '150127'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 0e57532bb0..bc97a3dba5 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 6.0dev -%define release 150126 +%define release 150127 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index eca0df7f5d..ed7c7f005d 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 6.0dev -%define release 150126 +%define release 150127 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2dd97dded1..26e5f94559 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150126} +{150127} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f6aacebf8b..2a44005890 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("6.0dev(Build 150126)") +#define PANDORA_VERSION ("6.0dev(Build 150127)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index d807afc4ba..313d183592 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(6.0dev(Build 150126))" + VALUE "ProductVersion", "(6.0dev(Build 150127))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4bd5c9f315..722764682c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 6.0dev-150126 +Version: 6.0dev-150127 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 61a3677f8c..554e5e76d1 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="6.0dev-150126" +pandora_version="6.0dev-150127" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 57d7068b7f..0febe2ad03 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC150126'; +$build_version = 'PC150127'; $pandora_version = 'v6.0dev'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 424f1bcec7..01cca210c6 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Tue, 27 Jan 2015 09:43:52 +0100 Subject: [PATCH 02/13] Do not build RPM or DEB packages for the Enterprise Server. --- extras/build_deb.sh | 3 --- extras/build_rpm.sh | 3 --- 2 files changed, 6 deletions(-) diff --git a/extras/build_deb.sh b/extras/build_deb.sh index 787929c543..788eb72536 100755 --- a/extras/build_deb.sh +++ b/extras/build_deb.sh @@ -19,8 +19,5 @@ cd $CODEHOME/pandora_agents/unix/DEBIAN && bash ./make_deb_package.sh && mv ../* # Enterprise console cd $PANDHOME_ENT/pandora_console/DEBIAN && bash ./make_deb_package.sh && mv ../*.deb $RPMHOME/DEB || exit 1 -# Enterprise server -cd $PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/DEBIAN && bash ./make_deb_package.sh && mv ../*.deb $RPMHOME/DEB || exit 1 - exit 0 diff --git a/extras/build_rpm.sh b/extras/build_rpm.sh index bf94591c2e..f523eeaa7d 100755 --- a/extras/build_rpm.sh +++ b/extras/build_rpm.sh @@ -19,8 +19,5 @@ rpmbuild -ba $CODEHOME/pandora_agents/unix/pandora_agent.spec || exit 1 # Enterprise console rpmbuild -ba $PANDHOME_ENT/pandora_console/enterprise/pandora_console_enterprise.spec || exit 1 -# Enterprise server -rpmbuild -ba $PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.spec || exit 1 - exit 0 From 6e86907f864a5b7bbd43ee4886785aed04207f25 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Tue, 27 Jan 2015 09:48:08 +0100 Subject: [PATCH 03/13] Removed unneeded buildrequires from the server's .spec file. --- pandora_server/pandora_server.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 185f5735d1..3a0e6e9d34 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -19,7 +19,6 @@ Prefix: /usr/share BuildRoot: %{_tmppath}/%{name}-buildroot BuildArch: noarch PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd -BuildRequires: sysvinit cron rsyslog sysconfig AutoReq: 0 Provides: %{name}-%{version} Requires: perl-DBI perl-DBD-mysql perl-libwww-perl From 68b1f9a73e51897ce6da714da658bff303c8657d Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Tue, 27 Jan 2015 10:15:30 +0100 Subject: [PATCH 04/13] Removed unneeded buildrequires from the agent's .spec file. --- pandora_agents/unix/pandora_agent.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index ed7c7f005d..42c30aeaae 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -19,7 +19,6 @@ Prefix: /usr/share BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildArch: noarch PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd -BuildRequires: sysvinit cron rsyslog sysconfig Requires: coreutils unzip AutoReq: 0 Provides: %{name}-%{version} From 92686247dc80847a2214e4007a4c47db6bc2c459 Mon Sep 17 00:00:00 2001 From: Vanessa Gil Date: Tue, 27 Jan 2015 11:44:26 +0100 Subject: [PATCH 05/13] Fixed bug #1679. --- pandora_console/include/functions_events.php | 24 +++++++++++++++++++ pandora_console/include/functions_tags.php | 6 +++-- .../operation/events/events_list.php | 12 ++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 2cde30a46f..a0ab1bcf05 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2768,4 +2768,28 @@ function events_get_count_events_validated ($filter, $period, $date, return $return; } + +function events_checks_event_tags($event_data, $acltags) { + global $config; + + if (empty($acltags[$event_data['id_grupo']])) { + return true; + } else { + $tags_arr_acl = explode(',',$acltags[$event_data['id_grupo']]); + $tags_arr_event = explode(',',$event_data['tags']); + + foreach ($tags_arr_acl as $tag) { + $tag_name = tags_get_name($tag); + if (in_array($tag_name, $tags_arr_event)) { + return true; + } else { + $has_tag = false; + } + } + if (!$has_tag) { + return false; + } + } + return false; +} ?> diff --git a/pandora_console/include/functions_tags.php b/pandora_console/include/functions_tags.php index d8083344ee..98cb2224d8 100644 --- a/pandora_console/include/functions_tags.php +++ b/pandora_console/include/functions_tags.php @@ -991,7 +991,8 @@ function tags_get_acl_tags_event_condition($acltags, $meta = false, $force_group if ($force_group_and_tag) { if (!empty($all_tags[$tag])) { - $tags_condition .= sprintf('(tags = "%s"',io_safe_input($all_tags[$tag])); + //~ $tags_condition .= sprintf('(tags = "%s"',io_safe_input($all_tags[$tag])); + $tags_condition .= "(tags LIKE '%".io_safe_input($all_tags[$tag])."%'"; $childrens = groups_get_childrens($group_id, null, true); if (empty($childrens)) { @@ -1009,7 +1010,8 @@ function tags_get_acl_tags_event_condition($acltags, $meta = false, $force_group $tags_condition .= "id_grupo = ".$group_id; } } else { - $tags_condition .= sprintf('tags = "%s"',io_safe_input($all_tags[$tag])); + //~ $tags_condition .= sprintf('tags = "%s"',io_safe_input($all_tags[$tag])); + $tags_condition .= "tags LIKE '%".io_safe_input($all_tags[$tag])."%'"; } } } diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index ecebd01f8a..6b8828ddba 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -564,6 +564,18 @@ else { $history); } +if (!empty($result)) { + //~ Checking the event tags exactly. The event query filters approximated tags to keep events + //~ with several tags + $acltags = tags_get_user_module_and_tags ($config['id_user'],'ER', true); + + foreach ($result as $key=>$event_data) { + $has_tags = events_checks_event_tags($event_data, $acltags); + if (!$has_tags) { + unset($result[$key]); + } + } +} if (!empty($result)) { $graph = '
' . From a0c2dcd46e0d59b9c38c95b0bbe34e624378138b Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 27 Jan 2015 15:14:53 +0100 Subject: [PATCH 06/13] Fixed problems with view of data when click in binary image in tree view, monitor detail and list of monitors --- pandora_console/include/ajax/module.php | 14 ++++++-------- pandora_console/operation/agentes/datos_agente.php | 10 ++++------ .../operation/agentes/status_monitor.php | 6 ++---- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 5dca8c9095..985ba2f7d2 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -121,7 +121,7 @@ if ($get_module_detail) { $formtable->data[0][3] = "". html_print_image ("images/refresh.png", true, array ("style" => 'vertical-align: middle;', "border" => "0" )) . ""; $formtable->rowspan[0][3] = 2; $formtable->cellstyle[0][3] = 'vertical-align: middle;'; - + /* $formtable->data[1][0] = html_print_radio_button_extended( "selection_mode", 'range','', $selection_mode, false, '', 'style="margin-right: 15px;"', true) . __("Specify time range"); @@ -140,7 +140,7 @@ if ($get_module_detail) { '', 10, 10, true); $formtable->data[1][2] .= html_print_input_text('time_to', $time_to, '', 9, 7, true); - + */ html_print_table($formtable); $moduletype_name = modules_get_moduletype_name( @@ -156,12 +156,8 @@ if ($get_module_detail) { $columns = array( - "Timestamp" => array( - "utimestamp", - "modules_format_timestamp", - "align" => "left"), "Data" => array( - "datos", + "data", "modules_format_data", "align" => "left"), "Time" => array( @@ -266,7 +262,7 @@ if ($get_module_detail) { ui_print_error_message(__('No available data to show')); } else { - ui_pagination ($count, false, $offset, 0, false, 'offset', true, 'binary_dialog'); + ui_pagination (count($count), false, $offset, 0, false, 'offset', true, 'binary_dialog'); html_print_table($table); } @@ -356,6 +352,7 @@ if ($get_id_tag) { echo $tag_id; return; } +<<<<<<< HEAD if ($list_modules) { include_once($config['homedir'] . "/include/functions_modules.php"); @@ -1058,4 +1055,5 @@ if ($list_modules) { } + ?> diff --git a/pandora_console/operation/agentes/datos_agente.php b/pandora_console/operation/agentes/datos_agente.php index 49ab0585a5..543db4299b 100755 --- a/pandora_console/operation/agentes/datos_agente.php +++ b/pandora_console/operation/agentes/datos_agente.php @@ -95,7 +95,6 @@ if ($moduletype_name == "log4x") { } $columns = array( - "Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "center" ), "Sev" => array("severity", "modules_format_data", "align" => "center", "width" => "70px"), "Message"=> array("message", "modules_format_verbatim", "align" => "left", "width" => "45%"), "StackTrace" => array("stacktrace", "modules_format_verbatim", "align" => "left", "width" => "50%") @@ -111,8 +110,8 @@ else if (preg_match ("/string/", $moduletype_name)) { } $columns = array( - "Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "left"), - "Data" => array("datos", "modules_format_data", "align" => "left") + "Data" => array("datos", "modules_format_data", "align" => "left"), + "Time" => array("utimestamp", "modules_format_time", "align" => "center"), ); } else { @@ -124,7 +123,6 @@ else { } $columns = array( - "Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "left"), "Data" => array("datos", "modules_format_data", "align" => "left"), "Time" => array("utimestamp", "modules_format_time", "align" => "center") ); @@ -186,7 +184,7 @@ $formtable->size[2] = '30%'; $formtable->data[0][0] = html_print_radio_button_extended ("selection_mode", 'fromnow', '', $selection_mode, false, '', 'style="margin-right: 15px;"', true) . __("Choose a time from now"); $formtable->data[0][1] = html_print_extended_select_for_time ('period', $period, '', '', '0', 10, true); - +/* $formtable->data[1][0] = html_print_radio_button_extended ("selection_mode", 'range','', $selection_mode, false, '', 'style="margin-right: 15px;"', true) . __("Specify time range"); $formtable->data[1][1] = __('Timestamp from:'); @@ -199,7 +197,7 @@ $formtable->data[1][1] .= __('Timestamp to:'); $formtable->data[1][2] .= '
'; $formtable->data[1][2] .= html_print_input_text ('date_to', $date_to, '', 10, 10, true); $formtable->data[1][2] .= html_print_input_text ('time_to', $time_to, '', 9, 7, true); - +*/ if (preg_match ("/string/", $moduletype_name) || $moduletype_name == "log4x") { $formtable->data[2][0] = __('Free text for search'); $formtable->data[2][1] = html_print_input_text ("freestring", $freestring, '', 20,30, true); diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index c22a12ecb4..94bda42221 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -1153,11 +1153,9 @@ foreach ($result as $row) { $link ="winopeng('operation/agentes/stat_win.php?type=$graph_type&period=86400&id=".$row["id_agente_modulo"]."&label=".rawurlencode(urlencode(base64_encode($row["module_name"])))."&refresh=600','day_".$win_handle."')"; $data[7] = '' . html_print_image("images/chart_curve.png", true, array("border" => '0', "alt" => "")) . ''; - if (defined('METACONSOLE')) - $data[7] .= "". html_print_image ("images/binary.png", true, array ("border" => "0", "alt" => "")) . ""; - else - $data[7] .= " " . html_print_image('images/binary.png', true, array("style" => '0', "alt" => '')) . ""; + $data[7] .= "". html_print_image ("images/binary.png", true, array ("border" => "0", "alt" => "")) . ""; + } $data[8] = ui_print_module_warn_value($row['max_warning'], $row['min_warning'], $row['str_warning'], $row['max_critical'], $row['min_critical'], $row['str_critical']); From 96f44de43e44cb1e5e50c118d0d586d812f7ba43 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 27 Jan 2015 15:34:47 +0100 Subject: [PATCH 07/13] Delete line of error with cherry-pick and recovery timestamp filter --- pandora_console/include/ajax/module.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 985ba2f7d2..6e5e937da3 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -121,7 +121,7 @@ if ($get_module_detail) { $formtable->data[0][3] = "". html_print_image ("images/refresh.png", true, array ("style" => 'vertical-align: middle;', "border" => "0" )) . ""; $formtable->rowspan[0][3] = 2; $formtable->cellstyle[0][3] = 'vertical-align: middle;'; - /* + $formtable->data[1][0] = html_print_radio_button_extended( "selection_mode", 'range','', $selection_mode, false, '', 'style="margin-right: 15px;"', true) . __("Specify time range"); @@ -140,7 +140,7 @@ if ($get_module_detail) { '', 10, 10, true); $formtable->data[1][2] .= html_print_input_text('time_to', $time_to, '', 9, 7, true); - */ + html_print_table($formtable); $moduletype_name = modules_get_moduletype_name( @@ -352,7 +352,6 @@ if ($get_id_tag) { echo $tag_id; return; } -<<<<<<< HEAD if ($list_modules) { include_once($config['homedir'] . "/include/functions_modules.php"); @@ -1055,5 +1054,4 @@ if ($list_modules) { } - ?> From a8a75e86f5aaced25483026694b6e163e940a895 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 27 Jan 2015 15:43:11 +0100 Subject: [PATCH 08/13] recovery timestamp filter in view 'Received data from modules' --- pandora_console/operation/agentes/datos_agente.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/agentes/datos_agente.php b/pandora_console/operation/agentes/datos_agente.php index 543db4299b..11c3ea9146 100755 --- a/pandora_console/operation/agentes/datos_agente.php +++ b/pandora_console/operation/agentes/datos_agente.php @@ -184,7 +184,7 @@ $formtable->size[2] = '30%'; $formtable->data[0][0] = html_print_radio_button_extended ("selection_mode", 'fromnow', '', $selection_mode, false, '', 'style="margin-right: 15px;"', true) . __("Choose a time from now"); $formtable->data[0][1] = html_print_extended_select_for_time ('period', $period, '', '', '0', 10, true); -/* + $formtable->data[1][0] = html_print_radio_button_extended ("selection_mode", 'range','', $selection_mode, false, '', 'style="margin-right: 15px;"', true) . __("Specify time range"); $formtable->data[1][1] = __('Timestamp from:'); @@ -197,7 +197,7 @@ $formtable->data[1][1] .= __('Timestamp to:'); $formtable->data[1][2] .= '
'; $formtable->data[1][2] .= html_print_input_text ('date_to', $date_to, '', 10, 10, true); $formtable->data[1][2] .= html_print_input_text ('time_to', $time_to, '', 9, 7, true); -*/ + if (preg_match ("/string/", $moduletype_name) || $moduletype_name == "log4x") { $formtable->data[2][0] = __('Free text for search'); $formtable->data[2][1] = html_print_input_text ("freestring", $freestring, '', 20,30, true); From 0400f2092c651b354f231c2a9375874bbf29e1c5 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 28 Jan 2015 00:01:08 +0100 Subject: [PATCH 09/13] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_console/pandoradb_data.sql | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index dadac3d556..8a553b84eb 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 6.0dev-150127 +Version: 6.0dev-150128 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 3d3400b447..e28a95cf7a 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="6.0dev-150127" +pandora_version="6.0dev-150128" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 47102d8581..dae8083cae 100644 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '6.0dev'; -use constant AGENT_BUILD => '150127'; +use constant AGENT_BUILD => '150128'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index bc97a3dba5..1b102ad8b0 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 6.0dev -%define release 150127 +%define release 150128 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 42c30aeaae..48f06cd8a3 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 6.0dev -%define release 150127 +%define release 150128 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 26e5f94559..ea94d5436a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150127} +{150128} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 2a44005890..ddf211d650 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("6.0dev(Build 150127)") +#define PANDORA_VERSION ("6.0dev(Build 150128)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 313d183592..a8e1b07354 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(6.0dev(Build 150127))" + VALUE "ProductVersion", "(6.0dev(Build 150128))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 722764682c..bdf2dd8ed7 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 6.0dev-150127 +Version: 6.0dev-150128 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 554e5e76d1..888390c960 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="6.0dev-150127" +pandora_version="6.0dev-150128" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 0febe2ad03..dea4424b4f 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC150127'; +$build_version = 'PC150128'; $pandora_version = 'v6.0dev'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 01cca210c6..c217d97e7e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Wed, 28 Jan 2015 10:14:19 +0100 Subject: [PATCH 10/13] Show version server in 'Tactical server information' instead of data (cherry picked from commit 278de27852ad8fac6a08c6f9d8b7f85cdf5a9253) --- pandora_console/include/functions_servers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_servers.php b/pandora_console/include/functions_servers.php index 7d67a0bf86..8a6e3732d7 100644 --- a/pandora_console/include/functions_servers.php +++ b/pandora_console/include/functions_servers.php @@ -361,7 +361,7 @@ function servers_get_info ($id_server = -1) { switch ($server['server_type']) { case SERVER_TYPE_DATA: $server["img"] = html_print_image ("images/data.png", true, array ("title" => __('Data server'))); - $server["type"] = "data"; + $server["type"] = "" . $server['version']. ""; $id_modulo = 1; break; case SERVER_TYPE_NETWORK: From a0eb5728f7df63037e980498d8e04441693fcc44 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 28 Jan 2015 10:34:41 +0100 Subject: [PATCH 11/13] Fixed problem with previous commit --- pandora_console/godmode/servers/servers.build_table.php | 7 ++++++- pandora_console/include/functions_servers.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index ab5b40f2a4..f3ac17c7c2 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -82,7 +82,12 @@ foreach ($servers as $server) { } // Type - $data[2] = ''.$server["img"].' ('.ucfirst($server["type"]).")"; + if ($server['type'] == 'data'){ + $data[2] = ''.$server["img"].' (' . $server["version"]. ')'; + } + else{ + $data[2] = ''.$server["img"].' ('.ucfirst($server["type"]).")"; + } if ($server["master"] == 1) $data[2] .= ui_print_help_tip (__("This is a master server"), true); diff --git a/pandora_console/include/functions_servers.php b/pandora_console/include/functions_servers.php index 8a6e3732d7..7d67a0bf86 100644 --- a/pandora_console/include/functions_servers.php +++ b/pandora_console/include/functions_servers.php @@ -361,7 +361,7 @@ function servers_get_info ($id_server = -1) { switch ($server['server_type']) { case SERVER_TYPE_DATA: $server["img"] = html_print_image ("images/data.png", true, array ("title" => __('Data server'))); - $server["type"] = "" . $server['version']. ""; + $server["type"] = "data"; $id_modulo = 1; break; case SERVER_TYPE_NETWORK: From 56537363ae2e9ba1efeecb7897d93b4636063286 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 28 Jan 2015 11:29:05 +0100 Subject: [PATCH 12/13] Fixed problem in tree view to metaconsola, not open popup (cherry picked from commit 33bf0a4e7b455367155905d3e3033990a12c9269) --- pandora_console/include/functions_modules.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 5c757042f1..1f772319e0 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -1547,7 +1547,7 @@ function modules_get_next_data ($id_agent_module, $utimestamp = 0, $string = 0) * * @return array The module value and the timestamp */ -function modules_get_agentmodule_data ($id_agent_module, $period, $date = 0) { +function modules_get_agentmodule_data ($id_agent_module, $period, $date = 0, $trash, $conexion = false, $order = 'ASC') { $module = db_get_row('tagente_modulo', 'id_agente_modulo', $id_agent_module); @@ -1571,8 +1571,8 @@ function modules_get_agentmodule_data ($id_agent_module, $period, $date = 0) { FROM tagente_datos_string WHERE id_agente_modulo = %d AND utimestamp > %d AND utimestamp <= %d - ORDER BY utimestamp ASC", - $id_agent_module, $datelimit, $date); + ORDER BY utimestamp %s", + $id_agent_module, $datelimit, $date, $order); break; //log4x case 24: @@ -1580,20 +1580,20 @@ function modules_get_agentmodule_data ($id_agent_module, $period, $date = 0) { FROM tagente_datos_log4x WHERE id_agente_modulo = %d AND utimestamp > %d AND utimestamp <= %d - ORDER BY utimestamp ASC", - $id_agent_module, $datelimit, $date); + ORDER BY utimestamp %s", + $id_agent_module, $datelimit, $date, $order); break; default: $sql = sprintf ("SELECT datos AS data, utimestamp FROM tagente_datos WHERE id_agente_modulo = %d AND utimestamp > %d AND utimestamp <= %d - ORDER BY utimestamp ASC", - $id_agent_module, $datelimit, $date); + ORDER BY utimestamp %s", + $id_agent_module, $datelimit, $date, $order); break; } - $values = db_get_all_rows_sql ($sql, $search_in_history_db, false); + $values = db_get_all_rows_sql ($sql, $search_in_history_db, false, $conexion); if ($values === false) { return array (); @@ -2038,4 +2038,4 @@ function modules_change_relation_lock ($id_relation) { return ($result !== false ? $new_value : $old_value); } -?> \ No newline at end of file +?> From 080f98e549fc616e730f3c12315c485bd8eb37dd Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 28 Jan 2015 11:56:38 +0100 Subject: [PATCH 13/13] Fixed problem in tree view with servername containt dot, tree not expand Problem in loadSubTree in search field with id X --- pandora_console/operation/tree.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/tree.php b/pandora_console/operation/tree.php index 2daade52aa..cb781137e8 100755 --- a/pandora_console/operation/tree.php +++ b/pandora_console/operation/tree.php @@ -709,7 +709,7 @@ ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascri * id_father int use in js and ajax php, its useful when you have a two subtrees with same agent for diferent each one */ function loadSubTree(type, div_id, less_branchs, id_father, server_name) { - var id = id_father + '_' + type + '_' + server_name + '_' + div_id; + var id = id_father + '_' + type + '_' + server_name.replace('.','\\.') + '_' + div_id; var hiddenDiv = $('#tree_div' + id).attr('hiddenDiv'); var loadDiv = $('#tree_div' + id).attr('loadDiv');