Compare commits

...

4 Commits

Author SHA1 Message Date
2509aa99e1 Update bootstrap icons to 1.11.3
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 41s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m49s
Create Docker Image / Final Docker Image Manifest (push) Successful in 11s
2024-06-05 19:23:58 +10:00
be8aec4751 Make it easier to identify systems that have been marked not active 2024-06-05 19:23:58 +10:00
efdb6b96ea Fix for user creation 2024-06-05 19:23:58 +10:00
1753111f8f Prefix is an optional argument, so default it to blank 2024-06-05 19:23:58 +10:00
8 changed files with 23 additions and 11 deletions

View File

@ -35,6 +35,6 @@ class EchoareaImport extends Command
public function handle(): int public function handle(): int
{ {
$do = Domain::where('name',strtolower($this->argument('domain')))->singleOrFail(); $do = Domain::where('name',strtolower($this->argument('domain')))->singleOrFail();
return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix'),$this->option('unlink')); return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix') ?: '',$this->option('unlink'));
} }
} }

View File

@ -35,6 +35,6 @@ class FileareaImport extends Command
public function handle(): int public function handle(): int
{ {
$do = Domain::where('name',strtolower($this->argument('domain')))->singleOrFail(); $do = Domain::where('name',strtolower($this->argument('domain')))->singleOrFail();
return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix'),$this->option('unlink')); return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix') ?: '',$this->option('unlink'));
} }
} }

View File

@ -21,7 +21,7 @@ class UserRequest extends FormRequest
$o = $this->route('o'); $o = $this->route('o');
return [ return [
'email' => 'required|email|unique:users,email,'.($o->exists ? $o->id : 0), 'email' => 'required|email|unique:users,email,'.($o?->exists ? $o->id : 0),
'name' => 'required|min:3', 'name' => 'required|min:3',
'pgp_pubkey' => [ 'pgp_pubkey' => [
'nullable', 'nullable',
@ -33,7 +33,7 @@ class UserRequest extends FormRequest
'admin' => 'required|boolean', 'admin' => 'required|boolean',
'system_id' => [ 'system_id' => [
'nullable', 'nullable',
Rule::in($o->systems->pluck('id')), Rule::in($o?->systems->pluck('id')),
], ],
]; ];
} }

View File

@ -35,7 +35,7 @@ class EchoareaImport implements ShouldQueue
* @param bool $delete_recs * @param bool $delete_recs
* @param bool $delete_file * @param bool $delete_file
*/ */
public function __construct(string $file,Domain $do,string $prefix,bool $delete_recs=FALSE,bool $delete_file=FALSE) public function __construct(string $file,Domain $do,string $prefix='',bool $delete_recs=FALSE,bool $delete_file=FALSE)
{ {
$this->file = $file; $this->file = $file;
$this->do = $do; $this->do = $do;

View File

@ -35,7 +35,7 @@ class FileareaImport implements ShouldQueue
* @param bool $delete_recs * @param bool $delete_recs
* @param bool $delete_file * @param bool $delete_file
*/ */
public function __construct(string $file,Domain $do,string $prefix,bool $delete_recs=FALSE,bool $delete_file=FALSE) public function __construct(string $file,Domain $do,string $prefix='',bool $delete_recs=FALSE,bool $delete_file=FALSE)
{ {
$this->file = $file; $this->file = $file;
$this->do = $do; $this->do = $do;

View File

@ -10,7 +10,7 @@
<!-- CSS only --> <!-- CSS only -->
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> <link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css"> <link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
<link type="text/css" rel="stylesheet" href="{{ asset('oldschool/css/main.css') }}" media="screen"> <link type="text/css" rel="stylesheet" href="{{ asset('oldschool/css/main.css') }}" media="screen">

View File

@ -40,14 +40,15 @@ use App\Models\System;
<th>Address</th> <th>Address</th>
<th>ZeroTier ID</th> <th>ZeroTier ID</th>
<th>Addresses</th> <th>Addresses</th>
<th>Active</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach (System::active()->with(['addresses.zone.domain'])->get() as $oo) @foreach (System::with(['addresses.zone.domain'])->get() as $oo)
<tr> <tr>
<td><a href="{{ url('system/addedit',[$oo->id]) }}" @cannot('update_nn',$oo)class="disabled" @endcannot>{{ $oo->id }}</a></td> <td><a href="{{ url('system/addedit',[$oo->id]) }}" @cannot('update_nn',$oo)class="disabled" @endcannot>{{ $oo->id }}</a></td>
<td>{{ $oo->name }} @if(! $oo->active)<span class="float-end"><small>[i]</small></span>@endif</td> <td>{{ $oo->name }}</td>
<td>{{ $oo->sysop }}</td> <td>{{ $oo->sysop }}</td>
<td>{{ $oo->location }}</td> <td>{{ $oo->location }}</td>
<td> <td>
@ -61,6 +62,7 @@ use App\Models\System;
<td>{{ $oo->addresses->pluck('ftn')->join(', ') }}</td> <td>{{ $oo->addresses->pluck('ftn')->join(', ') }}</td>
<td>{{ $oo->zt_id }}</td> <td>{{ $oo->zt_id }}</td>
<td>{{ $oo->addresses->count() }}</td> <td>{{ $oo->addresses->count() }}</td>
<td>{{ $oo->active ? 'Active' : 'Not Active' }}</td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
@ -94,15 +96,20 @@ use App\Models\System;
style: 'fade', style: 'fade',
speed: 500 // optional speed: 500 // optional
}, },
order: [1,'asc'],
orderFixed: [8,'asc'],
language: { language: {
paginate: { paginate: {
previous: '&lt;&lt;', previous: '&lt;&lt;',
next: '&gt;&gt;' next: '&gt;&gt;'
} }
}, },
rowGroup: {
dataSrc: [8],
},
columnDefs: [ columnDefs: [
{ {
targets: [5,6], targets: [5,6,8],
visible: false, visible: false,
} }
], ],

View File

@ -31,7 +31,12 @@
@foreach (\App\Models\SystemZone::select('*')->with(['system.addresses.zone.domain','zone.domain'])->get() as $oo) @foreach (\App\Models\SystemZone::select('*')->with(['system.addresses.zone.domain','zone.domain'])->get() as $oo)
<tr> <tr>
<td>{{ $oo->zone->domain->name }}</td> <td>{{ $oo->zone->domain->name }}</td>
<td><a href="{{ url('system/addedit',[$oo->system_id]) }}">{{ $oo->system_id }}</a>@if($oo->system->hold)<span class="float-end"><i class="text-danger bi bi-stop-circle"></i></span>@endif</td> <td>
<a href="{{ url('system/addedit',[$oo->system_id]) }}">{{ $oo->system_id }}</a>
@if(! $oo->system->active)<span class="float-end"><i class="text-danger bi bi-slash-circle"></i></span>
@elseif($oo->system->hold)<span class="float-end"><i class="text-danger bi bi-stop-circle"></i></span>
@endif
</td>
<td>{{ $oo->system->name }}</td> <td>{{ $oo->system->name }}</td>
<td>{{ $oo->system->sysop }}</td> <td>{{ $oo->system->sysop }}</td>
<td>{{ $oo->system->location }}</td> <td>{{ $oo->system->location }}</td>