Only show 3D addresses where necessary
This commit is contained in:
@@ -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)];
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user