Show indicator of user permissions on server when listing
This commit is contained in:
parent
4ad09c5435
commit
a5902bf39c
2 changed files with 14 additions and 0 deletions
|
@ -65,4 +65,8 @@ return [
|
|||
'admin_cp' => 'Admin Control Panel',
|
||||
'optional' => 'Optional',
|
||||
'read_only' => 'Read Only',
|
||||
'relation' => 'Relation',
|
||||
'owner' => 'Owner',
|
||||
'admin' => 'Admin',
|
||||
'subuser' => 'Subuser',
|
||||
];
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<th>@lang('strings.connection')</th>
|
||||
<th class="text-center hidden-sm hidden-xs">@lang('strings.memory')</th>
|
||||
<th class="text-center hidden-sm hidden-xs">@lang('strings.cpu')</th>
|
||||
<th class="text-center">@lang('strings.relation')</th>
|
||||
<th class="text-center">@lang('strings.status')</th>
|
||||
</tr>
|
||||
@foreach($servers as $server)
|
||||
|
@ -66,6 +67,15 @@
|
|||
<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">
|
||||
@if($server->user->id === Auth::user()->id)
|
||||
<span class="label bg-purple">@lang('strings.owner')</span>
|
||||
@elseif(Auth::user()->isRootAdmin())
|
||||
<span class="label bg-maroon">@lang('strings.admin')</span>
|
||||
@else
|
||||
<span class="label bg-blue">@lang('strings.subuser')</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center" data-action="status">
|
||||
@if($server->suspended === 1)
|
||||
<span class="label label-warning">@lang('strings.suspended')</span>
|
||||
|
|
Loading…
Reference in a new issue