[L6] Move all of the template files into the new correct location
This commit is contained in:
parent
1c5b9dbb87
commit
c97461d602
83 changed files with 0 additions and 0 deletions
70
resources/views/admin/packs/index.blade.php
Normal file
70
resources/views/admin/packs/index.blade.php
Normal file
|
@ -0,0 +1,70 @@
|
|||
{{-- Pterodactyl - Panel --}}
|
||||
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
|
||||
|
||||
{{-- This software is licensed under the terms of the MIT license. --}}
|
||||
{{-- https://opensource.org/licenses/MIT --}}
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title')
|
||||
List Packs
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>Packs<small>All service packs available on the system.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li class="active">Packs</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Pack List</h3>
|
||||
<div class="box-tools">
|
||||
<form action="{{ route('admin.packs') }}" method="GET">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" name="query" class="form-control pull-right" style="width:30%;" value="{{ request()->input('query') }}" placeholder="Search Packs">
|
||||
<div class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
|
||||
<a href="{{ route('admin.packs.new') }}"><button type="button" class="btn btn-sm btn-primary" style="border-radius: 0 3px 3px 0;margin-left:-1px;">Create New</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Pack Name</th>
|
||||
<th>Version</th>
|
||||
<th>Description</th>
|
||||
<th>Egg</th>
|
||||
<th class="text-center">Servers</th>
|
||||
</tr>
|
||||
@foreach ($packs as $pack)
|
||||
<tr>
|
||||
<td class="middle" data-toggle="tooltip" data-placement="right" title="{{ $pack->uuid }}"><code>{{ $pack->id }}</code></td>
|
||||
<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.nests.egg.view', $pack->egg->id) }}">{{ $pack->egg->name }}</a></td>
|
||||
<td class="middle text-center">{{ $pack->servers_count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@if ($packs->hasPages())
|
||||
<div class="box-footer with-border">
|
||||
<div class="col-md-12 text-center">{!! $packs->appends(['query' => Request::input('query')])->render() !!}</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
47
resources/views/admin/packs/modal.blade.php
Normal file
47
resources/views/admin/packs/modal.blade.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<div class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<form action="{{ route('admin.packs.new') }}" method="POST" enctype="multipart/form-data">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Install Pack from Template</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="well" style="margin-bottom:0">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<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 Egg that this pack is associated 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;">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<label class="control-label">Package Archive:</label>
|
||||
<input name="file_upload" type="file" accept=".zip,.json, application/json, application/zip" />
|
||||
<p class="text-muted"><small>This file should be either the <code>.json</code> template file, or a <code>.zip</code> pack archive containing <code>archive.tar.gz</code> and <code>import.json</code> within.<br /><br />This server is currently configured with the following limits: <code>upload_max_filesize={{ ini_get('upload_max_filesize') }}</code> and <code>post_max_size={{ ini_get('post_max_size') }}</code>. If your file is larger than either of those values this request will fail.</small></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{!! csrf_field() !!}
|
||||
<button type="submit" name="action" value="from_template" class="btn btn-primary btn-sm">Install</button>
|
||||
<button type="button" class="btn btn-default btn-sm pull-left" data-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
144
resources/views/admin/packs/new.blade.php
Normal file
144
resources/views/admin/packs/new.blade.php
Normal file
|
@ -0,0 +1,144 @@
|
|||
{{-- Pterodactyl - Panel --}}
|
||||
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
|
||||
|
||||
{{-- This software is licensed under the terms of the MIT license. --}}
|
||||
{{-- https://opensource.org/licenses/MIT --}}
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title')
|
||||
Packs → New
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>New Pack<small>Create a new pack on the system.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li><a href="{{ route('admin.packs') }}">Packs</a></li>
|
||||
<li class="active">New</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="nav-tabs-custom nav-tabs-floating">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="{{ route('admin.packs.new') }}">Configure Manually</a></li>
|
||||
<li><a href="#modal" id="toggleModal">Install From Template</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="{{ route('admin.packs.new') }}" method="POST" enctype="multipart/form-data">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Pack Details</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pName" class="form-label">Name</label>
|
||||
<input name="name" type="text" id="pName" class="form-control" value="{{ old('name') }}" />
|
||||
<p class="text-muted small">A short but descriptive name of what this pack is. For example, <code>Counter Strike: Source</code> if it is a Counter Strike package.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pDescription" class="form-label">Description</label>
|
||||
<textarea name="description" id="pDescription" class="form-control" rows="8">{{ old('description') }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pVersion" class="form-label">Version</label>
|
||||
<input type="text" name="version" id="pVersion" class="form-control" value="{{ old('version') }}" />
|
||||
<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="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
|
||||
</select>
|
||||
<p class="text-muted small">The option that this pack is associated with. Only servers that are assigned this option will be able to access this pack.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Pack Configuration</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<div class="checkbox checkbox-primary no-margin-bottom">
|
||||
<input id="pSelectable" name="selectable" type="checkbox" value="1" checked/>
|
||||
<label for="pSelectable">
|
||||
Selectable
|
||||
</label>
|
||||
</div>
|
||||
<p class="text-muted small">Check this box if user should be able to select this pack to install on their servers.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox checkbox-primary no-margin-bottom">
|
||||
<input id="pVisible" name="visible" type="checkbox" value="1" checked/>
|
||||
<label for="pVisible">
|
||||
Visible
|
||||
</label>
|
||||
</div>
|
||||
<p class="text-muted small">Check this box if this pack is visible in the dropdown menu. If this pack is assigned to a server it will be visible regardless of this setting.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox checkbox-warning no-margin-bottom">
|
||||
<input id="pLocked" name="locked" type="checkbox" value="1"/>
|
||||
<label for="pLocked">
|
||||
Locked
|
||||
</label>
|
||||
</div>
|
||||
<p class="text-muted small">Check this box if servers assigned this pack should not be able to switch to a different pack.</p>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="form-group no-margin-bottom">
|
||||
<label for="pFileUpload" class="form-label">Pack Archive</label>
|
||||
<input type="file" accept=".tar.gz, application/gzip" name="file_upload" class="well well-sm" style="width:100%"/>
|
||||
<p class="text-muted small">This package file must be a <code>.tar.gz</code> archive of pack files to be decompressed into the server folder.</p>
|
||||
<p class="text-muted small">If your file is larger than <code>50MB</code> it is recommended to upload it using SFTP. Once you have added this pack to the system, a path will be provided where you should upload the file.</p>
|
||||
<div class="callout callout-info callout-slim no-margin-bottom">
|
||||
<p class="text-muted small"><strong>This server is currently configured with the following limits:</strong><br /><code>upload_max_filesize={{ ini_get('upload_max_filesize') }}</code><br /><code>post_max_size={{ ini_get('post_max_size') }}</code><br /><br />If your file is larger than either of those values this request will fail.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer with-border">
|
||||
{!! csrf_field() !!}
|
||||
<button class="btn btn-sm btn-success pull-right" type="submit">Create Pack</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('#pEggId').select2();
|
||||
$('#toggleModal').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: Router.route('admin.packs.new.template'),
|
||||
headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') },
|
||||
}).fail(function (jqXhr) {
|
||||
console.error(jqXhr);
|
||||
alert('There was an error trying to create the upload modal.');
|
||||
}).done(function (data) {
|
||||
$(data).modal();
|
||||
$('#pEggIdModal').select2();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
154
resources/views/admin/packs/view.blade.php
Normal file
154
resources/views/admin/packs/view.blade.php
Normal file
|
@ -0,0 +1,154 @@
|
|||
{{-- Pterodactyl - Panel --}}
|
||||
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
|
||||
|
||||
{{-- This software is licensed under the terms of the MIT license. --}}
|
||||
{{-- https://opensource.org/licenses/MIT --}}
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title')
|
||||
Packs → View → {{ $pack->name }}
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>{{ $pack->name }}<small>{{ str_limit($pack->description, 60) }}</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li><a href="{{ route('admin.packs') }}">Packs</a></li>
|
||||
<li class="active">{{ $pack->name }}</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<form action="{{ route('admin.packs.view', $pack->id) }}" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Pack Details</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pName" class="form-label">Name</label>
|
||||
<input name="name" type="text" id="pName" class="form-control" value="{{ $pack->name }}" />
|
||||
<p class="text-muted small">A short but descriptive name of what this pack is. For example, <code>Counter Strike: Source</code> if it is a Counter Strike package.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pDescription" class="form-label">Description</label>
|
||||
<textarea name="description" id="pDescription" class="form-control" rows="8">{{ $pack->description }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pVersion" class="form-label">Version</label>
|
||||
<input type="text" name="version" id="pVersion" class="form-control" value="{{ $pack->version }}" />
|
||||
<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 class="form-label">Storage Location</label>
|
||||
<input type="text" class="form-control" readonly value="{{ storage_path('app/packs/' . $pack->uuid) }}">
|
||||
<p class="text-muted small">If you would like to modify the stored pack you will need to upload a new <code>archive.tar.gz</code> to the location defined above.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Pack Configuration</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<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
|
||||
</select>
|
||||
<p class="text-muted small">The option that this pack is associated with. Only servers that are assigned this option will be able to access this pack. This assigned option <em>cannot</em> be changed if servers are attached to this pack.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox checkbox-primary no-margin-bottom">
|
||||
<input id="pSelectable" name="selectable" type="checkbox" value="1" {{ ! $pack->selectable ?: 'checked' }}/>
|
||||
<label for="pSelectable">
|
||||
Selectable
|
||||
</label>
|
||||
</div>
|
||||
<p class="text-muted small">Check this box if user should be able to select this pack to install on their servers.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox checkbox-primary no-margin-bottom">
|
||||
<input id="pVisible" name="visible" type="checkbox" value="1" {{ ! $pack->visible ?: 'checked' }}/>
|
||||
<label for="pVisible">
|
||||
Visible
|
||||
</label>
|
||||
</div>
|
||||
<p class="text-muted small">Check this box if this pack is visible in the dropdown menu. If this pack is assigned to a server it will be visible regardless of this setting.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox checkbox-warning no-margin-bottom">
|
||||
<input id="pLocked" name="locked" type="checkbox" value="1" {{ ! $pack->locked ?: 'checked' }}/>
|
||||
<label for="pLocked">
|
||||
Locked
|
||||
</label>
|
||||
</div>
|
||||
<p class="text-muted small">Check this box if servers assigned this pack should not be able to switch to a different pack.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer with-border">
|
||||
{!! csrf_field() !!}
|
||||
<button name="_method" value="PATCH" class="btn btn-sm btn-primary pull-right" type="submit">Save</button>
|
||||
<button name="_method" value="DELETE" class="btn btn-sm btn-danger pull-left muted muted-hover" type="submit"><i class="fa fa-trash-o"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Servers Using This Pack</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding table-responsive">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Server Name</th>
|
||||
<th>Node</th>
|
||||
<th>Owner</th>
|
||||
</tr>
|
||||
@foreach($pack->servers as $server)
|
||||
<tr>
|
||||
<td><code>{{ $server->uuidShort }}</code></td>
|
||||
<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>
|
||||
<td><a href="{{ route('admin.nodes.view', $server->node->id) }}">{{ $server->node->name }}</a></td>
|
||||
<td><a href="{{ route('admin.users.view', $server->user->id) }}">{{ $server->user->email }}</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-5 col-md-offset-7 col-xs-offset-6">
|
||||
<form action="{{ route('admin.packs.view.export', $pack->id) }}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<button type="submit" class="btn btn-sm btn-success pull-right">Export</button>
|
||||
</form>
|
||||
<form action="{{ route('admin.packs.view.export', ['id' => $pack->id, 'files' => 'with-files']) }}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<button type="submit" class="btn btn-sm pull-right muted muted-hover" style="margin-right:10px;">Export with Archive</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('#pEggId').select2();
|
||||
</script>
|
||||
@endsection
|
Reference in a new issue