Refactor: Align system with gateway_users architecture

- Fixed database relationships: LlmRequest now properly uses gateway_user_id instead of user_id
- Updated Models: GatewayUser and LlmRequest relationships corrected
- Removed User->llmRequests relationship (admin users don't have LLM requests)
- Simplified Dashboard: Now shows Gateway User statistics instead of admin users
- Removed obsolete Budgets management pages (budgets handled directly in gateway_users)
- Removed User Budgets admin section (redundant with gateway_users management)
- Fixed view errors: Added null-checks for user_id in keys views
- Updated navigation: Removed Budget and User Budget links
- Updated routes: Cleaned up unused BudgetController and UserManagementController routes
- Simplified StatisticsService: Focus on gateway_users and basic metrics only
This commit is contained in:
Wilfried Trinkl
2025-11-19 21:13:59 +01:00
parent cb495e18e3
commit 602fe582b0
16 changed files with 91 additions and 751 deletions

View File

@@ -18,20 +18,12 @@ class DashboardController extends Controller
{
$stats = $this->statsService->getDashboardStats();
$dailyUsage = $this->statsService->getDailyUsageChart(30);
$topUsers = $this->statsService->getTopUsers(5);
$providerStats = $this->statsService->getUsageByProvider(30);
$modelStats = $this->statsService->getUsageByModel(30);
$costTrends = $this->statsService->getCostTrends(30);
$errorStats = $this->statsService->getErrorStats(30);
return view('dashboard', compact(
'stats',
'dailyUsage',
'topUsers',
'providerStats',
'modelStats',
'costTrends',
'errorStats'
'providerStats'
));
}