Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Add 1d range to AI cost dashboard

rcourtman5f81a451d44d
diff --git a/frontend-modern/src/components/AI/AICostDashboard.tsx b/frontend-modern/src/components/AI/AICostDashboard.tsx
index f269d1d85a..fa7cc893b8 100644
--- a/frontend-modern/src/components/AI/AICostDashboard.tsx
+++ b/frontend-modern/src/components/AI/AICostDashboard.tsx
@@ -85,6 +85,17 @@ export const AICostDashboard: Component = () => {
<div class="text-xs text-gray-500 dark:text-gray-400">Loading…</div>
</Show>
<div class="flex items-center gap-1">
+ <button
+ type="button"
+ disabled={loading()}
+ onClick={() => handleRangeClick(1)}
+ class={`p-0.5 px-1.5 text-xs border rounded transition-colors ${days() === 1
+ ? 'bg-blue-100 dark:bg-blue-900/50 text-blue-700 dark:text-blue-300 border-blue-300 dark:border-blue-700'
+ : 'border-gray-300 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700'
+ } ${loading() ? 'opacity-60 cursor-not-allowed' : ''}`}
+ >
+ 1d
+ </button>
<button
type="button"
disabled={loading()}