test staging
This commit is contained in:
parent
bdad83995d
commit
05d7f91ec5
|
@ -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);}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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() {
|
|||
>
|
||||
<Routes>
|
||||
<Route
|
||||
path={routes.list + '*'}
|
||||
path={'*'}
|
||||
element={
|
||||
<Grid item xs={12}>
|
||||
<Box p={4}>
|
||||
|
|
Loading…
Reference in New Issue