parent
660cdca940
commit
edaa270a33
7 changed files with 103 additions and 51 deletions
|
@ -41,14 +41,21 @@
|
|||
<h3 class="box-title">Core Details</h3>
|
||||
</div>
|
||||
<div class="box-body row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="pName">Server Name</label>
|
||||
<input type="text" class="form-control" id="pName" name="name" value="{{ old('name') }}" placeholder="Server Name">
|
||||
<p class="small text-muted no-margin">Character limits: <code>a-z A-Z 0-9 _ - .</code> and <code>[Space]</code> (max 200 characters).</p>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="pName">Server Name</label>
|
||||
<input type="text" class="form-control" id="pName" name="name" value="{{ old('name') }}" placeholder="Server Name">
|
||||
<p class="small text-muted no-margin">Character limits: <code>a-z A-Z 0-9 _ - .</code> and <code>[Space]</code> (max 200 characters).</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pUserId">Server Owner</label>
|
||||
<select class="form-control" style="padding-left:0;" name="user_id" id="pUserId"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="pUserId">Server Owner</label>
|
||||
<select class="form-control" style="padding-left:0;" name="user_id" id="pUserId"></select>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="description" class="control-label">Server Description</label>
|
||||
<textarea name="description" rows="3" class="form-control">{{ old('description') }}</textarea>
|
||||
<p class="text-muted small">A brief description of this server.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -71,6 +71,11 @@
|
|||
</select>
|
||||
<p class="text-muted small">You can change the owner of this server by changing this field to an email matching another use on this system. If you do this a new daemon security token will be generated automatically.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="control-label">Server Description</label>
|
||||
<textarea name="description" rows="3" class="form-control">{{ old('description', $server->description) }}</textarea>
|
||||
<p class="text-muted small">A brief description of this server.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name" class="control-label">Daemon Secret Token</label>
|
||||
<input type="text" disabled value="{{ $server->daemonSecret }}" class="form-control" />
|
||||
|
|
|
@ -60,30 +60,35 @@
|
|||
<th class="text-center">@lang('strings.status')</th>
|
||||
</tr>
|
||||
@foreach($servers as $server)
|
||||
<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->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">
|
||||
@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>
|
||||
@else
|
||||
<span class="label label-default"><i class="fa fa-refresh fa-fw fa-spin"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="dynamic-update" data-server="{{ $server->uuidShort }}">
|
||||
<td @if(! empty($server->description)) rowspan="2" @endif><code>{{ $server->uuidShort }}</code></td>
|
||||
<td><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></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">
|
||||
@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>
|
||||
@else
|
||||
<span class="label label-default"><i class="fa fa-refresh fa-fw fa-spin"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if (! empty($server->description))
|
||||
<tr class="server-description">
|
||||
<td colspan="7"><p class="text-muted small no-margin">{{ str_limit($server->description, 400) }}</p></td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -100,5 +105,12 @@
|
|||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('tr.server-description').on('mouseenter mouseleave', function (event) {
|
||||
$(this).prev('tr').css({
|
||||
'background-color': (event.type === 'mouseenter') ? '#f5f5f5' : '',
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{!! Theme::js('js/frontend/serverlist.js') !!}
|
||||
@endsection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue