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">
|
|
|
|
|
<h1>Dashboard</h1>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
|
<ol class="breadcrumb float-sm-right">
|
|
|
|
|
<li class="breadcrumb-item"><a class="text-muted" href="">Dashboard</a></li>
|
|
|
|
|
</ol>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<!-- END CONTENT HEADER -->
|
|
|
|
|
|
|
|
|
|
<!-- 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">
|
|
|
|
|
<span class="info-box-text">Servers</span>
|
|
|
|
|
<span class="info-box-number">{{Auth::user()->servers()->count()}}</span>
|
|
|
|
|
</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-08-02 17:25:33 +00:00
|
|
|
|
<span class="info-box-text">{{CREDITS_DISPLAY_NAME}}</span>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
<span class="info-box-number">{{Auth::user()->Credits()}}</span>
|
|
|
|
|
</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-08-02 17:25:33 +00:00
|
|
|
|
<span class="info-box-text">{{CREDITS_DISPLAY_NAME}} usage</span>
|
2021-06-06 09:28:09 +00:00
|
|
|
|
<span class="info-box-number">{{number_format($useage, 2, '.', '')}} <sup>per month</sup></span>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box-content -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.col -->
|
|
|
|
|
|
2021-09-22 16:07:19 +00:00
|
|
|
|
<div class="col-12 col-sm-6 col-md-3">
|
|
|
|
|
<div class="info-box mb-3">
|
|
|
|
|
@if(number_format((Auth::user()->Credits()*30)/$useage,0,'.','') >= 15)
|
|
|
|
|
<span class="info-box-icon bg-success elevation-1">
|
|
|
|
|
@elseif (number_format((Auth::user()->Credits()*30)/$useage,0,'.','') >= 8 && number_format((Auth::user()->Credits()*30)/$useage,0,'.','') <= 14)
|
|
|
|
|
<span class="info-box-icon bg-warning elevation-1">
|
|
|
|
|
@elseif (number_format((Auth::user()->Credits()*30)/$useage,0,'.','') <= 7)
|
|
|
|
|
<span class="info-box-icon bg-danger elevation-1">
|
|
|
|
|
@endif
|
|
|
|
|
<i class="fas fa-hourglass-half"></i></span>
|
|
|
|
|
|
|
|
|
|
<div class="info-box-content">
|
|
|
|
|
<span class="info-box-text">Out of {{CREDITS_DISPLAY_NAME}} in </span>
|
|
|
|
|
@if(number_format((Auth::user()->Credits()*30)/$useage,2,'.','') < "1")
|
2021-09-27 15:21:17 +00:00
|
|
|
|
@if(number_format(Auth::user()->Credits()/($useage/30/24),0,'.','') < "1")
|
|
|
|
|
<span class="info-box-number">You ran out of Credits </span>
|
|
|
|
|
@else
|
|
|
|
|
<span class="info-box-number">{{number_format(Auth::user()->Credits()/($useage/30/24),0,'.','')}} <sup> hours</sup></span>
|
|
|
|
|
@endif
|
2021-09-22 16:07:19 +00:00
|
|
|
|
@else
|
|
|
|
|
<span class="info-box-number">{{number_format((Auth::user()->Credits()*30)/$useage,0,'.','')}} <sup> days</sup></span>
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box-content -->
|
2021-09-22 07:17:44 +00:00
|
|
|
|
</div>
|
2021-09-22 16:07:19 +00:00
|
|
|
|
<!-- /.info-box -->
|
2021-09-22 07:17:44 +00:00
|
|
|
|
</div>
|
2021-09-22 16:07:19 +00:00
|
|
|
|
<!-- /.col -->
|
|
|
|
|
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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">
|
2021-06-09 22:16:34 +00:00
|
|
|
|
@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>
|
2021-06-10 21:25:13 +00:00
|
|
|
|
{!! $useful_link->description !!}
|
2021-06-09 22:16:34 +00:00
|
|
|
|
</div>
|
|
|
|
|
@endforeach
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-body -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.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 Log
|
|
|
|
|
</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
|
2021-07-10 07:41:24 +00:00
|
|
|
|
@case('redeemed')
|
|
|
|
|
<small><i class="fas text-success fa-money-check-alt mr-2"></i></small>
|
|
|
|
|
@break
|
2021-06-05 09:26:32 +00:00
|
|
|
|
@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>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-body -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.col -->
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<!-- END CUSTOM CONTENT -->
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<!-- END CONTENT -->
|
|
|
|
|
|
|
|
|
|
@endsection
|