Merge branch 'ent-11734-paradas-planificadas-periodicas-y-de-cron-no-deshabilitan-los-modulos' into 'develop'

Fix cron and periodically module planned downtimes

See merge request artica/pandorafms!6248
This commit is contained in:
Gorka Sanchez 2023-08-31 10:33:18 +00:00
commit 34ddf9e06c
2 changed files with 14 additions and 8 deletions

View File

@ -89,7 +89,7 @@ if (is_ajax() === true) {
[ [
'id' => 'agent_modules_affected_planned_downtime', 'id' => 'agent_modules_affected_planned_downtime',
'class' => 'info_table', 'class' => 'info_table',
'style' => 'width: 100%', 'style' => 'width: 99%',
'columns' => $columns, 'columns' => $columns,
'column_names' => $column_names, 'column_names' => $column_names,
'ajax_url' => 'godmode/agentes/planned_downtime.list', 'ajax_url' => 'godmode/agentes/planned_downtime.list',
@ -730,7 +730,7 @@ if ($downtimes === false && $filter_performed === false) {
$table->cellstyle = []; $table->cellstyle = [];
$table->head = []; $table->head = [];
$table->head['name'] = __('Name #Ag.'); $table->head['name'] = __('Name (Ag.)');
$table->head['description'] = __('Description'); $table->head['description'] = __('Description');
$table->head['group'] = __('Group'); $table->head['group'] = __('Group');
$table->head['type'] = __('Type'); $table->head['type'] = __('Type');

View File

@ -2397,7 +2397,8 @@ sub pandora_planned_downtime_cron_start($$) {
$dbh, $downtime->{'id'}); $dbh, $downtime->{'id'});
} }
elsif (($downtime->{'type_downtime'} eq "disable_agents") elsif (($downtime->{'type_downtime'} eq "disable_agents")
|| ($downtime->{'type_downtime'} eq "disable_agents_alerts")) { || ($downtime->{'type_downtime'} eq "disable_agents_alerts")
|| ($downtime->{'type_downtime'} eq "disable_agent_modules")) {
pandora_planned_downtime_set_disabled_elements($pa_config, pandora_planned_downtime_set_disabled_elements($pa_config,
$dbh, $downtime); $dbh, $downtime);
} }
@ -2448,7 +2449,8 @@ sub pandora_planned_downtime_cron_stop($$) {
$dbh, $downtime->{'id'}); $dbh, $downtime->{'id'});
} }
elsif (($downtime->{'type_downtime'} eq "disable_agents") elsif (($downtime->{'type_downtime'} eq "disable_agents")
|| ($downtime->{'type_downtime'} eq "disable_agents_alerts")) { || ($downtime->{'type_downtime'} eq "disable_agents_alerts")
|| ($downtime->{'type_downtime'} eq "disable_agent_modules")) {
pandora_planned_downtime_unset_disabled_elements($pa_config, pandora_planned_downtime_unset_disabled_elements($pa_config,
$dbh, $downtime); $dbh, $downtime);
} }
@ -2856,7 +2858,8 @@ sub pandora_planned_downtime_monthly_start($$) {
pandora_planned_downtime_set_quiet_elements($pa_config, $dbh, $downtime->{'id'}); pandora_planned_downtime_set_quiet_elements($pa_config, $dbh, $downtime->{'id'});
} }
elsif (($downtime->{'type_downtime'} eq "disable_agents") elsif (($downtime->{'type_downtime'} eq "disable_agents")
|| ($downtime->{'type_downtime'} eq "disable_agents_alerts")) { || ($downtime->{'type_downtime'} eq "disable_agents_alerts")
|| ($downtime->{'type_downtime'} eq "disable_agent_modules")) {
pandora_planned_downtime_set_disabled_elements($pa_config, $dbh, $downtime); pandora_planned_downtime_set_disabled_elements($pa_config, $dbh, $downtime);
} }
@ -2934,7 +2937,8 @@ sub pandora_planned_downtime_monthly_stop($$) {
$dbh, $downtime->{'id'}); $dbh, $downtime->{'id'});
} }
elsif (($downtime->{'type_downtime'} eq "disable_agents") elsif (($downtime->{'type_downtime'} eq "disable_agents")
|| ($downtime->{'type_downtime'} eq "disable_agents_alerts")) { || ($downtime->{'type_downtime'} eq "disable_agents_alerts")
|| ($downtime->{'type_downtime'} eq "disable_agent_modules")) {
pandora_planned_downtime_unset_disabled_elements($pa_config, pandora_planned_downtime_unset_disabled_elements($pa_config,
$dbh, $downtime); $dbh, $downtime);
@ -3044,7 +3048,8 @@ sub pandora_planned_downtime_weekly_start($$) {
$dbh, $downtime->{'id'}); $dbh, $downtime->{'id'});
} }
elsif (($downtime->{'type_downtime'} eq "disable_agents") elsif (($downtime->{'type_downtime'} eq "disable_agents")
|| ($downtime->{'type_downtime'} eq "disable_agents_alerts")) { || ($downtime->{'type_downtime'} eq "disable_agents_alerts")
|| ($downtime->{'type_downtime'} eq "disable_agent_modules")) {
pandora_planned_downtime_set_disabled_elements($pa_config, pandora_planned_downtime_set_disabled_elements($pa_config,
$dbh, $downtime); $dbh, $downtime);
} }
@ -3159,7 +3164,8 @@ sub pandora_planned_downtime_weekly_stop($$) {
$dbh, $downtime->{'id'}); $dbh, $downtime->{'id'});
} }
elsif (($downtime->{'type_downtime'} eq "disable_agents") elsif (($downtime->{'type_downtime'} eq "disable_agents")
|| ($downtime->{'type_downtime'} eq "disable_agents_alerts")) { || ($downtime->{'type_downtime'} eq "disable_agents_alerts")
|| ($downtime->{'type_downtime'} eq "disable_agent_modules")) {
pandora_planned_downtime_unset_disabled_elements($pa_config, pandora_planned_downtime_unset_disabled_elements($pa_config,
$dbh, $downtime); $dbh, $downtime);
} }