62 lines
3.4 KiB
PHP
62 lines
3.4 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<div class="flex items-center space-x-2">
|
|
<a href="{{ route('network.dashboard') }}" class="text-gray-500 hover:text-gray-700">Netzwerk</a>
|
|
<span class="text-gray-400">/</span>
|
|
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200">Scan importieren</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">
|
|
|
|
@if(session('success'))
|
|
<div class="mb-4 p-4 bg-green-100 text-green-800 rounded-md">{{ session('success') }}</div>
|
|
@endif
|
|
|
|
<p class="text-sm text-gray-600 dark:text-gray-400 mb-6">
|
|
Importiere den Textexport von <strong>Angry IP Scanner</strong>.<br>
|
|
Exportformat: <code class="bg-gray-100 dark:bg-gray-700 px-1 rounded">Datei → Speichern als → Komma-getrennte Textdatei (.txt)</code>
|
|
</p>
|
|
|
|
<form method="POST" action="{{ route('network.import') }}" enctype="multipart/form-data" class="space-y-5">
|
|
@csrf
|
|
|
|
<div>
|
|
<x-input-label for="segment_id" value="Netzwerk-Segment (optional)" />
|
|
<select id="segment_id" name="segment_id"
|
|
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">
|
|
<option value="">— Kein Segment —</option>
|
|
@foreach($segments as $segment)
|
|
<option value="{{ $segment->id }}"
|
|
{{ (request('segment') == $segment->id || old('segment_id') == $segment->id) ? 'selected' : '' }}>
|
|
{{ $segment->name }} ({{ $segment->subnet }}){{ $segment->vlan_id ? ' · VLAN ' . $segment->vlan_id : '' }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
<x-input-error :messages="$errors->get('segment_id')" class="mt-2" />
|
|
</div>
|
|
|
|
<div>
|
|
<x-input-label for="scan_file" value="Angry IP Scanner Export (.txt)" />
|
|
<input id="scan_file" name="scan_file" type="file" accept=".txt,.csv" required
|
|
class="mt-1 block w-full text-sm text-gray-500
|
|
file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0
|
|
file:text-sm file:font-medium file:bg-indigo-50 file:text-indigo-700
|
|
hover:file:bg-indigo-100 dark:file:bg-indigo-900 dark:file:text-indigo-300" />
|
|
<x-input-error :messages="$errors->get('scan_file')" class="mt-2" />
|
|
</div>
|
|
|
|
<div class="flex justify-end">
|
|
<button type="submit" style="background-color: var(--color-primary)"
|
|
class="px-6 py-2 text-white text-sm font-medium rounded-md hover:opacity-90 transition">
|
|
Import starten
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|