From 62c915d6df809906120f4e60e782a019e195b338 Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 9 Jan 2020 17:09:55 +0100 Subject: [PATCH 1/9] Added log when offline update fails --- pandora_console/include/ajax/update_manager.ajax.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_console/include/ajax/update_manager.ajax.php b/pandora_console/include/ajax/update_manager.ajax.php index 1988916bd5..023766a99e 100644 --- a/pandora_console/include/ajax/update_manager.ajax.php +++ b/pandora_console/include/ajax/update_manager.ajax.php @@ -404,6 +404,13 @@ if ($search_minor) { $return['have_minor'] = true; $size_mr = get_number_of_mr($package, $ent, $offline); $return['mr'] = $size_mr; + } else { + $product_name = io_safe_output(get_product_name()); + $version = get_parameter('version', ''); + db_pandora_audit( + 'ERROR: Update '.$product_name, + 'Update version of '.$product_name.' by '.$config['id_user'].' has failed.' + ); } echo json_encode($return); From 4ff1c9cb7d88c523dee605990f48ee4a07eefe2e Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Thu, 9 Jan 2020 17:56:34 +0100 Subject: [PATCH 2/9] Fixed template redirection tasklist on cron extension --- pandora_console/include/functions_cron.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index 6a79096175..5789764a3a 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -551,8 +551,9 @@ function cron_list_table() $report_per_agent = $args[0]; $report_name = $args[3]; $email = $args[4]; - $data[2] .= '
- '.__('Template').": ".$template['name'].''; + $data[2] .= '
- '.__('Template').': '; + $data[2] .= ''; + $data[2] .= $template['name'].''; $data[2] .= '
- '.__('Agents').': '.$agents_id.''; $data[2] .= '
- '.__('Report per agent').': '.$report_per_agent.''; $data[2] .= '
- '.__('Report name').': '.$report_name.''; From c9a524b12840de3c1297aee8b90c8aa388db629a Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 10 Jan 2020 11:12:05 +0100 Subject: [PATCH 3/9] fixed interval counter --- pandora_console/include/functions_agents.php | 2 +- pandora_console/operation/agentes/estado_generalagente.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 5bda3bac1a..2f7ff3433f 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -146,7 +146,7 @@ function agents_get_next_contact_time_left(int $id_agente) if ($id_agente > 0) { $last_contact = db_get_value_sql( sprintf( - 'SELECT format(intervalo,2) - (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(IF(ultimo_contacto > ultimo_contacto_remoto, ultimo_contacto, ultimo_contacto_remoto))) as "val" + 'SELECT CAST(intervalo AS SIGNED) - (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(IF(ultimo_contacto >= ultimo_contacto_remoto, ultimo_contacto, ultimo_contacto_remoto))) as "val" FROM `tagente` WHERE id_agente = %d ', $id_agente diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 4e7e668924..4ecd610c43 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -317,7 +317,7 @@ $data[1] = ui_progress( 1.8, '#BBB', true, - floor(($agent['intervalo'] * (100 - $progress) / 100)).' s', + ($agent['intervalo'] - (strtotime('now') - strtotime($agent['ultimo_contacto']))).' s', [ 'page' => 'operation/agentes/ver_agente', 'interval' => (100 / $agent['intervalo']), From 67428810095964c18b4a391eecb233a9aae21dde Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Fri, 10 Jan 2020 13:16:53 +0100 Subject: [PATCH 4/9] Fixed ui message icon bug on meta --- pandora_console/include/functions_ui.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 031e586c1d..0ca66bbe73 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -321,7 +321,7 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t $output = ' - +