Files
laravel-llm-gateway/laravel-app/resources/views/gateway-users/create.blade.php
Wilfried Trinkl 602fe582b0 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
2025-11-19 21:13:59 +01:00

70 lines
3.3 KiB
PHP

<x-app-layout>
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
{{ __('Create Gateway User') }}
</h2>
</x-slot>
<div class="py-12">
<div class="max-w-3xl mx-auto sm:px-6 lg:px-8">
<!-- Header -->
<div class="mb-6">
<h1 class="text-3xl font-bold text-gray-900">Create Gateway User</h1>
<p class="mt-1 text-sm text-gray-600">Add a new API consumer to the gateway</p>
</div>
<!-- Form -->
<div class="bg-white rounded-lg shadow-sm p-6">
<form method="POST" action="{{ route('gateway-users.store') }}">
@csrf
<!-- Alias -->
<div class="mb-6">
<label for="alias" class="block text-sm font-medium text-gray-700 mb-2">
Alias (Optional)
</label>
<input type="text"
name="alias"
id="alias"
value="{{ old('alias') }}"
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm @error('alias') border-red-300 @enderror"
placeholder="My Application">
<p class="mt-1 text-sm text-gray-500">A friendly name to identify this user</p>
@error('alias')
<p class="mt-1 text-sm text-red-600">{{ $message }}</p>
@enderror
</div>
<!-- Info Box -->
<div class="mb-6 bg-blue-50 border-l-4 border-blue-400 p-4">
<div class="flex">
<div class="flex-shrink-0">
<svg class="h-5 w-5 text-blue-400" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/>
</svg>
</div>
<div class="ml-3">
<p class="text-sm text-blue-700">
A unique user ID will be automatically generated. You can create API keys for this user after creation.
</p>
</div>
</div>
</div>
<!-- Actions -->
<div class="flex items-center justify-end space-x-3">
<a href="{{ route('gateway-users.index') }}"
class="inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-md font-semibold text-xs text-gray-700 uppercase tracking-widest shadow-sm hover:bg-gray-50">
Cancel
</a>
<button type="submit"
class="inline-flex items-center px-4 py-2 bg-indigo-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-indigo-700">
Create User
</button>
</div>
</form>
</div>
</div>
</div>
</x-app-layout>