diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 7812e141af..724a7b7aa5 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2009-11-25 Miguel de Dios + + * index.php: clean source code, the blank end line in the end of document + and show in the browser too. + * include/functions_ui.php, operation/agentes/alerts_status.php: add new + colummn, the action column that it show the actions of alert. + * godmode/alerts/alert_templates.php: add the 'Time threshold' in the + tooltip. + 2009-11-25 Miguel de Dios * include/functions_modules.php: fix the deletion of module in the function diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index 1a96b6bea6..9814e686e2 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -54,7 +54,8 @@ if (is_ajax ()) { /* Everyday */ echo ''.__('Everyday').'
'; - } else { + } + else { $days = array ('monday' => __('Monday'), 'tuesday' => __('Tuesday'), 'wednesday' => __('Wednesday'), @@ -76,8 +77,11 @@ if (is_ajax ()) { echo ' '.__('and').' '; } echo $last; + echo "
"; } + echo "" . __('Time threshold') . ": "; + echo $template['time_threshold']; echo '
'; if ($template['time_from'] != $template['time_to']) { @@ -88,7 +92,6 @@ if (is_ajax ()) { echo '
'; } - return; } diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 26401a2f22..f4013715b0 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -283,12 +283,12 @@ function format_alert_row ($alert, $compound = false, $agent = true, $url = '') if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) $index = array('policy' => 0, 'force_execution' => 1, 'agent_name' => 2, 'module_name' => 2, - 'description' => 3, 'template' => 3, 'last_fired' => 4, 'status' => 5, - 'validate' => 6); + 'description' => 3, 'template' => 3, 'action' => 4, 'last_fired' => 5, 'status' => 6, + 'validate' => 7); else $index = array('force_execution' => 0, 'agent_name' => 1, 'module_name' => 1, - 'description' => 2, 'template' => 2, 'last_fired' => 3, 'status' => 4, - 'validate' => 5); + 'description' => 2, 'template' => 2, 'action' => 3, 'last_fired' => 4, 'status' => 5, + 'validate' => 6); if ($alert['disabled']) { $disabledHtmlStart = ''; @@ -369,6 +369,14 @@ function format_alert_row ($alert, $compound = false, $agent = true, $url = '') } $data[$index['description']] .= $disabledHtmlStart . mb_substr (safe_input ($description), 0, 35) . $disabledHtmlEnd; + $actions = get_alert_agent_module_actions ($alert['id']); + $actionText = '
    '; + foreach ($actions as $action) + $actionText .= '
  • ' . $action['name'] . '
  • '; + $actionText .= '
'; + + $data[$index['action']] = $actionText; + $data[$index['last_fired']] = $disabledHtmlStart . print_timestamp ($alert["last_fired"], true) . $disabledHtmlEnd; @@ -387,7 +395,6 @@ function format_alert_row ($alert, $compound = false, $agent = true, $url = '') } $data[$index['status']] = print_status_image($status, $title, true); - if ($compound) { $data[$index['validate']] = print_checkbox ("validate_compound[]", $alert["id"], false, true); diff --git a/pandora_console/index.php b/pandora_console/index.php index 766c15e31d..f5d00eec89 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -260,4 +260,4 @@ echo ''; $run_time = format_numeric (microtime (true) - $config['start_time'], 3); echo "\n\n"; -?> +?> \ No newline at end of file diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index 2b4854b925..166bdb5ed4 100644 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -177,18 +177,20 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { $table->head[1] = "" . __('F.') . ""; $table->head[2] = ''; //Placeholder for name $table->head[3] = __('Template'); - $table->head[4] = __('Last fired'); - $table->head[5] = __('Status'); - $table->head[6] = __('Validate'); + $table->head[4] = __('Action'); + $table->head[5] = __('Last fired'); + $table->head[6] = __('Status'); + $table->head[7] = __('Validate'); } else { $table->head[0] = "" . __('F.') . ""; $table->head[1] = ''; //Placeholder for name $table->head[2] = __('Template'); - $table->head[3] = __('Last fired'); - $table->head[4] = __('Status'); - $table->head[5] = __('Validate'); + $table->head[3] = __('Action'); + $table->head[4] = __('Last fired'); + $table->head[5] = __('Status'); + $table->head[6] = __('Validate'); } $table->title = __('Single alerts'); $table->titlestyle = "background-color:#799E48;"; @@ -207,12 +209,12 @@ else { } $table->align = array (); if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { - $table->align[5] = 'center'; $table->align[6] = 'center'; + $table->align[7] = 'center'; } else { - $table->align[4] = 'center'; $table->align[5] = 'center'; + $table->align[6] = 'center'; } $table->data = array ();