diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 520eaff838..c4c9d8e42e 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, AIX version +# Version 7.0NG.728, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index c81ad7428b..53b7e5ed5d 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, FreeBSD Version +# Version 7.0NG.728, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index 50fc5ba4be..f12d0518f2 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, HP-UX Version +# Version 7.0NG.728, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index 82830cf957..9c36a4211c 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, GNU/Linux +# Version 7.0NG.728, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf index ea633488e4..5870e5283a 100644 --- a/pandora_agents/pc/NT4/pandora_agent.conf +++ b/pandora_agents/pc/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, GNU/Linux +# Version 7.0NG.728, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index c8a2153376..e6e468401e 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, Solaris Version +# Version 7.0NG.728, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index 6a01d22b4b..e1feeacc4e 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2010 Artica Soluciones Tecnologicas -# Version 7.0NG.727 +# Version 7.0NG.728 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index 27cbee7dfb..8d9e405b99 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.727, AIX version +# Version 7.0NG.728, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index 6eaf0415c2..f428ddf5e1 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.727 +# Version 7.0NG.728 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index 906269e8bb..6f1eded2ef 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.727, HPUX Version +# Version 7.0NG.728, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index b2cdc0e920..26b099a519 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727 +# Version 7.0NG.728 # Licensed under GPL license v2, # (c) 2003-2010 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index 82363fdb43..4f23ce219e 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727 +# Version 7.0NG.728 # Licensed under GPL license v2, # (c) 2003-2009 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index 2b4f58566b..8f272695ac 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727 +# Version 7.0NG.728 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index a1c4130f17..cce42277f7 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.727, Solaris version +# Version 7.0NG.728, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 0d640badaa..476c53874f 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, AIX version +# Version 7.0NG.728, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 07038a3ca9..55a22a44fa 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.727-181017 +Version: 7.0NG.728-181023 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 37eaeacd72..5a2813e0e3 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="7.0NG.727-181017" +pandora_version="7.0NG.728-181023" 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/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index 53dd20cf4f..ac53da9443 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, GNU/Linux +# Version 7.0NG.728, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2012 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index 3590ee6551..12f0f7d805 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, FreeBSD Version +# Version 7.0NG.728, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2016 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index aa1dcb1592..3339e5443d 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, HP-UX Version +# Version 7.0NG.728, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index fc55d1d872..58fb118e99 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, GNU/Linux +# Version 7.0NG.728, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf index 7a47602abc..a47ae7137b 100644 --- a/pandora_agents/unix/NT4/pandora_agent.conf +++ b/pandora_agents/unix/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, GNU/Linux +# Version 7.0NG.728, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index 42d8c19a25..701ee400e7 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, NetBSD Version +# Version 7.0NG.728, NetBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index 625bc89848..95152aadf3 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.727, Solaris Version +# Version 7.0NG.728, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index cf2b62ad81..a678058f3c 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,8 +41,8 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.727'; -use constant AGENT_BUILD => '181017'; +use constant AGENT_VERSION => '7.0NG.728'; +use constant AGENT_BUILD => '181023'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index e0098610ff..4a40015f3f 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.727 -%define release 181017 +%define version 7.0NG.728 +%define release 181023 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 98bbe14930..3faff7098a 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.727 -%define release 181017 +%define version 7.0NG.728 +%define release 181023 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index dcc22bb840..81f2c20d2c 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -9,8 +9,8 @@ # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION="7.0NG.727" -PI_BUILD="181017" +PI_VERSION="7.0NG.728" +PI_BUILD="181023" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 0901ac5234..bb4d1a6923 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2017 Artica Soluciones Tecnologicas -# Version 7.0NG.727 +# Version 7.0NG.728 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 6eb50cd34e..7a9c32c038 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -3,7 +3,7 @@ AllowLanguageSelection {Yes} AppName -{Pandora FMS Windows Agent v7.0NG.727} +{Pandora FMS Windows Agent v7.0NG.728} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{181017} +{181023} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index edfd3b2869..92ed21929d 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 ("7.0NG.727(Build 181017)") +#define PANDORA_VERSION ("7.0NG.728(Build 181023)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 0ceed3f74b..04def502c0 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", "(7.0NG.727(Build 181017))" + VALUE "ProductVersion", "(7.0NG.728(Build 181023))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 698e1666c9..97b5721572 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.727-181017 +Version: 7.0NG.728-181023 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 517b550c9d..5c70c21920 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="7.0NG.727-181017" +pandora_version="7.0NG.728-181023" package_pear=0 package_pandora=1 diff --git a/pandora_console/extras/mr/21.sql b/pandora_console/extras/mr/21.sql index 16b0184506..f832a0ed8a 100644 --- a/pandora_console/extras/mr/21.sql +++ b/pandora_console/extras/mr/21.sql @@ -4,6 +4,7 @@ ALTER TABLE `tservice` ADD COLUMN `is_favourite` tinyint(1) NOT NULL default 0; UPDATE tservice SET `is_favourite` = 1 WHERE `name` REGEXP '^[_|.|\[|\(]'; ALTER TABLE tlayout_data ADD COLUMN `show_last_value` tinyint(1) UNSIGNED NULL default '0'; +ALTER TABLE tlayout_template_data ADD COLUMN `show_last_value` tinyint(1) UNSIGNED NULL default '0'; ALTER TABLE tlayout MODIFY `name` varchar(600) NOT NULL; ALTER TABLE tmetaconsole_setup ADD COLUMN `meta_dbuser` text; diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 6ef8048310..079c9b5d23 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1778,6 +1778,7 @@ CREATE TABLE IF NOT EXISTS `tlayout_template_data` ( FOREIGN KEY (`id_layout_template`) REFERENCES tlayout_template(`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE = InnoDB DEFAULT CHARSET=utf8; +ALTER TABLE tlayout_template_data ADD COLUMN `show_last_value` tinyint(1) UNSIGNED NULL default '0'; -- --------------------------------------------------------------------- -- Table `tlog_graph_models` -- --------------------------------------------------------------------- diff --git a/pandora_console/godmode/massive/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php index be10127a80..8725c713aa 100755 --- a/pandora_console/godmode/massive/massive_delete_modules.php +++ b/pandora_console/godmode/massive/massive_delete_modules.php @@ -385,6 +385,9 @@ echo ''; echo ''; ui_require_jquery_file ('form'); +//Hack to translate text "none" in PHP to javascript +echo ''; +echo ''; ui_require_jquery_file ('pandora.controls'); if ($selection_mode == 'modules') { diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index b12093aaf5..a7056636b0 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -709,6 +709,7 @@ echo ''; echo ''; //Hack to translate text "none" in PHP to javascript echo ''; +echo ''; ui_require_jquery_file ('pandora.controls'); if ($selection_mode == 'modules') { diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 9a2f5f3018..e7e5965946 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -1087,6 +1087,34 @@ You can of course remove the warnings, that's why we include the source and do n $agents2[$value['id_agente']] = $value['alias']; } + if ((empty($agents2)) || $agents2 == -1) $agents = array(); + + $agents_select = array(); + if (is_array($id_agents) || is_object($id_agents)){ + foreach ($id_agents as $id) { + foreach ($agents2 as $key => $a) { + if ($key == (int)$id) { + $agents_select[$key] = $key; + } + } + } + } + html_print_select($agents2, 'id_agents3[]', $agents_select, $script = '', "", 0, false, true, true, '', false, "min-width: 180px"); + echo ""; + ?> + + + + + + + $value) { + $agents2[$value['id_agente']] = $value['alias']; + } + // $agents = agents_get_group_agents($group); if ((empty($agents2)) || $agents2 == -1) $agents = array(); @@ -1101,7 +1129,6 @@ You can of course remove the warnings, that's why we include the source and do n } } html_print_select($agents2, 'id_agents2[]', $agents_select, $script = '', "", 0, false, true, true, '', false, "min-width: 180px"); - echo ""; ?> @@ -2862,6 +2889,7 @@ function chooseType() { $("#row_percentil").hide(); $("#log_help_tip").css("visibility", "hidden"); $("#agents_row").hide(); + $("#agents_modules_row").hide(); $("#select_agent_modules").hide(); $("#modules_row").hide(); $("#row_show_summary_group").hide(); @@ -3328,7 +3356,7 @@ function chooseType() { $("#row_group").show(); $("#row_module_group").show(); $("#select_agent_modules").show(); - $("#agents_row").show(); + $("#agents_modules_row").show(); $("#modules_row").show(); $("#row_historical_db_check").hide(); break; @@ -3499,7 +3527,7 @@ function set_last_value_period() { } function source_change_agents() { - $("#id_agents2").empty(); + $("#id_agents3").empty(); $("#spinner_hack").show(); jQuery.post ("ajax.php", {"page" : "operation/agentes/ver_agente", @@ -3508,7 +3536,7 @@ function source_change_agents() { }, function (data, status) { for (var clave in data) { - $("#id_agents2").append(''); + $("#id_agents3").append(''); } $("#spinner_hack").hide(); }, diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index df7f08fde0..88f27d76b0 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -849,8 +849,7 @@ function readFields() { values['enable_link'] = $("input[name=enable_link]").is(':checked') ? 1 : 0; values['id_group'] = $("select[name=group]").val(); - values['id_custom_graph'] = parseInt( - $("#custom_graph option:selected").val()); + values['id_custom_graph'] = $("#custom_graph option:selected").val(); values['width_box'] = parseInt( $("input[name='width_box']").val()); values['height_box'] = parseInt( @@ -1715,8 +1714,13 @@ function loadFieldsFromDB(item) { .prop('checked', true); $("input[name='radio_choice']").trigger('change'); - $("#custom_graph option[value=" + data.id_custom_graph + "]").prop("selected", true); - + if (is_metaconsole()){ + $("#custom_graph option[value='" + data.id_custom_graph + '|' + data.id_metaconsole + "']").prop("selected", true); + } + else{ + $("#custom_graph option[value=" + data.id_custom_graph + "]").prop("selected", true); + } + } } @@ -2316,12 +2320,18 @@ function setModuleGraph(id_data) { dataType: 'json', success: function (data) { + + var url_hack_metaconsole = ''; + if (is_metaconsole()) { + url_hack_metaconsole = '../../'; + } + if (data['no_data'] == true) { $('#' + id_data).html(data['url']); } else { if($("#module_row").css('display')!='none'){ - $("#" + id_data + " img").attr('src', 'images/console/signes/module_graph.png'); + $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module_graph.png'); if($('#text-width_module_graph').val() == 0 || $('#text-height_module_graph').val() == 0){ $("#" + id_data + " img").css('width', '300px'); $("#" + id_data + " img").css('height', '180px'); @@ -2331,7 +2341,7 @@ function setModuleGraph(id_data) { $("#" + id_data + " img").css('height', $('#text-height_module_graph').val()+'px'); } }else{ - $("#" + id_data + " img").attr('src', 'images/console/signes/custom_graph.png'); + $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/custom_graph.png'); if($('#text-width_module_graph').val() == 0 || $('#text-height_module_graph').val() == 0){ $("#" + id_data + " img").css('width', '300px'); $("#" + id_data + " img").css('height', '180px'); diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php index 9796a217e8..898c9b09ff 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -427,13 +427,27 @@ foreach ($layoutDatas as $layoutData) { } } } - + $modules = io_safe_output($modules); - + if ($layoutData['id_agent'] == 0 and $layoutData['id_custom_graph'] != 0) { - $table->data[$i + 2][1] = html_print_select_from_sql( - "SELECT id_graph, name FROM tgraph", 'custom_graph_' . $idLayoutData, - $layoutData['id_custom_graph'], '', __('None'), 0, true); + if(is_metaconsole()){ + $graphs = array(); + $graphs = metaconsole_get_custom_graphs(true); + $table->data[$i + 2][1] = html_print_select( + $graphs, 'custom_graph_' . $idLayoutData, + $layoutData['id_custom_graph'] . "|" . $layoutData['id_metaconsole'], + '', __('None'), 0, true + ); + } + else{ + $table->data[$i + 2][1] = html_print_select_from_sql( + "SELECT id_graph, name FROM tgraph", + 'custom_graph_' . $idLayoutData, + $layoutData['id_custom_graph'], + '', __('None'), 0, true + ); + } } else { $table->data[$i + 2][1] = html_print_select($modules, 'module_' . $idLayoutData, @@ -446,12 +460,10 @@ foreach ($layoutDatas as $layoutData) { } break; } - - - + //Empty $table->data[$i + 2][2] = ''; - + //Period switch ($layoutData['type']) { case MODULE_GRAPH: diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 7bdddf50b9..db155e6f61 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -1206,13 +1206,29 @@ switch ($action) { break; case 'module_graph': $values['type'] = MODULE_GRAPH; - + + if(is_metaconsole()){ + $explode_id = explode("|", $values['id_custom_graph']); + $values['id_custom_graph'] = $explode_id[0]; + $values['id_metaconsole'] = $explode_id[1]; + } + if ($values['id_custom_graph'] > 0 ) { $values['height'] = $height_module_graph; $values['width'] = $width_module_graph; - + + if(is_metaconsole()){ + $server_data = metaconsole_get_connection_by_id($values['id_metaconsole']); + // Establishes connection + if (metaconsole_load_external_db($server_data) !== NOERR) continue; + } + $graph_conf = db_get_row('tgraph', 'id_graph', $values['id_custom_graph']); - + + if(is_metaconsole()){ + metaconsole_restore_db(); + } + $graph_stacked = $graph_conf['stacked']; if ( $graph_stacked == CUSTOM_GRAPH_BULLET_CHART) { $values['height'] = 50; diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 05c994df9e..af7cb2daf3 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -41,6 +41,8 @@ class Tree { protected $L2conditionInside = ''; protected $L2inner = ''; + protected $L3forceTagCondition = false; + const TV_DEFAULT_AGENT_STATUS = -1; public function __construct($type, $rootType = '', $id = -1, $rootID = -1, $serverID = false, $childrenMethod = "on_demand", $access = 'AR') { @@ -891,7 +893,9 @@ class Tree { $module_status_filter = $this->getModuleStatusFilterFromTestado(); $agent_filter = "AND ta.id_agente = " . $this->id; $tag_condition = $this->getTagCondition(); - $tag_join = empty($tag_condition) ? '' : $this->getTagJoin(); + $tag_join = empty($tag_condition) && (!$this->L3forceTagCondition) + ? '' + : $this->getTagJoin(); $condition = $this->L2condition; $inner = $this->L2inner; diff --git a/pandora_console/include/class/TreeTag.class.php b/pandora_console/include/class/TreeTag.class.php index c02fb7ba4a..374945005c 100644 --- a/pandora_console/include/class/TreeTag.class.php +++ b/pandora_console/include/class/TreeTag.class.php @@ -37,6 +37,8 @@ class TreeTag extends Tree { $this->L2condition = "AND ttm.id_tag = " . $this->rootID; $this->L2inner = $this->L1innerInside; + + $this->L3forceTagCondition = true; } protected function getData() { @@ -52,10 +54,6 @@ class TreeTag extends Tree { protected function getTagJoin () { return ''; } - - protected function getTagCondition () { - return ''; - } } ?> diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index c55b8c6526..a1e79940f0 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,8 +22,8 @@ /** * Pandora build version and version */ -$build_version = 'PC181017'; -$pandora_version = 'v7.0NG.727'; +$build_version = 'PC181023'; +$pandora_version = 'v7.0NG.728'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 2e9ef1f55f..fe61fc675e 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -94,7 +94,8 @@ function agents_create_agent ($name, $id_group, $interval, $ip_address, $values if (! is_array ($values)) $values = array (); - $values['nombre'] = $name; + $values['alias'] = $name; + $values['nombre'] = hash("sha256",$name . "|" .$ip_address ."|". time() ."|". sprintf("%04d", rand(0,10000))); $values['id_grupo'] = $id_group; $values['intervalo'] = $interval; @@ -1069,7 +1070,7 @@ function agents_get_group_agents ( */ function agents_get_modules ($id_agent = null, $details = false, $filter = false, $indexed = true, $get_not_init_modules = true, - $noACLs = false) { + $force_tags = false) { global $config; @@ -1205,7 +1206,7 @@ function agents_get_modules ($id_agent = null, $details = false, } $sql_tags_join = ""; - if (tags_has_user_acl_tags($config['id_user'])){ + if (tags_has_user_acl_tags($config['id_user']) || $force_tags){ $where_tags = tags_get_acl_tags($config['id_user'], $id_groups, 'AR', 'module_condition', 'AND', 'tagente_modulo', false, array(), true); diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 8bc8665a9d..56d809da67 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -298,7 +298,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { '#000000', 'text-grid_color', '', 7, 7, false, '', 'class="grid_color"', true) . ''; - + $form_items['radio_choice_graph'] = array(); $form_items['radio_choice_graph']['items'] = array( 'module_graph', @@ -312,27 +312,25 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { . __('Custom graph') . "  " . html_print_radio_button('radio_choice', 'custom_graph', '', 'module_graph', true) . ''; - - + $form_items['custom_graph_row'] = array(); - $form_items['custom_graph_row']['items'] = array( - 'module_graph', - 'datos'); - $form_items['custom_graph_row']['html'] = - '' . __('Custom graph') . ' - ' . - html_print_select_from_sql( - "SELECT id_graph, name FROM tgraph", 'custom_graph', - '', '', __('None'), 0, true) . - ''; - - + $form_items['custom_graph_row']['html'] = '' . __('Custom graph') . ''; + if(is_metaconsole()){ + $graphs = array(); + $graphs = metaconsole_get_custom_graphs(true); + $form_items['custom_graph_row']['html'] .= html_print_select($graphs, 'custom_graph', '', '', __('None'), 0, true); + } + else{ + $form_items['custom_graph_row']['html'] .= html_print_select_from_sql("SELECT id_graph, name FROM tgraph", 'custom_graph','', '', __('None'), 0, true); + } + $form_items['custom_graph_row']['html'] .= ''; + $form_items['agent_row'] = array(); $form_items['agent_row']['items'] = array('static_graph', 'percentile_bar', 'percentile_item', 'module_graph', 'simple_value', 'datos', 'auto_sla_graph'); $form_items['agent_row']['html'] = '' . - __('Agent') . ''; + __('Agent') . ''; $params = array(); $params['return'] = true; $params['show_helptip'] = true; diff --git a/pandora_console/include/graphs/functions_d3.php b/pandora_console/include/graphs/functions_d3.php index a0e4ea4a8d..81e55100e8 100644 --- a/pandora_console/include/graphs/functions_d3.php +++ b/pandora_console/include/graphs/functions_d3.php @@ -185,7 +185,7 @@ function d3_bullet_chart($chart_data, $width, $height, $color, $legend, .bullet g text { font-size:'.$font_size.'pt;} - +