2017-03-12 05:00:06 +00:00
|
|
|
@extends('layouts.admin')
|
|
|
|
|
|
|
|
@section('title')
|
2017-10-07 21:16:51 +00:00
|
|
|
Nests → New Egg
|
2017-03-12 05:00:06 +00:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('content-header')
|
2017-10-07 21:16:51 +00:00
|
|
|
<h1>New Egg<small>Create a new Egg to assign to servers.</small></h1>
|
2017-03-12 05:00:06 +00:00
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
2017-10-07 21:16:51 +00:00
|
|
|
<li><a href="{{ route('admin.nests') }}">Nests</a></li>
|
|
|
|
<li class="active">New Egg</li>
|
2017-03-12 05:00:06 +00:00
|
|
|
</ol>
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('content')
|
2017-10-07 21:16:51 +00:00
|
|
|
<form action="{{ route('admin.nests.egg.new') }}" method="POST">
|
2017-03-12 05:00:06 +00:00
|
|
|
<div class="row">
|
|
|
|
<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">
|
2017-10-07 21:16:51 +00:00
|
|
|
<label for="pNestId" class="form-label">Associated Nest</label>
|
|
|
|
<div>
|
|
|
|
<select name="nest_id" id="pNestId">
|
|
|
|
@foreach($nests as $nest)
|
|
|
|
<option value="{{ $nest->id }}" {{ old('nest_id') != $nest->id ?: 'selected' }}>{{ $nest->name }} <{{ $nest->author }}></option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
2018-05-13 14:34:09 +00:00
|
|
|
<p class="text-muted small">Think of a Nest as a category. You can put multiple Eggs in a nest, but consider putting only Eggs that are related to each other in each Nest.</p>
|
2017-10-07 21:16:51 +00:00
|
|
|
</div>
|
2017-03-12 05:00:06 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2017-10-07 21:16:51 +00:00
|
|
|
<label for="pName" class="form-label">Name</label>
|
2017-03-12 05:00:06 +00:00
|
|
|
<input type="text" id="pName" name="name" value="{{ old('name') }}" class="form-control" />
|
2018-05-13 14:34:09 +00:00
|
|
|
<p class="text-muted small">A simple, human-readable name to use as an identifier for this Egg. This is what users will see as their game server type.</p>
|
2017-03-12 05:00:06 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="pDescription" class="form-label">Description</label>
|
|
|
|
<textarea id="pDescription" name="description" class="form-control" rows="8">{{ old('description') }}</textarea>
|
2017-10-07 21:16:51 +00:00
|
|
|
<p class="text-muted small">A description of this Egg.</p>
|
2017-03-12 05:00:06 +00:00
|
|
|
</div>
|
2022-09-25 19:24:54 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="checkbox checkbox-primary no-margin-bottom">
|
|
|
|
<input id="pForceOutgoingIp" name="force_outgoing_ip" type="checkbox" value="1" {{ \Pterodactyl\Helpers\Utilities::checked('force_outgoing_ip', 0) }} />
|
|
|
|
<label for="pForceOutgoingIp" class="strong">Force Outgoing IP</label>
|
|
|
|
<p class="text-muted small">
|
|
|
|
Forces all outgoing network traffic to have its Source IP NATed to the IP of the server's primary allocation IP.
|
|
|
|
Required for certain games to work properly when the Node has multiple public IP addresses.
|
|
|
|
<br>
|
|
|
|
<strong>
|
|
|
|
Enabling this option will disable internal networking for any servers using this egg,
|
|
|
|
causing them to be unable to internally access other servers on the same node.
|
|
|
|
</strong>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-12 05:00:06 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-group">
|
2020-12-13 18:13:32 +00:00
|
|
|
<label for="pDockerImage" class="control-label">Docker Images</label>
|
|
|
|
<textarea id="pDockerImages" name="docker_images" rows="4" placeholder="quay.io/pterodactyl/service" class="form-control">{{ old('docker_images') }}</textarea>
|
|
|
|
<p class="text-muted small">The docker images available to servers using this egg. Enter one per line. Users will be able to select from this list of images if more than one value is provided.</p>
|
2017-03-12 05:00:06 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2017-10-07 21:16:51 +00:00
|
|
|
<label for="pStartup" class="control-label">Startup Command</label>
|
2020-12-13 18:13:32 +00:00
|
|
|
<textarea id="pStartup" name="startup" class="form-control" rows="10">{{ old('startup') }}</textarea>
|
2018-05-13 14:34:09 +00:00
|
|
|
<p class="text-muted small">The default startup command that should be used for new servers created with this Egg. You can change this per-server as needed.</p>
|
2017-03-12 05:00:06 +00:00
|
|
|
</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">
|
2018-05-13 14:34:09 +00:00
|
|
|
<p>All fields are required unless you select a separate option from the 'Copy Settings From' dropdown, in which case fields may be left blank to use the values from that option.</p>
|
2017-03-12 05:00:06 +00:00
|
|
|
</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">
|
2017-12-30 22:05:22 +00:00
|
|
|
<option value="">None</option>
|
2017-03-12 05:00:06 +00:00
|
|
|
</select>
|
2017-10-07 21:16:51 +00:00
|
|
|
<p class="text-muted small">If you would like to default to settings from another Egg select it from the dropdown above.</p>
|
2017-03-12 05:00:06 +00:00
|
|
|
</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="{{ old('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">{{ old('config_logs') }}</textarea>
|
2018-04-07 17:04:13 +00:00
|
|
|
<p class="text-muted small">This should be a JSON representation of where log files are stored, and whether or not the daemon should be creating custom logs.</p>
|
2017-03-12 05:00:06 +00:00
|
|
|
</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">{{ old('config_files') }}</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">{{ old('config_startup') }}</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>
|
2018-04-08 18:27:42 +00:00
|
|
|
</div>
|
2017-03-12 05:00:06 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="box-footer">
|
|
|
|
{!! csrf_field() !!}
|
2017-10-07 21:16:51 +00:00
|
|
|
<button type="submit" class="btn btn-success btn-sm pull-right">Create</button>
|
2017-03-12 05:00:06 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('footer-scripts')
|
|
|
|
@parent
|
|
|
|
{!! Theme::js('vendor/lodash/lodash.js') !!}
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
2017-10-07 21:16:51 +00:00
|
|
|
$('#pNestId').select2().change();
|
2017-03-12 05:00:06 +00:00
|
|
|
$('#pConfigFrom').select2();
|
|
|
|
});
|
2017-10-07 21:16:51 +00:00
|
|
|
$('#pNestId').on('change', function (event) {
|
2017-08-09 04:24:55 +00:00
|
|
|
$('#pConfigFrom').html('<option value="">None</option>').select2({
|
2017-10-07 21:16:51 +00:00
|
|
|
data: $.map(_.get(Pterodactyl.nests, $(this).val() + '.eggs', []), function (item) {
|
2017-03-12 05:00:06 +00:00
|
|
|
return {
|
|
|
|
id: item.id,
|
2017-10-07 21:16:51 +00:00
|
|
|
text: item.name + ' <' + item.author + '>',
|
2017-03-12 05:00:06 +00:00
|
|
|
};
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$('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
|