feat: Add Flush Cache tool page to web UI
Adds a /flush-cache web page with a button to clear all cached Google Sheets data and reset refresh timers. Link added to Tools nav across all templates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
167
templates/flush-cache.html
Normal file
167
templates/flush-cache.html
Normal file
@@ -0,0 +1,167 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>FUJ - Flush Cache</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
background-color: #0c0c0c;
|
||||
color: #cccccc;
|
||||
padding: 10px;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
font-size: 11px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #00ff00;
|
||||
font-family: inherit;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 20px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.nav {
|
||||
margin-bottom: 20px;
|
||||
font-size: 12px;
|
||||
color: #555;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nav > div {
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nav a {
|
||||
color: #00ff00;
|
||||
text-decoration: none;
|
||||
padding: 2px 8px;
|
||||
border: 1px solid #333;
|
||||
}
|
||||
|
||||
.nav a.active {
|
||||
color: #000;
|
||||
background-color: #00ff00;
|
||||
border-color: #00ff00;
|
||||
}
|
||||
|
||||
.nav a:hover {
|
||||
color: #fff;
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
.nav-archived a {
|
||||
font-size: 10px;
|
||||
color: #666;
|
||||
border-color: #222;
|
||||
}
|
||||
|
||||
.nav-archived a.active {
|
||||
color: #ccc;
|
||||
background-color: #333;
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
.nav-archived a:hover {
|
||||
color: #999;
|
||||
border-color: #444;
|
||||
}
|
||||
|
||||
.flush-container {
|
||||
background-color: #111;
|
||||
border: 1px solid #333;
|
||||
padding: 30px;
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
margin-bottom: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.flush-btn {
|
||||
font-family: inherit;
|
||||
font-size: 12px;
|
||||
color: #00ff00;
|
||||
background-color: #1a1a1a;
|
||||
border: 1px solid #00ff00;
|
||||
padding: 8px 24px;
|
||||
cursor: pointer;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.flush-btn:hover {
|
||||
background-color: #00ff00;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.status {
|
||||
margin-bottom: 15px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.status-ok { color: #00ff00; }
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
margin-top: 20px;
|
||||
font-size: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="nav">
|
||||
<div>
|
||||
<a href="/adults">[Adults]</a>
|
||||
<a href="/juniors">[Juniors]</a>
|
||||
</div>
|
||||
<div class="nav-archived">
|
||||
<span style="color: #666; margin-right: 5px;">Archived:</span>
|
||||
<a href="/fees">[Adult - Attendance/Fees]</a>
|
||||
<a href="/fees-juniors">[Junior Attendance/Fees]</a>
|
||||
<a href="/reconcile">[Adult Payment Reconciliation]</a>
|
||||
<a href="/reconcile-juniors">[Junior Payment Reconciliation]</a>
|
||||
<a href="/payments">[Payments Ledger]</a>
|
||||
</div>
|
||||
<div class="nav-archived">
|
||||
<span style="color: #666; margin-right: 5px;">Tools:</span>
|
||||
<a href="/sync-bank">[Sync Bank Data]</a>
|
||||
<a href="/flush-cache" class="active">[Flush Cache]</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1>Flush Cache</h1>
|
||||
|
||||
{% if flushed %}
|
||||
<div class="status">
|
||||
<span class="status-ok">Cache flushed successfully. {{ deleted }} file(s) deleted.</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="flush-container">
|
||||
<p style="margin-bottom: 20px; color: #888;">Clears all cached Google Sheets data and resets refresh timers.</p>
|
||||
<form method="POST" action="/flush-cache">
|
||||
<button type="submit" class="flush-btn">[Flush Cache]</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
{{ build_meta.tag }} | {{ build_meta.commit }} | {{ build_meta.build_date }}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user