From 9a9102d0ea3ab133bb4b0b3b72e5542470c79382 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 21 Mar 2015 00:01:11 +0100 Subject: [PATCH 01/27] 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 a0ebd3e425..3e8d8340a2 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 6.0dev-150320 +Version: 6.0dev-150321 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 a9e825bc08..61ab09a24d 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-150320" +pandora_version="6.0dev-150321" 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 0e2f8b9ec1..9b647aec60 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 => '150320'; +use constant AGENT_BUILD => '150321'; # 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 154352c8a2..019ac35c87 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 150320 +%define release 150321 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 640b7dca34..c3c057cb7a 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 150320 +%define release 150321 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 e2c4d03ecd..167a038dc4 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150320} +{150321} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f0197d1766..150ec1309b 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 150320)") +#define PANDORA_VERSION ("6.0dev(Build 150321)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 0f8a4c7283..fd37a9c9a3 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 150320))" + VALUE "ProductVersion", "(6.0dev(Build 150321))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7656bfc252..4dded4bc90 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 6.0dev-150320 +Version: 6.0dev-150321 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 1df91d489c..3bef897de6 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-150320" +pandora_version="6.0dev-150321" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e162f9af8f..cf7bd4dc39 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 = 'PC150320'; +$build_version = 'PC150321'; $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 536f6c048a..bf7c5a6857 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Sun, 22 Mar 2015 00:01:09 +0100 Subject: [PATCH 02/27] 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 3e8d8340a2..925c847de1 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 6.0dev-150321 +Version: 6.0dev-150322 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 61ab09a24d..adc4c52f75 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-150321" +pandora_version="6.0dev-150322" 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 9b647aec60..a447a61b35 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 => '150321'; +use constant AGENT_BUILD => '150322'; # 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 019ac35c87..381948f85e 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 150321 +%define release 150322 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 c3c057cb7a..de05585967 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 150321 +%define release 150322 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 167a038dc4..363ea2d0ec 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150321} +{150322} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 150ec1309b..00d44afde7 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 150321)") +#define PANDORA_VERSION ("6.0dev(Build 150322)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index fd37a9c9a3..68391beab2 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 150321))" + VALUE "ProductVersion", "(6.0dev(Build 150322))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4dded4bc90..90449539fc 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 6.0dev-150321 +Version: 6.0dev-150322 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 3bef897de6..1289ead9be 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-150321" +pandora_version="6.0dev-150322" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index cf7bd4dc39..9511fa66a5 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 = 'PC150321'; +$build_version = 'PC150322'; $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 bf7c5a6857..76d24d3804 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Mon, 23 Mar 2015 00:01:10 +0100 Subject: [PATCH 03/27] 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 925c847de1..700f40fafb 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 6.0dev-150322 +Version: 6.0dev-150323 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 adc4c52f75..0a13c242d7 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-150322" +pandora_version="6.0dev-150323" 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 a447a61b35..cea7bb2e21 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 => '150322'; +use constant AGENT_BUILD => '150323'; # 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 381948f85e..351ca04542 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 150322 +%define release 150323 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 de05585967..9ecddd7845 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 150322 +%define release 150323 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 363ea2d0ec..1fb90ab4ab 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150322} +{150323} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 00d44afde7..7f7e35da3f 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 150322)") +#define PANDORA_VERSION ("6.0dev(Build 150323)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 68391beab2..5b0e2b9316 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 150322))" + VALUE "ProductVersion", "(6.0dev(Build 150323))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 90449539fc..f05172a9b9 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 6.0dev-150322 +Version: 6.0dev-150323 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 1289ead9be..c1eefd4ab9 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-150322" +pandora_version="6.0dev-150323" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9511fa66a5..29faf5572f 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 = 'PC150322'; +$build_version = 'PC150323'; $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 76d24d3804..bdc1b74cd3 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Mon, 23 Mar 2015 12:02:48 +0100 Subject: [PATCH 04/27] Fixed visual metaconsole tiquet: 2013 --- .../reporting/reporting_builder.list_items.php | 7 ++++--- .../godmode/reporting/reporting_builder.php | 11 +++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.list_items.php b/pandora_console/godmode/reporting/reporting_builder.list_items.php index a5ccab69a4..552dcf339a 100644 --- a/pandora_console/godmode/reporting/reporting_builder.list_items.php +++ b/pandora_console/godmode/reporting/reporting_builder.list_items.php @@ -436,9 +436,10 @@ if (defined("METACONSOLE")){ echo "
"; else echo "
"; - - html_print_input_hidden('ids_items_to_delete', ''); - html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); + if (check_acl ($config['id_user'], 0, "RM")) { + html_print_input_hidden('ids_items_to_delete', ''); + html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); + } echo "
"; echo ""; } diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 10269ca226..3e429d9793 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -490,8 +490,10 @@ switch ($action) { $table->head[$next] = __('Group'); $table->align[$next] = 'center'; $next++; - $table->head[$next] = '' . - __('Op.') . ''; + if(!defined('METACONSOLE')) + $table->head[$next] = '' . + __('Op.') . ''; + $table->size = array (); $table->size[$next] = '80px'; $table->style[$next] = 'text-align:center;'; @@ -570,10 +572,7 @@ switch ($action) { if ($config['id_user'] == $report['id_user'] || is_user_admin ($config["id_user"])) { $delete = true; //owner can delete } else { - $delete = check_acl($config['id_user'], - $report['id_group'], "RM") - && - users_can_manage_group_all($report["id_group"], "RM"); + $delete = false; } break; case 'group_edit': From c8e48dcbe3f5c20c24d7f6b3519b3781b2809f5f Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 23 Mar 2015 12:25:02 +0100 Subject: [PATCH 05/27] Change Visual metaconsole, simplify criteria tiquet: 2010 --- .../include/functions_reporting.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index d3f41ad895..67f4f90dd4 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -8135,25 +8135,25 @@ function reporting_get_agents_by_status ($data, $graph_width = 250, $graph_heigh $agent_data = array(); $agent_data[0] = html_print_image('images/agent_critical.png', true, array('title' => __('Agents critical'))); - $agent_data[1] = "".format_numeric($data['agent_critical']).""; + $agent_data[1] = "".$data["agent_critical"] <= 0 ? '-' : format_numeric($data['agent_critical']).""; $agent_data[2] = html_print_image('images/agent_warning.png', true, array('title' => __('Agents warning'))); - $agent_data[3] = "".format_numeric($data['agent_warning']).""; + $agent_data[3] = "".$data["agent_warning"] <= 0 ? '-' : format_numeric($data['agent_warning']).""; $table_agent->data[] = $agent_data; $agent_data = array(); $agent_data[0] = html_print_image('images/agent_ok.png', true, array('title' => __('Agents ok'))); - $agent_data[1] = "".format_numeric($data['agent_ok']).""; + $agent_data[1] = "".$data["agent_ok"] <= 0 ? '-' : format_numeric($data['agent_ok']).""; $agent_data[2] = html_print_image('images/agent_unknown.png', true, array('title' => __('Agents unknown'))); - $agent_data[3] = "".format_numeric($data['agent_unknown']).""; + $agent_data[3] = "".$data["agent_unknown"] <= 0 ? '-' : format_numeric($data['agent_unknown']).""; $table_agent->data[] = $agent_data; $agent_data = array(); $agent_data[0] = html_print_image('images/agent_notinit.png', true, array('title' => __('Agents not init'))); - $agent_data[1] = "".format_numeric($data['agent_not_init']).""; + $agent_data[1] = "".$data["agent_not_init"] <= 0 ? '-' : format_numeric($data['agent_not_init']).""; $agent_data[2] = ""; $agent_data[3] = ""; @@ -8210,7 +8210,7 @@ function reporting_get_total_servers ($num_servers) { $node_data = array(); $node_data[0] = html_print_image('images/server_export.png', true, array('title' => __('Nodes'))); - $node_data[1] = "".format_numeric($num_servers).""; + $node_data[1] = "".$num_servers <= 0 ? '-' : format_numeric($num_servers).""; $table_node->data[] = $node_data; if (!defined('METACONSOLE')){ @@ -8244,19 +8244,19 @@ function reporting_get_events ($data, $links = false) { $table_events->style[0] = "background-color:#FC4444"; $table_events->data[0][0] = html_print_image('images/module_event_critical.png', true, array('title' => __('Critical events'))); $table_events->data[0][0] .= "   " . - "" . format_numeric($data['critical']).""; + "" .$data['critical'] <= 0 ? '-' : format_numeric($data['critical']).""; $table_events->style[1] = "background-color:#FAD403"; $table_events->data[0][1] = html_print_image('images/module_event_warning.png', true, array('title' => __('Warning events'))); $table_events->data[0][1] .= "   " . - "" . format_numeric($data['warning']).""; + "" .$data['warning'] <= 0 ? '-' : format_numeric($data['warning']).""; $table_events->style[2] = "background-color:#80BA27"; $table_events->data[0][2] = html_print_image('images/module_event_ok.png', true, array('title' => __('OK events'))); $table_events->data[0][2] .= "   " . - "" . format_numeric($data['normal']).""; + "" .$data['normal'] <= 0 ? '-' : format_numeric($data['normal']).""; $table_events->style[3] = "background-color:#B2B2B2"; $table_events->data[0][3] = html_print_image('images/module_event_unknown.png', true, array('title' => __('Unknown events'))); $table_events->data[0][3] .= "   " . - "" . format_numeric($data['unknown']).""; + "" .$data['unknown'] <= 0 ? '-' : format_numeric($data['unknown']).""; } else{ $table_events->data[0][0] = html_print_image('images/module_critical.png', true, array('title' => __('Critical events'))); From af2722ac5134f8750d7bd46e4f54d340e18d45e8 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 23 Mar 2015 12:37:27 +0100 Subject: [PATCH 06/27] Change Visual metaconsole, simplify criteria tiquet: 2010 (Fixed problems php) --- .../include/functions_reporting.php | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 67f4f90dd4..920447ddd5 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -8135,25 +8135,35 @@ function reporting_get_agents_by_status ($data, $graph_width = 250, $graph_heigh $agent_data = array(); $agent_data[0] = html_print_image('images/agent_critical.png', true, array('title' => __('Agents critical'))); - $agent_data[1] = "".$data["agent_critical"] <= 0 ? '-' : format_numeric($data['agent_critical']).""; + $agent_data[1] = ""; + $agent_data[1] .= format_numeric($data["agent_critical"]) <= 0 ? '-' : format_numeric($data['agent_critical']); + $agent_data[1] .= ""; $agent_data[2] = html_print_image('images/agent_warning.png', true, array('title' => __('Agents warning'))); - $agent_data[3] = "".$data["agent_warning"] <= 0 ? '-' : format_numeric($data['agent_warning']).""; + $agent_data[3] = ""; + $agent_data[3] .= $data["agent_warning"] <= 0 ? '-' : format_numeric($data['agent_warning']); + $agent_data[3] .= ""; $table_agent->data[] = $agent_data; $agent_data = array(); $agent_data[0] = html_print_image('images/agent_ok.png', true, array('title' => __('Agents ok'))); - $agent_data[1] = "".$data["agent_ok"] <= 0 ? '-' : format_numeric($data['agent_ok']).""; + $agent_data[1] = ""; + $agent_data[1] .= $data["agent_ok"] <= 0 ? '-' : format_numeric($data['agent_ok']); + $agent_data[1] .= ""; $agent_data[2] = html_print_image('images/agent_unknown.png', true, array('title' => __('Agents unknown'))); - $agent_data[3] = "".$data["agent_unknown"] <= 0 ? '-' : format_numeric($data['agent_unknown']).""; + $agent_data[3] = ""; + $agent_data[3] .= $data["agent_unknown"] <= 0 ? '-' : format_numeric($data['agent_unknown']); + $agent_data[3] .= ""; $table_agent->data[] = $agent_data; $agent_data = array(); $agent_data[0] = html_print_image('images/agent_notinit.png', true, array('title' => __('Agents not init'))); - $agent_data[1] = "".$data["agent_not_init"] <= 0 ? '-' : format_numeric($data['agent_not_init']).""; + $agent_data[1] = ""; + $agent_data[1] .= $data["agent_not_init"] <= 0 ? '-' : format_numeric($data['agent_not_init']); + $agent_data[1] .= ""; $agent_data[2] = ""; $agent_data[3] = ""; @@ -8210,7 +8220,9 @@ function reporting_get_total_servers ($num_servers) { $node_data = array(); $node_data[0] = html_print_image('images/server_export.png', true, array('title' => __('Nodes'))); - $node_data[1] = "".$num_servers <= 0 ? '-' : format_numeric($num_servers).""; + $node_data[1] = ""; + $node_data[1] .= $num_servers <= 0 ? '-' : format_numeric($num_servers); + $node_data[1] .= ""; $table_node->data[] = $node_data; if (!defined('METACONSOLE')){ @@ -8244,19 +8256,27 @@ function reporting_get_events ($data, $links = false) { $table_events->style[0] = "background-color:#FC4444"; $table_events->data[0][0] = html_print_image('images/module_event_critical.png', true, array('title' => __('Critical events'))); $table_events->data[0][0] .= "   " . - "" .$data['critical'] <= 0 ? '-' : format_numeric($data['critical']).""; + ""; + $table_events->data[0][0] .= format_numeric($data['critical']) <= 0 ? ' -' : format_numeric($data['critical']); + $table_events->data[0][0] .= ""; $table_events->style[1] = "background-color:#FAD403"; $table_events->data[0][1] = html_print_image('images/module_event_warning.png', true, array('title' => __('Warning events'))); $table_events->data[0][1] .= "   " . - "" .$data['warning'] <= 0 ? '-' : format_numeric($data['warning']).""; + ""; + $table_events->data[0][1] .= format_numeric($data['warning']) <= 0 ? ' -' : format_numeric($data['warning']); + $table_events->data[0][1] .= ""; $table_events->style[2] = "background-color:#80BA27"; $table_events->data[0][2] = html_print_image('images/module_event_ok.png', true, array('title' => __('OK events'))); $table_events->data[0][2] .= "   " . - "" .$data['normal'] <= 0 ? '-' : format_numeric($data['normal']).""; + ""; + $table_events->data[0][2] .= format_numeric($data['normal']) <= 0 ? ' -' : format_numeric($data['normal']); + $table_events->data[0][2] .= ""; $table_events->style[3] = "background-color:#B2B2B2"; $table_events->data[0][3] = html_print_image('images/module_event_unknown.png', true, array('title' => __('Unknown events'))); $table_events->data[0][3] .= "   " . - "" .$data['unknown'] <= 0 ? '-' : format_numeric($data['unknown']).""; + ""; + $table_events->data[0][3] .=format_numeric($data['unknown']) <= 0 ? ' -' : format_numeric($data['unknown']); + $table_events->data[0][3] .=""; } else{ $table_events->data[0][0] = html_print_image('images/module_critical.png', true, array('title' => __('Critical events'))); From ca341f3a9d977c5533632f12ce569aa7137c7bff Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Mon, 23 Mar 2015 12:54:25 +0100 Subject: [PATCH 07/27] Delete validated events from tmetaconsole_event_history. (cherry picked from commit cfa87d834173287aa1ce58bfaf476beafeb342e8) --- pandora_server/util/pandora_db.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a8b3bb211b..89315cbdb6 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -213,6 +213,20 @@ sub pandora_purgedb ($$) { usleep (10000); } log_message ('', "\n"); + + log_message ('PURGE', "Deleting validated events from tmetaconsole_event_history.", ''); + $events_to_delete = get_db_value ($dbh, "SELECT COUNT(*) FROM tmetaconsole_event_history WHERE estado = 1"); + while($events_to_delete > 0) { + db_do($dbh, "DELETE FROM tmetaconsole_event_history WHERE estado = 1 LIMIT ?", $BIG_OPERATION_STEP); + $events_to_delete = $events_to_delete - $BIG_OPERATION_STEP; + + # Mark the progress + log_message ('', "."); + + # Do not overload the MySQL server + usleep (10000); + } + log_message ('', "\n"); } else { log_message ('PURGE', 'event_purge is set to 0. Old events will not be deleted.'); From 03c961f239d91ee95f2e9d805389ab4690fa29c3 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 23 Mar 2015 13:38:59 +0100 Subject: [PATCH 08/27] Change Visual metaconsole, simplify criteria tiquet: 2010 (Fixed problems php) --- pandora_console/include/functions_reporting.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 920447ddd5..102834680e 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -1476,25 +1476,25 @@ function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_he $tdata[2] = html_print_image('images/module_warning.png', true, array('title' => __('Monitor warning'))); $tdata[3] = $data["monitor_warning"] <= 0 ? '-' : $data["monitor_warning"]; - $tdata[3] = '' . $tdata[3] . ''; + $tdata[3] .= '' . $tdata[3] . ''; $table_mbs->rowclass[] = ''; $table_mbs->data[] = $tdata; $tdata = array(); $tdata[0] = html_print_image('images/module_ok.png', true, array('title' => __('Monitor normal'))); $tdata[1] = $data["monitor_ok"] <= 0 ? '-' : $data["monitor_ok"]; - $tdata[1] = '' . $tdata[1] . ''; + $tdata[1] .= '' . $tdata[1] . ''; $tdata[2] = html_print_image('images/module_unknown.png', true, array('title' => __('Monitor unknown'))); $tdata[3] = $data["monitor_unknown"] <= 0 ? '-' : $data["monitor_unknown"]; - $tdata[3] = '' . $tdata[3] . ''; + $tdata[3] .= '' . $tdata[3] . ''; $table_mbs->rowclass[] = ''; $table_mbs->data[] = $tdata; $tdata = array(); $tdata[0] = html_print_image('images/module_notinit.png', true, array('title' => __('Monitor not init'))); $tdata[1] = $data["monitor_not_init"] <= 0 ? '-' : $data["monitor_not_init"]; - $tdata[1] = '' . $tdata[1] . ''; + $tdata[1] .= '' . $tdata[1] . ''; $tdata[2] = $tdata[3] = ''; $table_mbs->rowclass[] = ''; From da659a1e84ac69deba151c992dcbb3d6ccd0fc2c Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 23 Mar 2015 13:48:12 +0100 Subject: [PATCH 09/27] Fixed problems with visual in metaconsole --- pandora_console/include/functions_reporting.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 102834680e..920447ddd5 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -1476,25 +1476,25 @@ function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_he $tdata[2] = html_print_image('images/module_warning.png', true, array('title' => __('Monitor warning'))); $tdata[3] = $data["monitor_warning"] <= 0 ? '-' : $data["monitor_warning"]; - $tdata[3] .= '' . $tdata[3] . ''; + $tdata[3] = '' . $tdata[3] . ''; $table_mbs->rowclass[] = ''; $table_mbs->data[] = $tdata; $tdata = array(); $tdata[0] = html_print_image('images/module_ok.png', true, array('title' => __('Monitor normal'))); $tdata[1] = $data["monitor_ok"] <= 0 ? '-' : $data["monitor_ok"]; - $tdata[1] .= '' . $tdata[1] . ''; + $tdata[1] = '' . $tdata[1] . ''; $tdata[2] = html_print_image('images/module_unknown.png', true, array('title' => __('Monitor unknown'))); $tdata[3] = $data["monitor_unknown"] <= 0 ? '-' : $data["monitor_unknown"]; - $tdata[3] .= '' . $tdata[3] . ''; + $tdata[3] = '' . $tdata[3] . ''; $table_mbs->rowclass[] = ''; $table_mbs->data[] = $tdata; $tdata = array(); $tdata[0] = html_print_image('images/module_notinit.png', true, array('title' => __('Monitor not init'))); $tdata[1] = $data["monitor_not_init"] <= 0 ? '-' : $data["monitor_not_init"]; - $tdata[1] .= '' . $tdata[1] . ''; + $tdata[1] = '' . $tdata[1] . ''; $tdata[2] = $tdata[3] = ''; $table_mbs->rowclass[] = ''; From 5f32d18f06e1a4dce285539c829e13c0a19dd211 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 23 Mar 2015 14:02:22 +0100 Subject: [PATCH 10/27] Not show correct color in histogram, tiquet: #2008 --- pandora_console/include/functions_reporting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 920447ddd5..83b80b75f2 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -8412,8 +8412,8 @@ function reporting_get_event_histogram ($events) { $colors = array( EVENT_CRIT_MAINTENANCE => COL_MAINTENANCE, EVENT_CRIT_INFORMATIONAL => COL_INFORMATIONAL, - EVENT_CRIT_NORMAL => COL_MINOR, - EVENT_CRIT_MINOR => COL_NORMAL, + EVENT_CRIT_NORMAL => COL_NORMAL, + EVENT_CRIT_MINOR => COL_MINOR, EVENT_CRIT_WARNING => COL_WARNING, EVENT_CRIT_MAJOR => COL_MAJOR, EVENT_CRIT_CRITICAL => COL_CRITICAL From 4d70cdd24a12898b98473a10fcef388e6480d3be Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 23 Mar 2015 14:12:19 +0100 Subject: [PATCH 11/27] Fixed the view of list event filters with a user is setted strict_acl. #2017 --- pandora_console/godmode/events/event_filter.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/events/event_filter.php b/pandora_console/godmode/events/event_filter.php index ad3c544c9e..fc04fbecef 100644 --- a/pandora_console/godmode/events/event_filter.php +++ b/pandora_console/godmode/events/event_filter.php @@ -74,11 +74,23 @@ if ($multiple_delete) { __('Not deleted. Error deleting data')); } +$strict_acl = db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']); + $own_info = get_user_info ($config['id_user']); // Get group list that user has access -$groups_user = users_get_groups ($config['id_user'], "EW", users_can_manage_group_all(), true); +if ($strict_acl) { + $groups_user = users_get_strict_mode_groups($config['id_user'], + users_can_manage_group_all()); +} +else { + $groups_user = users_get_groups ($config['id_user'], "EW", + users_can_manage_group_all(), true); +} -$sql = "SELECT * FROM tevent_filter WHERE id_group_filter IN (".implode(',', array_keys ($groups_user)).")"; +$sql = " + SELECT * + FROM tevent_filter + WHERE id_group_filter IN (".implode(',', array_keys ($groups_user)).")"; $filters = db_get_all_rows_sql($sql); if ($filters === false) From 118b980f4eef6611178d6d20310a3123edc17418 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 23 Mar 2015 14:17:06 +0100 Subject: [PATCH 12/27] Fixed the view of list event filters with a user is setted strict_acl. #2017 --- pandora_console/include/functions_events.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 6a0b141eac..df0677d324 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1580,14 +1580,27 @@ function events_get_event_filter ($id_filter, $filter = false, $fields = false) * @param boolean If event filters are used for manage/view operations (non admin users can see group ALL for manage) # Fix * @return array A event filter matching id and filter or false. */ -function events_get_event_filter_select($manage = true){ +function events_get_event_filter_select($manage = true) { global $config; - $user_groups = users_get_groups ($config['id_user'], "EW", $manage, true); + $strict_acl = db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']); + + if ($strict_acl) { + $user_groups = users_get_strict_mode_groups($config['id_user'], + users_can_manage_group_all()); + } + else { + $user_groups = users_get_groups ($config['id_user'], "EW", + users_can_manage_group_all(), true); + } + if(empty($user_groups)) { return array(); } - $sql = "SELECT id_filter, id_name FROM tevent_filter WHERE id_group IN (".implode(',', array_keys ($user_groups)).")"; + $sql = " + SELECT id_filter, id_name + FROM tevent_filter + WHERE id_group IN (" . implode(',', array_keys ($user_groups)) . ")"; $event_filters = db_get_all_rows_sql($sql); From 7360171bd7a90cd3e04167595e056647c898d082 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Wed, 18 Mar 2015 20:28:55 +0100 Subject: [PATCH 13/27] Adapted the functions to work with the metaconsole (cherry picked from commit 567b5125bdc4a1407c5ae4709a2301455bcbb9ee) --- pandora_console/include/functions_graph.php | 143 +++++++++++--------- 1 file changed, 80 insertions(+), 63 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index c6b005a2ab..9c259451ac 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -804,26 +804,26 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events, $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png"); + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); if ($compare === 'separated') { return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend, - $long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl, - $water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl, + $long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", $unit, $homeurl, $water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl, $series_type, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str, $menu, $backgroundColor). '
'. area_graph($flash_chart, $chart_prev, $width, $height/2, $color_prev, $legend_prev, - $long_index_prev, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl, - $water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl, + $long_index_prev, ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", $unit, $homeurl, $water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl, $series_type_prev, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str, $menu, $backgroundColor); } else { // Color commented not to restrict serie colors return area_graph($flash_chart, $chart, $width, $height, $color, $legend, - $long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl, - $water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl, + $long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", $unit, $homeurl, $water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl, $series_type, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str, $menu, $backgroundColor); } @@ -1320,7 +1320,7 @@ function graphic_combined_module ($module_list, $weight_list, $period, $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); //Work around for fixed the agents name with huge size chars. @@ -1365,8 +1365,8 @@ function graphic_combined_module ($module_list, $weight_list, $period, case CUSTOM_GRAPH_AREA: return area_graph($flash_charts, $graph_values, $width, $height, $color, $module_name_list, $long_index, - ui_get_full_url("images/image_problem.opaque.png"), "", - "", $homeurl, $water_mark, $config['fontpath'], + ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", "", $homeurl, $water_mark, $config['fontpath'], $fixed_font_size, "", $ttl, array(), array(), 0, 0, '', false, '', true, $background_color); break; @@ -1374,22 +1374,22 @@ function graphic_combined_module ($module_list, $weight_list, $period, case CUSTOM_GRAPH_STACKED_AREA: return stacked_area_graph($flash_charts, $graph_values, $width, $height, $color, $module_name_list, $long_index, - ui_get_full_url("images/image_problem.opaque.png"), "", - "", $water_mark, $config['fontpath'], $fixed_font_size, + ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", "", $water_mark, $config['fontpath'], $fixed_font_size, "", $ttl, $homeurl, $background_color); break; case CUSTOM_GRAPH_LINE: return line_graph($flash_charts, $graph_values, $width, $height, $color, $module_name_list, $long_index, - ui_get_full_url("images/image_problem.opaque.png"), "", - "", $water_mark, $config['fontpath'], $fixed_font_size, + ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", "", $water_mark, $config['fontpath'], $fixed_font_size, "", $ttl, $homeurl, $background_color); break; case CUSTOM_GRAPH_STACKED_LINE: return stacked_line_graph($flash_charts, $graph_values, $width, $height, $color, $module_name_list, $long_index, - ui_get_full_url("images/image_problem.opaque.png"), "", - "", $water_mark, $config['fontpath'], $fixed_font_size, + ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", "", $water_mark, $config['fontpath'], $fixed_font_size, "", $ttl, $homeurl, $background_color); break; } @@ -1455,15 +1455,15 @@ function graphic_agentaccess ($id_agent, $width, $height, $period = 0, $return = } $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); if ($empty_data) { $out = graph_nodata_image($width, $height); } else { - $out = area_graph($config['flash_charts'], $data, $width, $height, - null, null, null, ui_get_full_url("images/image_problem.opaque.png"), "", "", ui_get_full_url(false, false, false, false), - $water_mark, + $out = area_graph($config['flash_charts'], $data, $width, $height, null, null, null, + ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", "", ui_get_full_url(false, false, false, false), $water_mark, $config['fontpath'], $config['font_size'], "", 1, array(), array(), 0, 0, '', false, '', false); } @@ -1553,7 +1553,7 @@ function graph_agent_status ($id_agent = false, $width = 300, $height = 200, $re array_walk($data, 'truncate_negatives'); $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); $colors = array(COL_CRITICAL, COL_WARNING, COL_NORMAL, COL_UNKNOWN); @@ -1566,8 +1566,8 @@ function graph_agent_status ($id_agent = false, $width = 300, $height = 200, $re } $out = pie2d_graph($config['flash_charts'], $data, $width, $height, - __("other"), - ui_get_full_url(false), '', $config['fontpath'], $config['font_size'], 1, "hidden", $colors); + __("other"), ui_get_full_url(false, false, false, false), '', + $config['fontpath'], $config['font_size'], 1, "hidden", $colors); if ($return) { return $out; @@ -1635,11 +1635,10 @@ function graph_event_module ($width = 300, $height = 200, $id_agent) { } $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); return pie3d_graph($config['flash_charts'], $data, $width, $height, __("other"), - '', $water_mark, - $config['fontpath'], $config['font_size'], 1, "bottom"); + '', $water_mark, $config['fontpath'], $config['font_size'], 1, "bottom"); } function progress_bar($progress, $width, $height, $title = '', $mode = 1, $value_text = false, $color = false, $options = false) { @@ -1736,8 +1735,7 @@ function graph_sla_slicebar ($id, $period, $sla_min, $sla_max, $date, $daysWeek 5 => COL_NOTINIT); return slicesbar_graph($data, $period, $width, $height, $colors, - $config['fontpath'], - $round_corner, $home_url, $ttl); + $config['fontpath'], $round_corner, $home_url, $ttl); } /** @@ -1947,7 +1945,7 @@ function grafico_db_agentes_purge ($id_agent, $width = 380, $height = 300) { $water_mark = array( 'file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png") + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false) ); return pie3d_graph($config['flash_charts'], $data, $width, $height, @@ -1979,11 +1977,10 @@ function grafico_db_agentes_paquetes($width = 380, $height = 300) { } $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); return hbar_graph($config['flash_charts'], $data, $width, $height, array(), - $legend, "", "", true, "", - $water_mark, + $legend, "", "", true, "", $water_mark, $config['fontpath'], $config['font_size'], false); } @@ -2040,8 +2037,8 @@ function graph_db_agentes_modulos($width, $height) { } $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); - + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); + return hbar_graph($config['flash_charts'], $data, $width, $height, array(), array(), "", "", true, "", @@ -2087,8 +2084,11 @@ function graphic_user_activity ($width = 350, $height = 230) { $data[$login['id_usuario']] = $login['n_incidents']; } + $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); + return pie3d_graph($config['flash_charts'], $data, $width, $height, - __('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png", + __('Other'), '', $water_mark, $config['fontpath'], $config['font_size']); } @@ -2122,8 +2122,11 @@ function grafico_incidente_prioridad () { __('Very serious') => $data_tmp[4], __('Maintenance') => $data_tmp[5]); + $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); + return pie3d_graph($config['flash_charts'], $data, 320, 200, - __('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png", + __('Other'), '', $water_mark, $config['fontpath'], $config['font_size']); } @@ -2157,8 +2160,11 @@ function graph_incidents_status () { $data[__("Invalid")]++; } + $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); + return pie3d_graph($config['flash_charts'], $data, 370, 180, - __('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png", + __('Other'), '', $water_mark, $config['fontpath'], $config['font_size']); } @@ -2195,8 +2201,11 @@ function graphic_incident_group () { $data[__('All')] = $incidents_all; } + $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); + return pie3d_graph($config['flash_charts'], $data, 320, 200, - __('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png", + __('Other'), '', $water_mark, $config['fontpath'], $config['font_size']); } @@ -2234,8 +2243,11 @@ function graphic_incident_user () { $data[$name] = $incident['n_incidents']; } + $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); + return pie3d_graph($config['flash_charts'], $data, 320, 200, - __('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png", + __('Other'), '', $water_mark, $config['fontpath'], $config['font_size']); } @@ -2282,8 +2294,11 @@ function graphic_incident_source($width = 320, $height = 200) { $data[$origin['origen']] = $origin['n_incident']; } + $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); + return pie3d_graph($config['flash_charts'], $data, $width, $height, - __('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png", + __('Other'), '', $water_mark, $config['fontpath'], $config['font_size']); } @@ -2305,7 +2320,7 @@ function graph_events_validated($width = 300, $height = 200, $url = "", $meta = } $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false, false)); + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); echo pie3d_graph( true, $data_graph, $width, $height, __("other"), "", @@ -2446,7 +2461,7 @@ function grafico_eventos_grupo ($width = 300, $height = 200, $url = "", $meta = arsort($data); $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false, false)); + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); return pie3d_graph($config['flash_charts'], $data, $width, $height, __('Other'), '', $water_mark, @@ -2518,7 +2533,7 @@ function grafico_eventos_total($filter = "", $width = 320, $height = 200) { $water_mark = array( 'file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("/images/logo_vertical_water.png", false, false, false)); return pie3d_graph($config['flash_charts'], $data, $width, $height, __('Other'), '', $water_mark, @@ -2574,7 +2589,7 @@ function grafico_eventos_usuario ($width, $height) { $water_mark = array( 'file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("/images/logo_vertical_water.png", false, false, false)); return pie3d_graph($config['flash_charts'], $data, $width, $height, __('Other'), '', $water_mark, @@ -2654,19 +2669,17 @@ function graph_custom_sql_graph ($id, $width, $height, $type = 'sql_graph_vbar', } $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("/images/logo_vertical_water.png", false, false, false)); switch ($type) { case 'sql_graph_vbar': // vertical bar return vbar_graph($flash_charts, $data, $width, $height, array(), - array(), "", "", $homeurl, - $water_mark, + array(), "", "", $homeurl, $water_mark, $config['fontpath'], $config['font_size'], false, $ttl); break; case 'sql_graph_hbar': // horizontal bar return hbar_graph($flash_charts, $data, $width, $height, array(), - array(), "", "", true, $homeurl, - $water_mark, + array(), "", "", true, $homeurl, $water_mark, $config['fontpath'], $config['font_size'], false, $ttl); break; case 'sql_graph_pie': // Pie @@ -3246,25 +3259,25 @@ function grafico_modulo_boolean ($agent_module_id, $period, $show_events, } $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("/images/logo_vertical_water.png", false, false, false)); if ($compare === 'separated') { return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend, - $long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl, - $water_mark, + $long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", $unit, $homeurl, $water_mark, $config['fontpath'], $config['font_size'], $unit, 1, $series_type, $chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str, $menu). '
'. area_graph($flash_chart, $chart_prev, $width, $height/2, $color_prev, $legend_prev, - $long_index_prev, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl, - $water_mark, + $long_index_prev, ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", $unit, $homeurl, $water_mark, $config['fontpath'], $config['font_size'], $unit, 1, $series_type_prev, $chart_extra_data_prev, 0, 0, $adapt_key, false, $series_suffix_str, $menu); } else { return area_graph($flash_chart, $chart, $width, $height, $color, $legend, - $long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl, - $water_mark, + $long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", $unit, $homeurl, $water_mark, $config['fontpath'], $config['font_size'], $unit, 1, $series_type, $chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str, $menu); } @@ -3337,11 +3350,12 @@ function graph_netflow_aggregate_area ($data, $period, $width, $height, $unit = } $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); return area_graph($flash_chart, $chart, $width, $height, array (), $sources, - array (), "images/image_problem.opaque.png", "", $unit, $homeurl, + array (), ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", $unit, $homeurl, $config['homedir'] . "/images/logo_vertical_water.png", $config['fontpath'], $config['font_size'], $unit, 2); } @@ -3415,12 +3429,12 @@ function graph_netflow_total_area ($data, $period, $width, $height, $unit = '', } $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); $legend = array (__('Max.') . ' ' . format_numeric($max) . ' ' . __('Min.') . ' ' . format_numeric($min) . ' ' . __('Avg.') . ' ' . format_numeric ($avg)); return area_graph($flash_chart, $chart, $width, $height, array (), $legend, - array (), ui_get_full_url("images/image_problem.opaque.png"), "", "", $homeurl, - $water_mark, + array (), ui_get_full_url("images/image_problem.opaque.png", false, false, false), + "", "", $homeurl, $water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl); } @@ -3454,8 +3468,11 @@ function graph_netflow_aggregate_pie ($data, $aggregate, $ttl = 1, $only_image = $flash_chart = false; } + $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); + return pie3d_graph($flash_chart, $values, 370, 200, - __('Other'), $config['homeurl'], $config['homedir'] . "/images/logo_vertical_water.png", + __('Other'), $config['homeurl'], $water_mark, $config['fontpath'], $config['font_size'], $ttl); } @@ -3762,7 +3779,7 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events, } $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png")); + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); return area_graph($flash_chart, $chart, $width, $height, $color, $legend, array(), '', "", $unit, $homeurl, From 581d5e9c5f9140ae19cfae7d959ff8fe39c9638b Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 23 Mar 2015 14:48:27 +0100 Subject: [PATCH 14/27] Fixed list of data in report when user have strict_acl, tiquet: #2014 --- pandora_console/godmode/reporting/reporting_builder.php | 2 +- pandora_console/include/functions_reports.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 3e429d9793..23337e8496 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -451,7 +451,7 @@ switch ($action) { $reports = reports_get_reports ($filter, array ('name', 'id_report', 'description', 'private', - 'id_user', 'id_group', 'non_interactive'), $return_all_group, 'RR', $group); + 'id_user', 'id_group', 'non_interactive'), $return_all_group, 'RR', $group, $strict_user); $table->width = '0px'; if (sizeof ($reports)) { diff --git a/pandora_console/include/functions_reports.php b/pandora_console/include/functions_reports.php index 62b1c924c5..6cf27fc0af 100644 --- a/pandora_console/include/functions_reports.php +++ b/pandora_console/include/functions_reports.php @@ -82,7 +82,7 @@ function reports_get_report ($id_report, $filter = false, $fields = false) { * * @return array An array with all the reports the user can view. */ -function reports_get_reports ($filter = false, $fields = false, $returnAllGroup = true, $privileges = 'RR', $group = false) { +function reports_get_reports ($filter = false, $fields = false, $returnAllGroup = true, $privileges = 'RR', $group = false, $strict_user) { global $config; if (! is_array ($filter)) @@ -110,6 +110,8 @@ function reports_get_reports ($filter = false, $fields = false, $returnAllGroup else { //Recheck in all reports if the user have permissions to see each report. $groups = users_get_groups ($config['id_user'], $privileges, $returnAllGroup); + if ($strict_user) + $groups = users_get_strict_mode_groups ($config['id_user'], $returnAllGroup) } foreach ($all_reports as $report) { From 57d9c66b78fb19b05a98c9a11d562ef6bab724ee Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 23 Mar 2015 14:50:43 +0100 Subject: [PATCH 15/27] Fixed error php --- pandora_console/include/functions_reports.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_reports.php b/pandora_console/include/functions_reports.php index 6cf27fc0af..083d60f195 100644 --- a/pandora_console/include/functions_reports.php +++ b/pandora_console/include/functions_reports.php @@ -111,7 +111,7 @@ function reports_get_reports ($filter = false, $fields = false, $returnAllGroup //Recheck in all reports if the user have permissions to see each report. $groups = users_get_groups ($config['id_user'], $privileges, $returnAllGroup); if ($strict_user) - $groups = users_get_strict_mode_groups ($config['id_user'], $returnAllGroup) + $groups = users_get_strict_mode_groups ($config['id_user'], $returnAllGroup); } foreach ($all_reports as $report) { From bac907638fc52fe8c2bcb3852f6e39cc9fd3be6c Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 23 Mar 2015 15:42:12 +0100 Subject: [PATCH 16/27] Fixed the list of custom fields in the fields event form editor after the update. --- pandora_console/godmode/events/custom_events.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/events/custom_events.php b/pandora_console/godmode/events/custom_events.php index 2ce631dd61..e0cceddebc 100644 --- a/pandora_console/godmode/events/custom_events.php +++ b/pandora_console/godmode/events/custom_events.php @@ -28,10 +28,6 @@ if (! check_acl($config['id_user'], 0, "EW")) { $update = get_parameter('upd_button', ''); $default = (int) get_parameter('default', 0); -$fields_selected = array(); -$event_fields = ''; -$fields_selected = explode (',', $config['event_fields']); - if ($default != 0) { $event_fields = io_safe_input('evento,id_agente,estado,timestamp'); $fields_selected = explode (',', $event_fields); @@ -52,9 +48,15 @@ else if ($update != '') { 'value' => $event_fields ); //update 'event_fields' in tconfig table to keep the value at update. - $result = db_process_sql_update('tconfig', $values, array ('token' => 'event_fields')); + $result = db_process_sql_update('tconfig', $values, + array ('token' => 'event_fields')); + $config['event_fields'] = $event_fields; } +$fields_selected = array(); +$event_fields = ''; +$fields_selected = explode (',', $config['event_fields']); + $result_selected = array(); //show list of fields selected. From 97c39b5e12e1b82cbd7405d0ce32212986edee22 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 23 Mar 2015 16:14:17 +0100 Subject: [PATCH 17/27] Fixed problems when save a variable in visual setup and save text. Tiquet: #2002 --- pandora_console/include/functions_config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 0e1fea5819..b27bb5eddc 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -421,7 +421,7 @@ function config_update_config () { $error_update[] = __('Login background'); if (!config_update_value ('vc_refr', get_parameter('vc_refr'))) $error_update[] = __('Default interval for refresh on Visual Console'); - if (!config_update_value ('vc_line_thickness', get_parameter('vc_line_thickness'))) + if (!config_update_value ('vc_line_thickness', (int) get_parameter('vc_line_thickness'))) $error_update[] = __('Default line thickness for the Visual Console'); if (!config_update_value ('agent_size_text_small', get_parameter('agent_size_text_small'))) $error_update[] = __('Agent size text'); @@ -455,7 +455,7 @@ function config_update_config () { $error_update[] = __('Shortened module graph data'); if (!config_update_value ('show_group_name', get_parameter('show_group_name'))) $error_update[] = __('Show the group name instead the group icon.'); - if (!config_update_value ('custom_graph_widht', get_parameter('custom_graph_widht'))) + if (!config_update_value ('custom_graph_widht', (int) get_parameter('custom_graph_widht', 1))) $error_update[] = __('Default line thickness for the Custom Graph.'); From 75dbb4dcb9ffd4bb46603c29d7750ba197caf08a Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 23 Mar 2015 17:28:38 +0100 Subject: [PATCH 18/27] Changed visual of metaconsole --- pandora_console/operation/events/events_list.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 921f396163..5c26c0baae 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -334,7 +334,7 @@ if(!defined("METACONSOLE")) true, true, true, '', false, 'width: 120px; height: 70px;') . '
'; else $data[0] = html_print_select ($tags_select_with, 'select_with', '', '', '', 0, - true, true, true, '', false, 'width: 250px; height: 70px;') . '
'; + true, true, true, '', false, 'width: auto; height: 70px;') . '
'; $data[1] = html_print_image('images/darrowright.png', true, array('id' => 'button-add_with', 'style' => 'cursor: pointer;', 'title' => __('Add'))); $data[1] .= html_print_input_hidden('tag_with', $tag_with_base64, true); $data[1] .= '

' . html_print_image('images/darrowleft.png', true, array('id' => 'button-remove_with', 'style' => 'cursor: pointer;', 'title' => __('Remove'))); @@ -343,7 +343,7 @@ if(!defined("METACONSOLE")) 0, true, true, true, '', false, "width: 120px; height: 70px;"); else $data[2] = html_print_select ($tag_with_temp, 'tag_with_temp', array(), '', '', - 0, true, true, true, '', false, "width: 250px; height: 70px;"); + 0, true, true, true, '', false, "width: auto; height: 70px;"); $tabletags_with->data[] = $data; $tabletags_with->rowclass[] = ''; @@ -368,7 +368,7 @@ if(!defined("METACONSOLE")) true, true, true, '', false, 'width: 120px; height: 70px;') . '
'; else $data[0] = html_print_select ($tags_select_without, 'select_without', '', '', '', 0, - true, true, true, '', false, 'width: 250px; height: 70px;') . '
'; + true, true, true, '', false, 'width: auto; height: 70px;') . '
'; $data[1] = html_print_image('images/darrowright.png', true, array('id' => 'button-add_without', 'style' => 'cursor: pointer;', 'title' => __('Add'))); $data[1] .= html_print_input_hidden('tag_without', $tag_without_base64, true); @@ -379,7 +379,7 @@ if(!defined("METACONSOLE")) 0, true, true, true, '', false, "width: 120px; height: 70px;"); else $data[2] = html_print_select ($tag_without_temp, 'tag_without_temp', array(), '', '', - 0, true, true, true, '', false, "width: 250px; height: 70px;"); + 0, true, true, true, '', false, "width: auto; height: 70px;"); $tabletags_without->data[] = $data; $tabletags_without->rowclass[] = ''; From b4e74e8502df222c423df6e281414f37b2d81104 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 23 Mar 2015 19:16:42 +0100 Subject: [PATCH 19/27] Fixed the insert duplicate event filter. --- pandora_console/operation/events/events_list.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 5c26c0baae..071bc3c1ce 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -82,13 +82,21 @@ if (is_ajax()) { $values['filter_only_alert'] = get_parameter('filter_only_alert'); $values['id_group_filter'] = get_parameter('id_group_filter'); - $result = db_process_sql_insert('tevent_filter', $values); + $exists = (bool)db_get_value_filter( + 'id_filter', 'tevent_filter', $values); - if ($result === false) { + if ($exists) { echo 'error'; } else { - echo $result; + $result = db_process_sql_insert('tevent_filter', $values); + + if ($result === false) { + echo 'error'; + } + else { + echo $result; + } } } From 2a832e57581df97e37ddb9350059ae049c9219d9 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 23 Mar 2015 19:18:00 +0100 Subject: [PATCH 20/27] Fixed the querys with the string '0'. --- pandora_console/include/db/mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index fc1e3804d8..fd904bb0ad 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -548,7 +548,7 @@ function mysql_db_format_array_where_clause_sql ($values, $join = 'AND', $prefix $query .= sprintf ('%s IN ("%s")', $field, implode ('", "', $value)); } else { - if (empty($value)) { + if ($value === "") { //Search empty string $query .= sprintf ("%s = ''", $field); } From 7b2f02571cfe2bea8508f8cea935abfb46305f5e Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 23 Mar 2015 19:51:59 +0100 Subject: [PATCH 21/27] Now the metaconsole can show the graphs of their nodes --- .../operation/agentes/stat_win.php | 79 ++++++++++--------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 2cee1df4bf..2e231cf992 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -21,32 +21,32 @@ if (! isset($_SESSION['id_usuario'])) { // Global & session management require_once ('../../include/config.php'); -require_once ('../../include/auth/mysql.php'); +require_once ($config['homedir'] . '/include/auth/mysql.php'); require_once ($config['homedir'] . '/include/functions.php'); require_once ($config['homedir'] . '/include/functions_db.php'); require_once ($config['homedir'] . '/include/functions_reporting.php'); require_once ($config['homedir'] . '/include/functions_graph.php'); require_once ($config['homedir'] . '/include/functions_modules.php'); - -// Hash login process -if (! isset ($config['id_user']) && get_parameter("loginhash", 0)) { - $loginhash_data = get_parameter("loginhash_data", ""); - $loginhash_user = str_rot13(get_parameter("loginhash_user", "")); - - if ($config["loginhash_pwd"] != "" - && $loginhash_data == md5($loginhash_user.io_output_password($config["loginhash_pwd"]))) { - - db_logon ($loginhash_user, $_SERVER['REMOTE_ADDR']); - $_SESSION['id_usuario'] = $loginhash_user; - $config["id_user"] = $loginhash_user; - - $hash_connection_data = true; - } - -} +require_once ($config['homedir'] . '/include/functions_agents.php'); check_login (); +// Metaconsole connection to the node +$server_id = (int) get_parameter("server"); +if ($config["metaconsole"] && !empty($server_id)) { + $server = metaconsole_get_connection_by_id($server_id); + + // Error connecting + if (metaconsole_connect($server) !== NOERR) { + echo ""; + echo ""; + ui_print_error_message(__('There was a problem connecting with the node')); + echo ""; + echo ""; + exit; + } +} + $user_language = get_user_language ($config['id_user']); if (file_exists ('../../include/languages/'.$user_language.'.mo')) { $l10n = new gettext_reader (new CachedFileReader ('../../include/languages/'.$user_language.'.mo')); @@ -100,15 +100,28 @@ $label = base64_decode(get_parameter('label', '')); '; - $params['body_text'] .= html_print_input_hidden ("id", $id, true); - $params['body_text'] .= html_print_input_hidden ("label", $label); - - if (isset($hash_connection_data)) { - $params['body_text'] .= - html_print_input_hidden("loginhash", "auto", true); - $params['body_text'] .= - html_print_input_hidden("loginhash_data", $loginhash_data, true); - $params['body_text'] .= - html_print_input_hidden("loginhash_user", - str_rot13($loginhash_user), true); - } - $params['body_text'] .= html_print_input_hidden ("id", $id, true); $params['body_text'] .= html_print_input_hidden ("label", $label, true); + if (!empty($server_id)) + $params['body_text'] .= html_print_input_hidden ("server", $server_id, true); + if (isset($_GET["type"])) { $type = get_parameter_get ("type"); $params['body_text'] .= html_print_input_hidden ("type", $type, true); From 9b9a3797cdf6a3dc9a7ea0722ff8db05fc0316c9 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 23 Mar 2015 20:05:07 +0100 Subject: [PATCH 22/27] Added support to show the module graphs through the metaconsole --- .../operation/agentes/status_monitor.php | 50 ++++++++----------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index a8fe0b621d..21b44a71a7 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -893,6 +893,7 @@ else { foreach ($result_server as $result_element_key => $result_element_value) { + $result_server[$result_element_key]['server_id'] = $server["id"]; $result_server[$result_element_key]['server_name'] = $server["server_name"]; $result_server[$result_element_key]['server_url'] = $server["server_url"]."/"; $result_server[$result_element_key]['hashdata'] = $hashdata; @@ -1200,35 +1201,28 @@ foreach ($result as $row) { $graph_type = return_graphtype ($row["module_type"]); - $nombre_tipo_modulo = modules_get_moduletype_name ($row["module_type"]); - $handle = "stat".$nombre_tipo_modulo."_".$row["id_agente_modulo"]; - $url = 'include/procesos.php?agente='.$row["id_agente_modulo"]; - $win_handle=dechex(crc32($row["id_agente_modulo"].$row["module_name"])); + $url = "operation/agentes/stat_win.php"; + $handle = dechex(crc32($row["id_agente_modulo"].$row["module_name"])); + $win_handle = "day_$handle"; - if (defined('METACONSOLE')) - $link ="winopeng('" . - $row['server_url'] . "operation/agentes/stat_win.php?" . - "type=$graph_type&" . - "period=" . SECONDS_1DAY . "&" . - "loginhash=auto&" . - "loginhash_data=" . $row["hashdata"] . "&" . - "loginhash_user=" . str_rot13($row["user"]) . "&" . - "id=" . $row["id_agente_modulo"] . "&" . - "label=" . rawurlencode( - urlencode( - base64_encode($row["module_name"]))) . "&" . - "avg_only=1&" . - "refresh=" . SECONDS_10MINUTES . "', 'day_".$win_handle."')"; - else - $link ="winopeng('" . - "operation/agentes/stat_win.php?" . - "type=$graph_type&" . - "period=" . SECONDS_1DAY . "&" . - "id=".$row["id_agente_modulo"]."&" . - "label=" . rawurlencode( - urlencode( - base64_encode($row["module_name"]))) . "&" . - "refresh=" . SECONDS_10MINUTES . "', 'day_".$win_handle."')"; + $graph_params = array( + "type" => $graph_type, + "period" => SECONDS_1DAY, + "id" => $row["id_agente_modulo"], + "label" => rawurlencode(urlencode(base64_encode($row["module_name"]))), + "refresh" => SECONDS_10MINUTES + ); + + if (defined('METACONSOLE') && isset($row["server_id"])) { + // Force the search of this url from the pandora_console's root homeurl + $url = "../../$url"; + // Set the server id + $graph_params["server"] = $row["server_id"]; + } + + $graph_params_str = http_build_query($graph_params); + + $link = "winopeng('$url?$graph_params_str','$win_handle')"; $data[7] = '' . html_print_image("images/chart_curve.png", true, array("border" => '0', "alt" => "")) . ''; From da8570d3b94c005e8ccab86b2af1ba7d031f71a2 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 23 Mar 2015 20:51:44 +0100 Subject: [PATCH 23/27] Added support to show the interface traffic graphs through the metaconsole and improved the ACL --- pandora_console/include/class/Tree.class.php | 49 ++++++------ pandora_console/include/functions_events.php | 64 ++++++++------- .../include/javascript/tree/TreeController.js | 78 ++++++++++--------- .../operation/agentes/status_monitor.php | 6 +- 4 files changed, 104 insertions(+), 93 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 05804d0be5..02b719369b 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -46,6 +46,7 @@ class Tree { global $config; include_once($config['homedir']."/include/functions_servers.php"); + include_once($config['homedir']."/include/functions_modules.php"); if (defined("METACONSOLE")) enterprise_include_once("meta/include/functions_ui_meta.php"); @@ -1306,31 +1307,35 @@ class Tree { $module['serverTypeHTML'] = servers_show_type($module['server_type']); // Link to the Module graph - $graphType = return_graphtype($module['id_module_type']); - $winHandle = dechex(crc32($module['id'] . $module['name'])); + $group_id = (int) modules_get_agent_group($module['id']); + $module["showGraphs"] = 0; - if (!defined('METACONSOLE')) { - $moduleGraphURL = $config['homeurl'] . - "/operation/agentes/stat_win.php?" . - "type=$graphType&" . - "period=" . SECONDS_1DAY . "&" . - "id=" . $module['id'] . "&" . - "label=" . rawurlencode(urlencode(base64_encode($module['name']))) . "&" . - "refresh=" . SECONDS_10MINUTES; - } - else if (!empty($server)) { - $moduleGraphURL = ui_meta_get_url_console_child( - $server, null, null, null, null, - "operation/agentes/stat_win.php?" . - "type=$graphType&" . - "period=" . SECONDS_1DAY . "&" . - "id=" . $module["id"] . "&" . - "label=" . rawurlencode(urlencode(base64_encode($module['name']))) . "&" . - "refresh=" . SECONDS_10MINUTES . "&" . - "avg_only=1"); + // ACL + if (!empty($group_id) { + $module["showGraphs"] = (int) check_acl($config['id_user'], $group_id, "RR"); } - if (!empty($moduleGraphURL)) { + if ($module["showGraphs"]) { + $graphType = return_graphtype($module['id_module_type']); + $url = ui_get_full_url("operation/agentes/stat_win.php", false, false, false); + $winHandle = dechex(crc32($module['id'].$module['name'])); + + $graph_params = array( + "type" => $graphType, + "period" => SECONDS_1DAY, + "id" => $module['id'], + "label" => rawurlencode(urlencode(base64_encode($module['name']))), + "refresh" => SECONDS_10MINUTES + ); + + if (defined('METACONSOLE') && !empty($server)) { + // Set the server id + $graph_params["server"] = $module['serverID']; + } + + $graph_params_str = http_build_query($graph_params); + $moduleGraphURL = "$url?$graph_params_str"; + $module['moduleGraph'] = array( 'url' => $moduleGraphURL, 'handle' => $winHandle diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 6a0b141eac..4802c73ea0 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2033,35 +2033,41 @@ function events_page_details ($event, $server = "") { } $table_details->data[] = $data; - $data = array(); - $data[0] = '
'.__('Graph').'
'; - $module_module_type = -1; - if (isset($module["module_type"])) { - $module_module_type = $module["module_type"]; - } - $graph_type = return_graphtype ($module_module_type); - - $win_handle=dechex(crc32($module["id_agente_modulo"] . - $module["nombre"])); - - $module_module_name = ''; - if (isset($module["module_name"])) { - $module_module_name = $module["module_name"]; - } - $link ="winopeng('" . $serverstring . - "operation/agentes/stat_win.php?type=" . $graph_type."&" . - "period=" . SECONDS_1DAY . "&" . - "id=" . $module["id_agente_modulo"] . "&" . - "label=" . rawurlencode( - urlencode( - base64_encode($module_module_name))) . $hashstring . "&" . - (!empty($server) ? "avg_only=1&" : "") . - "refresh=" . SECONDS_10MINUTES . "','day_".$win_handle."')"; - - $data[1] = ''; - $data[1] .= html_print_image('images/chart_curve.png',true); - $data[1] .= ''; - $table_details->data[] = $data; + if (check_acl($config['id_user'], $agent['id_grupo'], "RR")) { + $data = array(); + $data[0] = '
'.__('Graph').'
'; + + $module_type = -1; + if (isset($module["module_type"])) { + $module_type = $module["module_type"]; + } + $graph_type = return_graphtype ($module_type); + $url = ui_get_full_url("operation/agentes/stat_win.php", false, false, false); + $handle = dechex(crc32($module["id_agente_modulo"].$module["nombre"])); + $win_handle = "day_$handle"; + + $graph_params = array( + "type" => $graph_type, + "period" => SECONDS_1DAY, + "id" => $module["id_agente_modulo"], + "label" => rawurlencode(urlencode(base64_encode($module["nombre"]))), + "refresh" => SECONDS_10MINUTES + ); + + if (defined('METACONSOLE')) { + // Set the server id + $graph_params["server"] = $server["id"]; + } + + $graph_params_str = http_build_query($graph_params); + + $link = "winopeng('$url?$graph_params_str','$win_handle')"; + + $data[1] = ''; + $data[1] .= html_print_image('images/chart_curve.png',true); + $data[1] .= ''; + $table_details->data[] = $data; + } } $data = array(); diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index 07f869b553..6656a2b418 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -355,48 +355,50 @@ TreeController = { $content.append($serverTypeImage); } - - // Graph pop-up - if (typeof element.moduleGraph != 'undefined') { - var $graphImage = $(' '); - $graphImage - .addClass('module-graph') - .click(function (e) { - e.preventDefault(); - - try { - winopeng(element.moduleGraph.url, element.moduleGraph.handle); - } - catch (error) { - // console.log(error); - } - }); - - $content.append($graphImage); - } - // Data pop-up - if (typeof element.id != 'undefined' && !isNaN(element.id)) { + if (typeof element.showGraphs != 'undefined' && element.showGraphs != 0) { + // Graph pop-up + if (typeof element.moduleGraph != 'undefined') { + var $graphImage = $(' '); + $graphImage + .addClass('module-graph') + .click(function (e) { + e.preventDefault(); - var $dataImage = $(' '); - $dataImage - .addClass('module-data') - .click(function (e) { - e.preventDefault(); + try { + winopeng(element.moduleGraph.url, element.moduleGraph.handle); + } + catch (error) { + // console.log(error); + } + }); - try { - var serverName = element.serverName.length > 0 ? element.serverName : ''; - if ($("#module_details_window").length > 0) - show_module_detail_dialog(element.id, '', serverName, 0, 86400); - } - catch (error) { - // console.log(error); - } - }); + $content.append($graphImage); + } + + // Data pop-up + if (typeof element.id != 'undefined' && !isNaN(element.id)) { - $content.append($dataImage); + var $dataImage = $(' '); + $dataImage + .addClass('module-data') + .click(function (e) { + e.preventDefault(); + + try { + var serverName = element.serverName.length > 0 ? element.serverName : ''; + if ($("#module_details_window").length > 0) + show_module_detail_dialog(element.id, '', serverName, 0, 86400); + } + catch (error) { + // console.log(error); + } + }); + + $content.append($dataImage); + } } // Alerts diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 21b44a71a7..dae7768172 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -1197,11 +1197,11 @@ foreach ($result as $row) { $data[7] = ""; - if ($row['history_data'] == 1) { + if ($row['history_data'] == 1 && check_acl($config['id_user'], $row['id_group'], "RR") { $graph_type = return_graphtype ($row["module_type"]); - $url = "operation/agentes/stat_win.php"; + $url = ui_get_full_url("operation/agentes/stat_win.php", false, false, false); $handle = dechex(crc32($row["id_agente_modulo"].$row["module_name"])); $win_handle = "day_$handle"; @@ -1214,8 +1214,6 @@ foreach ($result as $row) { ); if (defined('METACONSOLE') && isset($row["server_id"])) { - // Force the search of this url from the pandora_console's root homeurl - $url = "../../$url"; // Set the server id $graph_params["server"] = $row["server_id"]; } From 857d9e2e11a97968932a704b12591976fe591219 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 23 Mar 2015 21:02:06 +0100 Subject: [PATCH 24/27] Fixed a PHP syntax error --- pandora_console/include/class/Tree.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 02b719369b..4db33dce1b 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -1311,7 +1311,7 @@ class Tree { $module["showGraphs"] = 0; // ACL - if (!empty($group_id) { + if (!empty($group_id)) { $module["showGraphs"] = (int) check_acl($config['id_user'], $group_id, "RR"); } From bbb41ddff50b7325cbeff7572e0eb138e0609fa9 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 23 Mar 2015 21:05:18 +0100 Subject: [PATCH 25/27] Fixed a PHP syntax error --- pandora_console/operation/agentes/status_monitor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index dae7768172..8471636016 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -1197,7 +1197,7 @@ foreach ($result as $row) { $data[7] = ""; - if ($row['history_data'] == 1 && check_acl($config['id_user'], $row['id_group'], "RR") { + if ($row['history_data'] == 1 && check_acl($config['id_user'], $row['id_group'], "RR")) { $graph_type = return_graphtype ($row["module_type"]); From 9915e22a113072d90fd4e903bd4dbdddeae2aa20 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 24 Mar 2015 00:01:11 +0100 Subject: [PATCH 26/27] 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 700f40fafb..e54928740b 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 6.0dev-150323 +Version: 6.0dev-150324 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 0a13c242d7..e5dfde2bf2 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-150323" +pandora_version="6.0dev-150324" 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 cea7bb2e21..743537e550 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 => '150323'; +use constant AGENT_BUILD => '150324'; # 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 351ca04542..fe78e6b0d4 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 150323 +%define release 150324 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 9ecddd7845..9a2fd374c8 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 150323 +%define release 150324 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 1fb90ab4ab..2923728823 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150323} +{150324} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7f7e35da3f..99230f05b6 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 150323)") +#define PANDORA_VERSION ("6.0dev(Build 150324)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5b0e2b9316..25fc4a4132 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 150323))" + VALUE "ProductVersion", "(6.0dev(Build 150324))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index f05172a9b9..f5a3429c44 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 6.0dev-150323 +Version: 6.0dev-150324 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 c1eefd4ab9..746674d285 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-150323" +pandora_version="6.0dev-150324" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 29faf5572f..95ca8f83d1 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 = 'PC150323'; +$build_version = 'PC150324'; $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 bdc1b74cd3..767c6a904c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Tue, 24 Mar 2015 10:36:02 +0100 Subject: [PATCH 27/27] same unit to snmp modules when unit not correct to module type, tiquet: #2025 (cherry picked from commit 471492807df2a3fb3653f8d9d5abc4af6a00636a) --- .../godmode/agentes/agent_wizard.snmp_interfaces_explorer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php index 0e75fad6b6..c1e20b1f94 100644 --- a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php @@ -239,6 +239,7 @@ if ($create_modules) { else $module_type = 15; + $values['unit'] = ""; if (preg_match("/Octets/", $name_array[1])) { $values['unit'] = "Bytes"; }