66 lines
3.7 KiB
PHP
66 lines
3.7 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<div class="flex items-center space-x-2">
|
|
<a href="{{ route('network.segments.index') }}" class="text-gray-500 hover:text-gray-700">Segmente</a>
|
|
<span class="text-gray-400">/</span>
|
|
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200">Neues Segment</h2>
|
|
</div>
|
|
</x-slot>
|
|
|
|
<div class="py-8">
|
|
<div class="max-w-xl mx-auto sm:px-6 lg:px-8">
|
|
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-lg p-6">
|
|
<form method="POST" action="{{ route('network.segments.store') }}" class="space-y-5">
|
|
@csrf
|
|
|
|
<div>
|
|
<x-input-label for="name" value="Name *" />
|
|
<x-text-input id="name" name="name" type="text" class="mt-1 block w-full"
|
|
value="{{ old('name') }}" placeholder="z.B. Büro, Server-VLAN, Produktion" required />
|
|
<x-input-error :messages="$errors->get('name')" class="mt-1" />
|
|
</div>
|
|
|
|
<div>
|
|
<x-input-label for="subnet" value="Subnetz *" />
|
|
<x-text-input id="subnet" name="subnet" type="text" class="mt-1 block w-full font-mono"
|
|
value="{{ old('subnet') }}" placeholder="z.B. 192.168.1.0/24 oder 10.0.0.0/8" required />
|
|
<x-input-error :messages="$errors->get('subnet')" class="mt-1" />
|
|
</div>
|
|
|
|
<div>
|
|
<x-input-label for="vlan_id" value="VLAN-ID (optional)" />
|
|
<x-text-input id="vlan_id" name="vlan_id" type="number" class="mt-1 block w-full"
|
|
value="{{ old('vlan_id') }}" placeholder="z.B. 10" min="1" max="4094" />
|
|
<x-input-error :messages="$errors->get('vlan_id')" class="mt-1" />
|
|
</div>
|
|
|
|
<div>
|
|
<x-input-label for="description" value="Beschreibung (optional)" />
|
|
<textarea id="description" name="description" rows="2"
|
|
class="mt-1 block w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 rounded-md shadow-sm text-sm focus:ring-indigo-500 focus:border-indigo-500"
|
|
placeholder="Kurze Beschreibung dieses Segments...">{{ old('description') }}</textarea>
|
|
</div>
|
|
|
|
<div class="flex items-center gap-2">
|
|
<input type="checkbox" id="active" name="active" value="1"
|
|
{{ old('active', '1') ? 'checked' : '' }}
|
|
class="rounded border-gray-300 text-indigo-600 focus:ring-indigo-500" />
|
|
<label for="active" class="text-sm text-gray-700 dark:text-gray-300">Aktiv (automatisch überwachen)</label>
|
|
</div>
|
|
|
|
<div class="flex justify-end gap-3">
|
|
<a href="{{ route('network.segments.index') }}"
|
|
class="px-4 py-2 text-sm font-medium rounded-md border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 transition">
|
|
Abbrechen
|
|
</a>
|
|
<button type="submit" style="background-color: var(--color-primary)"
|
|
class="px-5 py-2 text-white text-sm font-medium rounded-md hover:opacity-90 transition">
|
|
Segment anlegen
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|