api monitors

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-15 11:31:49 +00:00
parent 069e0a24d8
commit 133d63813a
14 changed files with 613 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import { useToast } from '../../components/ui/toast/ToastContainer';
import { fetchCreditBalance, CreditBalance } from '../../services/api';
import { Card } from '../../components/ui/card';
import Badge from '../../components/ui/badge/Badge';
import ApiStatusMonitor from '../../components/debug/ApiStatusMonitor';
export default function Credits() {
const toast = useToast();
@@ -88,6 +89,14 @@ export default function Credits() {
</Card>
</div>
)}
{/* API Status Monitor - Only shows when debug toggle is enabled */}
<ApiStatusMonitor
title="Billing"
endpoints={[
{ name: 'Get Credit Balance', method: 'GET', endpoint: '/v1/billing/credits/balance/balance/' },
]}
/>
</div>
);
}

View File

@@ -4,6 +4,7 @@ import { useToast } from '../../components/ui/toast/ToastContainer';
import { fetchCreditTransactions, CreditTransaction } from '../../services/api';
import { Card } from '../../components/ui/card';
import Badge from '../../components/ui/badge/Badge';
import ApiStatusMonitor from '../../components/debug/ApiStatusMonitor';
export default function Transactions() {
const toast = useToast();
@@ -97,6 +98,14 @@ export default function Transactions() {
</div>
</Card>
)}
{/* API Status Monitor - Only shows when debug toggle is enabled */}
<ApiStatusMonitor
title="Billing"
endpoints={[
{ name: 'Get Credit Transactions', method: 'GET', endpoint: '/v1/billing/credits/transactions/' },
]}
/>
</div>
);
}

View File

@@ -4,6 +4,7 @@ import { useToast } from '../../components/ui/toast/ToastContainer';
import { fetchCreditUsage, CreditUsageLog, fetchUsageLimits, LimitCard } from '../../services/api';
import { Card } from '../../components/ui/card';
import Badge from '../../components/ui/badge/Badge';
import ApiStatusMonitor from '../../components/debug/ApiStatusMonitor';
export default function Usage() {
const toast = useToast();
@@ -211,6 +212,15 @@ export default function Usage() {
</Card>
)}
</div>
{/* API Status Monitor - Only shows when debug toggle is enabled */}
<ApiStatusMonitor
title="Billing"
endpoints={[
{ name: 'Get Credit Usage', method: 'GET', endpoint: '/v1/billing/credits/usage/' },
{ name: 'Get Usage Limits', method: 'GET', endpoint: '/v1/billing/credits/usage/limits/' },
]}
/>
</div>
);
}