Fix last packet transfers shown, added file transfers
This commit is contained in:
24
resources/views/file.blade.php
Normal file
24
resources/views/file.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
@if($f->count())
|
||||
<table class="table monotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Files</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Origin</th>
|
||||
<th>Name</th>
|
||||
<th>Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($f as $oo)
|
||||
<tr>
|
||||
<td>{{ $oo->fftn->ftn }}</td>
|
||||
<td>{{ $oo->name }}</td>
|
||||
<td>{{ $oo->datetime }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
@@ -34,6 +34,7 @@
|
||||
<tr>
|
||||
<th>From</th>
|
||||
<th>MSGID</th>
|
||||
<th>Echoarea</th>
|
||||
<th>Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -43,6 +44,7 @@
|
||||
<tr>
|
||||
<td>{{ $oo->fftn->ftn }}</td>
|
||||
<td>{{ $oo->msgid }}</td>
|
||||
<td>{{ $oo->echoarea->name }}</td>
|
||||
<td>{{ $oo->datetime }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
@@ -417,8 +417,10 @@
|
||||
<div class="col-4">
|
||||
The last Netmails sent (to you):
|
||||
|
||||
@if(($x=\App\Models\Netmail::whereIn('sent_id',$o->addresses->pluck('id'))
|
||||
@if(($x=\App\Models\Netmail::select(['sent_pkt','sent_at',DB::raw('count(*) AS count')])
|
||||
->whereIn('sent_id',$o->addresses->pluck('id'))
|
||||
->whereNotNull('sent_at')
|
||||
->groupBy(['sent_pkt','sent_at'])
|
||||
->orderBy('sent_at','DESC')
|
||||
->limit(10)
|
||||
->get())->count())
|
||||
@@ -427,17 +429,17 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Packet</th>
|
||||
<th>Count</th>
|
||||
<th>Sent</th>
|
||||
<th class="text-end">Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($x->groupBy('sent_pkt') as $oo)
|
||||
@foreach ($x as $oo)
|
||||
<tr>
|
||||
<td class="packet">{{ $oo->first()->sent_pkt }}</td>
|
||||
<td>{{ $oo->count() }}</td>
|
||||
<td>{{ $oo->first()->sent_at }}</td>
|
||||
<td class="packet">{{ $oo->sent_pkt }}</td>
|
||||
<td>{{ $oo->sent_at }}</td>
|
||||
<td class="text-end">{{ $oo->count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -450,29 +452,62 @@
|
||||
<div class="col-4">
|
||||
The last Echomails sent (to you):
|
||||
|
||||
@if(($x=\App\Models\Echomail::select(['echomails.id','echomail_seenby.sent_pkt','echomail_seenby.sent_at'])
|
||||
@if(($x=\App\Models\Echomail::select(['sent_pkt','sent_at',DB::raw('count(*) AS count')])
|
||||
->join('echomail_seenby',['echomail_seenby.echomail_id'=>'echomails.id'])
|
||||
->whereNotNull('echomail_seenby.sent_at')
|
||||
->whereNotNull('sent_at')
|
||||
->whereIn('address_id',$o->addresses->pluck('id'))
|
||||
->groupBy(['sent_pkt','sent_at'])
|
||||
->orderBy('sent_at','DESC')
|
||||
->orderBy('sent_pkt')
|
||||
->limit(10)
|
||||
->get())->count())
|
||||
<table class="table monotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Packet</th>
|
||||
<th>Count</th>
|
||||
<th>Sent</th>
|
||||
<th class="text-end">Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($x->groupBy('sent_pkt') as $oo)
|
||||
@foreach ($x as $oo)
|
||||
<tr>
|
||||
<td class="packet">{{ $oo->first()->sent_pkt }}</td>
|
||||
<td>{{ $oo->count() }}</td>
|
||||
<td>{{ $oo->first()->sent_at }}</td>
|
||||
<td class="packet">{{ $oo->sent_pkt }}</td>
|
||||
<td>{{ $oo->sent_at }}</td>
|
||||
<td class="text-end">{{ $oo->count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<strong class="highlight">None</strong>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
The last Files sent (to you):
|
||||
|
||||
@if(($x=\App\Models\File::select(['sent_at',DB::raw('count(*) AS count')])
|
||||
->join('file_seenby',['file_seenby.file_id'=>'files.id'])
|
||||
->whereNotNull('sent_at')
|
||||
->whereIn('address_id',$o->addresses->pluck('id'))
|
||||
->groupBy(['sent_at'])
|
||||
->orderBy('sent_at','DESC')
|
||||
->limit(10)
|
||||
->get())->count())
|
||||
<table class="table monotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Session</th>
|
||||
<th class="text-end">Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($x as $oo)
|
||||
<tr>
|
||||
<td class="files">{{ $oo->sent_at }}</td>
|
||||
<td class="text-end">{{ $oo->count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -487,9 +522,10 @@
|
||||
<div class="col-4">
|
||||
The last Netmails received (you sent):
|
||||
|
||||
@if(($x=\App\Models\Netmail::select(['netmails.*','netmail_path.recv_pkt'])
|
||||
@if(($x=\App\Models\Netmail::select(['recv_pkt','created_at',DB::raw('count(*) AS count')])
|
||||
->join('netmail_path',['netmail_path.netmail_id'=>'netmails.id'])
|
||||
->whereIn('address_id',$o->addresses->pluck('id'))
|
||||
->groupBy(['recv_pkt','created_at'])
|
||||
->orderBy('created_at','DESC')
|
||||
->limit(10)
|
||||
->get())->count())
|
||||
@@ -497,17 +533,17 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Packet</th>
|
||||
<th>Count</th>
|
||||
<th>Received</th>
|
||||
<th class="text-end">Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($x->groupBy('recv_pkt') as $oo)
|
||||
@foreach ($x as $oo)
|
||||
<tr>
|
||||
<td class="packet">{{ $oo->first()->recv_pkt }}</td>
|
||||
<td>{{ $oo->count() }}</td>
|
||||
<td>{{ $oo->first()->created_at }}</td>
|
||||
<td class="packet">{{ $oo->recv_pkt }}</td>
|
||||
<td>{{ $oo->created_at }}</td>
|
||||
<td class="text-end">{{ $oo->count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -520,29 +556,60 @@
|
||||
<div class="col-4">
|
||||
The last Echomails received (you sent):
|
||||
|
||||
@if(($x=\App\Models\Echomail::select(['echomails.created_at','echomail_path.recv_pkt'])
|
||||
@if(($x=\App\Models\Echomail::select(['recv_pkt','created_at',DB::raw('count(*) AS count')])
|
||||
->join('echomail_path',['echomail_path.echomail_id'=>'echomails.id'])
|
||||
->whereNotNull('echomail_path.recv_pkt')
|
||||
->whereNotNull('recv_pkt')
|
||||
->whereIn('address_id',$o->addresses->pluck('id'))
|
||||
->groupBy(['recv_pkt','created_at'])
|
||||
->orderBy('created_at','DESC')
|
||||
->orderBy('recv_pkt')
|
||||
->limit(10)
|
||||
->get())->count())
|
||||
<table class="table monotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Packet</th>
|
||||
<th>Count</th>
|
||||
<th>Received</th>
|
||||
<th class="text-end">Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($x->groupBy('recv_pkt') as $oo)
|
||||
@foreach ($x as $oo)
|
||||
<tr>
|
||||
<td class="packet">{{ $oo->first()->recv_pkt }}</td>
|
||||
<td>{{ $oo->count() }}</td>
|
||||
<td>{{ $oo->first()->created_at }}</td>
|
||||
<td class="packet">{{ $oo->recv_pkt }}</td>
|
||||
<td>{{ $oo->created_at }}</td>
|
||||
<td class="text-end">{{ $oo->count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<strong class="highlight">None</strong>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
The last Files received (from you):
|
||||
|
||||
@if(($x=\App\Models\File::select(['created_at',DB::raw('count(*) AS count')])
|
||||
->whereIn('fftn_id',$o->addresses->pluck('id'))
|
||||
->groupBy(['created_at'])
|
||||
->orderBy('created_at','DESC')
|
||||
->limit(10)
|
||||
->get())->count())
|
||||
<table class="table monotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Session</th>
|
||||
<th class="text-end">Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($x as $oo)
|
||||
<tr>
|
||||
<td class="files">{{ $oo->created_at }}</td>
|
||||
<td class="text-end">{{ $oo->count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -562,6 +629,7 @@
|
||||
</div>
|
||||
|
||||
@include('widgets.modal_packet')
|
||||
@include('widgets.modal_files')
|
||||
@include('widgets.modal_purge')
|
||||
@endsection
|
||||
|
||||
|
58
resources/views/widgets/modal_files.blade.php
Normal file
58
resources/views/widgets/modal_files.blade.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<!-- $o=System::class -->
|
||||
<div class="modal fade" id="file-contents" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header bg-success">
|
||||
<h5 class="modal-title text-light">Summary File Contents for <span id="file"></span></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<i id="spinner" class="spinner-grow spinner-grow-sm d-none"></i>
|
||||
<div id="modal-content"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('page-scripts')
|
||||
<script>
|
||||
var file = new bootstrap.Modal(document.getElementById('file-contents'), {});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.files').click(function(e) {
|
||||
var item = this;
|
||||
var icon = $('#spinner');
|
||||
|
||||
$('span#file').html(e.target.innerText);
|
||||
|
||||
file.show();
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
data: {date: e.target.innerText.replace(/\s/,'@'),_token: '{{csrf_token()}}'},
|
||||
beforeSend: function() {
|
||||
icon.toggleClass('d-none');
|
||||
$('#file-contents').find('div#modal-content').empty();
|
||||
},
|
||||
success: function(data) {
|
||||
icon.toggleClass('d-none');
|
||||
|
||||
$('#file-contents').find('div#modal-content').html(data);
|
||||
},
|
||||
error: function(e) {
|
||||
icon.toggleClass('d-none');
|
||||
|
||||
alert('That didnt work? Please try again....');
|
||||
},
|
||||
url: '{{ url('file/contents',['o'=>$o->id]) }}/'+e.target.innerText.replace(/\s/,'@'),
|
||||
cache: false
|
||||
})
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
@@ -1,3 +1,4 @@
|
||||
<!-- $o=System::class -->
|
||||
<div class="modal fade" id="packet-contents" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||||
<div class="modal-content bg-dark">
|
||||
@@ -34,18 +35,19 @@
|
||||
data: {packet: e.target.innerText,_token: '{{csrf_token()}}'},
|
||||
beforeSend: function() {
|
||||
icon.toggleClass('d-none');
|
||||
$('#packet-contents').find('div#modal-content').empty();
|
||||
},
|
||||
success: function(data) {
|
||||
icon.toggleClass('d-none');
|
||||
|
||||
$('div#modal-content').html(data);
|
||||
$('#packet-contents').find('div#modal-content').html(data);
|
||||
},
|
||||
error: function(e) {
|
||||
icon.toggleClass('d-none');
|
||||
|
||||
alert('That didnt work? Please try again....');
|
||||
},
|
||||
url: '{{ url('packet/contents') }}/'+e.target.innerText,
|
||||
url: '{{ url('packet/contents',['o'=>$o->id]) }}/'+e.target.innerText,
|
||||
cache: false
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user