N°2534 - dashboard: bug with autorefresh that deactivates filtering on organizations

This commit is contained in:
acognet
2020-08-12 14:18:05 +02:00
parent e5487edbfb
commit f90105c107
2 changed files with 11 additions and 2 deletions

View File

@@ -928,6 +928,8 @@ class RuntimeDashboard extends Dashboard
$sExtraParams = json_encode($aAjaxParams);
$iReloadInterval = 1000 * $this->GetAutoReloadInterval();
$sReloadURL = $this->GetReloadURL();
$oAppContext = new ApplicationContext();
$sContext=$oAppContext->GetForPostParams();
$oPage->add_script(
<<<EOF
if (typeof(AutoReloadDashboardId$sDivId) !== 'undefined')
@@ -945,7 +947,7 @@ class RuntimeDashboard extends Dashboard
{
$('.dashboard_contents#$sDivId').block();
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php',
{ operation: 'reload_dashboard', dashboard_id: '$sId', file: '$sFile', extra_params: $sExtraParams, reload_url: '$sReloadURL'},
{ operation: 'reload_dashboard', dashboard_id: '$sId', file: '$sFile', extra_params: $sExtraParams, c: $sContext, reload_url: '$sReloadURL'},
function(data){
$('.dashboard_contents#$sDivId').html(data);
$('.dashboard_contents#$sDivId').unblock();