diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 71d39485ed..5cca3bfc08 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.760-220317
+Version: 7.0NG.760-220323
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 f627389151..1cd4bb6a44 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.760-220317"
+pandora_version="7.0NG.760-220323"
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 548782e68a..1fb038bd67 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.760';
-use constant AGENT_BUILD => '220317';
+use constant AGENT_BUILD => '220323';
# 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 df24b57257..c4e7643283 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.760
-%define release 220317
+%define release 220323
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 3d1a313bf9..c82c54a8b8 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.760
-%define release 220317
+%define release 220323
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 a5fbc23732..5ad8783635 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.760"
-PI_BUILD="220317"
+PI_BUILD="220323"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 7cec88850a..2562c227cd 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{220317}
+{220323}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index f07ea9b4da..ac0d6ecf37 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.760 Build 220317")
+#define PANDORA_VERSION ("7.0NG.760 Build 220323")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index e9d0760a44..31e8d991b3 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.760(Build 220317))"
+ VALUE "ProductVersion", "(7.0NG.760(Build 220323))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 4728c03770..f6becafe45 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.760-220317
+Version: 7.0NG.760-220323
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 42b77bfe0e..5ad1d08da0 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.760-220317"
+pandora_version="7.0NG.760-220323"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extras/mr/53.sql b/pandora_console/extras/mr/53.sql
index cbf408f5f2..dfb7976a91 100644
--- a/pandora_console/extras/mr/53.sql
+++ b/pandora_console/extras/mr/53.sql
@@ -1,5 +1,7 @@
START TRANSACTION;
+ALTER TABLE `tipam_vlan` ADD COLUMN `custom_id` bigint(20) unsigned DEFAULT NULL;
+
UPDATE `tuser_task` SET `parameters` = 'a:3:{i:0;a:2:{s:11:"description";s:11:"Description";s:4:"type";s:4:"text";}i:1;a:3:{s:11:"description";s:20:"Save to disk in path";s:4:"type";s:6:"string";s:13:"default_value";s:21:"_%_ATTACHMENT_PATH_%_";}i:2;a:3:{s:11:"description";s:14:"Active backups";s:4:"type";s:6:"number";s:13:"default_value";i:3;}}' WHERE `function_name` = 'cron_task_do_backup';
CREATE TABLE IF NOT EXISTS `tbackup` (
@@ -14,4 +16,4 @@ CREATE TABLE IF NOT EXISTS `tbackup` (
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-COMMIT;
\ No newline at end of file
+COMMIT;
diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php
index b3a211efdf..a68104f4e4 100755
--- a/pandora_console/godmode/massive/massive_edit_agents.php
+++ b/pandora_console/godmode/massive/massive_edit_agents.php
@@ -69,8 +69,6 @@ if (is_ajax() === true) {
if ($groups_secondary_selected === true) {
$groups = get_parameter('groups', []);
$groups_selected = get_parameter('groups_selected', []);
- hd($groups, true);
- hd($groups_selected, true);
$user_groups = users_get_groups($config['user'], 'AR', false);
$ret = [];
diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
index 719eda6e46..8cd4172daf 100755
--- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php
+++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
@@ -27,6 +27,8 @@
* ============================================================================
*/
+use PandoraFMS\Enterprise\Metaconsole\Synchronizer;
+
global $config;
@@ -3839,7 +3841,12 @@ function print_SLA_list($width, $action, $idItem=null)
[$item['id_agent_module']]
);
echo '
';
- echo printSmallFont($nameService);
+ if ($meta && $server_name != '') {
+ echo $server_name.' » '.$nameService;
+ } else {
+ echo $nameService;
+ }
+
echo '';
}
@@ -3986,8 +3993,8 @@ function print_SLA_list($width, $action, $idItem=null)
apply(
+ function ($node) {
+ try {
+ $node->connect();
+
+ $services_tmp = enterprise_hook(
+ 'services_get_services',
+ [
+ false,
+ [
+ 'id',
+ 'name',
+ 'description',
+ 'sla_id_module',
+ 'sla_value_id_module',
+ ],
+ ]
+ );
+
+ $all_services = [];
+ if (empty($services_tmp) === false
+ && $services_tmp !== ENTERPRISE_NOT_HOOK
+ ) {
+ foreach ($services_tmp as $service) {
+ $check_module_sla = modules_check_agentmodule_exists(
+ $service['sla_id_module']
+ );
+ $check_module_sla_value = modules_check_agentmodule_exists(
+ $service['sla_value_id_module']
+ );
+
+ if ($check_module_sla === true
+ && $check_module_sla_value === true
+ ) {
+ $all_services[$service['id']] = $service;
+ }
+ }
+ }
+
+ $node->disconnect();
+ } catch (\Exception $e) {
+ $all_services = false;
+ }
+
+ if ($all_services !== false) {
+ return array_reduce(
+ $all_services,
+ function ($carry, $item) use ($node) {
+ $carry[] = [
+ 'id' => $node->id().'|'.$item['id'],
+ 'name' => io_safe_output(
+ $node->server_name().' » '.$item['name']
+ ),
+ ];
+ return $carry;
+ },
+ []
+ );
+ }
+
+ return [];
+ },
+ false
+ );
+
+ foreach ($node_services as $ns) {
+ foreach ($ns as $k => $ser) {
+ $services[$ser['id']] = $ser['name'];
+ }
+ }
+ }
+
echo ' | ';
echo html_print_select(
$services,
@@ -5334,6 +5417,11 @@ function addSLARow() {
var slaMax = $("input[name=sla_max]").val();
var slaLimit = $("input[name=sla_limit]").val();
var serviceId = $("select#id_service>option:selected").val();
+ if(serviceId != '' && serviceId.split('|').length > 1 ) {
+ var ids = serviceId.split('|');
+ serverId = ids[0];
+ serviceId = ids[1];
+ }
var serviceName = $("select#id_service>option:selected").text();
if ((((idAgent != '') && (idAgent > 0))
diff --git a/pandora_console/godmode/reporting/visual_console_builder.data.php b/pandora_console/godmode/reporting/visual_console_builder.data.php
index e953e94092..2c5f1f4ce0 100644
--- a/pandora_console/godmode/reporting/visual_console_builder.data.php
+++ b/pandora_console/godmode/reporting/visual_console_builder.data.php
@@ -170,7 +170,7 @@ $table->data[2][0] = __('Background');
$table->data[2][1] = html_print_select(
$backgrounds_list,
'background',
- $background,
+ io_safe_output($background),
'',
'None',
'None.png',
diff --git a/pandora_console/godmode/setup/performance.php b/pandora_console/godmode/setup/performance.php
index 52a429dc95..ad74c490c2 100644
--- a/pandora_console/godmode/setup/performance.php
+++ b/pandora_console/godmode/setup/performance.php
@@ -504,9 +504,9 @@ $table_other->style[0] = 'font-weight: bold';
$table_other->size[0] = '70%';
$table_other->size[1] = '30%';
-
-$table_other->data[1][0] = __('Item limit for realtime reports');
-$table_other->data[1][1] = html_print_input_text(
+$i = 0;
+$table_other->data[$i][0] = __('Item limit for realtime reports');
+$table_other->data[$i++][1] = html_print_input_text(
'report_limit',
$config['report_limit'],
'',
@@ -515,8 +515,8 @@ $table_other->data[1][1] = html_print_input_text(
true
);
-$table_other->data[2][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
-$table_other->data[2][1] = html_print_input_text(
+$table_other->data[$i][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
+$table_other->data[$i++][1] = html_print_input_text(
'step_compact',
$config['step_compact'],
'',
@@ -535,8 +535,8 @@ $intervals[SECONDS_1WEEK] = __('Last week');
$intervals[SECONDS_2WEEK] = __('2 weeks');
$intervals[SECONDS_1MONTH] = __('Last month');
-$table_other->data[3][0] = __('Default hours for event view');
-$table_other->data[3][1] = html_print_input_text(
+$table_other->data[$i][0] = __('Default hours for event view');
+$table_other->data[$i++][1] = html_print_input_text(
'event_view_hr',
$config['event_view_hr'],
'',
@@ -545,16 +545,16 @@ $table_other->data[3][1] = html_print_input_text(
true
);
-$table_other->data[5][0] = __('Use realtime statistics');
-$table_other->data[5][1] = html_print_checkbox_switch(
+$table_other->data[$i][0] = __('Use realtime statistics');
+$table_other->data[$i++][1] = html_print_checkbox_switch(
'realtimestats',
1,
$config['realtimestats'],
true
);
-$table_other->data[6][0] = __('Batch statistics period (secs)');
-$table_other->data[6][1] = html_print_input_text(
+$table_other->data[$i][0] = __('Batch statistics period (secs)');
+$table_other->data[$i++][1] = html_print_input_text(
'stats_interval',
$config['stats_interval'],
'',
@@ -563,11 +563,11 @@ $table_other->data[6][1] = html_print_input_text(
true
);
-$table_other->data[7][0] = __('Use agent access graph');
-$table_other->data[7][1] = html_print_checkbox_switch('agentaccess', 1, $config['agentaccess'], true);
+$table_other->data[$i][0] = __('Use agent access graph');
+$table_other->data[$i++][1] = html_print_checkbox_switch('agentaccess', 1, $config['agentaccess'], true);
-$table_other->data[8][0] = __('Max. recommended number of files in attachment directory');
-$table_other->data[8][1] = html_print_input_text(
+$table_other->data[$i][0] = __('Max. recommended number of files in attachment directory');
+$table_other->data[$i++][1] = html_print_input_text(
'num_files_attachment',
$config['num_files_attachment'],
'',
@@ -576,11 +576,11 @@ $table_other->data[8][1] = html_print_input_text(
true
);
-$table_other->data[9][0] = __('Delete not init modules');
-$table_other->data[9][1] = html_print_checkbox_switch('delete_notinit', 1, $config['delete_notinit'], true);
+$table_other->data[$i][0] = __('Delete not init modules');
+$table_other->data[$i++][1] = html_print_checkbox_switch('delete_notinit', 1, $config['delete_notinit'], true);
-$table_other->data[10][0] = __('Big Operation Step to purge old data');
-$table_other->data[10][1] = html_print_input_text(
+$table_other->data[$i][0] = __('Big Operation Step to purge old data');
+$table_other->data[$i++][1] = html_print_input_text(
'big_operation_step_datos_purge',
$config['big_operation_step_datos_purge'],
'',
@@ -589,8 +589,8 @@ $table_other->data[10][1] = html_print_input_text(
true
);
-$table_other->data[11][0] = __('Small Operation Step to purge old data');
-$table_other->data[11][1] = html_print_input_text(
+$table_other->data[$i][0] = __('Small Operation Step to purge old data');
+$table_other->data[$i++][1] = html_print_input_text(
'small_operation_step_datos_purge',
$config['small_operation_step_datos_purge'],
'',
@@ -599,8 +599,8 @@ $table_other->data[11][1] = html_print_input_text(
true
);
-$table_other->data[12][0] = __('Graph container - Max. Items');
-$table_other->data[12][1] = html_print_input_text(
+$table_other->data[$i][0] = __('Graph container - Max. Items');
+$table_other->data[$i++][1] = html_print_input_text(
'max_graph_container',
$config['max_graph_container'],
'',
@@ -609,8 +609,8 @@ $table_other->data[12][1] = html_print_input_text(
true
);
-$table_other->data[13][0] = __('Events response max. execution');
-$table_other->data[13][1] = html_print_input_text(
+$table_other->data[$i][0] = __('Events response max. execution');
+$table_other->data[$i++][1] = html_print_input_text(
'max_execution_event_response',
$config['max_execution_event_response'],
'',
@@ -619,8 +619,8 @@ $table_other->data[13][1] = html_print_input_text(
true
);
-$table_other->data[14][0] = __('Row limit in csv log');
-$table_other->data[14][1] = html_print_input_text(
+$table_other->data[$i][0] = __('Row limit in csv log');
+$table_other->data[$i++][1] = html_print_input_text(
'row_limit_csv',
$config['row_limit_csv'],
'',
@@ -629,8 +629,8 @@ $table_other->data[14][1] = html_print_input_text(
true
);
-$table_other->data[15][0] = __('SNMP walk binary');
-$table_other->data[15][1] = html_print_input_text(
+$table_other->data[$i][0] = __('SNMP walk binary');
+$table_other->data[$i++][1] = html_print_input_text(
'snmpwalk',
$config['snmpwalk'],
'',
@@ -643,8 +643,8 @@ $tip = ui_print_help_tip(
__('SNMP bulk walk is not able to request V1 SNMP, this option will be used instead (by default snmpwalk, slower).'),
true
);
-$table_other->data[16][0] = __('SNMP walk binary (fallback)').$tip;
-$table_other->data[16][1] = html_print_input_text(
+$table_other->data[$i][0] = __('SNMP walk binary (fallback)').$tip;
+$table_other->data[$i++][1] = html_print_input_text(
'snmpwalk_fallback',
$config['snmpwalk_fallback'],
'',
@@ -653,6 +653,31 @@ $table_other->data[16][1] = html_print_input_text(
true
);
+$tip = ui_print_help_tip(
+ __(
+ '%s web2image cache system cleanup. It is always cleaned up after perform an upgrade',
+ get_product_name()
+ ),
+ true
+);
+
+if (enterprise_installed() === true) {
+ $table_other->data[$i][0] = __('PhantomJS cache cleanup ').$tip;
+ $table_other->data[$i++][1] = html_print_input(
+ [
+ 'type' => 'select',
+ 'name' => 'phantomjs_cache_interval',
+ 'return' => true,
+ 'fields' => [
+ PHANTOM_CACHE_CLEANUP_ONCE => __('No scheduled'),
+ PHANTOM_CACHE_CLEANUP_WEEKLY => __('Each week'),
+ PHANTOM_CACHE_CLEANUP_DAILY => __('Each day'),
+ ],
+ 'selected' => ($config['phantomjs_cache_interval'] ?? PHANTOM_CACHE_CLEANUP_ONCE),
+ ]
+ );
+}
+
echo ' |