Remove color coding from success rate metric
This commit is contained in:
parent
61cf83ad7a
commit
8ce81de224
3 changed files with 3 additions and 18 deletions
11
dashboard.js
11
dashboard.js
|
|
@ -223,15 +223,8 @@ async function fetchStats() {
|
|||
document.getElementById("total").textContent = total;
|
||||
document.getElementById("timeouts").textContent = timeouts;
|
||||
const rateEl = document.getElementById("success-rate-small");
|
||||
const statusLabel =
|
||||
successRate >= 70 ? "Good" : successRate >= 40 ? "Warning" : "Critical";
|
||||
rateEl.innerHTML = `${successRate.toFixed(1)}% <span class="sr-only">(${statusLabel})</span>`;
|
||||
rateEl.className =
|
||||
successRate >= 70
|
||||
? "success-rate"
|
||||
: successRate >= 40
|
||||
? "warn-rate"
|
||||
: "error";
|
||||
rateEl.textContent = `${successRate.toFixed(1)}%`;
|
||||
rateEl.className = "";
|
||||
document.getElementById("tor-traffic").textContent =
|
||||
`${formatBytes(torInbound)} / ${formatBytes(torOutbound)}`;
|
||||
document.getElementById("memory").textContent = formatBytes(memory);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
Rate</span>
|
||||
<span id="tip-success-rate" class="sr-only">Percentage of successful connections vs total
|
||||
attempts</span>
|
||||
<span role="definition" class="success-rate" id="success-rate-small">-</span>
|
||||
<span role="definition" id="success-rate-small">-</span>
|
||||
</div>
|
||||
<div class="metric-row">
|
||||
<span tabindex="0" role="term" class="metric-label" aria-describedby="tip-uptime" title="How long the Snowflake proxy has been running">Uptime</span>
|
||||
|
|
|
|||
|
|
@ -231,14 +231,6 @@ tr:last-child td {
|
|||
color: var(--error-color);
|
||||
}
|
||||
|
||||
.success-rate {
|
||||
color: var(--success-color);
|
||||
}
|
||||
|
||||
.warn-rate {
|
||||
color: var(--warn-color);
|
||||
}
|
||||
|
||||
.flag {
|
||||
font-size: 1.25rem;
|
||||
margin-right: var(--space-2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue