[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
155
resources/views/admin/eggs/new.blade.php
Normal file
155
resources/views/admin/eggs/new.blade.php
Normal file
|
@ -0,0 +1,155 @@
|
|||
{{-- 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')
|
||||
Nests → New Egg
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>New Egg<small>Create a new Egg to assign to servers.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li><a href="{{ route('admin.nests') }}">Nests</a></li>
|
||||
<li class="active">New Egg</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<form action="{{ route('admin.nests.egg.new') }}" method="POST">
|
||||
<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">
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pName" class="form-label">Name</label>
|
||||
<input type="text" id="pName" name="name" value="{{ old('name') }}" class="form-control" />
|
||||
<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>
|
||||
</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>
|
||||
<p class="text-muted small">A description of this Egg.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="pDockerImage" class="control-label">Docker Image</label>
|
||||
<input type="text" id="pDockerImage" name="docker_image" value="{{ old('docker_image') }}" placeholder="quay.io/pterodactyl/service" 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.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pStartup" class="control-label">Startup Command</label>
|
||||
<textarea id="pStartup" name="startup" class="form-control" rows="14">{{ old('startup') }}</textarea>
|
||||
<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>
|
||||
</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>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>
|
||||
</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="">None</option>
|
||||
</select>
|
||||
<p class="text-muted small">If you would like to default to settings from another Egg select it from the dropdown 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="{{ 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>
|
||||
<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>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<button type="submit" class="btn btn-success btn-sm pull-right">Create</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('vendor/lodash/lodash.js') !!}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#pNestId').select2().change();
|
||||
$('#pConfigFrom').select2();
|
||||
});
|
||||
$('#pNestId').on('change', function (event) {
|
||||
$('#pConfigFrom').html('<option value="">None</option>').select2({
|
||||
data: $.map(_.get(Pterodactyl.nests, $(this).val() + '.eggs', []), function (item) {
|
||||
return {
|
||||
id: item.id,
|
||||
text: item.name + ' <' + item.author + '>',
|
||||
};
|
||||
}),
|
||||
});
|
||||
});
|
||||
$('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
|
122
resources/views/admin/eggs/scripts.blade.php
Normal file
122
resources/views/admin/eggs/scripts.blade.php
Normal file
|
@ -0,0 +1,122 @@
|
|||
{{-- 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')
|
||||
Nests → Egg: {{ $egg->name }} → Scripts
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>{{ $egg->name }}<small>Manage install and upgrade scripts for this Egg.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li><a href="{{ route('admin.nests') }}">Service</a></li>
|
||||
<li><a href="{{ route('admin.nests.view', $egg->nest->id) }}">{{ $egg->nest->name }}</a></li>
|
||||
<li class="active">{{ $egg->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><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 class="active"><a href="{{ route('admin.nests.egg.scripts', $egg->id) }}">Scripts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="{{ route('admin.nests.egg.scripts', $egg->id) }}" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Install Script</h3>
|
||||
</div>
|
||||
@if(! is_null($egg->copyFrom))
|
||||
<div class="box-body">
|
||||
<div class="callout callout-warning no-margin">
|
||||
This service option is copying installation scripts and container options from <a href="{{ route('admin.nests.egg.view', $egg->copyFrom->id) }}">{{ $egg->copyFrom->name }}</a>. Any changes you make to this script will not apply unless you select "None" from the dropdown box below.
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding">
|
||||
<div id="editor_install"style="height:300px">{{ $egg->script_install }}</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="control-label">Copy Script From</label>
|
||||
<select id="pCopyScriptFrom" name="copy_script_from">
|
||||
<option value="">None</option>
|
||||
@foreach($copyFromOptions as $opt)
|
||||
<option value="{{ $opt->id }}" {{ $egg->copy_script_from !== $opt->id ?: 'selected' }}>{{ $opt->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<p class="text-muted small">If selected, script above will be ignored and script from selected option will be used in place.</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="control-label">Script Container</label>
|
||||
<input type="text" name="script_container" class="form-control" value="{{ $egg->script_container }}" />
|
||||
<p class="text-muted small">Docker container to use when running this script for the server.</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="control-label">Script Entrypoint Command</label>
|
||||
<input type="text" name="script_entry" class="form-control" value="{{ $egg->script_entry }}" />
|
||||
<p class="text-muted small">The entrypoint command to use for this script.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-muted">
|
||||
The following service options rely on this script:
|
||||
@if(count($relyOnScript) > 0)
|
||||
@foreach($relyOnScript as $rely)
|
||||
<a href="{{ route('admin.nests.egg.view', $rely->id) }}">
|
||||
<code>{{ $rely->name }}</code>@if(!$loop->last), @endif
|
||||
</a>
|
||||
@endforeach
|
||||
@else
|
||||
<em>none</em>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<textarea name="script_install" class="hidden"></textarea>
|
||||
<button type="submit" name="_method" value="PATCH" class="btn btn-primary btn-sm pull-right">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('vendor/ace/ace.js') !!}
|
||||
{!! Theme::js('vendor/ace/ext-modelist.js') !!}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#pCopyScriptFrom').select2();
|
||||
|
||||
const InstallEditor = ace.edit('editor_install');
|
||||
const Modelist = ace.require('ace/ext/modelist')
|
||||
|
||||
InstallEditor.setTheme('ace/theme/chrome');
|
||||
InstallEditor.getSession().setMode('ace/mode/sh');
|
||||
InstallEditor.getSession().setUseWrapMode(true);
|
||||
InstallEditor.setShowPrintMargin(false);
|
||||
|
||||
$('form').on('submit', function (e) {
|
||||
$('textarea[name="script_install"]').val(InstallEditor.getValue());
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
161
resources/views/admin/eggs/variables.blade.php
Normal file
161
resources/views/admin/eggs/variables.blade.php
Normal file
|
@ -0,0 +1,161 @@
|
|||
{{-- 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')
|
||||
Egg → {{ $egg->name }} → Variables
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>{{ $egg->name }}<small>Managing variables for this Egg.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<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><a href="{{ route('admin.nests.egg.view', $egg->id) }}">{{ $egg->name }}</a></li>
|
||||
<li class="active">Variables</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><a href="{{ route('admin.nests.egg.view', $egg->id) }}">Configuration</a></li>
|
||||
<li class="active"><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>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box no-border">
|
||||
<div class="box-body">
|
||||
<a href="#" class="btn btn-sm btn-success pull-right" data-toggle="modal" data-target="#newVariableModal">Create New Variable</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@foreach($egg->variables as $variable)
|
||||
<div class="col-sm-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $variable->name }}</h3>
|
||||
</div>
|
||||
<form action="{{ route('admin.nests.egg.variables.edit', ['id' => $egg->id, 'variable' => $variable->id]) }}" method="POST">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label class="form-label">Name</label>
|
||||
<input type="text" name="name" value="{{ $variable->name }}" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label">Description</label>
|
||||
<textarea name="description" class="form-control" rows="3">{{ $variable->description }}</textarea>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label">Environment Variable</label>
|
||||
<input type="text" name="env_variable" value="{{ $variable->env_variable }}" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label">Default Value</label>
|
||||
<input type="text" name="default_value" value="{{ $variable->default_value }}" class="form-control" />
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<p class="text-muted small">This variable can be accessed in the startup command by using <code>{{ $variable->env_variable }}</code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label">Permissions</label>
|
||||
<select name="options[]" class="pOptions form-control" multiple>
|
||||
<option value="user_viewable" {{ (! $variable->user_viewable) ?: 'selected' }}>Users Can View</option>
|
||||
<option value="user_editable" {{ (! $variable->user_editable) ?: 'selected' }}>Users Can Edit</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label">Input Rules</label>
|
||||
<input type="text" name="rules" class="form-control" value="{{ $variable->rules }}" />
|
||||
<p class="text-muted small">These rules are defined using standard <a href="https://laravel.com/docs/5.7/validation#available-validation-rules" target="_blank">Laravel Framework validation rules</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<button class="btn btn-sm btn-primary pull-right" name="_method" value="PATCH" type="submit">Save</button>
|
||||
<button class="btn btn-sm btn-danger pull-left muted muted-hover" data-action="delete" name="_method" value="DELETE" type="submit"><i class="fa fa-trash-o"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="modal fade" id="newVariableModal" tabindex="-1" role="dialog">
|
||||
<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">Create New Egg Variable</h4>
|
||||
</div>
|
||||
<form action="{{ route('admin.nests.egg.variables', $egg->id) }}" method="POST">
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Name <span class="field-required"></span></label>
|
||||
<input type="text" name="name" class="form-control" value="{{ old('name') }}"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">Description</label>
|
||||
<textarea name="description" class="form-control" rows="3">{{ old('description') }}</textarea>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="control-label">Environment Variable <span class="field-required"></span></label>
|
||||
<input type="text" name="env_variable" class="form-control" value="{{ old('env_variable') }}" />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="control-label">Default Value</label>
|
||||
<input type="text" name="default_value" class="form-control" value="{{ old('default_value') }}" />
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<p class="text-muted small">This variable can be accessed in the startup command by entering <code>@{{environment variable value}}</code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">Permissions</label>
|
||||
<select name="options[]" class="pOptions form-control" multiple>
|
||||
<option value="user_viewable">Users Can View</option>
|
||||
<option value="user_editable">Users Can Edit</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">Input Rules <span class="field-required"></span></label>
|
||||
<input type="text" name="rules" class="form-control" value="{{ old('rules', 'required|string|max:20') }}" placeholder="required|string|max:20" />
|
||||
<p class="text-muted small">These rules are defined using standard <a href="https://laravel.com/docs/5.7/validation#available-validation-rules" target="_blank">Laravel Framework validation rules</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{!! csrf_field() !!}
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">Create Variable</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('.pOptions').select2();
|
||||
$('[data-action="delete"]').on('mouseenter', function (event) {
|
||||
$(this).find('i').html(' Delete Variable');
|
||||
}).on('mouseleave', function (event) {
|
||||
$(this).find('i').html('');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
200
resources/views/admin/eggs/view.blade.php
Normal file
200
resources/views/admin/eggs/view.blade.php
Normal file
|
@ -0,0 +1,200 @@
|
|||
{{-- 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')
|
||||
Nests → Egg: {{ $egg->name }}
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>{{ $egg->name }}<small>{{ str_limit($egg->description, 50) }}</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<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>
|
||||
</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.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>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="alert alert-info">
|
||||
<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.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="{{ route('admin.nests.egg.view', $egg->id) }}" enctype="multipart/form-data" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-danger">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<div class="form-group no-margin-bottom">
|
||||
<label for="pName" class="control-label">Egg File</label>
|
||||
<div>
|
||||
<input type="file" name="import_file" class="form-control" style="border: 0;margin-left:-10px;" />
|
||||
<p class="text-muted small no-margin-bottom">If you would like to replace settings for this Egg by uploading a new JSON file, simply select it here and press "Update Egg". This will not change any existing startup strings or Docker images for existing servers.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
{!! csrf_field() !!}
|
||||
<button type="submit" name="_method" value="PUT" class="btn btn-sm btn-danger pull-right">Update Egg</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form action="{{ route('admin.nests.egg.view', $egg->id) }}" method="POST">
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<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>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<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>
|
||||
</div>
|
||||
</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>
|
||||
<div class="form-group">
|
||||
<label for="pStartup" class="control-label">Startup Command <span class="field-required"></span></label>
|
||||
<textarea id="pStartup" name="startup" class="form-control" rows="6">{{ $egg->startup }}</textarea>
|
||||
<p class="text-muted small">The default startup command that should be used for new servers using this Egg.</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 separate option from the 'Copy Settings From' dropdown, in which case fields may be left blank to use the values from that Egg.</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="">None</option>
|
||||
@foreach($egg->nest->eggs as $o)
|
||||
<option value="{{ $o->id }}" {{ ($egg->config_from !== $o->id) ?: 'selected' }}>{{ $o->name }} <{{ $o->author }}></option>
|
||||
@endforeach
|
||||
</select>
|
||||
<p class="text-muted small">If you would like to default to settings from another Egg select it 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="{{ $egg->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($egg->config_logs) ? json_encode(json_decode($egg->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 whether 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($egg->config_files) ? json_encode(json_decode($egg->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($egg->config_startup) ? json_encode(json_decode($egg->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 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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="alert alert-info">
|
||||
<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.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('#pConfigFrom').select2();
|
||||
$('#deleteButton').on('mouseenter', function (event) {
|
||||
$(this).find('i').html(' Delete Egg');
|
||||
}).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
|
Reference in a new issue