Improvements to finding idle nodes, last_session actually only shows the last time the remote polled us
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 47s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m53s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
2024-09-15 22:00:40 +10:00
parent 832b496b0b
commit 4501443a43
17 changed files with 122 additions and 38 deletions

View File

@@ -1,3 +1,5 @@
@use(App\Models\Domain)
@extends('layouts.app')
@section('htmlheader_title')
@@ -20,7 +22,7 @@
<span class="input-group-text"><i class="bi bi-tag-fill"></i></span>
<select class="form-select @error('domain_id') is-invalid @enderror" id="domain" name="domain_id" required @cannot('admin',$o)disabled @endcannot>
<option value="">&nbsp;</option>
@foreach (\App\Models\Domain::active()->orderBy('name')->cursor() as $oo)
@foreach (Domain::active()->orderBy('name')->cursor() as $oo)
<option value="{{ $oo->id }}" @if(old('domain_id',$o->domain_id)==$oo->id)selected @endif>{{ $oo->name }}</option>
@endforeach
</select>
@@ -180,7 +182,7 @@
<tr>
<td><a href="{{ url('system/addedit',[$ao->system_id]) }}">{{ $ao->system->full_name($ao) }}</a> @auth<span class="float-end"><small>@if($ao->is_hosted)<sup>{{ $ao->is_default ? '**' : '*' }}</sup>@elseif($ao->system->setup)<sup class="success">+</sup>@endif[{{ $ao->system_id }}]</small></span>@endauth</td>
<td>{{ $ao->ftn_3d }}</td>
<td>{{ $ao->system->last_session ? $ao->system->last_session->format('Y-m-d H:i') : '-' }}</td>
<td>{{ $ao->system->last_seen?->format('Y-m-d H:i') ?: '-' }}</td>
<td>{{ ($x=$o->waiting($ao))->count() ? $x->first()->datetime->format('Y-m-d H:i') : '-' }}</td>
<td class="text-end">{{ number_format($x->count()) }}</td>
</tr>

View File

@@ -1,3 +1,6 @@
@use(App\Models\SystemLog)
@use(Carbon\Carbon)
@extends('layouts.app')
@section('htmlheader_title')
Stats
@@ -119,7 +122,7 @@
<div class="card-header p-2">
<span class="card-title w-100 text-dark" style="font-size: 125%;"><i class="bi bi-pc-display"></i> Systems
<button type="button" class="btn float-end me-0" style="background-color: black; color: white;">
{{ number_format(\App\Models\System::where('last_session','>=',\Carbon\Carbon::now()->subWeek()->startOfDay())->count()) }}
{{ number_format(SystemLog::distinct('system_id')->where('created_at','>=',Carbon::now()->subWeek()->startOfDay())->count()) }}
</button>
</span>
</div>
@@ -188,7 +191,7 @@
<td class="text-end">{{ number_format($o->uncollected_echomail ?? 0) }}</td>
<td class="text-end">{{ number_format($o->uncollected_netmail ?? 0) }}</td>
<td class="text-end">{{ number_format($o->uncollected_files ?? 0) }}</td>
<td>{{ $o->system->last_session?->format('Y-m-d H:i') }}</td>
<td>{{ $o->system->last_seen?->format('Y-m-d H:i') }}</td>
<td>{{ is_null($o->system->pollmode) ? 'HOLD' : ($o->system->pollmode ? 'CRASH' : 'DAILY') }}</td>
<td>{{ $o->system->autohold ? 'YES' : 'NO' }}</td>
</tr>

View File

@@ -1,3 +1,5 @@
@use(App\Models\SystemZone)
@extends('layouts.app')
@section('htmlheader_title')
Systems
@@ -28,7 +30,7 @@
</thead>
<tbody>
@foreach (\App\Models\SystemZone::select('*')->with(['system.addresses.zone.domain','zone.domain'])->get() as $oo)
@foreach (SystemZone::select('*')->with(['system.addresses.zone.domain','zone.domain','system.logs_recent'])->get() as $oo)
<tr>
<td>{{ $oo->zone->domain->name }}</td>
<td>
@@ -40,7 +42,7 @@
<td>{{ $oo->system->name }}</td>
<td>{{ $oo->system->sysop }}</td>
<td>{{ $oo->system->location }}</td>
<td>{{ $oo->system->last_session ? $oo->system->last_session->format('Y-m-d H:i') : '-' }}</td>
<td>{{ $oo->system->last_seen?->format('Y-m-d H:i') ?: '-' }}</td>
<td>{{ $oo->system->akas->where('zone_id',$oo->zone_id)->pluck('ftn4d')->join(', ') }}</td>
<td>{{ $oo->system->zt_id }}</td>
</tr>