From b644f15d00d5b1b3f1b9e69290888dc792920dc9 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 25 Aug 2016 20:16:03 +0200 Subject: [PATCH 1/4] Ticket Integria: 3951 Changed workaround to generate api module graphs #31 (cherry picked from commit 95b162f63a1479883a369fac884300edd8e640d8) --- pandora_console/include/functions_api.php | 72 +++++++++++++++-------- 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index c62915c819..b9b92e78da 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -8890,29 +8890,55 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4) { '', false, false, true, time(), '', 0, 0, true, true, ui_get_full_url(false) . '/', 1, false, '', false, true); - $graph_image_file_encoded = false; - - // Get the src of the html item - if (preg_match("/ 'string', 'data' => $graph_image_file_encoded)); - } + $graph_image_file_encoded = false; + if (preg_match("/ 'string', 'data' => '')); + // To show only the base64 code, call returnData as: + // returnData('string', array('type' => 'string', 'data' => $graph_image_file_encoded)); + } } ?> From e2bc2002f4baf9f9e377cf9dc7599eb08340f939 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 26 Aug 2016 00:01:17 +0200 Subject: [PATCH 2/4] 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/unix/pandora_agent_installer | 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.oracle.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/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 296ae3285d..c5518121d1 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 6.1dev-160825 +Version: 6.1dev-160826 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 2407e9ec82..7616bf397a 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.1dev-160825" +pandora_version="6.1dev-160826" 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 1278ca2c13..414fb7a9ed 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.1dev'; -use constant AGENT_BUILD => '160825'; +use constant AGENT_BUILD => '160826'; # 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 633d1aebe8..78a520b34e 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.1dev -%define release 160825 +%define release 160826 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 cd956f39a7..af803b270a 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.1dev -%define release 160825 +%define release 160826 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 59f613258b..fb632b044a 100644 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="6.1dev" -PI_BUILD="160825" +PI_BUILD="160826" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 50911527d5..df7b894fb8 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{160825} +{160826} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 5c64a94511..f878c77e2c 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.1dev(Build 160825)") +#define PANDORA_VERSION ("6.1dev(Build 160826)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 828108629f..b316aacab1 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.1dev(Build 160825))" + VALUE "ProductVersion", "(6.1dev(Build 160826))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 57dfd6ca01..099e713ce0 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 6.1dev-160825 +Version: 6.1dev-160826 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 bf4333122a..5b7eaa5371 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.1dev-160825" +pandora_version="6.1dev-160826" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 132d1dd8c3..f396d56a14 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 = 'PC160825'; +$build_version = 'PC160826'; $pandora_version = 'v6.1dev'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d0dd1ec3c6..62d1a9a10f 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Fri, 26 Aug 2016 12:38:30 +0200 Subject: [PATCH 3/4] added default fontpath for windows. Ticket #3316. --- pandora_console/include/functions_config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 853c736301..046e3cfafe 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -981,8 +981,9 @@ function config_process_config () { if (!isset ($config['fontpath'])) { + $home = str_replace('\\', '/', $config['homedir'] ); config_update_value('fontpath', - $config['homedir'] . '/include/fonts/smallfont.ttf'); + $home . '/include/fonts/smallfont.ttf'); } if (!isset ($config['style'])) { From be3a5204887d6f9c38bc8e0d44207890f7560761 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Fri, 26 Aug 2016 12:41:34 +0200 Subject: [PATCH 4/4] Add if use ssl cert and path of this cert. #5 --- .../godmode/setup/setup_general.php | 20 ++++++++++++++++++- pandora_console/include/functions_config.php | 12 +++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index 4e547143d5..b0267c724b 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -20,6 +20,7 @@ check_login (); $table = new StdClass(); $table->class = 'databox filters'; +$table->id = 'setup_general'; $table->width = '100%'; $table->data = array (); $table->size = array(); @@ -74,6 +75,14 @@ $table->data[11][0] = __('Enforce https'); $table->data[11][1] = __('Yes').'   '.html_print_radio_button_extended ('https', 1, '', $config["https"], false, "if (! confirm ('" . __('If SSL is not properly configured you will lose access to Pandora FMS Console. Do you want to continue?') . "')) return false", '', true) .'  '; $table->data[11][1] .= __('No').'   '.html_print_radio_button ('https', 0, '', $config["https"], true); +$table->data[12][0] = __('Use cert of SSL'); +$table->data[12][1] = __('Yes').'   '.html_print_radio_button_extended ('use_cert', 1, '', $config["use_cert"], false, '', '', true) .'  '; +$table->data[12][1] .= __('No').'   '.html_print_radio_button ('use_cert', 0, '', $config["use_cert"], true); + +$table->rowstyle[13] = 'display: none;'; +$table->data[13][0] = __('Path of SSL Cert.') . ui_print_help_tip (__("Path where you put your cert and name of this cert. Remember your cert only in .pem extension."), true); +$table->data[13][1] = html_print_input_text ('cert_path', io_safe_output($config["cert_path"]), '', 50, 255, true); + $table->data[14][0] = __('Attachment store') . ui_print_help_tip (__("Directory where temporary data is stored."), true); $table->data[14][1] = html_print_input_text ('attachment_store', io_safe_output($config["attachment_store"]), '', 50, 255, true); @@ -285,7 +294,6 @@ $table->data[36][0] = __('audit log directory') . ui_print_help_tip (__("Directory where audit log is stored."), true); $table->data[36][1] = html_print_input_text ('auditdir', io_safe_output($config["auditdir"]), '', 30, 100, true); - echo '
'; echo "
"; @@ -358,6 +366,16 @@ $(document).ready (function () { $("#zone").attr("hidden", false); $("#timezone").attr("hidden", false); }); + $("input[name=use_cert]").change(function () { + if( $(this).is(":checked") ){ + var val = $(this).val(); + if (val == 1) { + $('#setup_general-13').show(); + } + else + $('#setup_general-13').hide(); + } + }); });