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:
@@ -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'
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user