mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-09-10 19:18:42 -06:00
Increased Offline Detection Timeout from 2 minutes to 5 minutes.
This commit is contained in:
@@ -61,10 +61,10 @@ export default function DeviceDetails({ device, onBack }) {
|
||||
const tsSec = device?.lastSeen;
|
||||
if (!tsSec) return "Offline";
|
||||
const now = Date.now() / 1000;
|
||||
return now - tsSec <= 120 ? "Online" : "Offline";
|
||||
return now - tsSec <= 300 ? "Online" : "Offline";
|
||||
});
|
||||
|
||||
const statusFromHeartbeat = (tsSec, offlineAfter = 120) => {
|
||||
const statusFromHeartbeat = (tsSec, offlineAfter = 300) => {
|
||||
if (!tsSec) return "Offline";
|
||||
const now = Date.now() / 1000;
|
||||
return now - tsSec <= offlineAfter ? "Online" : "Offline";
|
||||
|
@@ -28,7 +28,7 @@ import CachedIcon from "@mui/icons-material/Cached";
|
||||
import { DeleteDeviceDialog, CreateCustomViewDialog, RenameCustomViewDialog } from "../Dialogs.jsx";
|
||||
import QuickJob from "../Scheduling/Quick_Job.jsx";
|
||||
|
||||
function formatLastSeen(tsSec, offlineAfter = 120) {
|
||||
function formatLastSeen(tsSec, offlineAfter = 300) {
|
||||
if (!tsSec) return "unknown";
|
||||
const now = Date.now() / 1000;
|
||||
if (now - tsSec <= offlineAfter) return "Currently Online";
|
||||
@@ -45,7 +45,7 @@ function formatLastSeen(tsSec, offlineAfter = 120) {
|
||||
return `${date} @ ${time}`;
|
||||
}
|
||||
|
||||
function statusFromHeartbeat(tsSec, offlineAfter = 120) {
|
||||
function statusFromHeartbeat(tsSec, offlineAfter = 300) {
|
||||
if (!tsSec) return "Offline";
|
||||
const now = Date.now() / 1000;
|
||||
return now - tsSec <= offlineAfter ? "Online" : "Offline";
|
||||
|
Reference in New Issue
Block a user