Add support for suspension
This commit is contained in:
parent
3ca7e4d578
commit
38eae88bd0
9 changed files with 223 additions and 25 deletions
|
@ -42,8 +42,8 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
@foreach ($servers as $server)
|
||||
<tr class="dynUpdate @if($server->active !== 1)active @endif" id="{{ $server->uuidShort }}">
|
||||
<td><a href="/admin/servers/view/{{ $server->id }}">{{ $server->name }}</td>
|
||||
<tr class="dynUpdate @if($server->suspended === 1)warning @endif" id="{{ $server->uuidShort }}">
|
||||
<td><a href="/admin/servers/view/{{ $server->id }}">{{ $server->name }}</a>@if($server->suspended === 1) <span class="label label-warning">Suspended</span>@endif</td>
|
||||
<td><a href="/admin/users/view/{{ $server->owner }}">{{ $server->a_ownerEmail }}</a></td>
|
||||
<td class="hidden-xs"><a href="/admin/nodes/view/{{ $server->node }}">{{ $server->a_nodeName }}</a></td>
|
||||
<td><code>{{ $server->ip_alias }}:{{ $server->port }}</code> @if($server->ip !== $server->ip_alias)<span class="label label-default">alias</span>@endif</td>
|
||||
|
|
|
@ -30,6 +30,11 @@
|
|||
<li><a href="/admin/servers">Servers</a></li>
|
||||
<li class="active">{{ $server->name }} ({{ $server->uuidShort}})</li>
|
||||
</ul>
|
||||
@if($server->suspended === 1)
|
||||
<div class="alert alert-warning">
|
||||
This server is suspended and has no user access. Processes cannot be started and files cannot be modified. All API access is disabled unless using a master token.
|
||||
</div>
|
||||
@endif
|
||||
@if($server->installed === 0)
|
||||
<div class="alert alert-warning">
|
||||
This server is still running through the install process and is not avaliable for use just yet. This message will disappear once this process is completed.
|
||||
|
@ -89,7 +94,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><abbr title="Out of Memory">OOM</abbr> Killer</td>
|
||||
<td>{!! ($server->oom_disabled === 0) ? '<span class="label label-success">enabled</span>' : '<span class="label label-default">disabled</span>' !!}</td>
|
||||
<td>{!! ($server->oom_disabled === 0) ? '<span class="label label-success">Enabled</span>' : '<span class="label label-default">Disabled</span>' !!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Disk Space</td>
|
||||
|
@ -121,6 +126,10 @@
|
|||
<td>Installed</td>
|
||||
<td>{!! ($server->installed === 1) ? '<span class="label label-success">Yes</span>' : '<span class="label label-danger">No</span>' !!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Suspended</td>
|
||||
<td>{!! ($server->suspended === 1) ? '<span class="label label-warning">Suspended</span>' : '<span class="label label-success">No</span>' !!}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -437,6 +446,32 @@
|
|||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="panel-heading" style="border-top: 1px solid #ddd;"></div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
@if($server->suspended === 0)
|
||||
<div class="col-md-4 text-center">
|
||||
<form action="/admin/servers/view/{{ $server->id }}/suspend" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<button type="submit" class="btn btn-sm btn-warning">Suspend Server</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<p>This will suspend the server, stop any running processes, and immediately block the user from being able to access their files or otherwise manage the server through the panel or API.</p>
|
||||
</div>
|
||||
@else
|
||||
<div class="col-md-4 text-center">
|
||||
<form action="/admin/servers/view/{{ $server->id }}/unsuspend" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<button type="submit" class="btn btn-sm btn-success">Unsuspend Server</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<p>This will unsuspend the server and restore normal user access.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
Reference in a new issue