mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Added button to refresh graph in container graphs
This commit is contained in:
parent
60aaf4363e
commit
fecd2c74b5
@ -125,6 +125,20 @@ if ($report_r && $report_w) {
|
||||
get_graphs_container(id_container,hash,time);
|
||||
}
|
||||
});
|
||||
|
||||
$("div[id^=period_container_] a").on('click', function(e){
|
||||
if ($("div[id^=period_container_][id$=_default]").css('display') == 'none') {
|
||||
$('#refresh_custom_time').show();
|
||||
$('#refresh_custom_time').on('click', function(e){
|
||||
var time = $('input[id *= hidden-period_container_'+hash+']').val();
|
||||
get_graphs_container(id_container,hash,time);
|
||||
});
|
||||
}
|
||||
else if ($("div[id^=period_container_][id$=_manual]").css('display') == 'none') {
|
||||
$('#refresh_custom_time').hide();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -171,8 +171,9 @@ if ($get_graphs) {
|
||||
'',
|
||||
false,
|
||||
$periods,
|
||||
'vertical-align: middle;'
|
||||
'vertical-align: middle; margin-bottom:0;'
|
||||
);
|
||||
$single_table .= html_print_image('images/refresh_mc.png', true, ['id' => 'refresh_custom_time', 'title' => 'Refresh graph', 'style' => 'cursor:pointer; vertical-align: middle; display:none;']);
|
||||
$single_table .= '</td>';
|
||||
$single_table .= '</tr>';
|
||||
$single_table .= '</table>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user