Merge pull request #573 from ok236449/Delete-server-on-404

Some fixes that shouldn´t have been necessary
This commit is contained in:
Dennis 2022-08-23 21:10:37 +02:00 committed by GitHub
commit 5996a4cd8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 105 additions and 103 deletions

View file

@ -97,7 +97,7 @@ class OverViewController extends Controller
$output[$nodeId]->totalEarnings = 0;
$output[$nodeId]->activeEarnings = 0;
}
$counters['totalUsagePercent'] = round($counters['totalUsagePercent']/$nodes->count(), 2);
$counters['totalUsagePercent'] = ($nodes->count())?round($counters['totalUsagePercent']/$nodes->count(), 2):0;
foreach(Pterodactyl::getServers() as $server){ //gets all servers from Pterodactyl and calculates total of credit usage for each node separately + total
$nodeId = $server['attributes']['node'];

View file

@ -209,7 +209,8 @@
<h5><i class="icon fas fa-exclamation-circle"></i>{{ __('Error!') }}</h5>
<p class="">
{{ __('You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.') }}<br>
{{ __('You can do that in settings.') }}
{{ __('You can do that in settings.') }}<br>
{{ __('Note') }}: {{ __('If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel.') }}
</p>
</div>
@endif

View file

@ -40,7 +40,7 @@
<div class="row d-flex flex-row justify-content-center justify-content-md-start">
@foreach ($servers as $server)
@if($server->location&&$server->node&&$server->nest&&$server->egg)
<div class="col-xl-3 col-lg-5 col-md-6 col-sm-6 col-xs-12 card pr-0 pl-0 ml-sm-2 mr-sm-3"
style="max-width: 350px">
<div class="card-header">
@ -161,6 +161,7 @@
</a>
</div>
</div>
@endif
@endforeach
</div>
<!-- END CUSTOM CONTENT -->