Initial commit: Any-LLM Gateway with Laravel Admin Interface
- Any-LLM Gateway setup with Docker Compose - Laravel 11 admin interface with Livewire - Dashboard with usage statistics and charts - Gateway Users management with budget tracking - API Keys management with revocation - Budget templates with assignment - Usage Logs with filtering and CSV export - Model Pricing management with calculator - PostgreSQL database integration - Complete authentication system for admins
This commit is contained in:
111
laravel-app/resources/views/gateway-users/edit.blade.php
Normal file
111
laravel-app/resources/views/gateway-users/edit.blade.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
|
||||
{{ __('Edit 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">Edit Gateway User</h1>
|
||||
<p class="mt-1 text-sm text-gray-600">Update user settings and configuration</p>
|
||||
</div>
|
||||
|
||||
<!-- Form -->
|
||||
<div class="bg-white rounded-lg shadow-sm p-6">
|
||||
<form method="POST" action="{{ route('gateway-users.update', $user->user_id) }}">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
<!-- User ID (Read-only) -->
|
||||
<div class="mb-6">
|
||||
<label class="block text-sm font-medium text-gray-700 mb-2">
|
||||
User ID
|
||||
</label>
|
||||
<input type="text"
|
||||
value="{{ $user->user_id }}"
|
||||
readonly
|
||||
class="block w-full rounded-md border-gray-300 bg-gray-50 shadow-sm sm:text-sm font-mono">
|
||||
<p class="mt-1 text-sm text-gray-500">Cannot be changed</p>
|
||||
</div>
|
||||
|
||||
<!-- 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', $user->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">
|
||||
@error('alias')
|
||||
<p class="mt-1 text-sm text-red-600">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Budget -->
|
||||
<div class="mb-6">
|
||||
<label for="budget_id" class="block text-sm font-medium text-gray-700 mb-2">
|
||||
Budget Template
|
||||
</label>
|
||||
<select name="budget_id"
|
||||
id="budget_id"
|
||||
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm @error('budget_id') border-red-300 @enderror">
|
||||
<option value="">No Budget</option>
|
||||
@foreach($budgets as $budget)
|
||||
<option value="{{ $budget->budget_id }}"
|
||||
{{ old('budget_id', $user->budget_id) == $budget->budget_id ? 'selected' : '' }}>
|
||||
{{ $budget->budget_id }} - ${{ number_format($budget->max_budget, 2) }}
|
||||
({{ floor($budget->budget_duration_sec / 86400) }}d)
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('budget_id')
|
||||
<p class="mt-1 text-sm text-red-600">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Current Spend (Read-only) -->
|
||||
<div class="mb-6">
|
||||
<label class="block text-sm font-medium text-gray-700 mb-2">
|
||||
Current Spend
|
||||
</label>
|
||||
<input type="text"
|
||||
value="${{ number_format($user->spend, 2) }}"
|
||||
readonly
|
||||
class="block w-full rounded-md border-gray-300 bg-gray-50 shadow-sm sm:text-sm">
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="flex items-center justify-between">
|
||||
<form action="{{ route('gateway-users.destroy', $user->user_id) }}"
|
||||
method="POST"
|
||||
onsubmit="return confirm('Are you sure? This will delete the user and all associated data.');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit"
|
||||
class="inline-flex items-center px-4 py-2 bg-red-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-red-700">
|
||||
Delete User
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="flex space-x-3">
|
||||
<a href="{{ route('gateway-users.show', $user->user_id) }}"
|
||||
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">
|
||||
Update User
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user