From c652ee7c74f824765e00c6b5dbd6d089380f1c0c Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Tue, 24 Jun 2025 07:47:38 +0200 Subject: [PATCH] =?UTF-8?q?Device=20OLT=20Anpassungen=20-=20Service=20Port?= =?UTF-8?q?s=20k=C3=B6nnen=20nun=20Live=20gesynct=20werden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Layout/default/Device/Detail.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Layout/default/Device/Detail.php b/Layout/default/Device/Detail.php index e32a83833..608c6fdda 100644 --- a/Layout/default/Device/Detail.php +++ b/Layout/default/Device/Detail.php @@ -1006,7 +1006,7 @@ foreach ($devicesall as $deviceall) { const apiUrl = " 'deviceoltserviceporttimestamp', 'ip' => $devices->ip]) ?>"; // Funktion, die die Daten holt und ins DOM schreibt - function updateTimestamp() { + function updateTimestamp(firstCall = 0) { $.getJSON(apiUrl) .done(function(data) { $('#olt-serviceports').text('(' + data.data.timestamp + ')'); @@ -1017,10 +1017,10 @@ foreach ($devicesall as $deviceall) { } // Erstaufruf direkt beim Laden der Seite - updateTimestamp(); + updateTimestamp(1); // Dann alle 30 000 ms (30 Sekunden) wiederholen - setInterval(updateTimestamp, 10000); + setInterval(updateTimestamp, 5000); }).fail(function (jqxhr, textStatus, error) { @@ -1083,7 +1083,7 @@ foreach ($devicesall as $deviceall) { $('.ont-serviceport-refresh-span').html( '' ); - }, 8000); + }, 5000); }); });