This breaks literally the entire panel.
This commit is contained in:
parent
344c1a9885
commit
df87ea0867
88 changed files with 1205 additions and 992 deletions
|
@ -1,107 +0,0 @@
|
|||
{{-- 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')
|
||||
Service
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>Service<small>All services currently available on this system.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li class="active">Service</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="alert alert-danger">
|
||||
Services are a powerful feature of Pterodactyl Panel that allow for extreme flexibility and configuration. Please note that while powerful, modifing a service wrongly can very easily brick your servers and cause more problems. Please avoid editing our default services — those provided by <code>support@pterodactyl.io</code> — unless you are absolutely sure of what you are doing.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Configured Service</h3>
|
||||
<div class="box-tools">
|
||||
<a href="#" class="btn btn-sm btn-success" data-toggle="modal" data-target="#importServiceOptionModal" role="button"><i class="fa fa-upload"></i> Import Service Option</a>
|
||||
<a href="{{ route('admin.services.new') }}" class="btn btn-primary btn-sm">Create New</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th class="text-center">Options</th>
|
||||
<th class="text-center">Packs</th>
|
||||
<th class="text-center">Servers</th>
|
||||
</tr>
|
||||
@foreach($services as $service)
|
||||
<tr>
|
||||
<td class="middle"><a href="{{ route('admin.services.view', $service->id) }}" data-toggle="tooltip" data-placement="right" title="{{ $service->author }}">{{ $service->name }}</a></td>
|
||||
<td class="col-xs-6 middle">{{ $service->description }}</td>
|
||||
<td class="text-center middle"><code>{{ $service->options_count }}</code></td>
|
||||
<td class="text-center middle"><code>{{ $service->packs_count }}</code></td>
|
||||
<td class="text-center middle"><code>{{ $service->servers_count }}</code></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" tabindex="-1" role="dialog" id="importServiceOptionModal">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<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">Import a Service Option</h4>
|
||||
</div>
|
||||
<form action="{{ route('admin.services.option.import') }}" enctype="multipart/form-data" method="POST">
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="pImportFile">Service File <span class="field-required"></span></label>
|
||||
<div>
|
||||
<input id="pImportFile" type="file" name="import_file" class="form-control" accept="application/json" />
|
||||
<p class="small text-muted">Select the <code>.json</code> file for the new service option that you wish to import.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="pImportToService">Associated Service <span class="field-required"></span></label>
|
||||
<div>
|
||||
<select id="pImportToService" name="import_to_service">
|
||||
@foreach($services as $service)
|
||||
<option value="{{ $service->id }}">{{ $service->name }} <{{ $service->author }}></option>
|
||||
@endforeach
|
||||
</select>
|
||||
<p class="small text-muted">Select the service that this option will be associated with from the dropdown. If you wish to associate it with a new service you will need to create that service before continuing.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{{ csrf_field() }}
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Import</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#pImportToService').select2();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
|
@ -1,52 +0,0 @@
|
|||
{{-- 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')
|
||||
New Service
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>New Service<small>Configure a new service to deploy to all nodes.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li><a href="{{ route('admin.services') }}">Service</a></li>
|
||||
<li class="active">New</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<form action="{{ route('admin.services.new') }}" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">New Service</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Name</label>
|
||||
<div>
|
||||
<input type="text" name="name" class="form-control" value="{{ old('name') }}" />
|
||||
<p class="text-muted"><small>This should be a descriptive category name that emcompasses all of the options within the service.</small></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">Description</label>
|
||||
<div>
|
||||
<textarea name="description" class="form-control" rows="6">{{ old('description') }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<button type="input" class="btn btn-primary pull-right">Save Service</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
|
@ -1,164 +0,0 @@
|
|||
{{-- 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')
|
||||
Service → Option: {{ $option->name }}
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>{{ $option->name }}<small>{{ str_limit($option->description, 50) }}</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li><a href="{{ route('admin.services') }}">Service</a></li>
|
||||
<li><a href="{{ route('admin.services.view', $option->service->id) }}">{{ $option->service->name }}</a></li>
|
||||
<li class="active">{{ $option->name }}</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.services.option.view', $option->id) }}">Configuration</a></li>
|
||||
<li><a href="{{ route('admin.services.option.variables', $option->id) }}">Variables</a></li>
|
||||
<li><a href="{{ route('admin.services.option.scripts', $option->id) }}">Scripts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="{{ route('admin.services.option.view', $option->id) }}" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="callout callout-info">
|
||||
<strong>Notice:</strong> Editing the Option Tag or any of the Process Management fields <em>requires</em> that each daemon be rebooted to apply the changes.
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Configuration</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="pName" class="form-label">Option Name</label>
|
||||
<input type="text" id="pName" name="name" value="{{ $option->name }}" class="form-control" />
|
||||
<p class="text-muted small">A simple, human-readable name to use as an identifier for this service.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pDescription" class="form-label">Description</label>
|
||||
<textarea id="pDescription" name="description" class="form-control" rows="10">{{ $option->description }}</textarea>
|
||||
<p class="text-muted small">A description of this service that will be displayed throughout the panel as needed.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label">Option Tag</label>
|
||||
<input type="text" disabled value="{{ $option->tag }}" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pDockerImage" class="control-label">Docker Image <span class="field-optional"></label>
|
||||
<input type="text" id="pDockerImage" name="docker_image" value="{{ $option->docker_image }}" class="form-control" />
|
||||
<p class="text-muted small">The default docker image that should be used for new servers under this service option. This can be left blank to use the parent service's defined image, and can also be changed per-server.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pStartup" class="control-label">Startup Command <span class="field-optional"></label>
|
||||
<textarea id="pStartup" name="startup" class="form-control" rows="4" placeholder="{{ $option->service->startup }}">{{ $option->startup }}</textarea>
|
||||
<p class="text-muted small">The default statup command that should be used for new servers under this service option. This can be left blank to use the parent service's startup, and can also be changed per-server.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Process Management</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="alert alert-warning">
|
||||
<p>The following configuration options should not be edited unless you understand how this system works. If wrongly modified it is possible for the daemon to break.</p>
|
||||
<p>All fields are required unless you select a seperate option from the 'Copy Settings From' dropdown, in which case fields may be left blank to use the values from that option.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="pConfigFrom" class="form-label">Copy Settings From</label>
|
||||
<select name="config_from" id="pConfigFrom" class="form-control">
|
||||
<option value="0">None</option>
|
||||
@foreach($option->service->options as $o)
|
||||
<option value="{{ $o->id }}" {{ ($option->config_from !== $o->id) ?: 'selected' }}>{{ $o->name }} <{{ $option->tag }}></option>
|
||||
@endforeach
|
||||
</select>
|
||||
<p class="text-muted small">If you would like to default to settings from another option select the option from the menu above.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pConfigStop" class="form-label">Stop Command</label>
|
||||
<input type="text" id="pConfigStop" name="config_stop" class="form-control" value="{{ $option->config_stop }}" />
|
||||
<p class="text-muted small">The command that should be sent to server processes to stop them gracefully. If you need to send a <code>SIGINT</code> you should enter <code>^C</code> here.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pConfigLogs" class="form-label">Log Configuration</label>
|
||||
<textarea data-action="handle-tabs" id="pConfigLogs" name="config_logs" class="form-control" rows="6">{{ ! is_null($option->config_logs) ? json_encode(json_decode($option->config_logs), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) : '' }}</textarea>
|
||||
<p class="text-muted small">This should be a JSON representation of where log files are stored, and wether or not the daemon should be creating custom logs.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="pConfigFiles" class="form-label">Configuration Files</label>
|
||||
<textarea data-action="handle-tabs" id="pConfigFiles" name="config_files" class="form-control" rows="6">{{ ! is_null($option->config_files) ? json_encode(json_decode($option->config_files), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) : '' }}</textarea>
|
||||
<p class="text-muted small">This should be a JSON representation of configuration files to modify and what parts should be changed.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pConfigStartup" class="form-label">Start Configuration</label>
|
||||
<textarea data-action="handle-tabs" id="pConfigStartup" name="config_startup" class="form-control" rows="6">{{ ! is_null($option->config_startup) ? json_encode(json_decode($option->config_startup), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) : '' }}</textarea>
|
||||
<p class="text-muted small">This should be a JSON representation of what values the daemon should be looking for when booting a server to determine completion.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<button id="deleteButton" type="submit" name="_method" value="DELETE" class="btn btn-danger btn-sm muted muted-hover">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</button>
|
||||
<button type="submit" name="_method" value="PATCH" class="btn btn-primary btn-sm pull-right">Edit Option</button>
|
||||
<a href="{{ route('admin.services.option.export', ['option' => $option->id]) }}" class="btn btn-sm btn-info pull-right" style="margin-right:10px;">Export Option Configuration</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('#pConfigFrom').select2();
|
||||
$('#deleteButton').on('mouseenter', function (event) {
|
||||
$(this).find('i').html(' Delete Option');
|
||||
}).on('mouseleave', function (event) {
|
||||
$(this).find('i').html('');
|
||||
});
|
||||
$('textarea[data-action="handle-tabs"]').on('keydown', function(event) {
|
||||
if (event.keyCode === 9) {
|
||||
event.preventDefault();
|
||||
|
||||
var curPos = $(this)[0].selectionStart;
|
||||
var prepend = $(this).val().substr(0, curPos);
|
||||
var append = $(this).val().substr(curPos);
|
||||
|
||||
$(this).val(prepend + ' ' + append);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
|
@ -1,111 +0,0 @@
|
|||
{{-- 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')
|
||||
Service → {{ $service->name }}
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>{{ $service->name }}<small>{{ str_limit($service->description, 50) }}</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li><a href="{{ route('admin.services') }}">Service</a></li>
|
||||
<li class="active">{{ $service->name }}</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<form action="{{ route('admin.services.view', $service->id) }}" method="POST">
|
||||
<div class="col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Name <span class="field-required"></span></label>
|
||||
<div>
|
||||
<input type="text" name="name" class="form-control" value="{{ $service->name }}" />
|
||||
<p class="text-muted"><small>This should be a descriptive category name that emcompasses all of the options within the service.</small></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">Description <span class="field-required"></span></label>
|
||||
<div>
|
||||
<textarea name="description" class="form-control" rows="7">{{ $service->description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<button type="submit" name="_method" value="PATCH" class="btn btn-primary btn-sm pull-right">Edit Option</button>
|
||||
<button id="deleteButton" type="submit" name="_method" value="DELETE" class="btn btn-sm btn-danger muted muted-hover"><i class="fa fa-trash-o"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Author</label>
|
||||
<div>
|
||||
<input type="text" readonly class="form-control" value="{{ $service->author }}" />
|
||||
<p class="text-muted small">The author of this service option. Please direct questions and issues to them unless this is an official option authored by <code>support@pterodactyl.io</code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">UUID</label>
|
||||
<div>
|
||||
<input type="text" readonly class="form-control" value="{{ $service->uuid }}" />
|
||||
<p class="text-muted small">A unique identifier that all servers using this option are assigned for identification purposes.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Configured Options</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Tag</th>
|
||||
<th class="text-center">Servers</th>
|
||||
</tr>
|
||||
@foreach($service->options as $option)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.services.option.view', $option->id) }}">{{ $option->name }}</a></td>
|
||||
<td class="col-xs-6">{!! $option->description !!}</td>
|
||||
<td><code>{{ $option->tag }}</code></td>
|
||||
<td class="text-center">{{ $option->servers->count() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="{{ route('admin.services.option.new') }}"><button class="btn btn-success btn-sm pull-right">New Service Option</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('#deleteButton').on('mouseenter', function (event) {
|
||||
$(this).find('i').html(' Delete Service');
|
||||
}).on('mouseleave', function (event) {
|
||||
$(this).find('i').html('');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
Reference in a new issue