diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 3c97c6e154..516095201c 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.774-231201
+Version: 7.0NG.774-231205
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 ca4c9222aa..db2417bcc0 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.774-231201"
+pandora_version="7.0NG.774-231205"
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 e3f19fa5f7..dd6b68b3a1 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -1039,7 +1039,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.774';
-use constant AGENT_BUILD => '231201';
+use constant AGENT_BUILD => '231205';
# 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 856bf29aae..0e7014287e 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.774
-%define release 231201
+%define release 231205
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec
index 1166df20f9..2c4ee352e4 100644
--- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec
+++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec
@@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.774
-%define release 231201
+%define release 231205
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version
diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec
index 0ee91358de..3e45b4325c 100644
--- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec
+++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec
@@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.774
-%define release 231201
+%define release 231205
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version
diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec
index d30857834b..0629789841 100644
--- a/pandora_agents/unix/pandora_agent.redhat_bin.spec
+++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec
@@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.774
-%define release 231201
+%define release 231205
Summary: Pandora FMS Linux agent, binary version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 088ad4eba0..45dff8f0bf 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.774
-%define release 231201
+%define release 231205
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 beab7ebf7e..8ada865d04 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.774"
-PI_BUILD="231201"
+PI_BUILD="231205"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 8af046be0c..6b0fb53ca1 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{231201}
+{231205}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 99b210ee5b..77604cfe02 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.774 Build 231201")
+#define PANDORA_VERSION ("7.0NG.774 Build 231205")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 9195fac0d2..5106a9c650 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
- VALUE "ProductVersion", "(7.0NG.774(Build 231201))"
+ VALUE "ProductVersion", "(7.0NG.774(Build 231205))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index a02531535c..16c44a9fe0 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.774-231201
+Version: 7.0NG.774-231205
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 6ae0812782..539c8a813d 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.774-231201"
+pandora_version="7.0NG.774-231205"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt
index 234ec4e997..03db82db4e 100644
--- a/pandora_console/extras/delete_files/delete_files.txt
+++ b/pandora_console/extras/delete_files/delete_files.txt
@@ -1720,3 +1720,4 @@ include/functions_integriaims.php
include/ajax/integria_incidents.ajax.php
enterprise/operation/log/log_source.php
enterprise/include/class/LogSource.class.php
+include/chart_generator.php
\ No newline at end of file
diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php
index 557b855e09..26bae75929 100644
--- a/pandora_console/godmode/agentes/agent_manager.php
+++ b/pandora_console/godmode/agentes/agent_manager.php
@@ -600,43 +600,176 @@ html_print_div(
'content' => html_print_table($tableAgent, true).$CodeQRTable,
]
);
-/*
- TODO REVIEW
- $table_satellite = '';
- if ($remote_agent === true) {
- // Satellite server selector.
- $satellite_servers = db_get_all_rows_filter(
- 'tserver',
- ['server_type' => SERVER_TYPE_ENTERPRISE_SATELLITE],
- [
- 'id_server',
- 'name',
- ]
- );
- $satellite_names = [];
- if (empty($satellite_servers) === false) {
- foreach ($satellite_servers as $s_server) {
- $satellite_names[$s_server['id_server']] = $s_server['name'];
+// Basic Options.
+$tableBasicAgent = new stdClass();
+$tableBasicAgent->class = 'filter-table-adv';
+$tableBasicAgent->data = [];
+$disabledBasic = false;
+$tableClassDisabled = '';
+if ($new_agent === true || $remote_agent === false || $has_remote_conf === false) {
+ $disabledBasic = true;
+ $tableClassDisabled = ' basic-options-disabled';
+}
+
+if (enterprise_installed()) {
+ // Get all plugins (BASIC OPTIONS).
+ $agent_plugin = new PandoraFMS\Agent($id_agente);
+ $plugins = $agent_plugin->getPlugins();
+ // Check if some plugin was enabled/disabled in conf.
+ foreach ($plugins as $key => $row) {
+ if (preg_match('/pandora_hardening/', $row['raw']) === 1) {
+ if ($row['disabled'] === 1) {
+ $security_hardening = 0;
+ } else {
+ $security_hardening = 1;
+ }
}
- $table_satellite = '
-
-
-
-
-
-
-
-
-
- load_tables();
-}
-
-$hack_metaconsole = (is_metaconsole() === true) ? '../../' : '';
-?>
-
-
-
-
-
Pandora FMS Graph
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ;'>
- 0,
- 'height' => 0,
- ];
-
- $style = 'width:100%;';
- if (isset($params['options']['viewport']) === true) {
- $viewport = $params['options']['viewport'];
- if (empty($viewport['width']) === false) {
- $style .= 'width:'.$viewport['width'].'px;';
- }
-
- if (empty($viewport['height']) === false) {
- $style .= 'height:'.$viewport['height'].'px;';
- }
- }
-
- echo '
';
- switch ($type_graph_pdf) {
- case 'combined':
- $params['pdf'] = true;
- $result = graphic_combined_module(
- $module_list,
- $params,
- $params_combined
- );
-
- echo $result;
- break;
-
- case 'sparse':
- $params['pdf'] = true;
- echo grafico_modulo_sparse($params);
- break;
-
- case 'pie_graph':
- $params['pdf'] = true;
- $chart = get_build_setup_charts(
- 'PIE',
- $params['options'],
- $params['chart_data']
- );
-
- echo $chart->render(true);
- break;
-
- case 'vbar_graph':
- $params['pdf'] = true;
- $chart = get_build_setup_charts(
- 'BAR',
- $params['options'],
- $params['chart_data']
- );
-
- echo $chart->render(true);
- break;
-
- case 'ring_graph':
- $params['pdf'] = true;
- $params['options']['width'] = 500;
- $params['options']['height'] = 500;
-
- $chart = get_build_setup_charts(
- 'DOUGHNUT',
- $params['options'],
- $params['chart_data']
- );
-
- echo $chart->render(true);
- break;
-
- case 'line_graph':
- $params['pdf'] = true;
- $params['options']['width'] = '100%';
- $params['options']['height'] = 200;
- $chart = get_build_setup_charts(
- 'LINE',
- $params['options'],
- $params['chart_data']
- );
- echo $chart->render(true);
- break;
-
- case 'slicebar':
- // TO-DO Cambiar esto para que se pase por POST, NO SE PUEDE PASAR POR GET.
- $params['graph_data'] = json_decode(io_safe_output($config[$params['tokem_config']]), true);
- delete_config_token($params['tokem_config']);
- echo flot_slicesbar_graph(
- $params['graph_data'],
- $params['period'],
- $params['width'],
- $params['height'],
- $params['legend'],
- $params['colors'],
- $params['fontpath'],
- $params['round_corner'],
- $params['homeurl'],
- $params['watermark'],
- $params['adapt_key'],
- $params['stat_winalse'],
- $params['id_agent'],
- $params['full_legend_daterray'],
- $params['not_interactive'],
- $params['ttl'],
- $params['sizeForTicks'],
- $params['show'],
- $params['date_to'],
- $params['server_id']
- );
- break;
-
- default:
- // Code...
- break;
- }
-
- echo '
';
- ?>
-
-
diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php
index 31098225e7..83208256fb 100644
--- a/pandora_console/include/class/ConsoleSupervisor.php
+++ b/pandora_console/include/class/ConsoleSupervisor.php
@@ -2383,7 +2383,7 @@ class ConsoleSupervisor
$this->notify(
[
'type' => 'NOTIF.UPDATEMANAGER.REGISTRATION',
- 'title' => __('This instance is not registered in the Update manager section'),
+ 'title' => __('This instance is not registered in the Warp Update section'),
'message' => __('Click here to start the registration process'),
'url' => '__url__/index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=online',
]
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 5c60ea7ced..fe3237294c 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
-$build_version = 'PC231201';
+$build_version = 'PC231205';
$pandora_version = 'v7.0NG.774';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php
index 1ad9a39995..0bb6612376 100644
--- a/pandora_console/include/functions.php
+++ b/pandora_console/include/functions.php
@@ -4390,48 +4390,22 @@ function generator_chart_to_pdf(
$module_list=false
) {
global $config;
-
- if (is_metaconsole()) {
+ $hack_metaconsole = '';
+ if (is_metaconsole() === true) {
$hack_metaconsole = '../..';
- } else {
- $hack_metaconsole = '';
}
- $url = ui_get_full_url(false).$hack_metaconsole.'/include/chart_generator.php';
-
if (!$params['return_img_base_64']) {
$img_file = 'img_'.uniqid().'.png';
$img_path = $config['homedir'].'/attachment/'.$img_file;
$img_url = ui_get_full_url(false).$hack_metaconsole.'/attachment/'.$img_file;
}
- $session_id = session_id();
- if ($type_graph_pdf === 'combined') {
- $data = [
- 'data' => $params,
- 'session_id' => $session_id,
- 'type_graph_pdf' => $type_graph_pdf,
- 'data_module_list' => $module_list,
- 'data_combined' => $params_combined,
- 'id_user' => $config['id_user'],
- 'slicebar' => $_SESSION['slicebar'],
- 'slicebar_value' => $config[$_SESSION['slicebar']],
- 'apipass' => get_parameter('apipass', null),
-
- ];
- } else {
- $data = [
- 'data' => $params,
- 'session_id' => $session_id,
- 'type_graph_pdf' => $type_graph_pdf,
- 'id_user' => $config['id_user'],
- 'slicebar' => $_SESSION['slicebar'],
- 'slicebar_value' => $config[$_SESSION['slicebar']],
- 'apipass' => get_parameter('apipass', null),
- ];
+ if ($type_graph_pdf !== 'combined') {
+ $params_combined = [];
+ $module_list = [];
}
- unset($data['data']['graph_data']);
// If not install chromium avoid 500 convert tu images no data to show.
$chromium_dir = io_safe_output($config['chromium_path']);
$result_ejecution = exec($chromium_dir.' --version');
@@ -4451,22 +4425,16 @@ function generator_chart_to_pdf(
// Creates a new page.
$page = $browser->createPage();
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, $url);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, ['data' => json_encode($data)]);
+ // Generate Html.
+ $html = chart_generator(
+ $type_graph_pdf,
+ $params,
+ $params_combined,
+ $module_list
+ );
- $response = curl_exec($curl);
-
- curl_close($curl);
-
- $page->setHtml($response);
- /*
- //For debug url with parameters.
- $navigation = $page->navigate($url.'?data='.urlencode(json_encode($data)));
- $navigation->waitForNavigation(Page::DOM_CONTENT_LOADED);
- */
+ $page->setHtml($html);
// Dynamic.
$dynamic_height = $page->evaluate('document.getElementById("container-chart-generator-item").clientHeight')->getReturnValue();
@@ -4513,6 +4481,211 @@ function generator_chart_to_pdf(
}
+/**
+ * Html print chart for chromium
+ *
+ * @param string $type_graph_pdf Chart mode.
+ * @param array $params Params.
+ * @param array $params_combined Params Combined charts.
+ * @param array $module_list Module list Combined charts.
+ *
+ * @return string Output Html.
+ */
+function chart_generator(
+ string $type_graph_pdf,
+ array $params,
+ array $params_combined=[],
+ array $module_list=[]
+) : string {
+ global $config;
+
+ include_once $config['homedir'].'/include/graphs/functions_d3.php';
+
+ if (isset($params['backgroundColor']) === false) {
+ $params['backgroundColor'] = 'inherit';
+ }
+
+ $hack_metaconsole = (is_metaconsole() === true) ? '../../' : '';
+
+ $output = '';
+ $output .= '';
+ $output .= '';
+ $output .= '
';
+ $output .= '
Pandora FMS Graph';
+ $output .= '';
+
+ $css_files = [
+ 'pandora' => 'include/styles/',
+ 'pandora_minimal' => 'include/styles/',
+ 'jquery-ui.min' => 'include/styles/js/',
+ 'jquery-ui_custom' => 'include/styles/js/',
+ ];
+
+ foreach ($css_files as $name => $path) {
+ $output .= ui_require_css_file($name, $path, true, true);
+ }
+
+ $js_files = [
+ 'pandora_ui' => 'include/javascript/',
+ 'jquery.current' => 'include/javascript/',
+ 'jquery.pandora' => 'include/javascript/',
+ 'jquery-ui.min' => 'include/javascript/',
+ 'date' => 'include/javascript/timezone/src/',
+ 'pandora' => 'include/javascript/',
+ 'jquery.flot' => 'include/graphs/flot/',
+ 'jquery.flot.min' => 'include/graphs/flot/',
+ 'jquery.flot.time' => 'include/graphs/flot/',
+ 'jquery.flot.pie' => 'include/graphs/flot/',
+ 'jquery.flot.crosshair.min' => 'include/graphs/flot/',
+ 'jquery.flot.stack.min' => 'include/graphs/flot/',
+ 'jquery.flot.selection.min' => 'include/graphs/flot/',
+ 'jquery.flot.resize.min' => 'include/graphs/flot/',
+ 'jquery.flot.threshold' => 'include/graphs/flot/',
+ 'jquery.flot.threshold.multiple' => 'include/graphs/flot/',
+ 'jquery.flot.symbol.min' => 'include/graphs/flot/',
+ 'jquery.flot.exportdata.pandora' => 'include/graphs/flot/',
+ 'jquery.flot.axislabels' => 'include/graphs/flot/',
+ 'pandora.flot' => 'include/graphs/flot/',
+ 'chart' => 'include/graphs/chartjs/',
+ 'chartjs-plugin-datalabels.min' => 'include/graphs/chartjs/',
+ ];
+
+ foreach ($js_files as $name => $path) {
+ $output .= ui_require_javascript_file($name, $path, true, true);
+ }
+
+ $output .= include_javascript_d3(true, true);
+
+ $output .= '';
+ $output .= '';
+ $params['only_image'] = false;
+ $params['menu'] = false;
+ $params['disable_black'] = true;
+
+ $viewport = [
+ 'width' => 0,
+ 'height' => 0,
+ ];
+
+ $style = 'width:100%;';
+ if (isset($params['options']['viewport']) === true) {
+ $viewport = $params['options']['viewport'];
+ if (empty($viewport['width']) === false) {
+ $style .= 'width:'.$viewport['width'].'px;';
+ }
+
+ if (empty($viewport['height']) === false) {
+ $style .= 'height:'.$viewport['height'].'px;';
+ }
+ }
+
+ $output .= '
';
+ switch ($type_graph_pdf) {
+ case 'combined':
+ $params['pdf'] = true;
+ $result = graphic_combined_module(
+ $module_list,
+ $params,
+ $params_combined
+ );
+
+ $output .= $result;
+ break;
+
+ case 'sparse':
+ $params['pdf'] = true;
+ $output .= grafico_modulo_sparse($params);
+ break;
+
+ case 'pie_graph':
+ $params['pdf'] = true;
+ $chart = get_build_setup_charts(
+ 'PIE',
+ $params['options'],
+ $params['chart_data']
+ );
+
+ $output .= $chart->render(true);
+ break;
+
+ case 'vbar_graph':
+ $params['pdf'] = true;
+ $chart = get_build_setup_charts(
+ 'BAR',
+ $params['options'],
+ $params['chart_data']
+ );
+
+ $output .= $chart->render(true);
+ break;
+
+ case 'ring_graph':
+ $params['pdf'] = true;
+ $params['options']['width'] = 500;
+ $params['options']['height'] = 500;
+
+ $chart = get_build_setup_charts(
+ 'DOUGHNUT',
+ $params['options'],
+ $params['chart_data']
+ );
+
+ $output .= $chart->render(true);
+ break;
+
+ case 'line_graph':
+ $params['pdf'] = true;
+ $params['options']['width'] = '100%';
+ $params['options']['height'] = 200;
+ $chart = get_build_setup_charts(
+ 'LINE',
+ $params['options'],
+ $params['chart_data']
+ );
+ $output .= $chart->render(true);
+ break;
+
+ case 'slicebar':
+ $output .= flot_slicesbar_graph(
+ $params['graph_data'],
+ $params['period'],
+ $params['width'],
+ $params['height'],
+ $params['legend'],
+ $params['colors'],
+ $params['fontpath'],
+ $params['round_corner'],
+ $params['homeurl'],
+ $params['watermark'],
+ $params['adapt_key'],
+ $params['stat_winalse'],
+ $params['id_agent'],
+ $params['full_legend_daterray'],
+ $params['not_interactive'],
+ $params['ttl'],
+ $params['sizeForTicks'],
+ $params['show'],
+ $params['date_to'],
+ $params['server_id']
+ );
+ break;
+
+ default:
+ // Code...
+ break;
+ }
+
+ $output .= '
';
+ $output .= '';
+ $output .= '';
+
+ return $output;
+}
+
+
/**
* Get the product name.
*
diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php
index 94dcb97f6c..c461eb1402 100644
--- a/pandora_console/include/functions_alerts.php
+++ b/pandora_console/include/functions_alerts.php
@@ -2169,13 +2169,16 @@ function get_group_alerts(
$strict_user=false,
$tag=false,
$action_filter=false,
- $alert_action=true
+ $alert_action=true,
+ $search_sg=false
) {
global $config;
-
$group_query = '';
if (!empty($idGroup)) {
$group_query = ' AND id_grupo = '.$idGroup;
+ if ((bool) $search_sg === true) {
+ $group_query .= ' OR tasg.id_group = '.$idGroup;
+ }
}
if (is_array($filter)) {
diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php
index 2381d51ad6..8f5fb66f54 100644
--- a/pandora_console/include/functions_api.php
+++ b/pandora_console/include/functions_api.php
@@ -82,7 +82,7 @@ function parseOtherParameter($other, $otherType, $rawDecode)
case 'url_encode':
$returnVar = [
'type' => 'string',
- 'data' => urldecode($other),
+ 'data' => $rawDecode ? rawurldecode($other) : urldecode($other),
];
break;
diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php
index 1df84f6025..66b14a2776 100644
--- a/pandora_console/include/functions_menu.php
+++ b/pandora_console/include/functions_menu.php
@@ -1003,7 +1003,7 @@ if (is_ajax()) {
$dialogButtons = [];
$dialogButtons[] = html_print_button(
- __('Update manager'),
+ __('Warp update'),
'update_manager',
false,
'location.href="'.ui_get_full_url('/index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=history', false, false, false).'"',
diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php
index e85029064e..13813d479c 100755
--- a/pandora_console/include/functions_modules.php
+++ b/pandora_console/include/functions_modules.php
@@ -251,6 +251,11 @@ function modules_copy_agent_module_to_agent($id_agent_module, $id_destiny_agent,
unset($new_module['id_agente_modulo']);
unset($new_module['id_agente']);
+ // Set debug content.
+ if (empty($new_module['debug_content']) === false) {
+ $new_module['debug_content'] = str_replace("'", '"', $new_module['debug_content']);
+ }
+
$id_new_module = modules_create_agent_module(
$id_destiny_agent,
$new_module['nombre'],
diff --git a/pandora_console/include/functions_notifications.php b/pandora_console/include/functions_notifications.php
index 162effdf00..c65c475550 100644
--- a/pandora_console/include/functions_notifications.php
+++ b/pandora_console/include/functions_notifications.php
@@ -1066,7 +1066,7 @@ function notification_filter()
break;
case 'UPDATEMANAGER':
- $type_name = 'UPDATE MANAGER';
+ $type_name = 'WARP UPDATE';
break;
case 'ALLOWOVERRIDE':
diff --git a/pandora_console/include/functions_reports.php b/pandora_console/include/functions_reports.php
index e5b8f52b7b..9b77eed800 100755
--- a/pandora_console/include/functions_reports.php
+++ b/pandora_console/include/functions_reports.php
@@ -1011,12 +1011,12 @@ function reports_get_report_types($template=false, $not_editor=false)
$types['vuls_attack_complexity'] = [
'optgroup' => __('Vulnerabilities'),
- 'name' => __('Attack complexity graph donut'),
+ 'name' => __('Attack complexity doughnut chart'),
];
$types['vuls_by_packages'] = [
'optgroup' => __('Vulnerabilities'),
- 'name' => __('By packages in graph pie'),
+ 'name' => __('By packages in pie chart'),
];
$types['vuls_by_agent'] = [
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index b6a7486455..5c9a7e90fc 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -1978,15 +1978,21 @@ function ui_print_help_icon(
*
* @return boolean True if the file was added. False if the file doesn't exist.
*/
-function ui_require_css_file($name, $path='include/styles/', $echo_tag=false)
+function ui_require_css_file($name, $path='include/styles/', $echo_tag=false, $return=false)
{
global $config;
$filename = $path.$name.'.css';
if ($echo_tag === true) {
- echo '
';
- return null;
+ $filename .= '?v='.$config['current_package'];
+ $tag_name = '
';
+ if ($return === false) {
+ echo $tag_name;
+ return null;
+ } else {
+ return $tag_name;
+ }
}
if (! isset($config['css'])) {
@@ -2035,15 +2041,20 @@ function ui_require_css_file($name, $path='include/styles/', $echo_tag=false)
*
* @return boolean True if the file was added. False if the file doesn't exist.
*/
-function ui_require_javascript_file($name, $path='include/javascript/', $echo_tag=false)
+function ui_require_javascript_file($name, $path='include/javascript/', $echo_tag=false, $return=false)
{
global $config;
-
$filename = $path.$name.'.js';
- if ($echo_tag) {
- echo '';
- return null;
+ if ($echo_tag === true) {
+ $filename .= '?v='.$config['current_package'];
+ $tag_name = '';
+ if ($return === false) {
+ echo $tag_name;
+ return null;
+ } else {
+ return $tag_name;
+ }
}
if (! isset($config['js'])) {
diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php
index 5286c91670..98f99aefe1 100644
--- a/pandora_console/include/graphs/fgraph.php
+++ b/pandora_console/include/graphs/fgraph.php
@@ -1004,6 +1004,13 @@ function get_build_setup_charts($type, $options, $data)
}
}
+ // Set display grid true or false.
+ if (isset($options['grid']) === true) {
+ $scales = $chart->options()->getScales();
+ $scales->getX()->grid()->setDrawOnChartArea($options['grid']);
+ $scales->getY()->grid()->setDrawOnChartArea($options['grid']);
+ }
+
// Radius is null maximum possible.
if (isset($options['radius']) === true
&& empty($options['radius']) === false
diff --git a/pandora_console/include/graphs/functions_d3.php b/pandora_console/include/graphs/functions_d3.php
index 5bfd03d244..e4324afd45 100644
--- a/pandora_console/include/graphs/functions_d3.php
+++ b/pandora_console/include/graphs/functions_d3.php
@@ -11,14 +11,14 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-function include_javascript_d3($return=false)
+function include_javascript_d3($return=false, $force=false)
{
global $config;
static $is_include_javascript = false;
$output = '';
- if (!$is_include_javascript) {
+ if (!$is_include_javascript || $force === true) {
$is_include_javascript = true;
$output .= '