2013-04-25 Miguel de Dios <miguel.dedios@artica.es>

* godmode/events/custom_events.php,
	godmode/massive/massive_enable_disable_alerts.php,
	godmode/massive/massive_edit_agents.php,
	godmode/massive/massive_delete_modules.php,
	godmode/massive/massive_add_action_alerts.php,
	godmode/massive/massive_delete_profiles.php,
	godmode/massive/massive_delete_alerts.php,
	godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
	godmode/reporting/graph_builder.php, godmode/reporting/graphs.php,
	godmode/alerts/alert_templates.php,
	godmode/alerts/configure_alert_action.php, include/functions_ui.php,
	include/functions_graph.php: improved the source code.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8057 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-04-25 10:16:41 +00:00
parent 5333840059
commit ff8ffd53b2
16 changed files with 87 additions and 61 deletions

View File

@ -1,3 +1,18 @@
2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
* godmode/events/custom_events.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_edit_agents.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_add_action_alerts.php,
godmode/massive/massive_delete_profiles.php,
godmode/massive/massive_delete_alerts.php,
godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/graphs.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php, include/functions_ui.php,
include/functions_graph.php: improved the source code.
2013-04-25 Ramon Novoa <rnovoa@artica.es>
* pandoradb.sql,

View File

@ -167,7 +167,10 @@ if ($delete_template) {
alerts_meta_print_header ();
}
else {
ui_print_page_header (__('Alerts')." &raquo; ". __('Alert templates'), "images/gm_alerts.png", false, "alert_template", true);
ui_print_page_header(
__('Alerts') . " &raquo; " . __('Alert templates'),
"images/gm_alerts.png", false, "alert_template",
true);
}
}
} // If user tries to delete a template of others groups

View File

@ -44,18 +44,21 @@ if ($enterpriseEnable){
$subsection = '';
switch ($activeTab) {
case 'main': $buttons['graph_list']['active'] = true;
case 'main':
$buttons['graph_list']['active'] = true;
$subsection = ' &raquo; '.__('Graph list');
break;
default: $subsection = reporting_enterprise_add_graph_template_subsection($activeTab, $buttons);
default:
$subsection = reporting_enterprise_add_graph_template_subsection($activeTab, $buttons);
break;
}
switch ($activeTab) {
case 'main': require_once('godmode/reporting/graphs.php');
case 'main':
require_once('godmode/reporting/graphs.php');
break;
default: reporting_enterprise_select_graph_template_tab($activeTab);
default:
reporting_enterprise_select_graph_template_tab($activeTab);
break;
}
@ -116,8 +119,10 @@ if ($multiple_delete) {
db_process_sql_commit();
}
if ($result !== false) $result = true;
else $result = false;
if ($result !== false)
$result = true;
else
$result = false;
$str_ids = implode (',', $ids);
if ($result) {

View File

@ -2146,7 +2146,9 @@ function grafico_eventos_total($filter = "", $width = 320, $height = 200) {
$legend = array ();
$total = 0;
$sql = "SELECT criticity, COUNT(id_evento) events FROM tevento GROUP BY criticity ORDER BY events DESC";
$sql = "SELECT criticity, COUNT(id_evento) events
FROM tevento
GROUP BY criticity ORDER BY events DESC";
$criticities = db_get_all_rows_sql ($sql, false, false);
@ -2398,10 +2400,10 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho
if (!empty($event['utimestamp'])) {
$data[$cont]['utimestamp'] = $periodtime;
switch ($event['criticity']) {
case 3:
case EVENT_CRIT_WARNING:
$data[$cont]['data'] = 2;
break;
case 4:
case EVENT_CRIT_CRITICAL:
$data[$cont]['data'] = 3;
break;
default:

View File

@ -1725,7 +1725,8 @@ function ui_print_module_warn_value ($max_warning, $min_warning, $str_warning, $
$data .= " - ";
if ($max_critical != $min_critical) {
$data .= format_for_graph($max_critical) ."/". format_for_graph ($min_critical);
$data .= format_for_graph($max_critical) . "/" .
format_for_graph ($min_critical);
}
else {
$data .= __("N/A");