Some smaller fixes (#880)
This commit is contained in:
commit
3a6362402b
|
@ -37,7 +37,9 @@ class OverViewController extends Controller
|
||||||
//Get counters
|
//Get counters
|
||||||
$counters = collect();
|
$counters = collect();
|
||||||
//Set basic variables in the collection
|
//Set basic variables in the collection
|
||||||
$counters->put('users', User::query()->count());
|
$counters->put('users', collect());
|
||||||
|
$counters['users']->active = User::where("suspended", 0)->count();
|
||||||
|
$counters['users']->total = User::query()->count();
|
||||||
$counters->put('credits', number_format(User::query()->whereHas("roles", function($q){ $q->where("id", "!=", "1"); })->sum('credits'), 2, '.', ''));
|
$counters->put('credits', number_format(User::query()->whereHas("roles", function($q){ $q->where("id", "!=", "1"); })->sum('credits'), 2, '.', ''));
|
||||||
$counters->put('payments', Payment::query()->count());
|
$counters->put('payments', Payment::query()->count());
|
||||||
$counters->put('eggs', Egg::query()->count());
|
$counters->put('eggs', Egg::query()->count());
|
||||||
|
|
|
@ -245,10 +245,10 @@ class VoucherController extends Controller
|
||||||
})
|
})
|
||||||
->editColumn('expires_at', function (Voucher $voucher) {
|
->editColumn('expires_at', function (Voucher $voucher) {
|
||||||
if (! $voucher->expires_at) {
|
if (! $voucher->expires_at) {
|
||||||
return '';
|
return __("Never");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $voucher->expires_at ? $voucher->expires_at->diffForHumans() : '';
|
return $voucher->expires_at ? $voucher->expires_at->diffForHumans() : __("Never");
|
||||||
})
|
})
|
||||||
->editColumn('code', function (Voucher $voucher) {
|
->editColumn('code', function (Voucher $voucher) {
|
||||||
return "<code>{$voucher->code}</code>";
|
return "<code>{$voucher->code}</code>";
|
||||||
|
|
|
@ -19,7 +19,7 @@ $required_extensions = ['openssl', 'gd', 'mysql', 'PDO', 'mbstring', 'tokenizer'
|
||||||
|
|
||||||
$requirements = [
|
$requirements = [
|
||||||
'minPhp' => '8.1',
|
'minPhp' => '8.1',
|
||||||
'maxPhp' => '8.2', // This version is not supported
|
'maxPhp' => '8.3', // This version is not supported
|
||||||
'mysql' => '5.7.22',
|
'mysql' => '5.7.22',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,12 @@
|
||||||
<span class="info-box-icon bg-info elevation-1"><i class="fas fa-server"></i></span>
|
<span class="info-box-icon bg-info elevation-1"><i class="fas fa-server"></i></span>
|
||||||
|
|
||||||
<div class="info-box-content">
|
<div class="info-box-content">
|
||||||
<span class="info-box-text">{{__('Servers')}}</span>
|
<span class="info-box-text">{{__('Servers')}}
|
||||||
|
<i class="fas fa-info-circle mr-4" data-toggle="popover"
|
||||||
|
data-trigger="hover" data-placement="top"
|
||||||
|
data-html="true"
|
||||||
|
data-content="{{ __("This shows the total active servers and the total servers. Total active servers are all servers which are not suspended") }}"></i>
|
||||||
|
</span>
|
||||||
<span class="info-box-number">{{$counters['servers']->active}}/{{$counters['servers']->total}}</span>
|
<span class="info-box-number">{{$counters['servers']->active}}/{{$counters['servers']->total}}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.info-box-content -->
|
<!-- /.info-box-content -->
|
||||||
|
@ -71,8 +76,13 @@
|
||||||
<span class="info-box-icon bg-primary elevation-1"><i class="fas fa-users"></i></span>
|
<span class="info-box-icon bg-primary elevation-1"><i class="fas fa-users"></i></span>
|
||||||
|
|
||||||
<div class="info-box-content">
|
<div class="info-box-content">
|
||||||
<span class="info-box-text">{{__('Users')}}</span>
|
<span class="info-box-text">{{__('Users')}}
|
||||||
<span class="info-box-number">{{$counters['users']}}</span>
|
<i class="fas fa-info-circle mr-4" data-toggle="popover"
|
||||||
|
data-trigger="hover" data-placement="top"
|
||||||
|
data-html="true"
|
||||||
|
data-content="{{ __("This shows the total active Users and the total Users. Total active Users are all Users which are not suspended") }}"></i>
|
||||||
|
</span>
|
||||||
|
<span class="info-box-number">{{$counters['users']->active}}/{{$counters['users']->total}}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.info-box-content -->
|
<!-- /.info-box-content -->
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -51,10 +51,10 @@
|
||||||
<th>{{__('Disk')}}</th>
|
<th>{{__('Disk')}}</th>
|
||||||
<th>{{__('Databases')}}</th>
|
<th>{{__('Databases')}}</th>
|
||||||
<th>{{__('Backups')}}</th>
|
<th>{{__('Backups')}}</th>
|
||||||
|
<th>{{__('OOM Killer')}}</th>
|
||||||
<th>{{__('Nodes')}}</th>
|
<th>{{__('Nodes')}}</th>
|
||||||
<th>{{__('Eggs')}}</th>
|
<th>{{__('Eggs')}}</th>
|
||||||
<th>{{__('Min Credits')}}</th>
|
<th>{{__('Min Credits')}}</th>
|
||||||
<th>{{__('OOM Killer')}}</th>
|
|
||||||
<th>{{__('Servers')}}</th>
|
<th>{{__('Servers')}}</th>
|
||||||
<th>{{__('Created at')}}</th>
|
<th>{{__('Created at')}}</th>
|
||||||
<th>{{ __('Actions') }}</th>
|
<th>{{ __('Actions') }}</th>
|
||||||
|
@ -101,10 +101,10 @@
|
||||||
{data: "disk"},
|
{data: "disk"},
|
||||||
{data: "databases"},
|
{data: "databases"},
|
||||||
{data: "backups"},
|
{data: "backups"},
|
||||||
|
{data: "oom_killer"},
|
||||||
{data: "nodes", sortable: false},
|
{data: "nodes", sortable: false},
|
||||||
{data: "eggs", sortable: false},
|
{data: "eggs", sortable: false},
|
||||||
{data: "minimum_credits"},
|
{data: "minimum_credits"},
|
||||||
{data: "oom_killer"},
|
|
||||||
{data: "servers", sortable: false},
|
{data: "servers", sortable: false},
|
||||||
{data: "created_at"},
|
{data: "created_at"},
|
||||||
{data: "actions", sortable: false}
|
{data: "actions", sortable: false}
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
<label>{{ __('Email') }}</label>
|
<label>{{ __('Email') }}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<span style="max-width: 250px;" class="d-inline-block text-truncate">
|
<span style="max-width: 400px;" class="d-inline-block text-truncate">
|
||||||
{{ $user->email }}
|
{{ $user->email }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="text" name="email"
|
<input type="text" name="email"
|
||||||
class="form-control @error('email') is-invalid @enderror"
|
class="form-control @error('email') is-invalid @enderror @error('name') is-invalid @enderror"
|
||||||
placeholder="{{ __('Email or Username') }}">
|
placeholder="{{ __('Email or Username') }}">
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<div class="input-group-text">
|
<div class="input-group-text">
|
||||||
|
@ -41,11 +41,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@error('email')
|
@if ($errors->get("email") || $errors->get("name"))
|
||||||
<span class="text-danger" role="alert">
|
<span class="text-danger" role="alert">
|
||||||
<small><strong>{{ $message }}</strong></small>
|
<small><strong>{{ $errors->first('email') ? $errors->first('email') : $errors->first('name') }}</strong></small>
|
||||||
</span>
|
</span>
|
||||||
@enderror
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -251,14 +251,14 @@
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@if(in_array($referral_settings->mode, ["Commission","Both"]))<th>{{ __('Reward per registered user') }}</th> @endif
|
@if(in_array($referral_settings->mode, ["comission","both"]))<th>{{ __('Reward per registered user') }}</th> @endif
|
||||||
@if(in_array($referral_settings->mode, ["Sign-Up","Both"]))<th>{{ __('New user payment commision') }}</th> @endif
|
@if(in_array($referral_settings->mode, ["sign-up","both"]))<th>{{ __('New user payment commision') }}</th> @endif
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
@if(in_array($referral_settings->mode, ["Commission","Both"]))<td>{{ $referral_settings->reward }} {{ $general_settings->credits_display_name }}</td> @endif
|
@if(in_array($referral_settings->mode, ["comission","both"]))<td>{{ $referral_settings->reward }} {{ $general_settings->credits_display_name }}</td> @endif
|
||||||
@if(in_array($referral_settings->mode, ["Sign-Up","Both"]))<td>{{ $referral_settings->percentage }}%</td> @endif
|
@if(in_array($referral_settings->mode, ["sign-up","both"]))<td>{{ $referral_settings->percentage }}%</td> @endif
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in a new issue