Add filearea stats
This commit is contained in:
@@ -58,10 +58,10 @@
|
||||
<tbody>
|
||||
@foreach ($o->echoarea_stats()->groupBy('id') as $oo)
|
||||
<tr>
|
||||
<td style="width: 15%;"><a href="{{ url('echoarea/addedit',[($x=$oo->first())->id]) }}">{{ $x->name }}</a></td>
|
||||
<td style="width: 10%;"><a href="{{ url('echoarea/addedit',[($x=$oo->first())->id]) }}">{{ $x->name }}</a></td>
|
||||
<td>{{ $x->description }}</td>
|
||||
<td style="width: 15%;">{{ ($xx=$oo->min('first_message')) ? $xx->format('Y-m-d H:i') : '-' }}</td>
|
||||
<td style="width: 15%;">{{ $x->last_message ? $x->last_message->format('Y-m-d H:i') : '-' }}</td>
|
||||
<td>{{ ($xx=$oo->min('first_message')) ? $xx->format('Y-m-d H:i') : '-' }}</td>
|
||||
<td>{{ $x->last_message ? $x->last_message->format('Y-m-d H:i') : '-' }}</td>
|
||||
<td>{{ $x->active ? 'Active' : 'Archive' }}</td>
|
||||
<td class="text-end">{{ number_format($oo->where('stats','day')->pop()?->count) }}</td>
|
||||
<td class="text-end">{{ number_format($oo->where('stats','week')->pop()?->count) }}</td>
|
||||
@@ -88,21 +88,35 @@
|
||||
<div class="accordion-body">
|
||||
@if($o->fileareas->count())
|
||||
<p>This network provides the following File areas:</p>
|
||||
<table class="table monotable" id="filearea">
|
||||
<table class="table monotable w-100" id="filearea">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-75" colspan="4"></th>
|
||||
<th colspan="4" class="text-center">Files</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Filearea</th>
|
||||
<th>Description</th>
|
||||
<th>Last File Sent</th>
|
||||
<th>First File</th>
|
||||
<th>Last File</th>
|
||||
<th>Area Active</th>
|
||||
<th class="text-end">Week</th>
|
||||
<th class="text-end">Month</th>
|
||||
<th class="text-end">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($o->fileareas->sortBy('name') as $oo)
|
||||
@foreach ($o->filearea_stats()->groupBy('id') as $oo)
|
||||
<tr>
|
||||
<td style="width: 15%;"><a href="{{ url('filearea/addedit',[$oo->id]) }}">{{ $oo->name }}</a></td>
|
||||
<td>{{ $oo->description }}</td>
|
||||
<td style="width: 15%;">-</td>
|
||||
<td style="width: 10%;"><a href="{{ url('filearea/addedit',[($x=$oo->first())->id]) }}">{{ $x->name }}</a></td>
|
||||
<td>{{ $x->description }}</td>
|
||||
<td>{{ ($xx=$oo->min('first_file')) ? $xx->format('Y-m-d H:i') : '-' }}</td>
|
||||
<td>{{ $x->last_file ? $x->last_file->format('Y-m-d H:i') : '-' }}</td>
|
||||
<td>{{ $x->active ? 'Active' : 'Archive' }}</td>
|
||||
<td class="text-end">{{ number_format($oo->where('stats','week')->pop()?->count) }}</td>
|
||||
<td class="text-end">{{ number_format($oo->where('stats','month')->pop()?->count) }}</td>
|
||||
<td class="text-end">{{ number_format($oo->sum('count')) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -247,7 +261,16 @@
|
||||
conditionalPaging: {
|
||||
style: 'fade',
|
||||
speed: 500 // optional
|
||||
}
|
||||
},
|
||||
rowGroup: {
|
||||
dataSrc: [4],
|
||||
},
|
||||
columnDefs: [
|
||||
{
|
||||
targets: [4],
|
||||
visible: false,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
$('#system').DataTable({
|
||||
|
Reference in New Issue
Block a user