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>
|
2009-11-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/functions_modules.php: fix the deletion of module in the function
|
* include/functions_modules.php: fix the deletion of module in the function
|
||||||
|
|
|
@ -54,7 +54,8 @@ if (is_ajax ()) {
|
||||||
|
|
||||||
/* Everyday */
|
/* Everyday */
|
||||||
echo '<strong>'.__('Everyday').'</strong><br />';
|
echo '<strong>'.__('Everyday').'</strong><br />';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$days = array ('monday' => __('Monday'),
|
$days = array ('monday' => __('Monday'),
|
||||||
'tuesday' => __('Tuesday'),
|
'tuesday' => __('Tuesday'),
|
||||||
'wednesday' => __('Wednesday'),
|
'wednesday' => __('Wednesday'),
|
||||||
|
@ -76,8 +77,11 @@ if (is_ajax ()) {
|
||||||
echo ' '.__('and').' ';
|
echo ' '.__('and').' ';
|
||||||
}
|
}
|
||||||
echo $last;
|
echo $last;
|
||||||
|
echo "<br />";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
echo "<strong>" . __('Time threshold') . ": </strong>";
|
||||||
|
echo $template['time_threshold'];
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
if ($template['time_from'] != $template['time_to']) {
|
if ($template['time_from'] != $template['time_to']) {
|
||||||
|
@ -88,7 +92,6 @@ if (is_ajax ()) {
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -283,12 +283,12 @@ function format_alert_row ($alert, $compound = false, $agent = true, $url = '')
|
||||||
|
|
||||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK)
|
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK)
|
||||||
$index = array('policy' => 0, 'force_execution' => 1, 'agent_name' => 2, 'module_name' => 2,
|
$index = array('policy' => 0, 'force_execution' => 1, 'agent_name' => 2, 'module_name' => 2,
|
||||||
'description' => 3, 'template' => 3, 'last_fired' => 4, 'status' => 5,
|
'description' => 3, 'template' => 3, 'action' => 4, 'last_fired' => 5, 'status' => 6,
|
||||||
'validate' => 6);
|
'validate' => 7);
|
||||||
else
|
else
|
||||||
$index = array('force_execution' => 0, 'agent_name' => 1, 'module_name' => 1,
|
$index = array('force_execution' => 0, 'agent_name' => 1, 'module_name' => 1,
|
||||||
'description' => 2, 'template' => 2, 'last_fired' => 3, 'status' => 4,
|
'description' => 2, 'template' => 2, 'action' => 3, 'last_fired' => 4, 'status' => 5,
|
||||||
'validate' => 5);
|
'validate' => 6);
|
||||||
|
|
||||||
if ($alert['disabled']) {
|
if ($alert['disabled']) {
|
||||||
$disabledHtmlStart = '<span style="font-style: italic; color: #aaaaaa;">';
|
$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;
|
$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;
|
$data[$index['last_fired']] = $disabledHtmlStart . print_timestamp ($alert["last_fired"], true) . $disabledHtmlEnd;
|
||||||
|
|
||||||
|
|
||||||
|
@ -388,7 +396,6 @@ function format_alert_row ($alert, $compound = false, $agent = true, $url = '')
|
||||||
|
|
||||||
$data[$index['status']] = print_status_image($status, $title, true);
|
$data[$index['status']] = print_status_image($status, $title, true);
|
||||||
|
|
||||||
|
|
||||||
if ($compound) {
|
if ($compound) {
|
||||||
$data[$index['validate']] = print_checkbox ("validate_compound[]", $alert["id"], false, true);
|
$data[$index['validate']] = print_checkbox ("validate_compound[]", $alert["id"], false, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,18 +177,20 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
||||||
$table->head[1] = "<span title='" . __('Force execution') . "'>" . __('F.') . "</span>";
|
$table->head[1] = "<span title='" . __('Force execution') . "'>" . __('F.') . "</span>";
|
||||||
$table->head[2] = ''; //Placeholder for name
|
$table->head[2] = ''; //Placeholder for name
|
||||||
$table->head[3] = __('Template');
|
$table->head[3] = __('Template');
|
||||||
$table->head[4] = __('Last fired');
|
$table->head[4] = __('Action');
|
||||||
$table->head[5] = __('Status');
|
$table->head[5] = __('Last fired');
|
||||||
$table->head[6] = __('Validate');
|
$table->head[6] = __('Status');
|
||||||
|
$table->head[7] = __('Validate');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$table->head[0] = "<span title='" . __('Force execution') . "'>" . __('F.') . "</span>";
|
$table->head[0] = "<span title='" . __('Force execution') . "'>" . __('F.') . "</span>";
|
||||||
$table->head[1] = ''; //Placeholder for name
|
$table->head[1] = ''; //Placeholder for name
|
||||||
$table->head[2] = __('Template');
|
$table->head[2] = __('Template');
|
||||||
$table->head[3] = __('Last fired');
|
$table->head[3] = __('Action');
|
||||||
$table->head[4] = __('Status');
|
$table->head[4] = __('Last fired');
|
||||||
$table->head[5] = __('Validate');
|
$table->head[5] = __('Status');
|
||||||
|
$table->head[6] = __('Validate');
|
||||||
}
|
}
|
||||||
$table->title = __('Single alerts');
|
$table->title = __('Single alerts');
|
||||||
$table->titlestyle = "background-color:#799E48;";
|
$table->titlestyle = "background-color:#799E48;";
|
||||||
|
@ -207,12 +209,12 @@ else {
|
||||||
}
|
}
|
||||||
$table->align = array ();
|
$table->align = array ();
|
||||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
||||||
$table->align[5] = 'center';
|
|
||||||
$table->align[6] = 'center';
|
$table->align[6] = 'center';
|
||||||
|
$table->align[7] = 'center';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$table->align[4] = 'center';
|
|
||||||
$table->align[5] = 'center';
|
$table->align[5] = 'center';
|
||||||
|
$table->align[6] = 'center';
|
||||||
}
|
}
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue