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 diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 2819f4aa86..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-150126 +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 3151d0ec3e..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-150126" +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 bfb60ad661..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 => '150126'; +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 0e57532bb0..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 150126 +%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 eca0df7f5d..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 150126 +%define release 150128 Summary: Pandora FMS Linux agent, PERL version Name: %{name} @@ -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} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2dd97dded1..ea94d5436a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150126} +{150128} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f6aacebf8b..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 150126)") +#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 d807afc4ba..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 150126))" + 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 4bd5c9f315..bdf2dd8ed7 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-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 61a3677f8c..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-150126" +pandora_version="6.0dev-150128" package_pear=0 package_pandora=1 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/ajax/module.php b/pandora_console/include/ajax/module.php index 5dca8c9095..6e5e937da3 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -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); } diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 57d7068b7f..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 = 'PC150126'; +$build_version = 'PC150128'; $pandora_version = 'v6.0dev'; // Do not overwrite default timezone set if defined. 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_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 +?> 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/install.php b/pandora_console/install.php index 424f1bcec7..c217d97e7e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@