Remove old views no longer in use.

This commit is contained in:
Dane Everitt 2017-03-12 16:29:04 -04:00
parent f5a4ec981d
commit 37a723aa58
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
9 changed files with 0 additions and 1084 deletions

View file

@ -1,180 +0,0 @@
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.admin')
@section('title')
Manage Service Configuration
@endsection
@section('content')
<div class="col-md-12">
<ul class="breadcrumb">
<li><a href="/admin">Admin Control</a></li>
<li><a href="/admin/services">Services</a></li>
<li><a href="{{ route('admin.services.service', $service->id) }}">{{ $service->name }}</a></li>
<li class="active">Configuration</li>
</ul>
<h3 class="nopad">Service Configuration</h3><hr />
<ul class="nav nav-tabs tabs_with_panel" id="config_tabs">
<li class="active"><a href="#tab_main" data-toggle="tab">main.json</a></li>
<li><a href="#tab_index" data-toggle="tab">index.js</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_main">
<div class="panel panel-default">
<div class="panel-heading"></div>
<div class="panel-body" style="padding-top:0;">
<div class="row" style="border-bottom:1px solid #ccc;">
<div class="col-md-12" style="margin:0; padding:0;">
<div id="editor_json" style="height:500px;">{{ $contents['json'] }}</div>
</div>
</div>
<div class="row" style="margin-top:15px;">
<div class="col-md-12">
<button type="submit" id="save_json" class="btn btn-sm btn-success">Save Configuration</button>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="tab_index">
<div class="panel panel-default">
<div class="panel-heading"></div>
<div class="panel-body" style="padding-top:0;">
<div class="row" style="border-bottom:1px solid #ccc;">
<div class="col-md-12" style="margin:0; padding:0;">
<div id="editor_index" style="height:500px;">{{ $contents['index'] }}</div>
</div>
</div>
<div class="row" style="margin-top:15px;">
<div class="col-md-12">
<button type="submit" id="save_index" class="btn btn-sm btn-success">Save Scripting</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{!! Theme::js('js/vendor/ace/ace.js') !!}
{!! Theme::js('js/vendor/ace/ext-modelist.js') !!}
<script>
$(document).ready(function () {
$('#sidebar_links').find("a[href='/admin/services']").addClass('active');
const JsonEditor = ace.edit('editor_json');
const IndexEditor = ace.edit('editor_index');
const Modelist = ace.require('ace/ext/modelist')
JsonEditor.setTheme('ace/theme/chrome');
JsonEditor.getSession().setMode('ace/mode/json');
JsonEditor.getSession().setUseWrapMode(true);
JsonEditor.setShowPrintMargin(false);
IndexEditor.setTheme('ace/theme/chrome');
IndexEditor.getSession().setMode('ace/mode/javascript');
IndexEditor.getSession().setUseWrapMode(true);
IndexEditor.setShowPrintMargin(false);
JsonEditor.commands.addCommand({
name: 'save',
bindKey: {win: 'Ctrl-S', mac: 'Command-S'},
exec: function(editor) {
saveConfig();
},
readOnly: false
});
IndexEditor.commands.addCommand({
name: 'save',
bindKey: {win: 'Ctrl-S', mac: 'Command-S'},
exec: function(editor) {
saveIndex();
},
readOnly: false
});
$('#save_json').on('click', function (e) {
e.preventDefault();
saveConfig();
});
$('#save_index').on('click', function (e) {
e.preventDefault();
saveIndex();
});
function saveConfig() {
$('#save_json').append(' <i class="fa fa-spinner fa fa-spin"></i>').addClass('disabled');
$.ajax({
type: 'POST',
url: '{{ route('admin.services.service.config', $service->id) }}',
headers: { 'X-CSRF-Token': '{{ csrf_token() }}' },
data: {
file: 'main',
contents: JsonEditor.getValue()
}
}).done(function (data) {
$.notify({
message: 'Service configuration file has been saved successfully.'
}, {
type: 'success'
});
}).fail(function (jqXHR) {
$.notify({
message: jqXHR.responseText
}, {
type: 'danger'
});
}).always(function () {
$('#save_json').html('Save Configuration').removeClass('disabled');
});
}
function saveIndex() {
$('#save_json').append(' <i class="fa fa-spinner fa fa-spin"></i>').addClass('disabled');
$.ajax({
type: 'POST',
url: '{{ route('admin.services.service.config', $service->id) }}',
headers: { 'X-CSRF-Token': '{{ csrf_token() }}' },
data: {
file: 'index',
contents: IndexEditor.getValue()
}
}).done(function (data) {
$.notify({
message: 'Service scripting file has been saved successfully.'
}, {
type: 'success'
});
}).fail(function (jqXHR) {
$.notify({
message: jqXHR.responseText
}, {
type: 'danger'
});
}).always(function () {
$('#save_json').html('Save Scripting').removeClass('disabled');
});
}
});
</script>
@endsection

