Change domain view last seen to show last time an echomail came from that system
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 40s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m43s
Create Docker Image / Final Docker Image Manifest (push) Successful in 11s

This commit is contained in:
Deon George 2024-05-23 23:28:42 +10:00
parent a547e29e56
commit 27956146e3
3 changed files with 6 additions and 4 deletions

View File

@ -118,7 +118,7 @@ class DomainController extends Controller
if (! $o->public && ! Gate::check('admin',$o)) if (! $o->public && ! Gate::check('admin',$o))
abort(404); abort(404);
$o->load(['zones.system','zones.domain','zones.addresses.nodes_hub']); $o->load(['zones.system','zones.domain','zones.addresses.nodes_hub','zones.addresses.echomail_from']);
return view('domain.view') return view('domain.view')
->with('o',$o); ->with('o',$o);

View File

@ -534,7 +534,9 @@ class Address extends Model
public function echomail_from() public function echomail_from()
{ {
return $this->hasMany(Echomail::class,'fftn_id','id'); return $this->hasMany(Echomail::class,'fftn_id','id')
->orderBy('datetime','DESC')
->limit(10);
} }
/** /**

View File

@ -126,7 +126,7 @@
<th>Sysop</th> <th>Sysop</th>
<th>Location</th> <th>Location</th>
<th>Address</th> <th>Address</th>
<th>Last Seen</th> <th>Last Echomail</th>
</tr> </tr>
</thead> </thead>
@ -138,7 +138,7 @@
<td>{{ $ao->system->sysop }}</td> <td>{{ $ao->system->sysop }}</td>
<td>{{ $ao->system->location }}</td> <td>{{ $ao->system->location }}</td>
<td>{{ $ao->ftn4d }}</td> <td>{{ $ao->ftn4d }}</td>
<td>{{ $ao->system->last_session ? $ao->system->last_session->format('Y-m-d H:i') : '-' }}</td> <td>{{ $ao->echomail_from->count() ? $ao->echomail_from->first()->datetime->format('Y-m-d H:i') : '-' }}</td>
</tr> </tr>
@endforeach @endforeach
@endforeach @endforeach