Add query cache, show per echo stats on network page

This commit is contained in:
Deon George
2021-11-26 16:16:33 +11:00
parent 871430edf8
commit be886d9e4b
4 changed files with 1378 additions and 598 deletions

View File

@@ -15,6 +15,7 @@
<div id="collapse_about" class="accordion-collapse collapse show" aria-labelledby="about" data-bs-parent="#accordion_homepage">
<div class="accordion-body">
<div style="float:right; width: 50%; height: 20em;" id="network_traffic"></div>
{!! \Illuminate\Mail\Markdown::parse($o->homepage) !!}
</div>
</div>
@@ -163,9 +164,18 @@
@section('page-css')
@css('datatables')
<style>
div#collapse_about {
min-height: 20em;
}
div#collapse_about .collapse{
min-height: 0;
}
</style>
@append
@section('page-scripts')
@js('datatables')
@js('highcharts')
<script type="text/javascript">
$(document).ready(function() {
@@ -218,5 +228,62 @@
}
});
});
Highcharts.chart('network_traffic', {
chart: {
type: 'spline',
zoomType: 'x',
resetZoomButton: {
position: {
x: 0,
y: -40,
}
}
},
credits: {
enabled: false
},
exporting: {
buttons: false
},
title: {
text: 'FTN Network Traffic for {{ $o->name }}'
},
xAxis: {
type: 'datetime',
title: {
text: 'Time'
},
},
yAxis: {
title: {
text: 'Echomail'
},
},
legend: {
symbolWidth: 40
},
plotOptions: {
series: {
point: {
events: {
click: function () {
//window.location.href = this.series.options.website;
}
}
},
cursor: 'pointer'
}
},
series: [
@foreach($o->echoareas as $oo)
{
name: '{{ $oo->name }}',
data: {!! $o->daily_echoarea_stats($oo) !!},
dashStyle: 'ShortDot',
},
@endforeach
],
});
</script>
@append