Renamed import nodelist job, dont display address id's to unauthed users, removed debugging from importnodelist.

This commit is contained in:
Deon George 2021-06-26 10:55:02 +10:00
parent aa06296963
commit 980f57e808
3 changed files with 8 additions and 10 deletions

View File

@ -6,16 +6,16 @@ use Carbon\Carbon;
use Illuminate\Console\Command;
use App\Models\{Domain,Nodelist};
use App\Jobs\ImportNodelist as Job;
use App\Jobs\NodelistImport as Job;
class ImportNodelist extends Command
class NodelistImport extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'import:nodelist'
protected $signature = 'nodelist:import'
.' {domain : Domain Name}'
.' {file : Nodelist File}'
.' {--D|delete : Delete old data for the date}';

View File

@ -14,7 +14,7 @@ use App\Http\Controllers\DomainController;
use App\Models\{Address,Domain,Nodelist,System,Zone};
use App\Traits\Import as ImportTrait;
class ImportNodelist implements ShouldQueue
class NodelistImport implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
use ImportTrait;
@ -238,10 +238,8 @@ class ImportNodelist implements ShouldQueue
$ao->zone_id = $zo->id;
if ($ao->getDirty()) {
dd($ao);
if ($ao->getDirty())
$p++;
}
try {
$so->addresses()->save($ao);

View File

@ -80,7 +80,7 @@
@foreach ($oz->addresses()->active()->FTNorder()->whereNull('hub_id')->with(['system','zone.domain'])->get() as $ao)
@if ($ao->role == 'Host')
<tr>
<td>{{ sprintf('NC-%s-%05d',$oz->domain->name,$ao->host_id) }} <span class="float-end"><small>[{{ $ao->id }}]</small></span></td>
<td>{{ sprintf('NC-%s-%05d',$oz->domain->name,$ao->host_id) }} @auth<span class="float-end"><small>[{{ $ao->id }}]</small></span>@endauth</td>
<td>{{ $ao->system->sysop }}</td>
<td>{{ $ao->system->location }}</td>
<td>{{ $oz->zone_id }}:{{ $ao->host_id }}/0.0<span>@</span>{{ $oz->domain->name }}</td>
@ -89,7 +89,7 @@
@endif
<tr>
<td>{{ $ao->system->full_name($ao) }} <span class="float-end"><small>[{{ $ao->id }}]</small></span></td>
<td>{{ $ao->system->full_name($ao) }} @auth<span class="float-end"><small>[{{ $ao->id }}]</small></span>@endauth</td>
<td>{{ $ao->system->sysop }}</td>
<td>{{ $ao->system->location }}</td>
<td>{{ $ao->ftn }}</td>
@ -100,7 +100,7 @@
@if ($ao->role == 'Hub')
@foreach ($oz->addresses()->active()->FTNorder()->where('hub_id',$ao->id)->with(['system','zone.domain'])->get() as $aoo)
<tr>
<td>{{ $aoo->system->full_name($aoo) }} <span class="float-end"><small>[{{ $aoo->id }}]</small></span></td>
<td>{{ $aoo->system->full_name($aoo) }} @auth<span class="float-end"><small>[{{ $aoo->id }}]</small></span>@endauth</td>
<td>{{ $aoo->system->sysop }}</td>
<td>{{ $aoo->system->location }}</td>
<td>{{ $aoo->role }}</td>