Quotas: usage as a share, and their statistics per rule
What a quota used shows its percentage of the allowance on the Rules page (line and dialog), the dashboard and in hc quotas. Statistics' Quotas card links each entry to its rule, named, without the share of the total; per-address quotas are in it at last: their quota:rN series is the sum of their addresses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a169e9aa96
commit
7d23fb13ed
11 files changed
+59
-15
No files matched your search
@@ -161,6 +161,13 @@ export function fmtBytes(n) {
|
||||
return n + " bytes";
|
||||
}
|
||||
|
||||
// pct writes used as a share of total: "25%", "<1%" for a little.
|
||||
export function pct(used, total) {
|
||||
if (!total || used <= 0) return "0%";
|
||||
const p = used / total * 100;
|
||||
return p < 1 ? "<1%" : Math.floor(p) + "%";
|
||||
}
|
||||
|
||||
// usageBar draws used out of total as a bar, red once it is all used.
|
||||
export function usageBar(used, total) {
|
||||
const seg = h("div", { class: "seg leased" });
|
||||
|
||||
Reference in new issue
Block a user