refactor: rename ScadaLink → ZB.MOM.WW.ScadaBridge (code + projects + namespaces)
Solution + 23 src projects + 26 test projects renamed; folders, csproj, namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated. ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated. SQL roles/logins, LDAP domains, CLI command name, and CLI config dir (~/.scadalink → ~/.scadabridge) also renamed. Build green; 5 Host.Tests fail awaiting SQL login rename in next commit. Pre-existing StaleTagMonitor timing flakes unchanged. Rename script committed at tools/rename-to-scadabridge.sh.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// CentralUI-020: client-side helper for the SessionExpiry component's
|
||||
// idle-logout check. Pings the given URL and reports the HTTP status code so
|
||||
// the Blazor component can redirect to /login once the server reports 401.
|
||||
//
|
||||
// `redirect: "manual"` ensures a 302 (should the endpoint ever start
|
||||
// redirecting) is reported as an opaque status rather than being followed
|
||||
// transparently — the component only ever wants to see the real outcome.
|
||||
export async function ping(url) {
|
||||
try {
|
||||
const resp = await fetch(url, {
|
||||
method: "GET",
|
||||
credentials: "same-origin",
|
||||
cache: "no-store",
|
||||
redirect: "manual",
|
||||
headers: { "X-Requested-With": "XMLHttpRequest" }
|
||||
});
|
||||
return resp.status;
|
||||
} catch {
|
||||
// Network failure: report 0 so the caller treats it as inconclusive
|
||||
// and retries on the next poll rather than logging the user out.
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user