diff --git a/app/Http/Controllers/DomainController.php b/app/Http/Controllers/DomainController.php
index eeda084..d292dc3 100644
--- a/app/Http/Controllers/DomainController.php
+++ b/app/Http/Controllers/DomainController.php
@@ -71,7 +71,7 @@ class DomainController extends Controller
->get();
return $oo->map(function($item) {
- return ['id'=>$item->host_id,'value'=>sprintf('%s %s',$item->ftn,$item->system->name)];
+ return ['id'=>$item->host_id,'value'=>sprintf('%s %s',$item->ftn_3d,$item->system->name)];
});
}
@@ -91,7 +91,7 @@ class DomainController extends Controller
->get();
return $oo->map(function($item) {
- return ['id'=>$item->id,'value'=>sprintf('%s %s',$item->ftn,$item->system->name)];
+ return ['id'=>$item->id,'value'=>sprintf('%s %s',$item->ftn_3d,$item->system->name)];
});
}
@@ -112,7 +112,7 @@ class DomainController extends Controller
->get();
return $oo->map(function($item) {
- return ['id'=>$item->region_id,'value'=>sprintf('%s %s',$item->ftn,$item->system->location)];
+ return ['id'=>$item->region_id,'value'=>sprintf('%s %s',$item->ftn_3d,$item->system->location)];
});
}
diff --git a/app/Models/Address.php b/app/Models/Address.php
index 6de94ca..e27d80f 100644
--- a/app/Models/Address.php
+++ b/app/Models/Address.php
@@ -45,7 +45,17 @@ class Address extends Model
*/
public function getFTNAttribute()
{
- return sprintf('%d:%d/%d.%d@%s',$this->zone->zone_id,$this->host_id ?: $this->region_id,$this->node_id,$this->point_id,$this->zone->domain->name);
+ return sprintf('%s@%s',$this->getFTN4DAttribute(),$this->zone->domain->name);
+ }
+
+ public function getFTN3DAttribute()
+ {
+ return sprintf('%d:%d/%d',$this->zone->zone_id,$this->host_id ?: $this->region_id,$this->node_id);
+ }
+
+ public function getFTN4DAttribute()
+ {
+ return sprintf('%s.%d',$this->getFTN3DAttribute(),$this->point_id);
}
public function getRoleAttribute($value)
diff --git a/resources/views/domain/view.blade.php b/resources/views/domain/view.blade.php
index f838cfc..70d56d8 100644
--- a/resources/views/domain/view.blade.php
+++ b/resources/views/domain/view.blade.php
@@ -73,38 +73,38 @@
{{ sprintf('ZC-%s-%05d',$oz->domain->name,$oz->zone_id) }} |
{{ $oz->system->sysop }} |
{{ $oz->system->location }} |
- {{ $oz->zone_id }}:0/0.0@{{ $oz->domain->name }} |
+ {{ $oz->zone_id }}:0/0 |
- |
- @foreach ($oz->addresses()->active()->FTNorder()->whereNull('hub_id')->with(['system','zone.domain'])->get() as $ao)
+ @foreach ($oz->addresses()->active()->FTNorder()->where('point_id',0)->whereNull('hub_id')->with(['system','zone.domain'])->get() as $ao)
@if ($ao->role == 'Host')
- {{ sprintf('NC-%s-%05d',$oz->domain->name,$ao->host_id) }} @auth[{{ $ao->id }}]@endauth |
+ {{ sprintf('NC-%s-%05d',$oz->domain->name,$ao->host_id) }} @auth[{{ $ao->system_id }}]@endauth |
{{ $ao->system->sysop }} |
{{ $ao->system->location }} |
- {{ $oz->zone_id }}:{{ $ao->host_id }}/0.0@{{ $oz->domain->name }} |
+ {{ $oz->zone_id }}:{{ $ao->host_id }}/0 |
- |
@endif
- {{ $ao->system->full_name($ao) }} @auth[{{ $ao->id }}]@endauth |
+ {{ $ao->system->full_name($ao) }} @auth[{{ $ao->system_id }}]@endauth |
{{ $ao->system->sysop }} |
{{ $ao->system->location }} |
- {{ $ao->ftn }} |
+ {{ $ao->ftn_3d }} |
- |
@if ($ao->role == 'Hub')
- @foreach ($oz->addresses()->active()->FTNorder()->where('hub_id',$ao->id)->with(['system','zone.domain'])->get() as $aoo)
+ @foreach ($oz->addresses()->active()->FTNorder()->where('point_id',0)->where('hub_id',$ao->id)->with(['system','zone.domain'])->get() as $aoo)
- {{ $aoo->system->full_name($aoo) }} @auth[{{ $aoo->id }}]@endauth |
+ {{ $aoo->system->full_name($aoo) }} @auth[{{ $aoo->system_id }}]@endauth |
{{ $aoo->system->sysop }} |
{{ $aoo->system->location }} |
{{ $aoo->role }} |
- {{ $aoo->ftn }} |
+ {{ $aoo->ftn_3d }} |
- |
@endforeach
diff --git a/resources/views/system/addedit.blade.php b/resources/views/system/addedit.blade.php
index 569db8c..754309c 100644
--- a/resources/views/system/addedit.blade.php
+++ b/resources/views/system/addedit.blade.php
@@ -288,7 +288,7 @@
@foreach ($o->addresses->sortBy(['region_id','host_id']) as $oo)
- {{ $oo->ftn }} |
+ {{ $oo->ftn_4d }} |
{{ $oo->active ? 'YES' : 'NO' }} |
{{ $oo->role }} |
@@ -529,7 +529,7 @@
$('#region_id').append('');
data.forEach(function(item) {
- $('#region_id').append('');
+ $('#region_id').append('');
});
$('#region_id').prop('disabled',false);
@@ -617,7 +617,7 @@
$('#host_id').append('');
data.forEach(function(item) {
- $('#host_id').append('');
+ $('#host_id').append('');
});
$('#host_id').prop('disabled',false);
@@ -683,7 +683,7 @@
$('#hub_id').append('');
data.forEach(function(item) {
- $('#hub_id').append('');
+ $('#hub_id').append('');
});
$('#hub_id').prop('disabled',false);
diff --git a/resources/views/system/home.blade.php b/resources/views/system/home.blade.php
index 4d18cd5..43db0bc 100644
--- a/resources/views/system/home.blade.php
+++ b/resources/views/system/home.blade.php
@@ -85,6 +85,7 @@
paging: true,
pageLength: 25,
searching: true,
+ autoWidth: false,
columnDefs: [
{
targets: [5,6],