Compare commits
3 Commits
e1bd2b7d06
...
a32e2e504a
Author | SHA1 | Date | |
---|---|---|---|
a32e2e504a | |||
7e87481e05 | |||
670450387c |
@ -27,7 +27,7 @@ class AddressPoll implements ShouldQueue, ShouldBeUnique
|
|||||||
|
|
||||||
private const LOGKEY = 'JAP';
|
private const LOGKEY = 'JAP';
|
||||||
|
|
||||||
public int $tries = 5;
|
public int $tries = 10;
|
||||||
public int $maxExceptions = 1;
|
public int $maxExceptions = 1;
|
||||||
public bool $failOnTimeout = TRUE;
|
public bool $failOnTimeout = TRUE;
|
||||||
|
|
||||||
|
@ -254,19 +254,26 @@ class Address extends Model
|
|||||||
$ftn = self::parseFTN($address);
|
$ftn = self::parseFTN($address);
|
||||||
$do = $ftn['d'] ? Domain::where('name',$ftn['d'])->single() : NULL;
|
$do = $ftn['d'] ? Domain::where('name',$ftn['d'])->single() : NULL;
|
||||||
|
|
||||||
if ($ftn['z'] === 0)
|
$o = new self;
|
||||||
Log::alert(sprintf('%s:! newFTN was parsed an FTN [%s] with a zero zone',self::LOGKEY,$address));
|
$o->region_id = $ftn['r'];
|
||||||
|
$o->host_id = $ftn['n'];
|
||||||
|
$o->node_id = $ftn['f'];
|
||||||
|
$o->point_id = $ftn['p'];
|
||||||
|
|
||||||
$zo = Zone::where('zone_id',$ftn['z'])
|
$zo = Zone::where('zone_id',$ftn['z'])
|
||||||
->when($do,fn($query)=>$query->where('domain_id',$do->id))
|
->when($do,fn($query)=>$query->where('domain_id',$do->id))
|
||||||
->single();
|
->single();
|
||||||
|
|
||||||
$o = new self;
|
|
||||||
$o->zone_id = $zo?->id;
|
$o->zone_id = $zo?->id;
|
||||||
$o->region_id = $ftn['r'];
|
|
||||||
$o->host_id = $ftn['n'];
|
if (($ftn['z'] === 0) || (! $zo)) {
|
||||||
$o->node_id = $ftn['f'];
|
Log::alert(sprintf('%s:! newFTN was parsed an FTN [%s] with a zero zone, adding empty zone in domain',self::LOGKEY,$address));
|
||||||
$o->point_id = $ftn['p'];
|
|
||||||
|
$zo = new Zone;
|
||||||
|
$zo->domain_id = $do?->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$o->zone()->associate($zo);
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
@ -761,6 +768,9 @@ class Address extends Model
|
|||||||
if (! $this->relationLoaded('zone'))
|
if (! $this->relationLoaded('zone'))
|
||||||
$this->load(['zone:id,domain_id,zone_id']);
|
$this->load(['zone:id,domain_id,zone_id']);
|
||||||
|
|
||||||
|
if (! $this->zone)
|
||||||
|
throw new InvalidFTNException(sprintf('Invalid Zone for FTN address [%d/%d.%d@%s]',$this->host_id ?: $this->region_id,$this->node_id,$this->point_id,$this->domain?->name));
|
||||||
|
|
||||||
return sprintf('%d:%s',$this->zone->zone_id,$this->getFTN2DAttribute());
|
return sprintf('%d:%s',$this->zone->zone_id,$this->getFTN2DAttribute());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
resources/views/maintenance.blade.php
Normal file
13
resources/views/maintenance.blade.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
@extends('layouts.auth')
|
||||||
|
|
||||||
|
@section('htmlheader_title')
|
||||||
|
Down for a bit
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="text-center">
|
||||||
|
<h1 class="m-5" style="border-bottom: 0;">Down for a bit, back soon!</h1>
|
||||||
|
|
||||||
|
<p class="text-center"><strong class="highlight danger"><small>If it has been this way too long, <br>you might want to let somebody know.</small></strong></p>
|
||||||
|
</div>
|
||||||
|
@endsection
|
Loading…
Reference in New Issue
Block a user