mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-11 06:53:05 -05:00
process/show: trigger immediate refresh on page load
This commit is contained in:
parent
95008cd251
commit
50b4625290
1 changed files with 9 additions and 1 deletions
|
|
@ -69,7 +69,6 @@ class Businessprocess_ProcessController extends Controller
|
|||
$this->view->warnings = $bp->getWarnings();
|
||||
}
|
||||
}
|
||||
$this->setAutorefreshInterval(10);
|
||||
|
||||
$bp->retrieveStatesFromBackend();
|
||||
|
||||
|
|
@ -91,6 +90,15 @@ class Businessprocess_ProcessController extends Controller
|
|||
$bp->applySimulation($simulation);
|
||||
}
|
||||
|
||||
if ($this->isXhr()) {
|
||||
$this->setAutorefreshInterval(10);
|
||||
} else {
|
||||
// This will trigger the very first XHR refresh immediately on page
|
||||
// load. Please not that this may hammer the server in case we would
|
||||
// decide to use autorefreshInterval for HTML meta-refreshes also.
|
||||
$this->setAutorefreshInterval(1);
|
||||
}
|
||||
|
||||
if ($this->params->get('mode') === 'toplevel') {
|
||||
$this->render('toplevel');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue