2009-11-25 Miguel de Dios <miguel.dedios@artica.es>
* 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. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2130 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
8c7a1340b2
commit
c311027031
|
@ -1,3 +1,12 @@
|
|||
2009-11-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* 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 <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_modules.php: fix the deletion of module in the function
|
||||
|
|
|
@ -54,7 +54,8 @@ if (is_ajax ()) {
|
|||
|
||||
/* Everyday */
|
||||
echo '<strong>'.__('Everyday').'</strong><br />';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$days = array ('monday' => __('Monday'),
|
||||
'tuesday' => __('Tuesday'),
|
||||
'wednesday' => __('Wednesday'),
|
||||
|
@ -76,8 +77,11 @@ if (is_ajax ()) {
|
|||
echo ' '.__('and').' ';
|
||||
}
|
||||
echo $last;
|
||||
echo "<br />";
|
||||
|
||||
}
|
||||
echo "<strong>" . __('Time threshold') . ": </strong>";
|
||||
echo $template['time_threshold'];
|
||||
echo '<br />';
|
||||
|
||||
if ($template['time_from'] != $template['time_to']) {
|
||||
|
@ -88,7 +92,6 @@ if (is_ajax ()) {
|
|||
echo '<br />';
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 = '<span style="font-style: italic; color: #aaaaaa;">';
|
||||
|
@ -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 = '<ul>';
|
||||
foreach ($actions as $action)
|
||||
$actionText .= '<li>' . $action['name'] . '</li>';
|
||||
$actionText .= '</ul>';
|
||||
|
||||
$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);
|
||||
|
|
|
@ -260,4 +260,4 @@ echo '</html>';
|
|||
|
||||
$run_time = format_numeric (microtime (true) - $config['start_time'], 3);
|
||||
echo "\n<!-- Page generated in $run_time seconds -->\n";
|
||||
?>
|
||||
?>
|
|
@ -177,18 +177,20 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
|||
$table->head[1] = "<span title='" . __('Force execution') . "'>" . __('F.') . "</span>";
|
||||
$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] = "<span title='" . __('Force execution') . "'>" . __('F.') . "</span>";
|
||||
$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 ();
|
||||
|
||||
|
|
Loading…
Reference in New Issue