Merge branch '2630-Exportación-Gráficas-relacionado-con-CSV' into 'develop'

Fixed bug in csv export graph

See merge request artica/pandorafms!1814
This commit is contained in:
vgilc 2018-10-25 12:57:24 +02:00
commit 4c4c874553
2 changed files with 16 additions and 5 deletions

View File

@ -2262,17 +2262,25 @@ function pandoraFlotArea( graph_id, values, legend,
}
$('#overview_' + graph_id).css('display', 'none');
if (menu) {
var parent_height;
$('#menu_overview_' + graph_id).click(function() {
$('#overview_' + graph_id).toggle();
});
$("#menu_export_csv_"+graph_id)
.click(function (event) {
event.preventDefault();
$("#menu_export_csv_"+graph_id).click(function (e) {
e.preventDefault();
plot.exportDataCSV();
var es_firefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
if(es_firefox){
$("#dialog").css('visibility', 'visible').dialog();
}
delete data_base[0].threshold;
plot = $.plot($('#' + graph_id), data_base,
$.extend(true, {}, options, {
legend: { show: true }
}));
});
$('#menu_threshold_' + graph_id).click(function() {

View File

@ -100,8 +100,11 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
</script>
</head>
<body bgcolor="#ffffff" style='background:#ffffff;'>
<?php
echo"<div id='dialog' title='".__('CSV Export Information')."' style='visibility:hidden;'>";
echo"<p>" . __('The CSV export has been successful.') . "</p>";
echo"</div>";
// Module id
$id = (int) get_parameter ("id", 0);
// Agent id