Improves server model and cleans up model code calls.
This commit is contained in:
parent
b1389262e2
commit
02458c909d
8 changed files with 71 additions and 80 deletions
|
@ -62,8 +62,8 @@
|
|||
<tr class="dynamic-update" data-server="{{ $server->uuidShort }}">
|
||||
<td><code>{{ $server->uuidShort }}</code></td>
|
||||
<td><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></td>
|
||||
<td>{{ $server->node_idName }}</td>
|
||||
<td><code>@if(!is_null($server->ip_alias)){{ $server->ip_alias }}@else{{ $server->ip }}@endif:{{ $server->port }}</code></td>
|
||||
<td>{{ $server->node->name }}</td>
|
||||
<td><code>{{ $server->allocation->alias }}:{{ $server->allocation->port }}</code></td>
|
||||
<td class="text-center hidden-sm hidden-xs"><span data-action="memory">--</span> / {{ $server->memory === 0 ? '∞' : $server->memory }} MB</td>
|
||||
<td class="text-center hidden-sm hidden-xs"><span data-action="cpu" data-cpumax="{{ $server->cpu }}">--</span> %</td>
|
||||
<td class="text-center" data-action="status">
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="control-sidebar-servers-tab">
|
||||
<ul class="control-sidebar-menu">
|
||||
@foreach (Pterodactyl\Models\Server::getUserServers() as $s)
|
||||
@foreach (Auth::user()->serverAccessCollection() as $s)
|
||||
<li>
|
||||
<a
|
||||
@if(isset($server) && isset($node))
|
||||
|
@ -254,7 +254,7 @@
|
|||
@endif
|
||||
@endif
|
||||
href="{{ route('server.index', $s->uuidShort) }}">
|
||||
@if($s->owner === Auth::user()->id)
|
||||
@if($s->owner_id === Auth::user()->id)
|
||||
<i class="menu-icon fa fa-user bg-blue"></i>
|
||||
@else
|
||||
<i class="menu-icon fa fa-user-o bg-gray"></i>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue