count.blade.php 2.33 KB
Newer Older
1
2
3
4
5
@extends('layouts.subPages')

@section('title', $title )

@section('content')
Dominik Hebeler's avatar
Dominik Hebeler committed
6
7
8
9
10
	<p>{{ exec("uptime") }}</p>
	@if( isset($rekordDate) && isset($rekordTagSameTime) && isset($rekordCount) )
		<p>Rekord am {{ $rekordDate }} zur gleichen Zeit <span class="text-info">{{ $rekordTagSameTime }}</span> - insgesamt <span class="text-danger">{{ $rekordCount }}</span></p>
	@endif
	<p>Mittelwert der letzten {{ sizeof($oldLogs) }} Tage: {{ $oldLogs[sizeof($oldLogs)]['median'] }}</p>
11
	<table class="table table-striped">
Dominik Hebeler's avatar
Dominik Hebeler committed
12
13
14
15
16
17
18
19
		<caption>
			<form method="POST" style="display: flex; align-items: center;">
				<div class="form-group" style="max-width: 100px; margin-right: 8px;">
					<label for="days">Tage</label>
					<input class="form-control" type="number" id="days" name="days" value="{{$days}}" />
				</div>
				<div class="form-group" style="max-width: 100px; margin-right: 8px;">
					<label for="interface">Sprache</label>
20
21
22
23
24
25
					<select class="form-control" name="interface" id="interface">
						<option value="all" {{ (Request::input('interface', 'all') == "all" ? "selected" : "")}}>Alle</option>
						<option value="de" {{ (Request::input('interface', 'all') == "de" ? "selected" : "")}}>DE</option>
						<option value="en" {{ (Request::input('interface', 'all') == "en" ? "selected" : "")}}>EN</option>
						<option value="es" {{ (Request::input('interface', 'all') == "es" ? "selected" : "")}}>ES</option>
					</select>
Dominik Hebeler's avatar
Dominik Hebeler committed
26
27
28
29
30
31
32
33
34
				</div>
				<div id="refresh" style="margin-top: 11px; margin-right: 8px;">
					<button type="submit" class="btn btn-sm btn-default">Aktualisieren</button>
				</div>
				<div id="export" style="margin-top: 11px;">
					<button type="submit" name="out" value="csv" class="btn btn-sm btn-default">Als CSV exportieren</button>
				</div>
			</form>
		</caption>
35
36
37
38
39
40
41
42
		<tr>
			<th>Datum</th>
			<th>Suchanfragen zur gleichen Zeit</th>
			<th>Suchanfragen insgesamt</th>
			<th>Mittelwert (bis zum jeweiligen Tag zurück)</th>
		</tr>
		@if( isset($today) )
			<tr>
Dominik Hebeler's avatar
Dominik Hebeler committed
43
				<td>{{ Carbon::now()->format('D, d.m.Y') }}</td>
44
45
46
47
48
49
50
				<td>{{ $today }}</td>
				<td>???</td>
				<td>???</td>
			</tr>
		@endif
		@foreach($oldLogs as $key => $value)
			<tr>
Dominik Hebeler's avatar
Dominik Hebeler committed
51
				<td>{{ Carbon::now()->subDays($key)->format('D, d.m.Y') }}</td>
52
53
54
55
56
57
				<td>{{ $value['sameTime'] }}</td>
				<td>{{ $value['insgesamt'] }}</td>
				<td>{{ $value['median'] }}</td>
			</tr>
		@endforeach
	</table>
Dominik Hebeler's avatar
Dominik Hebeler committed
58

59
@endsection