diff --git a/csharp/App/Backend/Websockets/WebsockerManager.cs b/csharp/App/Backend/Websockets/WebsockerManager.cs index 311410153..ef4d9a107 100644 --- a/csharp/App/Backend/Websockets/WebsockerManager.cs +++ b/csharp/App/Backend/Websockets/WebsockerManager.cs @@ -72,6 +72,7 @@ public static class WebsocketManager lock (InstallationConnections){ foreach (var installationConnection in InstallationConnections){ if ((DateTime.Now - installationConnection.Value.Timestamp) > TimeSpan.FromMinutes(1)){ + Console.WriteLine("Installation "+installationConnection.Key+" is offline, latest timestamp was "+installationConnection.Value.Timestamp); installationConnection.Value.Status = -1; if (installationConnection.Value.Connections.Count > 0){InformWebsocketsForInstallation(installationConnection.Key);} } diff --git a/csharp/App/SaliMax/src/Program.cs b/csharp/App/SaliMax/src/Program.cs index 253bfc1ab..c657b3bb7 100644 --- a/csharp/App/SaliMax/src/Program.cs +++ b/csharp/App/SaliMax/src/Program.cs @@ -281,8 +281,9 @@ internal static class Program if (s3Bucket != null) InformMiddleware(s3Bucket, currentSalimaxState); } - else if (_subscribedToQueue && _heartBitInterval==15) + else if (_subscribedToQueue && _heartBitInterval>=15) { + Console.WriteLine("----------------------------------------Sending Heartbit----------------------------------------"); _heartBitInterval = 0; currentSalimaxState.Type = MessageType.Heartbit; @@ -357,6 +358,7 @@ internal static class Program private static void InformMiddleware(String? bucket, StatusMessage status) { + //ddddddddd int.TryParse(bucket[0].ToString(), out var installationId); var message = JsonSerializer.Serialize(status); diff --git a/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx b/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx index 9b4041957..1c0435a71 100644 --- a/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx @@ -51,16 +51,16 @@ function InstallationTabs() { if (installations.length === 1) { if (!currentTab) { - navigate(`?installation=${installationId}&tab=live`, { + navigate(`?installation=${installations[0].id}&tab=live`, { replace: true }); setCurrentTab('live'); } else { - navigate(`?installation=${installationId}&tab=${currentTab}`, { + navigate(`?installation=${installations[0].id}&tab=${currentTab}`, { replace: true }); } - } else { + } else if (installations.length > 1) { if ( location.pathname === '/installations' || location.pathname === '/installations/' @@ -339,7 +339,7 @@ function InstallationTabs() { >