feat(kpihistory): add 30d/90d trend windows to Audit/SiteCalls/Notifications/Health (plan #22 T7)

Adds 30d (720h) and 90d (2160h) toggle buttons alongside the existing
24h/7d controls on all four KPI trend surfaces. No fetch-logic changes:
the setters already recompute fromUtc and re-fetch, and the query service
(T5) transparently routes windows > RollupThresholdHours to hourly rollups
— so these windows are what actually exercise the rollup path. bUnit tests
extend the Audit and SiteCalls trend harnesses to cover the new buttons.

Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
Joseph Doherty
2026-07-10 12:12:17 -04:00
parent bedf3c55f0
commit bbfc1b3278
6 changed files with 91 additions and 0 deletions
@@ -39,6 +39,16 @@
@onclick="() => SetWindowAsync(168)" disabled="@_trendsLoading">
7d
</button>
<button type="button"
class="btn @(_windowHours == 720 ? "btn-secondary" : "btn-outline-secondary")"
@onclick="() => SetWindowAsync(720)" disabled="@_trendsLoading">
30d
</button>
<button type="button"
class="btn @(_windowHours == 2160 ? "btn-secondary" : "btn-outline-secondary")"
@onclick="() => SetWindowAsync(2160)" disabled="@_trendsLoading">
90d
</button>
</div>
}
</div>
@@ -109,6 +109,12 @@
<button type="button"
class="btn @(_trendWindowHours == 168 ? "btn-primary" : "btn-outline-secondary")"
@onclick="() => SetTrendWindowAsync(168)" disabled="@_trendsLoading">7d</button>
<button type="button"
class="btn @(_trendWindowHours == 720 ? "btn-primary" : "btn-outline-secondary")"
@onclick="() => SetTrendWindowAsync(720)" disabled="@_trendsLoading">30d</button>
<button type="button"
class="btn @(_trendWindowHours == 2160 ? "btn-primary" : "btn-outline-secondary")"
@onclick="() => SetTrendWindowAsync(2160)" disabled="@_trendsLoading">90d</button>
</div>
</div>
<div class="card-body p-3">
@@ -172,6 +172,12 @@
<button type="button"
class="btn @(_windowHours == 168 ? "btn-primary" : "btn-outline-secondary")"
@onclick="() => SetWindowAsync(168)" disabled="@_trendsLoading">7d</button>
<button type="button"
class="btn @(_windowHours == 720 ? "btn-primary" : "btn-outline-secondary")"
@onclick="() => SetWindowAsync(720)" disabled="@_trendsLoading">30d</button>
<button type="button"
class="btn @(_windowHours == 2160 ? "btn-primary" : "btn-outline-secondary")"
@onclick="() => SetWindowAsync(2160)" disabled="@_trendsLoading">90d</button>
</div>
</div>
<div class="row g-3">
@@ -248,6 +248,12 @@
<button type="button"
class="btn @(_windowHours == 168 ? "btn-primary" : "btn-outline-secondary")"
@onclick="() => SetWindowAsync(168)" disabled="@_trendsLoading">7d</button>
<button type="button"
class="btn @(_windowHours == 720 ? "btn-primary" : "btn-outline-secondary")"
@onclick="() => SetWindowAsync(720)" disabled="@_trendsLoading">30d</button>
<button type="button"
class="btn @(_windowHours == 2160 ? "btn-primary" : "btn-outline-secondary")"
@onclick="() => SetWindowAsync(2160)" disabled="@_trendsLoading">90d</button>
</div>
}
</div>