2021-06-05 09:26:32 +00:00
|
|
|
|
@extends('layouts.main')
|
|
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
<!-- CONTENT HEADER -->
|
|
|
|
|
<section class="content-header">
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
<div class="row mb-2">
|
|
|
|
|
<div class="col-sm-6">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<h1>{{ __('Dashboard') }}</h1>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
|
<ol class="breadcrumb float-sm-right">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<li class="breadcrumb-item"><a class="text-muted" href="">{{ __('Dashboard') }}</a></li>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</ol>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<!-- END CONTENT HEADER -->
|
|
|
|
|
|
2022-01-24 11:39:01 +00:00
|
|
|
|
@if(!file_exists(public_path()."/install/install.lock") && Auth::User()->role == "admin")
|
|
|
|
|
<div class="callout callout-danger">
|
|
|
|
|
<h4>{{ __('The installer is not locked!') }}</h4>
|
|
|
|
|
<p>{{ __('please create a file called "installer.lock" in your "dashboard/public/installer" directory!') }}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
2021-06-05 09:26:32 +00:00
|
|
|
|
<!-- MAIN CONTENT -->
|
|
|
|
|
<section class="content">
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-12 col-sm-6 col-md-3">
|
|
|
|
|
<div class="info-box">
|
|
|
|
|
<span class="info-box-icon bg-info elevation-1"><i class="fas fa-server"></i></span>
|
|
|
|
|
|
|
|
|
|
<div class="info-box-content">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<span class="info-box-text">{{ __('Servers') }}</span>
|
|
|
|
|
<span class="info-box-number">{{ Auth::user()->servers()->count() }}</span>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box-content -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.col -->
|
|
|
|
|
<div class="col-12 col-sm-6 col-md-3">
|
|
|
|
|
<div class="info-box mb-3">
|
2021-09-22 16:07:19 +00:00
|
|
|
|
<span class="info-box-icon bg-secondary elevation-1"><i class="fas fa-coins"></i></span>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
|
|
|
|
|
<div class="info-box-content">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<span class="info-box-text">{{ CREDITS_DISPLAY_NAME }}</span>
|
|
|
|
|
<span class="info-box-number">{{ Auth::user()->Credits() }}</span>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box-content -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.col -->
|
|
|
|
|
|
|
|
|
|
<!-- fix for small devices only -->
|
|
|
|
|
<div class="clearfix hidden-md-up"></div>
|
|
|
|
|
|
|
|
|
|
<div class="col-12 col-sm-6 col-md-3">
|
|
|
|
|
<div class="info-box mb-3">
|
|
|
|
|
<span class="info-box-icon bg-warning elevation-1"><i class="fas fa-chart-line"></i></span>
|
|
|
|
|
|
|
|
|
|
<div class="info-box-content">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<span class="info-box-text">{{ CREDITS_DISPLAY_NAME }} {{ __('Usage') }}</span>
|
|
|
|
|
<span class="info-box-number">{{ number_format($usage, 2, '.', '') }}
|
|
|
|
|
<sup>{{ __('per month') }}</sup></span>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box-content -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box -->
|
|
|
|
|
</div>
|
|
|
|
|
|
2021-09-27 16:42:55 +00:00
|
|
|
|
<!-- /.col -->
|
2021-12-28 19:05:03 +00:00
|
|
|
|
@if ($credits > 0.01 and $usage > 0)
|
|
|
|
|
<div class="col-12 col-sm-6 col-md-3">
|
2021-10-26 14:53:53 +00:00
|
|
|
|
<div class="info-box mb-3">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<span class="info-box-icon {{ $bg }} elevation-1">
|
|
|
|
|
<i class="fas fa-hourglass-half"></i></span>
|
2021-10-26 14:53:53 +00:00
|
|
|
|
<div class="info-box-content">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<span
|
|
|
|
|
class="info-box-text">{{ __('Out of Credits in', ['credits' => CREDITS_DISPLAY_NAME]) }}
|
|
|
|
|
</span>
|
|
|
|
|
<span class="info-box-number">{{ $boxText }}<sup>{{ $unit }}</sup></span>
|
2021-10-26 14:53:53 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<!-- /.info-box -->
|
2021-10-26 14:53:53 +00:00
|
|
|
|
@endif
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<!-- /.col -->
|
2021-06-05 09:26:32 +00:00
|
|
|
|
|
2021-12-28 19:05:03 +00:00
|
|
|
|
</div>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
|
2021-09-27 16:42:55 +00:00
|
|
|
|
|
2021-10-26 14:53:53 +00:00
|
|
|
|
|
2021-12-28 19:05:03 +00:00
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<div class="card card-default">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<h3 class="card-title">
|
|
|
|
|
<i class="fas fa-link mr-2"></i>
|
|
|
|
|
{{ __('Useful Links') }}
|
|
|
|
|
</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-header -->
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
@foreach ($useful_links as $useful_link)
|
|
|
|
|
<div class="alert alert-dismissible">
|
|
|
|
|
<button type="button" class="close" data-dismiss="alert"
|
|
|
|
|
aria-hidden="true">×</button>
|
|
|
|
|
<h5>
|
|
|
|
|
<a class="alert-link text-decoration-none" target="__blank"
|
|
|
|
|
href="{{ $useful_link->link }}">
|
|
|
|
|
<i class="{{ $useful_link->icon }} mr-2"></i>{{ $useful_link->title }}
|
|
|
|
|
</a>
|
|
|
|
|
</h5>
|
|
|
|
|
{!! $useful_link->description !!}
|
|
|
|
|
</div>
|
|
|
|
|
@endforeach
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<!-- /.card-body -->
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<!-- /.card -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.col -->
|
|
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<div class="card card-default">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<h3 class="card-title">
|
|
|
|
|
<i class="fas fa-history mr-2"></i>
|
|
|
|
|
{{ __('Activity Logs') }}
|
|
|
|
|
</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-header -->
|
|
|
|
|
<div class="card-body py-0 pb-2">
|
|
|
|
|
<ul class="list-group list-group-flush">
|
|
|
|
|
@foreach (Auth::user()->actions()->take(8)->orderBy('created_at', 'desc')->get()
|
|
|
|
|
as $log)
|
|
|
|
|
<li class="list-group-item d-flex justify-content-between text-muted">
|
|
|
|
|
<span>
|
|
|
|
|
@switch($log->description)
|
|
|
|
|
@case('created')
|
|
|
|
|
<small><i class="fas text-success fa-plus mr-2"></i></small>
|
|
|
|
|
@break
|
|
|
|
|
@case('redeemed')
|
2021-07-10 07:41:24 +00:00
|
|
|
|
<small><i class="fas text-success fa-money-check-alt mr-2"></i></small>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
@break
|
|
|
|
|
@case('deleted')
|
|
|
|
|
<small><i class="fas text-danger fa-times mr-2"></i></small>
|
|
|
|
|
@break
|
|
|
|
|
@case('updated')
|
|
|
|
|
<small><i class="fas text-info fa-pen mr-2"></i></small>
|
|
|
|
|
@break
|
|
|
|
|
@endswitch
|
|
|
|
|
{{ ucfirst($log->description) }}
|
|
|
|
|
{{ explode('\\', $log->subject_type)[2] }}
|
|
|
|
|
</span>
|
|
|
|
|
<small>
|
|
|
|
|
{{ $log->created_at->diffForHumans() }}
|
|
|
|
|
</small>
|
|
|
|
|
</li>
|
|
|
|
|
@endforeach
|
|
|
|
|
</ul>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<!-- /.card-body -->
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<!-- /.card -->
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<!-- /.col -->
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<!-- END CUSTOM CONTENT -->
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<!-- END CONTENT -->
|
|
|
|
|
|
|
|
|
|
@endsection
|