diff --git a/src/psm/Module/Server/Controller/StatusController.php b/src/psm/Module/Server/Controller/StatusController.php
index 4ef5aca9..5afde541 100644
--- a/src/psm/Module/Server/Controller/StatusController.php
+++ b/src/psm/Module/Server/Controller/StatusController.php
@@ -91,6 +91,13 @@ class StatusController extends AbstractServerController {
$this->twig->addGlobal('auto_refresh', true);
$this->twig->addGlobal('auto_refresh_seconds', $auto_refresh_seconds);
}
+
+ if($this->isXHR() || isset($_SERVER["HTTP_X_REQUESTED_WITH"])) {
+ $this->xhr = true;
+ //disable auto refresh in ajax return html
+ $layout_data["auto_refresh"] = 0;
+ }
+
return $this->twig->render('module/server/status/index.tpl.html', $layout_data);
}
diff --git a/src/templates/default/main/body.tpl.html b/src/templates/default/main/body.tpl.html
index 2197ac9e..fa7d252a 100644
--- a/src/templates/default/main/body.tpl.html
+++ b/src/templates/default/main/body.tpl.html
@@ -11,9 +11,6 @@
- {% if auto_refresh %}
-
- {% endif %}
diff --git a/src/templates/default/module/server/status/index.tpl.html b/src/templates/default/module/server/status/index.tpl.html
index 4f579206..77fe4c89 100644
--- a/src/templates/default/module/server/status/index.tpl.html
+++ b/src/templates/default/module/server/status/index.tpl.html
@@ -57,4 +57,17 @@
-
\ No newline at end of file
+
+
+{% if auto_refresh %}
+
+{% endif %}
\ No newline at end of file