diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 5565a9fe78..3c5defe04d 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -664,7 +664,7 @@ function mainAgentsModules() $name = $module; $modules_by_name[$cont]['name'] = $name; $modules_by_name[$cont]['id'][] = $key; - $cont ++; + $cont++; } } diff --git a/pandora_console/extras/mr/50.sql b/pandora_console/extras/mr/50.sql index 0ab1cb6387..2cf49fd3ac 100644 --- a/pandora_console/extras/mr/50.sql +++ b/pandora_console/extras/mr/50.sql @@ -124,4 +124,7 @@ INSERT IGNORE INTO `tncm_script` VALUES INSERT INTO `tncm_template_scripts`(`id_template`, `id_script`) VALUES (1,1),(1,2),(1,3),(1,4),(1,5); +ALTER TABLE `tevent_alert` ADD COLUMN `last_evaluation` bigint(20) NOT NULL default 0; +ALTER TABLE `tevent_alert` ADD COLUMN `pool_occurrences` int unsigned not null default 0; + COMMIT; 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 b5e340c1dc..2762672e09 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 @@ -712,6 +712,8 @@ ALTER TABLE `tevent_alert` MODIFY COLUMN `time_threshold` int(10) NOT NULL defau ALTER TABLE `tevent_alert` ADD COLUMN `disable_event` tinyint(1) DEFAULT 0; ALTER TABLE `tevent_alert` ADD COLUMN `id_template_conditions` int(10) unsigned NOT NULL default 0; ALTER TABLE `tevent_alert` ADD COLUMN `id_template_fields` int(10) unsigned NOT NULL default 0; +ALTER TABLE `tevent_alert` ADD COLUMN `last_evaluation` bigint(20) NOT NULL default 0; +ALTER TABLE `tevent_alert` ADD COLUMN `pool_occurrences` int unsigned not null default 0; -- ----------------------------------------------------- -- Table `tevent_alert_action` diff --git a/pandora_console/godmode/massive/massive_add_profiles.php b/pandora_console/godmode/massive/massive_add_profiles.php index f1903b83de..71a0b6777a 100644 --- a/pandora_console/godmode/massive/massive_add_profiles.php +++ b/pandora_console/godmode/massive/massive_add_profiles.php @@ -85,7 +85,7 @@ if ($create_profiles) { ); $return = profile_create_user_profile($user, $profile, $group); if ($return !== false) { - $n_added ++; + $n_added++; } } } diff --git a/pandora_console/godmode/massive/massive_operations.php b/pandora_console/godmode/massive/massive_operations.php index 23693a5d4b..547ced655c 100755 --- a/pandora_console/godmode/massive/massive_operations.php +++ b/pandora_console/godmode/massive/massive_operations.php @@ -219,7 +219,8 @@ $alertstab = [ 'title' => __('Alerts operations'), 'class' => 'invert_filter', ] - ).'', 'active' => $tab == 'massive_alerts', + ).'', + 'active' => $tab == 'massive_alerts', ]; $userstab = [ @@ -230,7 +231,8 @@ $userstab = [ 'title' => __('Users operations'), 'class' => 'invert_filter', ] - ).'', 'active' => $tab == 'massive_users', + ).'', + 'active' => $tab == 'massive_users', ]; $agentstab = [ @@ -241,7 +243,8 @@ $agentstab = [ 'title' => __('Agents operations'), 'class' => 'invert_filter', ] - ).'', 'active' => $tab == 'massive_agents', + ).'', + 'active' => $tab == 'massive_agents', ]; $modulestab = [ @@ -252,7 +255,8 @@ $agentstab = [ 'title' => __('Modules operations'), 'class' => 'invert_filter', ] - ).'', 'active' => $tab == 'massive_modules', + ).'', + 'active' => $tab == 'massive_modules', ]; $pluginstab = [ @@ -263,7 +267,8 @@ $agentstab = [ 'title' => __('Plugins operations'), 'class' => 'invert_filter', ] - ).'', 'active' => $tab == 'massive_plugins', + ).'', + 'active' => $tab == 'massive_plugins', ]; $policiestab = enterprise_hook('massive_policies_tab'); diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index aaed1b0137..b0caf02af0 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -3772,23 +3772,23 @@ function print_SLA_list($width, $action, $idItem=null) ], ] ); - if (!empty($services_tmp) - && $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 - && $check_module_sla_value + if (!empty($services_tmp) + && $services_tmp != ENTERPRISE_NOT_HOOK ) { - $services[$service['id']] = $service['name']; + 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 + && $check_module_sla_value + ) { + $services[$service['id']] = $service['name']; + } + } } - } - } echo '