Skip to content

Commit a31f195

Browse files
Update index.html
1 parent 46e5307 commit a31f195

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

app/templates/index.html

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
<title>DB Endpoint Latency Checker</title>
5+
<title>DB Latency Minimalist SaaS</title>
66
<link rel="stylesheet" href="/static/style.css"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
88
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
@@ -17,6 +17,8 @@
1717
.latency-table th, .latency-table td { border:1px solid #dde1ec; padding:0.56em 0.9em;}
1818
.summary-label { font-weight:700; }
1919
.summary-value { font-weight:400; }
20+
.clear-btn-active { background: #ea1616!important; color:#fff!important; border:1.3px solid #e34434!important; }
21+
.clear-btn-active:hover { background: #e32e2e!important; color:#fff!important; }
2022
</style>
2123
</head>
2224
<body>
@@ -70,17 +72,16 @@ <h2 class="minimal-title">DB Endpoint Latency Checker</h2>
7072
<label for="interval">Delay Between Tests (seconds)</label>
7173
<input type="number" id="interval" name="interval" value="{{ interval|default(1) }}" min="0.1" step="0.1">
7274
</div>
73-
<footer class="minimal-footer">
75+
<footer class="minimal-footer" id="footer-btns">
7476
<button type="submit" class="minimal-btn">Run Test</button>
75-
<button type="reset" class="minimal-btn minimal-btn-secondary" onclick="formReset(); return false;">Clear</button>
77+
<button type="button" id="clear-btn" class="minimal-btn minimal-btn-secondary{% if result %} clear-btn-active{% endif %}" onclick="hardClear(); return false;">Clear</button>
7678
</footer>
7779
<div id="loading-indicator" style="display:none; text-align:center; margin-top:1em;">
7880
<div class="loader"></div>
7981
<div id="prog-label" style="margin:0.8em 0; color:#455;"></div>
8082
<progress id="progress-bar" max="100" value="1" style="width: 90%;"></progress>
8183
</div>
8284
</form>
83-
8485
{% if result %}
8586
<section class="result-card result-section printable centered-block" id="printable-result" style="margin:2em auto 1.2em auto;max-width:650px;">
8687
<h3 style="margin:2em 0 0.65em 0; text-align:center;">Latency Chart (ms over test time)</h3>
@@ -194,8 +195,16 @@ <h3 style="text-align:center;margin-bottom:0.5em;">Summary of Statistics</h3>
194195
document.getElementById('latency-form').reset();
195196
dbFields.style.display = '';
196197
urlFields.style.display = 'none';
198+
removeResults();
199+
}
200+
function hardClear() {
201+
// redirect to base URL, kill cache/results
202+
window.location.href = "/";
203+
}
204+
function removeResults() {
205+
var r = document.getElementById('printable-result');
206+
if (r) r.parentNode.removeChild(r);
197207
}
198-
// Loader/progress for test (progress based on Test Duration)
199208
function runProgressBar() {
200209
const loader = document.getElementById('loading-indicator');
201210
loader.style.display = '';

0 commit comments

Comments
 (0)