Skip to content

Commit

Permalink
Start something for a dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
leonjza committed Dec 4, 2015
1 parent 0238e32 commit bc8e6eb
Showing 2 changed files with 60 additions and 4 deletions.
26 changes: 25 additions & 1 deletion src/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
<?php
/*
This file is part of SeAT
Copyright (C) 2015 Leon Jacobs
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

namespace Seat\Web\Http\Controllers;

use App\Http\Controllers\Controller;
use Seat\Services\Repositories\Eve\EveRepository;

/**
* Class HomeController
@@ -11,14 +31,18 @@
class HomeController extends Controller
{

use EveRepository;

/**
*
* @return \Illuminate\View\View
*/
public function getHome()
{

return view('web::home');
$server_status = $this->getEveLastServerStatus();

return view('web::home', compact('server_status'));
}

}
38 changes: 35 additions & 3 deletions src/resources/views/home.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
@extends('web::layouts.app')
@extends('web::layouts.grids.12')

@section('title', 'Home')
@section('page_header', 'Home')
@section('page_description', 'The home page')

@section('content')
Soon™
@section('full')

<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-aqua"><i class="fa fa-server"></i></span>
<div class="info-box-content">
<span class="info-box-text">Online Players</span>
<span class="info-box-number">
{{ $server_status['onlinePlayers'] or 'Unknown' }}
</span>
<span class="text-muted">
Last Update: {{ human_diff($server_status['created_at']) }}
</span>
</div><!-- /.info-box-content -->
</div><!-- /.info-box -->
</div><!-- /.col -->
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-green"><i class="fa fa-key"></i></span>
<div class="info-box-content">
<span class="info-box-text">Owned API Keys</span>
<span class="info-box-number">
{{ count(auth()->user()->keys) }}
</span>
</div><!-- /.info-box-content -->
</div><!-- /.info-box -->
</div><!-- /.col -->

</div>



@stop

0 comments on commit bc8e6eb

Please sign in to comment.