2017-09-26 02:43:01 +00:00
|
|
|
{{-- Pterodactyl - Panel --}}
|
2017-03-10 23:25:12 +00:00
|
|
|
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
|
|
|
|
|
2017-09-26 02:43:01 +00:00
|
|
|
{{-- This software is licensed under the terms of the MIT license. --}}
|
|
|
|
{{-- https://opensource.org/licenses/MIT --}}
|
2017-03-10 23:25:12 +00:00
|
|
|
@extends('layouts.admin')
|
|
|
|
|
|
|
|
@section('title')
|
2017-10-07 04:57:53 +00:00
|
|
|
Nests → Egg: {{ $egg->name }}
|
2017-03-10 23:25:12 +00:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('content-header')
|
2017-10-07 04:57:53 +00:00
|
|
|
<h1>{{ $egg->name }}<small>{{ str_limit($egg->description, 50) }}</small></h1>
|
2017-03-10 23:25:12 +00:00
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
2017-10-07 04:57:53 +00:00
|
|
|
<li><a href="{{ route('admin.nests') }}">Nests</a></li>
|
|
|
|
<li><a href="{{ route('admin.nests.view', $egg->nest->id) }}">{{ $egg->nest->name }}</a></li>
|
|
|
|
<li class="active">{{ $egg->name }}</li>
|
2017-03-10 23:25:12 +00:00
|
|
|
</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">
|
2017-10-07 04:57:53 +00:00
|
|
|
<li class="active"><a href="{{ route('admin.nests.egg.view', $egg->id) }}">Configuration</a></li>
|
|
|
|
<li><a href="{{ route('admin.nests.egg.variables', $egg->id) }}">Variables</a></li>
|
|
|
|
<li><a href="{{ route('admin.nests.egg.scripts', $egg->id) }}">Scripts</a></li>
|
2017-03-10 23:25:12 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-10-07 04:57:53 +00:00
|
|
|
<form action="{{ route('admin.nests.egg.view', $egg->id) }}" method="POST">
|
2017-03-10 23:25:12 +00:00
|
|
|
<div class="row">
|
2017-05-24 03:08:00 +00:00
|
|
|
<div class="col-xs-12">
|
|
|
|
<div class="callout callout-info">
|
2017-10-07 04:57:53 +00:00
|
|
|
<strong>Notice:</strong> Editing an Egg or any of the Process Management fields <em>requires</em> that each Daemon be rebooted in order to apply the changes.
|
2017-05-24 03:08:00 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-10 23:25:12 +00:00
|
|
|
<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 04:57:53 +00:00
|
|
|
<label for="pName" class="control-label">Name <span class="field-required"></span></label>
|
|
|
|
<input type="text" id="pName" name="name" value="{{ $egg->name }}" class="form-control" />
|
|
|
|
<p class="text-muted small">A simple, human-readable name to use as an identifier for this Egg.</p>
|
2017-03-10 23:25:12 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2017-10-09 02:36:22 +00:00
|
|
|
<label for="pUuid" class="control-label">UUID</label>
|
|
|
|
<input type="text" id="pUuid" readonly value="{{ $egg->uuid }}" class="form-control" />
|
|
|
|
<p class="text-muted small">This is the globally unique identifier for this Egg which the Daemon uses as an identifier.</p>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="pAuthor" class="control-label">Author</label>
|
|
|
|
<input type="text" id="pAuthor" readonly value="{{ $egg->author }}" class="form-control" />
|
|
|
|
<p class="text-muted small">The author of this version of the Egg. Uploading a new Egg configuration from a different author will change this.</p>
|
2017-03-10 23:25:12 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2017-10-07 04:57:53 +00:00
|
|
|
<label for="pDockerImage" class="control-label">Docker Image <span class="field-required"></span></label>
|
|
|
|
<input type="text" id="pDockerImage" name="docker_image" value="{{ $egg->docker_image }}" class="form-control" />
|
|
|
|
<p class="text-muted small">The default docker image that should be used for new servers using this Egg. This can be changed per-server as needed.</p>
|
2017-03-10 23:25:12 +00:00
|
|
|
</div>
|
2017-10-09 02:36:22 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="pDescription" class="control-label">Description <span class="field-required"></span></label>
|
|
|
|
<textarea id="pDescription" name="description" class="form-control" rows="6">{{ $egg->description }}</textarea>
|
|
|
|
<p class="text-muted small">A description of this Egg that will be displayed throughout the Panel as needed.</p>
|
|
|
|
</div>
|
2017-03-10 23:25:12 +00:00
|
|
|
<div class="form-group">
|
2017-10-07 04:57:53 +00:00
|
|
|
<label for="pStartup" class="control-label">Startup Command <span class="field-required"></span></label>
|
2017-10-09 02:36:22 +00:00
|
|
|
<textarea id="pStartup" name="startup" class="form-control" rows="6">{{ $egg->startup }}</textarea>
|
2017-10-07 04:57:53 +00:00
|
|
|
<p class="text-muted small">The default statup command that should be used for new servers using this Egg.</p>
|
2017-03-10 23:25:12 +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">
|
|
|
|
<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>
|
2017-10-07 04:57:53 +00:00
|
|
|
<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 Egg.</p>
|
2017-03-10 23:25:12 +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">
|
|
|
|
<option value="0">None</option>
|
2017-10-07 04:57:53 +00:00
|
|
|
@foreach($egg->nest->eggs as $o)
|
|
|
|
<option value="{{ $o->id }}" {{ ($egg->config_from !== $o->id) ?: 'selected' }}>{{ $o->name }} <{{ $o->author }}></option>
|
2017-03-10 23:25:12 +00:00
|
|
|
@endforeach
|
|
|
|
</select>
|
2017-10-07 04:57:53 +00:00
|
|
|
<p class="text-muted small">If you would like to default to settings from another Egg select it from the menu above.</p>
|
2017-03-10 23:25:12 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="pConfigStop" class="form-label">Stop Command</label>
|
2017-10-07 04:57:53 +00:00
|
|
|
<input type="text" id="pConfigStop" name="config_stop" class="form-control" value="{{ $egg->config_stop }}" />
|
2017-03-10 23:25:12 +00:00
|
|
|
<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>
|
2017-10-07 04:57:53 +00:00
|
|
|
<textarea data-action="handle-tabs" id="pConfigLogs" name="config_logs" class="form-control" rows="6">{{ ! is_null($egg->config_logs) ? json_encode(json_decode($egg->config_logs), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) : '' }}</textarea>
|
2017-03-10 23:25:12 +00:00
|
|
|
<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>
|
2017-10-07 04:57:53 +00:00
|
|
|
<textarea data-action="handle-tabs" id="pConfigFiles" name="config_files" class="form-control" rows="6">{{ ! is_null($egg->config_files) ? json_encode(json_decode($egg->config_files), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) : '' }}</textarea>
|
2017-03-10 23:25:12 +00:00
|
|
|
<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>
|
2017-10-07 04:57:53 +00:00
|
|
|
<textarea data-action="handle-tabs" id="pConfigStartup" name="config_startup" class="form-control" rows="6">{{ ! is_null($egg->config_startup) ? json_encode(json_decode($egg->config_startup), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) : '' }}</textarea>
|
2017-03-10 23:25:12 +00:00
|
|
|
<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>
|
2017-03-12 05:00:06 +00:00
|
|
|
</div>
|
2017-03-10 23:25:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="box-footer">
|
|
|
|
{!! csrf_field() !!}
|
2017-08-12 20:29:01 +00:00
|
|
|
<button id="deleteButton" type="submit" name="_method" value="DELETE" class="btn btn-danger btn-sm muted muted-hover">
|
2017-03-12 05:00:06 +00:00
|
|
|
<i class="fa fa-trash-o"></i>
|
|
|
|
</button>
|
2017-10-07 04:57:53 +00:00
|
|
|
<button type="submit" name="_method" value="PATCH" class="btn btn-primary btn-sm pull-right">Save</button>
|
|
|
|
<a href="{{ route('admin.nests.egg.export', ['option' => $egg->id]) }}" class="btn btn-sm btn-info pull-right" style="margin-right:10px;">Export</a>
|
2017-03-10 23:25:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('footer-scripts')
|
|
|
|
@parent
|
|
|
|
<script>
|
2017-03-12 05:00:06 +00:00
|
|
|
$('#pConfigFrom').select2();
|
|
|
|
$('#deleteButton').on('mouseenter', function (event) {
|
2017-10-09 02:36:22 +00:00
|
|
|
$(this).find('i').html(' Delete Egg');
|
2017-03-12 05:00:06 +00:00
|
|
|
}).on('mouseleave', function (event) {
|
|
|
|
$(this).find('i').html('');
|
|
|
|
});
|
2017-03-10 23:25:12 +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
|