More fixes

This commit is contained in:
Dane Everitt 2017-10-07 18:08:19 -05:00
parent 17642bffe7
commit c19c423568
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
14 changed files with 67 additions and 61 deletions

View file

@ -56,7 +56,7 @@
<td><code>{{ $server->uuidShort }}</code></td>
<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>
<td><a href="{{ route('admin.users.view', $server->owner_id) }}">{{ $server->user->username }}</a></td>
<td>{{ $server->service->name }} ({{ $server->option->name }})</td>
<td>{{ $server->nest->name }} ({{ $server->egg->name }})</td>
<td class="text-center"><span data-action="memory">NaN</span> / {{ $server->memory === 0 ? '&infin;' : $server->memory }} MB</td>
<td class="text-center">{{ $server->disk }} MB</td>
<td class="text-center"><span data-action="cpu" data-cpumax="{{ $server->cpu }}">NaN</span> %</td>

View file

@ -43,7 +43,7 @@
<th>Pack Name</th>
<th>Version</th>
<th>Description</th>
<th>Option</td>
<th>Egg</th>
<th class="text-center">Servers</th>
</tr>
@foreach ($packs as $pack)
@ -52,7 +52,7 @@
<td class="middle"><a href="{{ route('admin.packs.view', $pack->id) }}">{{ $pack->name }}</a></td>
<td class="middle"><code>{{ $pack->version }}</code></td>
<td class="col-md-6">{{ str_limit($pack->description, 150) }}</td>
<td class="middle"><a href="{{ route('admin.services.option.view', $pack->option->id) }}">{{ $pack->option->name }}</a></td>
<td class="middle"><a href="{{ route('admin.nests.egg.view', $pack->egg->id) }}">{{ $pack->egg->name }}</a></td>
<td class="middle text-center">{{ $pack->servers_count }}</td>
</tr>
@endforeach

View file

@ -10,17 +10,17 @@
<div class="well" style="margin-bottom:0">
<div class="row">
<div class="col-md-12">
<label for="pOptionIdModal" class="form-label">Associated Service Option:</label>
<select id="pOptionIdModal" name="option_id" class="form-control">
@foreach($services as $service)
<optgroup label="{{ $service->name }}">
@foreach($service->options as $option)
<option value="{{ $option->id }}">{{ $option->name }}</option>
<label for="pEggIdModal" class="form-label">Associated Egg:</label>
<select id="pEggIdModal" name="egg_id" class="form-control">
@foreach($nests as $nest)
<optgroup label="{{ $nest->name }}">
@foreach($nest->eggs as $egg)
<option value="{{ $egg->id }}">{{ $egg->name }}</option>
@endforeach
</optgroup>
@endforeach
</select>
<p class="text-muted small">The option that this pack is assocaited with. Only servers that are assigned this option will be able to access this pack.</p>
<p class="text-muted small">The Egg that this pack is assocaited with. Only servers that are assigned this Egg will be able to access this pack.</p>
</div>
</div>
<div class="row" style="margin-top:15px;">

View file

@ -52,12 +52,12 @@
<p class="text-muted small">The version of this package, or the version of the files contained within the package.</p>
</div>
<div class="form-group">
<label for="pOptionId" class="form-label">Associated Option</label>
<select id="pOptionId" name="option_id" class="form-control">
@foreach($services as $service)
<optgroup label="{{ $service->name }}">
@foreach($service->options as $option)
<option value="{{ $option->id }}">{{ $option->name }}</option>
<label for="pEggId" class="form-label">Associated Egg</label>
<select id="pEggId" name="egg_id" class="form-control">
@foreach($nests as $nest)
<optgroup label="{{ $nest->name }}">
@foreach($nest->eggs as $egg)
<option value="{{ $egg->id }}">{{ $egg->name }}</option>
@endforeach
</optgroup>
@endforeach
@ -124,7 +124,7 @@
@section('footer-scripts')
@parent
<script>
$('#pOptionId').select2();
$('#pEggId').select2();
$('#toggleModal').on('click', function (event) {
event.preventDefault();
@ -135,9 +135,9 @@
}).fail(function (jqXhr) {
console.error(jqXhr);
alert('There was an error trying to create the upload modal.');
}).success(function (data) {
}).done(function (data) {
$(data).modal();
$('#pOptionIdModal').select2();
$('#pEggIdModal').select2();
});
});
</script>

