2012-03-07 Miguel de Dios <miguel.dedios@artica.es>

* include/javascript/jquery-1.6.1.min.js: removed this file because the
	console use the last jquery library.
	
	* operation/search_agents.php: clean source code style.
	
	* include/graphs/functions_flot.php, include/graphs/flot/pandora.flot.js:
	fixed the lost unit in the style of the divs for the graphs, into the
	function "pandoraFlotArea" check the alerts.lenght for empty strings, into
	the function "updateLegend" check empty string for to var
	"item.series.label", into the function "get_event_details" check empty var
	"event_ids" and into the function "flot_area_graph" check empty var in
	$long_index.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5707 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-03-07 10:53:06 +00:00
parent f1bf725afc
commit be037611d8
4 changed files with 50 additions and 42 deletions

View File

@ -1,3 +1,18 @@
2012-03-07 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/jquery-1.6.1.min.js: removed this file because the
console use the last jquery library.
* operation/search_agents.php: clean source code style.
* include/graphs/functions_flot.php, include/graphs/flot/pandora.flot.js:
fixed the lost unit in the style of the divs for the graphs, into the
function "pandoraFlotArea" check the alerts.lenght for empty strings, into
the function "updateLegend" check empty string for to var
"item.series.label", into the function "get_event_details" check empty var
"event_ids" and into the function "flot_area_graph" check empty var in
$long_index.
2012-03-07 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/estado_generalagente.php, operation/search_agents.php:

View File

@ -425,7 +425,10 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
legend = legend.split(separator);
events = events.split(separator);
event_ids = event_ids.split(separator);
alerts = alerts.split(separator);
if (alerts.length != 0)
alerts = alerts.split(separator);
else
alerts = [];
alert_ids = alert_ids.split(separator);
colors = colors.split(separator);
@ -456,7 +459,8 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
stacked = 'stack';
filled = true;
break;
}
}
var datas = new Array();
var data_base = new Array();
@ -761,8 +765,8 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
});
$('#'+graph_id).bind("plotclick", function (event, pos, item) {
plot.unhighlight();
if (item) {
plot.unhighlight();
if (item && item.series.label != '') {
plot.unhighlight();
var canvaslimit = parseInt(plot.offset().left + plot.width());
var dataset = plot.getData();
@ -782,6 +786,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
$('#extra_'+graph_id).css('left',left_pos);
$('#extra_'+graph_id).css('top',plot.offset().top + 25);
switch(item.series.label) {
case legend_alerts:
extra_info = '<b>'+legend_alerts+' - '+labels_long[item.dataIndex]+'</b>'+get_event_details(alertsz[item.dataIndex]);
@ -790,7 +795,10 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
case legend_events:
extra_info = '<b>'+legend_events+' - '+labels_long[item.dataIndex]+'</b>'+get_event_details(eventsz[item.dataIndex]);
extra_show = true;
break;
break;
default:
return;
break;
}
extra_info = get_event_details(eventsz[item.dataIndex]);
@ -935,22 +943,25 @@ function set_watermark(graph_id, plot, watermark_src) {
}
function get_event_details (event_ids) {
var inputs = [];
var table;
inputs.push ("get_events_details=1");
inputs.push ("event_ids="+event_ids);
inputs.push ("page=include/ajax/events");
jQuery.ajax ({
data: inputs.join ("&"),
type: 'GET',
url: action="../../ajax.php",
timeout: 10000,
dataType: 'html',
async: false,
success: function (data) {
table = data;
}
});
table = '';
if (typeof(event_ids) != "undefined") {
var inputs = [];
var table;
inputs.push ("get_events_details=1");
inputs.push ("event_ids="+event_ids);
inputs.push ("page=include/ajax/events");
jQuery.ajax ({
data: inputs.join ("&"),
type: 'GET',
url: action="../../ajax.php",
timeout: 10000,
dataType: 'html',
async: false,
success: function (data) {
table = data;
}
});
}
return table;
}

File diff suppressed because one or more lines are too long

View File

@ -185,7 +185,7 @@ if ($searchAgents) {
";
break;
}
$select =
"SELECT t1.id_agente, t1.ultimo_contacto, t1.nombre, t1.id_os, t1.intervalo, t1.id_grupo, t1.disabled";
$limit = " ORDER BY " . $order['field'] . " " . $order['order'] .
@ -206,7 +206,7 @@ if ($searchAgents) {
if (!$agents) {
echo "<br><div class='nf'>" . __("Zero results found") . "</div>\n";
}
else {
else {
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->width = "98%";