diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4c2bf64417..9ff509a172 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,19 @@ +2013-04-30 Sergio Martin + + * include/styles/pandora.css: Fix bad reposition + action of bar graphs values in pure mode + + * include/graphs/flot/pandora.flot.js: Fix bad + reposition action of bar graphs values when resize + container + + * include/functions_graph.php: Fix the graph of + database info of agents with most modules. Now + avoid pending delete and the data is showed properly + + * operation/agentes/estado_generalagente.php: Fix a + missing change of agent view layout fix + 2013-04-30 Sergio Martin * godmode/modules/manage_network_components.php: Added diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 682b5c9d5f..5252e3e66e 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1705,6 +1705,7 @@ function graph_db_agentes_modulos($width, $height) { case "postgresql": $modules = db_get_all_rows_sql ('SELECT COUNT(id_agente_modulo), id_agente FROM tagente_modulo + WHERE delete_pending = 0 GROUP BY id_agente ORDER BY 1 DESC LIMIT 10'); break; @@ -1712,6 +1713,7 @@ function graph_db_agentes_modulos($width, $height) { $modules = db_get_all_rows_sql ('SELECT COUNT(id_agente_modulo), id_agente FROM tagente_modulo WHERE rownum <= 10 + AND delete_pending = 0 GROUP BY id_agente ORDER BY 1 DESC'); break; @@ -1721,6 +1723,10 @@ function graph_db_agentes_modulos($width, $height) { foreach ($modules as $module) { $agent_name = agents_get_name ($module['id_agente'], "none"); + + if(empty($agent_name)) { + continue; + } switch ($config['dbtype']){ case "mysql": case "postgresql": diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index bc6d03541d..94a0b07cfd 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -215,8 +215,16 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark, maxvalue, water_ $('#'+graph_id+' .yAxis .tickLabel').each(function() { inCanvasValuePos = parseInt(pixelPerValue * ($('#value_'+i+'_'+graph_id).html())); + label_width = ($('#value_'+i+'_'+graph_id).css('width').split('px')[0] - 3); - $('#value_'+i+'_'+graph_id).css('left',plot.offset().left + inCanvasValuePos - $('#value_'+i+'_'+graph_id).css('width').split('px')[0] - 3); + label_left_offset = plot.offset().left + inCanvasValuePos + 5; //Label located on right side of bar + 5 pixels + + //If label fit into the bar just recalculate left position to fit on right side of bar + if (inCanvasValuePos > label_width) { + label_left_offset = plot.offset().left + inCanvasValuePos - $('#value_'+i+'_'+graph_id).css('width').split('px')[0] - 3; + } + + $('#value_'+i+'_'+graph_id).css('left',label_left_offset); i++; }); }); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index cba700e81f..d22964f1b1 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -1629,7 +1629,7 @@ div#main_pure { margin-right: 10px; height: auto; width: 98%; - position: absolute; + position: static; } #table-agent-configuration radio { margin-right: 40px; diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 1a44f76895..c301efb824 100644 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -231,7 +231,7 @@ if ($config['activate_gis'] || $agent['url_address'] != '') { $data[1] = __('There is no GIS data.'); } else { - $data[$col] = ''; + $data[1] = ''; if ($dataPositionAgent['description'] != "") $data[1] .= $dataPositionAgent['description']; else