View file

@ -1,65 +0,0 @@
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.admin')
@section('title')
Manage Services
@endsection
@section('content')
<div class="col-md-12">
<ul class="breadcrumb">
<li><a href="/admin">Admin Control</a></li>
<li class="active">Services</li>
</ul>
<h3 class="nopad">Server Services</h3><hr />
<table class="table table-bordered table-hover">
<thead>
<tr>
<th class="col-md-3">Service Type</th>
<th>Description</th>
<th class="text-center">Servers</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach ($services as $service)
<tr>
<td><a href="{{ route('admin.services.service', $service->id) }}">{{ $service->name }}</a></td>
<td>{!! $service->description !!}</td>
<td class="text-center">{{ $service->servers_count }}</td>
<td class="text-center align-middle"><a href="{{ route('admin.services.service.config', $service->id) }}"><button class="btn btn-xxs btn-primary"><i class="fa fa-wrench"></i> Configure</button></a></td>
</tr>
@endforeach
<tr>
<td></td>
<td></td>
<td></td>
<td class="text-center"><a href="{{ route('admin.services.new') }}"><i class="fa fa-plus"></i></a></td>
</tr>
</tbody>
</table>
</div>
<script>
$(document).ready(function () {
$('#sidebar_links').find("a[href='/admin/services']").addClass('active');
});
</script>
@endsection

View file

@ -1,95 +0,0 @@
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.admin')
@section('title')
New Service
@endsection
@section('content')
<div class="col-md-12">
<ul class="breadcrumb">
<li><a href="/admin">Admin Control</a></li>
<li><a href="{{ route('admin.services') }}">Services</a></li>
<li class="active">New Service</li>
</ul>
<h3 class="nopad">Add New Service</h3><hr />
<form action="{{ route('admin.services.new') }}" method="POST">
<div class="row">
<div class="col-md-6 form-group">
<label class="control-label">Service 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="col-md-6 form-group">
<label class="control-label">Service Description:</label>
<div>
<textarea name="description" class="form-control" rows="4">{{ old('description') }}</textarea>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 form-group">
<label class="control-label">Service Configuration File:</label>
<div class="input-group">
<span class="input-group-addon">/src/services/</span>
<input type="text" name="file" class="form-control" value="{{ old('file') }}" />
<span class="input-group-addon">/index.js</span>
</div>
<p class="text-muted"><small>This should be a unique alpha-numeric <code>(a-z)</code> name used to identify the service.</small></p>
</div>
<div class="col-md-6 form-group">
<label class="control-label">Display Executable:</label>
<div>
<input type="text" name="executable" class="form-control" value="{{ old('executable') }}" />
</div>
<p class="text-muted"><small>Changing this has no effect on operation of the daemon, it is simply used for display purposes on the panel. This can be changed per-option.</small></p>
</div>
</div>
<div class="row">
<div class="col-md-12 form-group">
<label class="control-label">Default Startup:</label>
<div class="input-group">
<span class="input-group-addon" id="disp_exec"></span>
<input type="text" name="startup" class="form-control" value="{{ old('startup') }}" />
</div>
<p class="text-muted"><small>This is the default startup that will be used for all servers created using this service. This can be changed per-option.</small></p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="alert alert-info">You will be able to add service options and variables once the service is created.</div>
{!! csrf_field() !!}
<input type="submit" class="btn btn-sm btn-primary" value="Add New Service" />
</div>
</div>
</form>
</div>
<script>
$(document).ready(function () {
$('#sidebar_links').find("a[href='/admin/services/new']").addClass('active');
$('input[name="executable"]').on('keyup', function() {
$("#disp_exec").html(escape($(this).val()));
});
});
</script>
@endsection

