From 88985669559ae6e4dda5637cd2ad1cfc54cb2bb8 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Thu, 30 Jan 2014 10:44:54 +0000 Subject: [PATCH] 2014-01-30 Sergio Martin * operation/gis_maps/ajax.php: Fixed broken agent icons when autorefresh on gis maps * mobile/operation/groups.php mobile/operation/events.php mobile/include/style/main.css mobile/include/ui.class.php mobile/include/user.class.php: More aesthetic and responsible improvements on mobile console * include/functions_graph.php include/constants.php: Added more colors to the graph color collection to support more graphics in a combined graphs git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9388 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 17 ++++ pandora_console/include/constants.php | 5 ++ pandora_console/include/functions_graph.php | 5 ++ pandora_console/mobile/include/style/main.css | 84 +++++++++++++++++-- pandora_console/mobile/include/ui.class.php | 4 +- pandora_console/mobile/include/user.class.php | 6 +- pandora_console/mobile/operation/events.php | 37 ++++---- pandora_console/mobile/operation/groups.php | 5 +- pandora_console/operation/gis_maps/ajax.php | 2 +- 9 files changed, 136 insertions(+), 29 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 252da2bd27..d3965eaef8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,20 @@ +2014-01-30 Sergio Martin + + * operation/gis_maps/ajax.php: Fixed broken agent + icons when autorefresh on gis maps + + * mobile/operation/groups.php + mobile/operation/events.php + mobile/include/style/main.css + mobile/include/ui.class.php + mobile/include/user.class.php: More aesthetic and + responsible improvements on mobile console + + * include/functions_graph.php + include/constants.php: Added more colors to the + graph color collection to support more graphics in + a combined graphs + 2014-01-28 Sergio Martin * mobile/operation/events.php: Improve the method of diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 7bed8af604..fd43a24449 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -139,6 +139,11 @@ define('COL_GRAPH5', '#6BD8DD'); define('COL_GRAPH6', '#F49B31'); define('COL_GRAPH7', '#999999'); define('COL_GRAPH8', '#F2B8C1'); +define('COL_GRAPH9', '#C4E8C1'); +define('COL_GRAPH10', '#C1DBE5'); +define('COL_GRAPH11', '#C9C1e0'); +define('COL_GRAPH12', '#F45B95'); +define('COL_GRAPH13', '#E83128'); /* The styles */ diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 4aff43d4c3..1d085eac9d 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1238,6 +1238,11 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $ $color[8] = array('border' => '#000000', 'color' => COL_GRAPH6, 'alpha' => 50); $color[9] = array('border' => '#000000', 'color' => COL_GRAPH7, 'alpha' => 50); $color[10] = array('border' => '#000000', 'color' => COL_GRAPH8, 'alpha' => 50); + $color[11] = array('border' => '#000000', 'color' => COL_GRAPH9, 'alpha' => 50); + $color[12] = array('border' => '#000000', 'color' => COL_GRAPH10, 'alpha' => 50); + $color[13] = array('border' => '#000000', 'color' => COL_GRAPH11, 'alpha' => 50); + $color[14] = array('border' => '#000000', 'color' => COL_GRAPH12, 'alpha' => 50); + $color[15] = array('border' => '#000000', 'color' => COL_GRAPH13, 'alpha' => 50); switch ($stacked) { case GRAPH_AREA: diff --git a/pandora_console/mobile/include/style/main.css b/pandora_console/mobile/include/style/main.css index e9d95b6b32..c971d78b33 100644 --- a/pandora_console/mobile/include/style/main.css +++ b/pandora_console/mobile/include/style/main.css @@ -8,7 +8,7 @@ body { direction: ltr; display: block; font-family: Arial,Helvetica,sans-serif; - font-size: 12px !important; + font-size: 12px; margin: 0; text-align: left; vertical-align: top; @@ -22,12 +22,10 @@ body { font-size: 14px !important; } -label, input, .ui-btn-inner { - font-size: 12px !important; +.ui-btn-inner { + font-weight: bold; } - - /*INIT----------Tactical styles-----------------------------------------*/ #tactical1 *, #tactical2 * { font-size: 12px !important; @@ -242,13 +240,46 @@ tr.group_view_data, .group_view_data { } tr.events { - border-bottom: 3px solid white !important; + border-bottom: 6px solid #f7f7f7 !important; font-size: 12px !important; } table#list_events th { font-size: 12px !important; font-weight: bolder !important; + border: 0px; +} + +table.alternate tr:nth-child(odd) td, table.alternate tr:nth-child(odd) th{ + background-color: #ffffff; +} +table.alternate tr:nth-child(even) td, table.alternate tr:nth-child(eveny) th{ + background-color: #e4e5e4; +} + +table.pandora_responsive { + width: 100%; +} + +table.pandora_responsive td, table.pandora_responsive th{ + padding: 4px; +} + +table.event_details img{ + margin-left: 4px; +} + +table.event_details td{ + height: 14px; +} + +table.event_details td.cell_event_name { + font-size: 14px; +} + +#validate_button { + margin: 10px auto; + display: block; } /* @@ -763,16 +794,20 @@ li.ui-btn { } /* For mobiles */ -@media screen and (max-width: 800px) +@media screen and (max-width: 750px) { .ui-content>.ui-btn { margin: 10px 7px; height: 30px; padding-top: 3px; } + + label, input, .ui-btn-inner { + font-size: 12px !important; + } } /* For tablets */ -@media screen and (min-width: 800px) +@media screen and (min-width: 750px) { .ui-content>.ui-btn { width: 31%; @@ -781,8 +816,41 @@ li.ui-btn { height: 40px; padding-top: 8px; } + + label, input, .ui-btn-inner { + font-size: 16px !important; + padding-top: 6px !important; + } + + .ui-header .ui-title { + font-size: 18px !important; + } + + * { + font-size: 18px; + } } +#login_container { + width: 60%; + margin: 0 auto; + max-width: 300px; +} + +#logout_dialog-button_close { + display: block; + margin: 15px auto; +} + +#login_container #login_btn-container { + margin-top: 30px; +} + +#login_container input, #login_container .ui-btn-text{ + font-size: 16px !important; +} + + table.tactical_bars { width: 100%; } diff --git a/pandora_console/mobile/include/ui.class.php b/pandora_console/mobile/include/ui.class.php index 4620f29960..9785195a6c 100755 --- a/pandora_console/mobile/include/ui.class.php +++ b/pandora_console/mobile/include/ui.class.php @@ -402,7 +402,7 @@ class Ui { $options['id'] = 'text-' . $options['name']; } - $html = "
\n"; + $html = "
\n"; $html .= "
\n"; if (!empty($options['label'])) { $html .= "\n"; @@ -605,7 +605,7 @@ class Ui { $dialogHtml .= "'); + $ui->contentAddHtml('
'); $ui->beginForm(); $ui->formAddHtml(html_print_input_hidden('action', 'login', true)); $options = array( @@ -177,10 +179,12 @@ class User { $options = array( 'value' => __('Login'), 'icon' => 'star', - 'icon_pos' => 'right' + 'icon_pos' => 'right', + 'name' => 'login_btn' ); $ui->formAddSubmitButton($options); $ui->endForm(); + $ui->contentAddHtml('
'); $ui->endContent(); $ui->showPage(); diff --git a/pandora_console/mobile/operation/events.php b/pandora_console/mobile/operation/events.php index 264afc5b79..203395f897 100644 --- a/pandora_console/mobile/operation/events.php +++ b/pandora_console/mobile/operation/events.php @@ -137,6 +137,9 @@ class Events { html_print_image('images/chart_curve.png', true, array ("style" => 'vertical-align: middle;')) . '
'; } + else { + $event['module_graph_link'] = '' . __('N/A') . ''; + } if ($event['id_agente'] > 0) { $event['agent'] = ""; } + else { + $event['agent'] = '' . __('N/A') . ''; + } $event['evento'] = io_safe_output($event['evento']); @@ -161,7 +167,9 @@ class Events { $event["owner_user"] = $user_owner; } - $event["event_type"] = events_print_type_img ($event["event_type"], true).' '.events_print_type_description($event["event_type"], true); + $event["event_type"] = events_print_type_description($event["event_type"], true); + $event["event_type"] .= ' '; + $event["event_type"] .= events_print_type_img ($event["event_type"], true); if (!isset($group_rep)) $group_rep = 0; @@ -204,14 +212,13 @@ class Events { $img_sev = "images/status_sets/default/severity_major.png"; break; } - - $event["criticity"] = html_print_image ($img_sev, true, + + $event["criticity"] = ' ' . $event_criticity; + $event["criticity"] .= html_print_image ($img_sev, true, array ("class" => "image_status", "width" => 12, "height" => 12, - "title" => $event_criticity)); - $event["criticity"] .= ' ' . $event_criticity; - + "title" => $event_criticity)); if ($event['estado'] == 1) { $user_ack = db_get_value('fullname', 'tusuario', 'id_user', $event['id_usuario']); @@ -229,7 +236,7 @@ class Events { // Get Status switch ($event['estado']) { case 0: - $img_st = "images/star.png"; + $img_st = "images/star_dark.png"; $title_st = __('New event'); break; case 1: @@ -241,10 +248,12 @@ class Events { $title_st = __('Event in process'); break; } - $event["status"] = html_print_image($img_st,true).' '.$title_st; + $event["status"] = $title_st; + $event["status"] .= ' '; + $event["status"] .= html_print_image($img_st,true); - $event["group"] = ui_print_group_icon ($event["id_grupo"], true); - $event["group"] .= groups_get_name ($event["id_grupo"]); + $event["group"] = groups_get_name ($event["id_grupo"], true); + $event["group"] .= ui_print_group_icon ($event["id_grupo"], true); $event["tags"] = tags_get_tags_formatted($event["tags"]); if (empty($event["tags"])) { @@ -409,7 +418,7 @@ class Events { //Content ob_start(); ?> - +
@@ -796,11 +805,7 @@ class Events { .html(event[\"agent\"]); //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\"]); - } + $(\".cell_module_graph\").html(event[\"module_graph_link\"]); $(\"#event_id\").val(id_event); diff --git a/pandora_console/mobile/operation/groups.php b/pandora_console/mobile/operation/groups.php index 4047c58431..efa0c7ada2 100644 --- a/pandora_console/mobile/operation/groups.php +++ b/pandora_console/mobile/operation/groups.php @@ -71,7 +71,10 @@ class Groups { $ui->contentAddHtml(' '); diff --git a/pandora_console/operation/gis_maps/ajax.php b/pandora_console/operation/gis_maps/ajax.php index c59e5023c3..c136a9cdee 100644 --- a/pandora_console/operation/gis_maps/ajax.php +++ b/pandora_console/operation/gis_maps/ajax.php @@ -192,7 +192,7 @@ switch ($opt) { $icon_height = $icon_size[1]; $agents[$row['tagente_id_agente']] = array( - 'icon_path' => $icon, + 'icon_path' => $config["homeurl"] . '/' . $icon, 'icon_width' => $icon_width, 'icon_height' => $icon_height, 'name' => $row['nombre'],