changes
This commit is contained in:
36
fusion_claims/static/nuke_cache.html
Normal file
36
fusion_claims/static/nuke_cache.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>Odoo Cache Reset</title></head>
|
||||
<body style="font-family: Arial, sans-serif; padding: 40px; text-align: center;">
|
||||
<h1>Odoo Cache Reset</h1>
|
||||
<div id="status" style="font-size: 18px; margin: 20px;">Working...</div>
|
||||
<script>
|
||||
async function nukeEverything() {
|
||||
const status = document.getElementById("status");
|
||||
let log = "";
|
||||
if ("serviceWorker" in navigator) {
|
||||
const registrations = await navigator.serviceWorker.getRegistrations();
|
||||
for (let reg of registrations) {
|
||||
await reg.unregister();
|
||||
log += "<p style=\"color:green\">Unregistered service worker: " + reg.scope + "</p>";
|
||||
}
|
||||
if (registrations.length === 0) log += "<p>No service workers found.</p>";
|
||||
}
|
||||
if ("caches" in window) {
|
||||
const names = await caches.keys();
|
||||
for (let name of names) {
|
||||
await caches.delete(name);
|
||||
log += "<p style=\"color:green\">Deleted cache: " + name + "</p>";
|
||||
}
|
||||
if (names.length === 0) log += "<p>No caches found.</p>";
|
||||
}
|
||||
try { localStorage.clear(); log += "<p style=\"color:green\">Cleared localStorage</p>"; } catch(e) {}
|
||||
try { sessionStorage.clear(); log += "<p style=\"color:green\">Cleared sessionStorage</p>"; } catch(e) {}
|
||||
log += "<h2 style=\"color:blue; margin-top:30px;\">Done! Click below to go to Odoo.</h2>";
|
||||
log += "<a href=\"/odoo\" style=\"display:inline-block;padding:15px 30px;background:#714b67;color:white;text-decoration:none;border-radius:5px;font-size:18px;margin-top:10px;\">Go to Odoo Backend</a>";
|
||||
status.innerHTML = log;
|
||||
}
|
||||
nukeEverything();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user