mirror of
https://github.com/SophiaAtkinson/steamwidgets-web.git
synced 2025-06-27 06:07:40 -07:00
Stats
This commit is contained in:
@ -10,7 +10,6 @@
|
||||
<link rel="icon" type="image/png" href="{{ asset('img/logo.png') }}"/>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('css/bulma.css') }}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('css/app.css') }}"/>
|
||||
|
||||
<title>{{ env('APP_TITLE') }}</title>
|
||||
|
||||
@ -54,6 +53,11 @@
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
window.vue.initNavBar();
|
||||
|
||||
@if ((isset($render_stats_to)) && (isset($render_stats_pw)))
|
||||
window.statsChart = null;
|
||||
window.vue.renderStats('{{ $render_stats_pw }}', '{{ $render_stats_to }}', '{{ $render_stats_start }}');
|
||||
@endif
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
25
app/views/stats.php
Normal file
25
app/views/stats.php
Normal file
@ -0,0 +1,25 @@
|
||||
<div class="content-section content-top-margin">
|
||||
<h1>Stats</h1>
|
||||
|
||||
<div class="hits-summary">
|
||||
<div>
|
||||
Range: <input class="stats-input" type="date" id="inp-date-from"/> <input class="stats-input" type="date" id="inp-date-till"/>
|
||||
<select class="stats-input" onchange="window.vue.renderStats('{{ $render_stats_pw }}', '{{ $render_stats_to }}', this.value, '{{ $render_stats_end }}');">
|
||||
<option value="{{ $render_stats_start }}">- Select a range -</option>
|
||||
@foreach ($predefined_dates as $key => $value)
|
||||
<option value="{{ $value }}">{{ $key }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<a class="button is-dark" href="javascript:void(0);" onclick="window.vue.renderStats('{{ $render_stats_pw }}', '{{ $render_stats_to }}', document.getElementById('inp-date-from').value, document.getElementById('inp-date-till').value);">Go</a>
|
||||
</div>
|
||||
|
||||
<div>Sum: <div class="is-inline-block" id="count-total"></div></div>
|
||||
<div>App count: <div class="is-inline-block" id="count-app"></div></div>
|
||||
<div>Server count: <div class="is-inline-block" id="count-server"></div></div>
|
||||
<div>User count: <div class="is-inline-block" id="count-user"></div></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<canvas id="hits-stats"></canvas>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user