View file

@ -51,12 +51,12 @@
</div>
<div class="box-body">
<div class="form-group">
<label for="pOptionId" class="form-label">Associated Option</label>
<select id="pOptionId" name="option_id" class="form-control">
@foreach($services as $service)
<optgroup label="{{ $service->name }}">
@foreach($service->options as $option)
<option value="{{ $option->id }}" {{ $pack->option_id !== $option->id ?: 'selected' }}>{{ $option->name }}</option>
<label for="pEggId" class="form-label">Associated Option</label>
<select id="pEggId" name="egg_id" class="form-control">
@foreach($nests as $nest)
<optgroup label="{{ $nest->name }}">
@foreach($nest->eggs as $egg)
<option value="{{ $egg->id }}" {{ $pack->egg_id !== $egg->id ?: 'selected' }}>{{ $egg->name }}</option>
@endforeach
</optgroup>
@endforeach
@ -173,6 +173,6 @@
@section('footer-scripts')
@parent
<script>
$('#pOptionId').select2();
$('#pEggId').select2();
</script>
@endsection

View file

@ -113,22 +113,23 @@
</tr>
</thead>
<tbody>
@foreach($user->setAccessLevel('subuser')->access()->get() as $server)
<tr>
<td><a href="{{ route('server.index', $server->uuidShort) }}/"><i class="fa fa-tachometer"></i></a></td>
<td><code>{{ $server->uuidShort }}</code></td>
<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>
<td>
@if($server->owner_id === $user->id)
<span class="label bg-purple">Owner</span>
@else
<span class="label bg-blue">Subuser</span>
@endif
</td>
<td><a href="{{ route('admin.nodes.view', $server->node->id) }}">{{ $server->node->name }}</a></td>
<td class="centered">@if($server->suspended === 0)<span class="label muted muted-hover label-success">Active</span>@else<span class="label label-warning">Suspended</span>@endif</td>
</td>
@endforeach
Oh dear, this hasn't been fixed yet?
{{--@foreach($user->setAccessLevel('subuser')->access()->get() as $server)--}}
{{--<tr>--}}
{{--<td><a href="{{ route('server.index', $server->uuidShort) }}/"><i class="fa fa-tachometer"></i></a></td>--}}
{{--<td><code>{{ $server->uuidShort }}</code></td>--}}
{{--<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>--}}
{{--<td>--}}
{{--@if($server->owner_id === $user->id)--}}
{{--<span class="label bg-purple">Owner</span>--}}
{{--@else--}}
{{--<span class="label bg-blue">Subuser</span>--}}
{{--@endif--}}
{{--</td>--}}
{{--<td><a href="{{ route('admin.nodes.view', $server->node->id) }}">{{ $server->node->name }}</a></td>--}}
{{--<td class="centered">@if($server->suspended === 0)<span class="label muted muted-hover label-success">Active</span>@else<span class="label label-warning">Suspended</span>@endif</td>--}}
{{--</td>--}}
{{--@endforeach--}}
</tbody>
</table>
</div>

View file

@ -79,7 +79,7 @@
{!! Theme::js('js/frontend/console.js') !!}
{!! Theme::js('vendor/chartjs/chart.min.js') !!}
{!! Theme::js('vendor/jquery/date-format.min.js') !!}
@if($server->service->folder === 'minecraft')
@if($server->nest->name === 'Minecraft' && $server->nest->author === 'support@pterodactyl.io')
{!! Theme::js('js/plugins/minecraft/eula.js') !!}
@endif
@endsection