View file

@ -1,98 +0,0 @@
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.admin')
@section('title')
New Service Option for {{ $service->name }}
@endsection
@section('content')
<div class="col-md-12">
<ul class="breadcrumb">
<li><a href="/admin">Admin Control</a></li>
<li><a href="/admin/services">Services</a></li>
<li><a href="{{ route('admin.services.service', $service->id) }}">{{ $service->name }}</a></li>
<li class="active">New Service Option</li>
</ul>
<h3>Service Option Settings</h3><hr />
<form action="{{ route('admin.services.option.new', $service->id) }}" method="POST">
<div class="row">
<div class="col-md-6 form-group">
<label class="control-label">Name:</label>
<div>
<input type="text" name="name" value="{{ old('name') }}" class="form-control" />
</div>
</div>
<div class="col-md-6 form-group">
<label class="control-label">Description:</label>
<div>
<textarea name="description" class="form-control" rows="3">{{ old('description') }}</textarea>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 form-group">
<label class="control-label">Tag:</label>
<div>
<input type="text" name="tag" value="{{ old('tag') }}" class="form-control" />
</div>
</div>
<div class="col-md-3 form-group">
<label class="control-label">Executable:</label>
<div>
<input type="text" name="executable" value="{{ old('executable') }}" class="form-control" />
<p class="text-muted"><small>Leave blank to use parent executable.</small></p>
</div>
</div>
<div class="col-md-6 form-group">
<label class="control-label">Docker Image:</label>
<div>
<input type="text" name="docker_image" value="{{ old('docker_image') }}" class="form-control" />
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 form-group">
<label class="control-label">Default Startup Command:</label>
<div>
<input type="text" name="startup" value="{{ old('startup') }}" class="form-control" />
<p class="text-muted"><small>To use the default startup of the parent service simply leave this field blank.</small></p>
</div>
</div>
</div>
<div class="well well-sm">
<div class="row">
<div class="col-md-12">
{!! csrf_field() !!}
<input type="submit" class="btn btn-sm btn-primary" value="Create Service Option" />
</div>
</div>
</div>
</form>
</div>
<script>
$(document).ready(function () {
$('#sidebar_links').find("a[href='/admin/services']").addClass('active');
$('#env_var').on('keyup', function () {
$(this).parent().find('code').html('&#123;&#123;' + escape($(this).val()) + '&#125;&#125;');
});
});
</script>
@endsection

View file

