From 5bbed8c526082897b9d71894102ed69144f95412 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Fri, 5 Apr 2013 13:07:03 +0000 Subject: [PATCH] 2013-04-05 Miguel de Dios * mobile/operation/agents.php, mobile/operation/tactical.php, mobile/operation/home.php, mobile/include/style/main.css, include/functions_html.php, include/functions_reporting.php: some fixes and improves in the mobile console. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 ++++ pandora_console/mobile/include/style/main.css | 31 ++++++++++++-- pandora_console/mobile/operation/agents.php | 20 ++++++--- pandora_console/mobile/operation/events.php | 42 +++++++++++-------- 4 files changed, 74 insertions(+), 26 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e5c739ec94..ecd3d01bf2 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-04-05 Miguel de Dios + + * mobile/operation/agents.php, mobile/operation/tactical.php, + mobile/operation/home.php, mobile/include/style/main.css, + include/functions_html.php, include/functions_reporting.php: some + fixes and improves in the mobile console. + 2013-04-05 Ramon Novoa * include/functions_events.php: Display the event text properly. diff --git a/pandora_console/mobile/include/style/main.css b/pandora_console/mobile/include/style/main.css index f96aa7654c..e033688797 100644 --- a/pandora_console/mobile/include/style/main.css +++ b/pandora_console/mobile/include/style/main.css @@ -14,6 +14,10 @@ body { vertical-align: top; } +.small { + font-size: 10px !important; +} + .ui-header .ui-title { font-size: 14px !important; } @@ -402,9 +406,9 @@ table#list_events th { } @media screen and (max-width: 35em) { - /* Put in new line the event name */ + /* Hide the title of event name */ #list_events tbody tr.events td.cell_0 b.ui-table-cell-label { - display: block; + display: none; } } @@ -432,7 +436,9 @@ table#list_events th { #list_agents .cell_2 .ui-table-cell-label, #list_agents .cell_3 .ui-table-cell-label, #list_agents .cell_6 .ui-table-cell-label, - #list_agents .cell_7 .ui-table-cell-label { + #list_agents .cell_4 .ui-table-cell-label, + #list_agents .cell_5 .ui-table-cell-label, + #list_agents .cell_8 .ui-table-cell-label { min-width: auto !important; } @@ -449,6 +455,25 @@ table#list_events th { display: inline !important; float: none !important; } + + #list_agents .cell_4, + #list_agents .cell_8 { + display: inline !important; + float: none !important; + } + + #list_agents .cell_8 { + display: inline !important; + float: none !important; + } + + #list_agents b.ui-table-cell-label { + display: none; + } + + #list_agents .show_collapside { + display: inline !important; + } } /*END-----------Agents styles-----------------------------------------*/ diff --git a/pandora_console/mobile/operation/agents.php b/pandora_console/mobile/operation/agents.php index 788be314bc..7e100ea1a0 100644 --- a/pandora_console/mobile/operation/agents.php +++ b/pandora_console/mobile/operation/agents.php @@ -253,14 +253,21 @@ class Agents { $row = array(); $row[0] = $row[__('Agent')] = io_safe_output($agent['nombre']); - $row[1] = $row[__('Description')] = ui_print_truncate_text($agent["description"], 'description', false, true); + $row[1] = $row[__('Description')] = '' . + ui_print_truncate_text($agent["description"], 'description', false, true) . + ''; + $row[2] = $row[__('OS')] = ui_print_os_icon ($agent["id_os"], false, true); $row[3] = $row[__('Group')] = ui_print_group_icon ($agent["id_grupo"], true); - $row[4] = $row[__('Interval')] = human_time_description_raw($agent["intervalo"]); - $row[5] = $row[__('Modules')] = reporting_tiny_stats($agent, true); - $row[6] = $row[__('Status')] = agents_tree_view_status_img ($agent["critical_count"], + $row[4] = $row[__('Interval')] = '' . + '' . human_time_description_raw($agent["intervalo"]) . ''; + $row[5] = $row[__('Status')] = '' . agents_tree_view_status_img ($agent["critical_count"], $agent["warning_count"], $agent["unknown_count"]); - $row[7] = $row[__('Alerts')] = agents_tree_view_alert_img ($agent["fired_count"]); + $row[6] = $row[__('Alerts')] = '' . agents_tree_view_alert_img ($agent["fired_count"]); + + $row[7] = $row[__('Modules')] = '' . + reporting_tiny_stats($agent, true); + $last_time = strtotime ($agent["ultimo_contacto"]); $now = time (); $diferencia = $now - $last_time; @@ -271,6 +278,9 @@ class Agents { else $row[8] = $row[__('Last contact')] = $time; + $row[8] = $row[__('Last contact')] = '' . + $row[__('Last contact')]; + if (!$ajax) { unset($row[0]); unset($row[1]); diff --git a/pandora_console/mobile/operation/events.php b/pandora_console/mobile/operation/events.php index a02aea7d12..8c7ecfc919 100644 --- a/pandora_console/mobile/operation/events.php +++ b/pandora_console/mobile/operation/events.php @@ -127,6 +127,15 @@ class Events { $event = events_get_event($id_event); if ($event) { + //Check if it is a event from module. + if ($event['id_agentmodule'] > 0) { + $event['module_graph_link'] = + '' . + html_print_image('images/chart_curve.png', true, array ("style" => 'vertical-align: middle;')) . + ''; + } + + $event['evento'] = io_safe_output($event['evento']); $event['clean_tags'] = events_clean_tags($event['tags']); @@ -361,33 +370,18 @@ class Events { $options['title_close_button'] = true; $options['title_text'] = __('Event detail'); - $table = new Table(); - $table->row_keys_as_head_row = true; - $table->addRow(array('event_id' => ""), __('Event ID')); - $table->addRow(array('event_name' => ""), __('Event name')); - $table->addRow(array('event_timestamp' => ""), __('Timestamp')); - $table->addRow(array('event_owner' => ""), __('Owner')); - $table->addRow(array('event_type' => ""), __('Type')); - $table->addRow(array('event_repeated' => ""), __('Repeated')); - $table->addRow(array('event_severity' => ""), __('Severity')); - $table->addRow(array('event_status' => ""), __('Status')); - $table->addRow(array('event_acknowledged_by' => ""), __('Acknowledged by')); - $table->addRow(array('event_group' => ""), __('Group')); - $table->addRow(array('event_tags' => ""), __('Tags')); - //Content ob_start(); ?> + + + - - - - @@ -420,6 +414,11 @@ class Events { + + + + + @@ -778,6 +777,13 @@ class Events { $(\"#detail_event_dialog .cell_event_tags\") .html(event[\"tags\"]); + //The link to module graph + $(\".event_module_graph\").hide(); + if (event[\"id_agentmodule\"] != \"0\") { + $(\".event_module_graph\").show(); + $(\".cell_module_graph\").html(event[\"module_graph_link\"]); + } + $(\"#event_id\").val(id_event); if (event[\"estado\"] != 1) {