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,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>