huge update.
fix issues with failing tests (I'm just gonna fucking assume directx isn't installed on the github actions machines). Added MUCH better RBAC support and control Fixed an issue when you have over a million clients RBAC would be slow asf Add settings page with some basic settings and configs you can change.
This commit is contained in:
@@ -2,6 +2,7 @@ import { state } from "./state.js";
|
||||
import { digestData } from "./utils.js";
|
||||
|
||||
const POLL_INTERVAL_MS = 5000;
|
||||
const PREF_REFRESH_KEY = "overlord_refresh_interval_seconds";
|
||||
let pollTimer = null;
|
||||
let render = () => {};
|
||||
|
||||
@@ -91,11 +92,19 @@ function updateOsFilter(items) {
|
||||
}
|
||||
}
|
||||
|
||||
function getConfiguredPollIntervalMs(defaultMs) {
|
||||
const savedSeconds = Number(localStorage.getItem(PREF_REFRESH_KEY));
|
||||
if (!Number.isFinite(savedSeconds)) return defaultMs;
|
||||
const boundedSeconds = Math.min(120, Math.max(3, savedSeconds));
|
||||
return boundedSeconds * 1000;
|
||||
}
|
||||
|
||||
export function startAutoRefresh(intervalMs = POLL_INTERVAL_MS) {
|
||||
const effectiveInterval = getConfiguredPollIntervalMs(intervalMs);
|
||||
clearInterval(pollTimer);
|
||||
pollTimer = setInterval(() => {
|
||||
loadWithOptions({ force: false });
|
||||
}, intervalMs);
|
||||
}, effectiveInterval);
|
||||
}
|
||||
|
||||
export async function sendCommand(clientId, action) {
|
||||
|
||||
Reference in New Issue
Block a user