@ -1,211 +0,0 @@
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.admin')
@section('title')
Manage Service Option {{ $option->name }}
@endsection
@section('content')
<div class="col-md-12">
<ul class="breadcrumb">
<li><a href="/admin">Admin Control</a></li>
<li><a href="/admin/services">Services</a></li>
<li><a href="{{ route('admin.services.service', $option->service->id) }}">{{ $option->service->name }}</a></li>
<li class="active">{{ $option->name }}</li>
</ul>
<div class="alert alert-warning"><strong>Warning!</strong> This page contains advanced settings that the panel and daemon use to control servers. Modifying information on this page is not recommended unless you are absolutely sure of what you are doing.</div>
<h3>Settings</h3><hr />
<form action="{{ route('admin.services.option', [$option->service->id, $option->id]) }}" method="POST">
<div class="row">
<div class="col-md-6 form-group">
<label class="control-label">Name:</label>
<div>
<input type="text" name="name" value="{{ old('name', $option->name) }}" class="form-control" />
</div>
</div>
<div class="col-md-6 form-group">
<label class="control-label">Description:</label>
<div>
<textarea name="description" class="form-control" rows="3">{{ old('description', $option->description) }}</textarea>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 form-group">
<label class="control-label">Tag:</label>
<div>
<input type="text" name="tag" value="{{ old('tag', $option->tag) }}" class="form-control" />
</div>
</div>
<div class="col-md-3 form-group">
<label class="control-label">Executable:</label>
<div>
<input type="text" name="executable" value="{{ old('executable', $option->executable) }}" class="form-control" />
<p class="text-muted"><small>Leave blank to use parent executable.</small></p>
</div>
</div>
<div class="col-md-6 form-group">
<label class="control-label">Docker Image:</label>
<div>
<input type="text" name="docker_image" value="{{ old('docker_image', $option->docker_image) }}" class="form-control" />
<p class="text-muted"><small>Changing the docker image will only effect servers created or modified after this point.</small></p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 form-group">
<label class="control-label">Default Startup Command:</label>
<div>
<input type="text" name="startup" value="{{ old('startup', $option->startup) }}" placeholder="{{ $option->service->startup }}" class="form-control" />
<p class="text-muted"><small>To use the default startup of the parent service simply leave this field blank.</small></p>
</div>
</div>
</div>
<div class="well well-sm">
<div class="row">
<div class="col-md-12">
{!! csrf_field() !!}
<input type="submit" class="btn btn-sm btn-primary" value="Update Service Option" />
</div>
</div>
</div>
</form>
<h3>Variables <small><a href="{{ route('admin.services.option.variable.new', [$option->service->id, $option->id]) }}"><i class="fa fa-plus"></i></a></small></h3><hr />
@foreach($option->variables as $variable)
<form action="{{ route('admin.services.option.variable', [$option->service->id, $option->id, $variable->id]) }}" method="POST">
<div class="well">
<div class="row">
<div class="col-md-6 form-group">
<label class="control-label">Variable Name:</label>
<div>
<input type="text" name="{{ $variable->id }}_name" class="form-control" value="{{ old($variable->id.'_name', $variable->name) }}" />
</div>
</div>
<div class="col-md-6 form-group">
<label class="control-label">Variable Description:</label>
<div>
<textarea name="{{ $variable->id }}_description" class="form-control" rows="2">{{ old($variable->id.'_description', $variable->description) }}</textarea>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 form-group">
<label class="control-label">Environment Variable:</label>
<div>
<input type="text" name="{{ $variable->id }}_env_variable" id="env_var" class="form-control" value="{{ old($variable->id.'_env_variable', $variable->env_variable) }}" />
<p class="text-muted"><small>Accessed in startup by using <code>&#123;&#123;{{ $variable->env_variable }}&#125;&#125;</code> prameter.</small></p>
</div>
</div>
<div class="col-md-4 form-group">
<label class="control-label">Default Value:</label>
<div>
<input type="text" name="{{ $variable->id }}_default_value" class="form-control" value="{{ old($variable->id.'_default_value', $variable->default_value) }}" />
<p class="text-muted"><small>The default value to use for this field.</small></p>
</div>
</div>
<div class="col-md-4 form-group">
<label class="control-label">Regex:</label>
<div>
<input type="text" name="{{ $variable->id }}_regex" class="form-control" value="{{ old($variable->id.'_regex', $variable->regex) }}" />
<p class="text-muted"><small>Regex code to use when verifying the contents of the field.</small></p>
</div>
</div>
</div>
<div class="row fuelux">
<div class="col-md-4">
<div class="checkbox highlight">
<label class="checkbox-custom highlight" data-initialize="checkbox">
<input class="sr-only" name="{{ $variable->id }}_user_viewable" type="checkbox" value="1" @if((int) old($variable->id.'_user_viewable', $variable->user_viewable) === 1)checked="checked"@endif> <strong>User Viewable</strong>
<p class="text-muted"><small>Can users view this variable?</small><p>
</label>
</div>
</div>
<div class="col-md-4">
<div class="checkbox highlight">
<label class="checkbox-custom highlight" data-initialize="checkbox">
<input class="sr-only" name="{{ $variable->id }}_user_editable" type="checkbox" value="1" @if((int) old($variable->id.'_user_editable', $variable->user_editable) === 1)checked="checked"@endif> <strong>User Editable</strong>
<p class="text-muted"><small>Can users edit this variable?</small><p>
</label>
</div>
</div>
<div class="col-md-4">
<div class="checkbox highlight">
<label class="checkbox-custom highlight" data-initialize="checkbox">
<input class="sr-only" name="{{ $variable->id }}_required" type="checkbox" value="1" @if((int) old($variable->id.'_required', $variable->required) === 1)checked="checked"@endif> <strong>Required</strong>
<p class="text-muted"><small>This this variable required?</small><p>
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
{!! csrf_field() !!}
<a href="{{ route('admin.services.option.variable.delete', [$option->service->id, $option->id, $variable->id]) }}"><button type="button" class="btn btn-sm btn-danger pull-right"><i class="fa fa-times"></i></button></a>
<input type="submit" class="btn btn-sm btn-success" value="Update Variable" />
</div>
</div>
</div>
</form>
@endforeach
<h3>Servers</h3><hr />
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Name</th>
<th>Owner</th>
<th>Updated</th>
</tr>
</thead>
<tbody>
@foreach ($option->servers as $server)
<tr>
<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>
<td><a href="{{ route('admin.users.view', $server->owner_id) }}">{{ $server->user->email }}</a></td>
<td>{{ $server->updated_at }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="text-center">
{!! $option->servers->render() !!}
</div>
<form action="{{ route('admin.services.option', [$option->service->id, $option->id]) }}" method="POST">
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger">
Deleting an option is an irreversible action. An option can <em>only</em> be deleted if no servers are associated with it.
</div>
{!! csrf_field() !!}
{!! method_field('DELETE') !!}
<input type="submit" class="btn btn-sm btn-danger pull-right" value="Delete Option" />
</div>
</div>
</form>
</div>
<script>
$(document).ready(function () {
$('#sidebar_links').find("a[href='/admin/services']").addClass('active');
$('#env_var').on('keyup', function () {
$(this).parent().find('code').html('&#123;&#123;' + escape($(this).val()) + '&#125;&#125;');
});
});
</script>
@endsection

View file

@ -1,135 +0,0 @@
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.admin')
@section('title')
Manage Service
@endsection
@section('content')
<div class="col-md-12">
<ul class="breadcrumb">
<li><a href="/admin">Admin Control</a></li>
<li><a href="/admin/services">Services</a></li>
<li class="active">{{ $service->name }}</li>
</ul>
<h3 class="nopad">Service Options</h3><hr />
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Option Name</th>
<th>Description</th>
<th>Tag</th>
<th class="text-center">Servers</th>
</tr>
</thead>
<tbody>
@foreach($service->options as $option)
<tr>
<td><a href="{{ route('admin.services.option', [ $service->id, $option->id]) }}">{{ $option->name }}</a></td>
<td>{!! $option->description !!}</td>
<td><code>{{ $option->tag }}</code></td>
<td class="text-center">{{ $option->servers->count() }}</td>
</tr>
@endforeach
<tr>
<td></td>
<td></td>
<td></td>
<td class="text-center"><a href="{{ route('admin.services.option.new', $service->id) }}"><i class="fa fa-plus"></i></a></td>
</tr>
</tbody>
</table>
<div class="well">
<form action="{{ route('admin.services.service', $service->id) }}" method="POST">
<div class="row">
<div class="col-md-6 form-group">
<label class="control-label">Service Name:</label>
<div>
<input type="text" name="name" class="form-control" value="{{ old('name', $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="col-md-6 form-group">
<label class="control-label">Service Description:</label>
<div>
<textarea name="description" class="form-control" rows="4">{{ old('description', $service->description) }}</textarea>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 form-group">
<label class="control-label">Service Configuration File:</label>
<div class="input-group">
<span class="input-group-addon">/src/services/</span>
<input type="text" name="file" class="form-control" value="{{ old('file', $service->file) }}" />
<span class="input-group-addon">/index.js</span>
</div>
<p class="text-muted"><small>This should be the name of the folder on the daemon that contains all of the service logic. Changing this can have unintended effects on servers or causes errors to occur.</small></p>
</div>
<div class="col-md-6 form-group">
<label class="control-label">Display Executable:</label>
<div>
<input type="text" name="executable" class="form-control" value="{{ old('executable', $service->executable) }}" />
</div>
<p class="text-muted"><small>Changing this has no effect on operation of the daemon, it is simply used for display purposes on the panel. This can be changed per-option.</small></p>
</div>
</div>
<div class="row">
<div class="col-md-12 form-group">
<label class="control-label">Default Startup:</label>
<div class="input-group">
<span class="input-group-addon" id="disp_exec">{{ $service->executable }}</span>
<input type="text" name="startup" class="form-control" value="{{ old('startup', $service->startup) }}" />
</div>
<p class="text-muted"><small>This is the default startup that will be used for all servers created using this service. This can be changed per-option.</small></p>
</div>
</div>
<div class="row">
<div class="col-md-12">
{!! csrf_field() !!}
<input type="submit" class="btn btn-sm btn-primary" value="Save Changes" />
<a href="{{ route('admin.services.service.config', $service->id) }}"><button type="button" class="pull-right btn btn-sm btn-default">Manage Configuration</button></a>
</div>
</div>
</form>
</div>
<form action="{{ route('admin.services.service', $service->id) }}" method="POST">
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger">
Deleting a service is an irreversible action. A service can <em>only</em> be deleted if no servers are associated with it.
</div>
{!! csrf_field() !!}
{!! method_field('DELETE') !!}
<input type="submit" class="btn btn-sm btn-danger pull-right" value="Delete Service" />
</div>
</div>
</form>
</div>
<script>
$(document).ready(function () {
$('#sidebar_links').find("a[href='/admin/services']").addClass('active');
$('input[name="executable"]').on('keyup', function() {
$("#disp_exec").html(escape($(this).val()));
});
});
</script>
@endsection

View file

@ -1,37 +0,0 @@
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.master')
@section('title', '403: Forbidden')
@section('content')
<div class="col-md-12">
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title">HTTP 403: Access Denied</h3>
</div>
<div class="panel-body">
<p style="margin-bottom:0;">You do not have permission to access that function. Please contact your server administrator to request permission.</p>
</div>
</div>
<p style="text-align:center;"><img src="{{ Theme::url('images/403.jpg') }}" /></p>
<p style="text-align:center;"><a href="{{ URL::previous() }}">Take me back</a> or <a href="/">go home</a>.</p>
</div>
@endsection

View file

@ -1,37 +0,0 @@
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.master')
@section('title', '404: Not Found')
@section('right-nav')
@endsection
@section('sidebar')
@endsection
@section('content')
<div class="col-md-8">
<h1 class="text-center">404 - File Not Found</h1>
<p class="text-center"><img src="{{ Theme::url('images/404.jpg') }}" /></p>
<p class="text-center"><a href="{{ URL::previous() }}">Take me back</a> or <a href="/">go home</a>.</p>
</div>
@endsection

View file

@ -1,226 +0,0 @@
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
<!DOCTYPE html>
<html lang="en">
<head>
@section('scripts')
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex">
{!! Theme::css('css/vendor/bootstrap/bootstrap.css') !!}
{!! Theme::css('css/pterodactyl.css') !!}
{!! Theme::css('css/animate.css') !!}
{!! Theme::css('css/vendor/fontawesome/font-awesome.min.css') !!}
{!! Theme::css('css/vendor/sweetalert/sweetalert.min.css') !!}
{!! Theme::css('css/vendor/fuelux/fuelux.min.css') !!}
{!! Theme::js('js/vendor/jquery/jquery.min.js') !!}
{!! Theme::js('js/vendor/bootstrap/bootstrap.min.js') !!}
{!! Theme::js('js/vendor/sweetalert/sweetalert.min.js') !!}
{!! Theme::js('js/vendor/fuelux/fuelux.min.js') !!}
{!! Theme::js('js/admin.min.js') !!}
{!! Theme::js('js/bootstrap-notify.min.js') !!}
<script>
$(document).ready(function () {
$.notifyDefaults({
placement: {
from: 'bottom',
align: 'right'
},
newest_on_top: true,
delay: 2000,
animate: {
enter: 'animated fadeInUp',
exit: 'animated fadeOutDown'
}
});
});
</script>
@show
<title>{{ Settings::get('company') }} - @yield('title')</title>
</head>
<body>
<div class="container">
<div class="navbar navbar-default">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">{{ Settings::get('company', 'Pterodactyl Panel') }}</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
@section('navbar-links')
<ul class="nav navbar-nav hidden-md hidden-lg">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Management <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/admin">Admin Index</a></li>
<li><a href="/admin/settings">General Settings</a></li>
<li><a href="/admin/databases">Database Management</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Users <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/admin/users">Find Account</a></li>
<li><a href="/admin/users/new">New Account</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Servers <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/admin/servers">Find Server</a></li>
<li><a href="/admin/servers/new">New Server</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Nodes <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/admin/nodes">List Nodes</a></li>
<li><a href="/admin/locations">Manage Locations</a></li>
<li><a href="/admin/nodes/new">New Node</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Services <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/admin/services/packs">Service Packs</a></li>
<li><a href="/admin/services">List Services</a></li>
<li><a href="/admin/services/new">Add Service</a></li>
</ul>
</li>
</ul>
@show
@section('right-nav')
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ trans('strings.language') }}<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/language/de">Deutsch</a></li>
<li><a href="/language/en">English</a></li>
<!-- <li><a href="/language/es">Espa&ntilde;ol</a></li>
<li><a href="/language/fr">Fran&ccedil;ais</a></li>
<li><a href="/language/it">Italiano</a></li>
<li><a href="/language/pl">Polski</a></li> -->
<li><a href="/language/pt">Portugu&ecirc;s</a></li>
<!-- <li><a href="/language/ru">&#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;</a></li>
<li><a href="/language/se">Svenska</a></li>
<li><a href="/language/zh">&#20013;&#22269;&#30340;的</a></li> -->
</ul>
</li>
<li class="hidden-xs"><a href="/"><i class="fa fa-server"></i></a></li>
<li class="visible-xs"><a href="/"><i class="fa fa-server"></i> Server View</a></li>
<li class="hidden-xs"><a href="/auth/logout"><i class="fa fa-power-off"></i></a></li>
<li class="visible-xs"><a href="/auth/logout"><i class="fa fa-power-off"></i> Logout</a></li>
</ul>
@show
</div>
</div>
<!-- Add Back Mobile Support -->
<div class="row">
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar_links">
@section('sidebar')
<div class="list-group">
<a href="#" class="list-group-item list-group-item-heading"><strong>Management</strong></a>
<a href="/admin" id="sidenav_admin-index" class="list-group-item">Admin Index</a>
<a href="/admin/settings" class="list-group-item">General Settings</a>
<a href="/admin/databases" class="list-group-item">Database Management</a>
</div>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-heading"><strong>Account Management</strong></a>
<a href="/admin/users" class="list-group-item">Find Account</a>
<a href="/admin/users/new" class="list-group-item">New Account</a>
</div>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-heading"><strong>Server Management</strong></a>
<a href="/admin/servers" class="list-group-item">Find Server</a>
<a href="/admin/servers/new" class="list-group-item">New Server</a>
</div>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-heading"><strong>Node Management</strong></a>
<a href="/admin/nodes" class="list-group-item">List Nodes</a>
<a href="/admin/locations" class="list-group-item">Manage Locations</a>
<a href="/admin/nodes/new" class="list-group-item">Add Node</a>
</div>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-heading"><strong>Service Management</strong></a>
<a href="/admin/services/packs" class="list-group-item">Service Packs</a>
<a href="/admin/services" class="list-group-item">List Services</a>
<a href="/admin/services/new" class="list-group-item">Add Service</a>
</div>
@show
</div>
<div class="col-md-9">
<div class="row">
<div class="col-md-12" id="tpl_messages">
@section('resp-errors')
@if (count($errors) > 0)
<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<strong>{{ trans('strings.whoops') }}!</strong> {{ trans('auth.errorencountered') }}<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@show
@section('resp-alerts')
@foreach (Alert::getMessages() as $type => $messages)
@foreach ($messages as $message)
<div class="alert alert-{{ $type }} alert-dismissable" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
{!! $message !!}
</div>
@endforeach
@endforeach
@show
</div>
</div>
<div class="row">
@yield('content')
</div>
</div>
</div>
<div class="footer">
<div class="row" style="margin-bottom:15px;">
<div class="col-md-12">
Copyright &copy; 2015 - {{ date('Y') }} <a href="https://github.com/Pterodactyl/Panel" target="_blank">Pterodactyl Software &amp; Design</a>.<br />
Pterodactyl is licensed under a <a href="https://opensource.org/licenses/MIT" target="_blank">MIT</a> license. <!-- Please do not remove this license notice. We can't stop you though... :) -->
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
@if (count($errors) > 0)
@foreach ($errors->all() as $error)
<?php preg_match('/^The\s(.*?)\sfield/', $error, $matches) ?>
@if (isset($matches[1]))
$('[name="{{ str_replace(' ', '_', $matches[1]) }}"]').parent().parent().addClass('has-error');
@endif
@endforeach
@endif
});
</script>
</body>
</html>