diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index aa45b0b23c..da154ad674 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.722-180522 +Version: 7.0NG.722-180528 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 a891688f34..a8e47c0413 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.722-180522" +pandora_version="7.0NG.722-180528" 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 b5e245dc96..96c3ee38d5 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.722'; -use constant AGENT_BUILD => '180522'; +use constant AGENT_BUILD => '180528'; # 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 c86087f9c7..fae183ef4f 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 7.0NG.722 -%define release 180522 +%define release 180528 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 e9706ca567..e6cbdbe1f4 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 7.0NG.722 -%define release 180522 +%define release 180528 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 545cccc233..cdba332136 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.722" -PI_BUILD="180522" +PI_BUILD="180528" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 4d5d20319a..7b1b0f4c9e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{180522} +{180528} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 978947be91..03c0805baf 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.722(Build 180522)") +#define PANDORA_VERSION ("7.0NG.722(Build 180528)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index e695181758..63a2b23f30 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.722(Build 180522))" + VALUE "ProductVersion", "(7.0NG.722(Build 180528))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 6ab6811d54..b0585b9842 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.722-180522 +Version: 7.0NG.722-180528 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 53eae0dffd..553e2bbe86 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.722-180522" +pandora_version="7.0NG.722-180528" package_pear=0 package_pandora=1 diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php index b3e9fff95f..b8b7481786 100644 --- a/pandora_console/ajax.php +++ b/pandora_console/ajax.php @@ -49,7 +49,7 @@ if (isset ($_GET["loginhash"])) { $public_hash = get_parameter('hash', false); // Check user -if ($public_hash === false) { +if ($public_hash == false) { check_login(); } else { enterprise_include_once('include/functions_dashboard.php'); diff --git a/pandora_console/extensions/insert_data.php b/pandora_console/extensions/insert_data.php index 8357c96113..7495c54600 100644 --- a/pandora_console/extensions/insert_data.php +++ b/pandora_console/extensions/insert_data.php @@ -167,6 +167,7 @@ function mainInsertData() { $params['use_hidden_input_idagent'] = true; $params['print_hidden_input_idagent'] = true; $params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent'; + $params['hidden_input_idagent_value'] = $id_agente; $table->data[0][1] = ui_print_agent_autocomplete_input($params); diff --git a/pandora_console/extensions/plugin_registration.php b/pandora_console/extensions/plugin_registration.php index 63c2d56920..3efa7ff183 100644 --- a/pandora_console/extensions/plugin_registration.php +++ b/pandora_console/extensions/plugin_registration.php @@ -16,6 +16,8 @@ function pluginreg_extension_main () { global $config; + + check_login(); if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { db_pandora_audit("ACL Violation", "Trying to access Setup Management"); diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index c21b47733f..028d72d8a5 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -284,8 +284,9 @@ if ($create_agent) { "Url description":"' . $url_description .'", "Quiet":"' . (int)$quiet.'"}'; + $unsafe_alias = io_safe_output($alias); db_pandora_audit("Agent management", - "Created agent $alias", false, true, $info); + "Created agent $unsafe_alias", false, true, $info); } else { $id_agente = 0; diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index 335766606b..a65b925a44 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -90,14 +90,17 @@ if ($create_alert) { "tagente_modulo","id_agente_modulo", $id_agent_module)); // Audit the creation only when the alert creation is correct + $unsafe_alert_template_name = io_safe_output($alert_template_name); + $unsafe_module_name = io_safe_output($module_name); + $unsafe_agent_alias = io_safe_output($agent_alias); if ($id) { db_pandora_audit("Alert management", - "Added alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'", + "Added alert '$unsafe_alert_template_name' for module '$unsafe_module_name' in agent '$unsafe_agent_alias'", false, false, 'ID: ' . $id); } else { db_pandora_audit("Alert management", - "Fail Added alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'"); + "Fail Added alert '$unsafe_alert_template_name' for module '$unsafe_module_name' in agent '$unsafe_agent_alias'"); } $messageAction = ui_print_result_message ($id, diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index c0dd651384..b8ba89e59b 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 = 'PC180522'; +$build_version = 'PC180528'; $pandora_version = 'v7.0NG.722'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 24db5de2cc..34072be403 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -2368,7 +2368,7 @@ function print_audit_csv ($data) { echo __('User') . ';' . __('Action') . ';' . __('Date') . ';' . - __('Source ID') . ';' . + __('Source IP') . ';' . __('Comments') ."\n"; foreach ($data as $line) { echo io_safe_output($line['id_usuario']) . ';' . io_safe_output($line['accion']) . ';' . $line['fecha'] . ';' . $line['ip_origen'] . ';'. io_safe_output($line['descripcion']). "\n"; diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index c1abf15186..0ab870c20c 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1546,7 +1546,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, shadowSize: 0.1 }, crosshair: { mode: 'xy' }, - selection: { mode: 'x', color: '#777' }, + selection: { mode: 'xy', color: '#777' }, export: { export_data: true, labels_long: labels_long, @@ -1640,7 +1640,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, color: '' } ], yaxis: {ticks: [], autoscaleMargin: 0.1 }, - selection: {mode: 'x', color: '#777' }, + selection: {mode: 'xy', color: '#777' }, legend: {show: false}, crosshair: {mode: 'x'} }); @@ -1652,6 +1652,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, if (menu == 0) { return; } + dataInSelection = ranges.xaxis.to - ranges.xaxis.from; dataInPlot = plot.getData()[0].data.length; @@ -1660,18 +1661,36 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, new_steps = parseInt(factor * steps); plot = $.plot($('#' + graph_id), data_base, - $.extend(true, {}, options, { - xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to}, - xaxes: [ { - tickFormatter: xFormatter, - minTickSize: new_steps, - color: '' - } ], - legend: { show: false } - })); + $.extend(true, {}, options, { + yaxis: { + min: ranges.yaxis.from, + max: ranges.yaxis.to + }, + yaxes: [{ + tickFormatter: yFormatter, + color: '', + alignTicksWithAxis: 1, + labelWidth: 30, + position: 'left', + font: font, + reserveSpace: true, + min: ranges.yaxis.from + }], + xaxis: { + min: ranges.xaxis.from, + max: ranges.xaxis.to + }, + xaxes: [ { + tickFormatter: xFormatter, + minTickSize: new_steps, + color: '' + } ], + legend: { show: false } + })); + if (thresholded) { var zoom_data_threshold = new Array (); - + var y_recal = axis_thresholded(threshold_data, plot.getAxes().yaxis.min, plot.getAxes().yaxis.max, red_threshold, extremes, red_up); plot = $.plot($('#' + graph_id), data_base, @@ -1690,7 +1709,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, plot.setData(zoom_data_threshold); plot.draw(); } - + $('#menu_cancelzoom_' + graph_id) .attr('src', homeurl + '/images/zoom_cross_grey.png'); @@ -1760,7 +1779,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, } else if (y < -1000) { how_bigger = "K"; - y = y / 1000; + y = y / 1000; } if (currentRanges == null || (currentRanges.xaxis.from < j && j < currentRanges.xaxis.to)) { diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index c06cdbfed6..9ad693a414 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -893,6 +893,9 @@ div#cont { table, img { border: 0px; } +table pre{ + white-space: pre-wrap; +} tr:first-child>th { background-color: #373737; diff --git a/pandora_console/install.php b/pandora_console/install.php index a2111071f1..0caa210815 100755 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@