From fb217cc7a009c2963a10f1a149f27d6df820325c Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 4 Jul 2013 13:41:47 +0000 Subject: [PATCH] 2013-07-04 Miguel de Dios * include/functions_graph.php: fixed include javascript in the static image for boolean module graph. * mobile/operation/module_graph.php, mobile/operation/modules.php, mobile/include/style/main.css: a lot of fixes in mobile. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8472 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 ++++ pandora_console/include/functions_graph.php | 1 + pandora_console/mobile/include/style/main.css | 51 +++++++++++++++++++ .../mobile/operation/module_graph.php | 6 +++ pandora_console/mobile/operation/modules.php | 5 +- 5 files changed, 70 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 94720c1ead..e76c3171ac 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2013-07-04 Miguel de Dios + + * include/functions_graph.php: fixed include javascript in the + static image for boolean module graph. + + * mobile/operation/module_graph.php, + mobile/operation/modules.php, + mobile/include/style/main.css: a lot of fixes in mobile. + 2013-07-03 Miguel de Dios * mobile/operation/events.php, mobile/operation/module_graph.php, diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 589e10233f..8e0e859338 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -2486,6 +2486,7 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events, global $series_type; global $chart_extra_data; + $chart = array(); $color = array(); $legend = array(); diff --git a/pandora_console/mobile/include/style/main.css b/pandora_console/mobile/include/style/main.css index 92e6fd6af6..27dfe57621 100644 --- a/pandora_console/mobile/include/style/main.css +++ b/pandora_console/mobile/include/style/main.css @@ -538,6 +538,56 @@ table#list_events th { color: #000000 !important; } +@media screen and (max-width: 35em) { + #list_Modules_Embedded .cell_1 .ui-table-cell-label, + #list_Modules_Embedded .cell_4 .ui-table-cell-label { + min-width: auto !important; + } + + #list_Modules_Embedded .cell_4 .ui-table-cell-label { + padding-left: 10px; + } + + #list_Modules_Embedded .cell_3, + #list_Modules_Embedded .cell_4 { + display: inline !important; + float: none !important; + } + + #list_Modules_Embedded .cell_0 .ui-table-cell-label, + #list_Modules_Embedded .cell_1 .ui-table-cell-label, + #list_Modules_Embedded .cell_3 .ui-table-cell-label, + #list_Modules_Embedded .cell_4 .ui-table-cell-label { + display: none; + } + + #list_Modules_Embedded .show_collapside { + display: inline !important; + } + + #list_Modules_Embedded .data { +/* + white-space: nowrap; +*/ + } + + #list_Modules_Embedded .cell_2 { + display: none !important; + } + + #list_Modules_Embedded .show_collapside > img { + display: none !important; + } + #list_Modules_Embedded .cell_3 .show_collapside { + display: none !important; + } +} + +#list_Modules_Embedded .cell_4 a { + color: #000000 !important; +} +/* + @media screen and (max-width: 320px) { #list_Modules_Embedded .cell_1 .ui-table-cell-label, #list_Modules_Embedded .cell_6 .ui-table-cell-label { @@ -577,6 +627,7 @@ table#list_events th { #list_Modules_Embedded .cell_4 a { color: #000000 !important; } +*/ /*END------------Modules styles---------------------------------------*/ diff --git a/pandora_console/mobile/operation/module_graph.php b/pandora_console/mobile/operation/module_graph.php index 7b37fe627c..d66f99e754 100644 --- a/pandora_console/mobile/operation/module_graph.php +++ b/pandora_console/mobile/operation/module_graph.php @@ -87,6 +87,11 @@ class ModuleGraph { $this->height -= 80; //Correct the height + //For to avoid fucking IPHONES when they are in horizontal. + if ($this->height < 140) { + $this->height = 140; + } + } public function ajax($parameter2 = false) { @@ -127,6 +132,7 @@ class ModuleGraph { } + ob_start(); switch ($this->graph_type) { case 'boolean': diff --git a/pandora_console/mobile/operation/modules.php b/pandora_console/mobile/operation/modules.php index 9915352437..666167e433 100644 --- a/pandora_console/mobile/operation/modules.php +++ b/pandora_console/mobile/operation/modules.php @@ -435,7 +435,7 @@ class Modules { $row[4] = $row[__('Interval')] = ($module['module_interval'] == 0) ? human_time_description_raw($module['agent_interval']) : human_time_description_raw($module['module_interval']); - + $row[4] = $row[__('Interval')] = '' . $row[__('Interval')] . ''; @@ -490,7 +490,8 @@ class Modules { $row[7] = $row[__('Data')] = '' . '' . - '' . + '' . '' . html_print_image('images/chart_curve.png', true, array ("style" => 'vertical-align: middle;')) . '' . ' ' . $output . '' . '';