Thats enough re-theming for the day...
This commit is contained in:
parent
911434d033
commit
b926d432e8
15 changed files with 733 additions and 38 deletions
71
resources/themes/pterodactyl/admin/index.blade.php
Normal file
71
resources/themes/pterodactyl/admin/index.blade.php
Normal file
|
@ -0,0 +1,71 @@
|
|||
{{-- 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')
|
||||
Administration
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>Administrative Overview<small>A quick glance at your system.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li class="active">Index</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box
|
||||
@if(Version::isLatestPanel())
|
||||
box-success
|
||||
@else
|
||||
box-danger
|
||||
@endif
|
||||
">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">System Information</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if (Version::isLatestPanel())
|
||||
You are running Pterodactyl Panel version <code>{{ Version::getCurrentPanel() }}</code>. Your panel is up-to-date!
|
||||
@else
|
||||
Your panel is <strong>not up-to-date!</strong> The latest version is <a href="https://github.com/Pterodactyl/Panel/releases/v{{ Version::getPanel() }}" target="_blank"><code>{{ Version::getPanel() }}</code></a> and you are currently running version <code>{{ Version::getCurrentPanel() }}</code>.
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-3 text-center">
|
||||
<a href="{{ Version::getDiscord() }}"><button class="btn btn-warning" style="width:100%;"><i class="fa fa-fw fa-support"></i> Get Help <small>(via Discord)</small></button></a>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 text-center">
|
||||
<a href="https://docs.pterodactyl.io"><button class="btn btn-primary" style="width:100%;"><i class="fa fa-fw fa-link"></i> Documentation</button></a>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 text-center">
|
||||
<a href="https://github.com/Pterodactyl/Panel"><button class="btn btn-primary" style="width:100%;"><i class="fa fa-fw fa-support"></i> Github</button></a>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 text-center">
|
||||
<a href="https://patreon.com/pterry"><button class="btn btn-success" style="width:100%;"><i class="fa fa-fw fa-money"></i> Support the Project</button></a>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
94
resources/themes/pterodactyl/admin/servers/index.blade.php
Normal file
94
resources/themes/pterodactyl/admin/servers/index.blade.php
Normal file
|
@ -0,0 +1,94 @@
|
|||
{{-- 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')
|
||||
List Servers
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>Servers<small>All servers available on the system.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li class="active">Servers</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Server List</h3>
|
||||
<div class="box-tools">
|
||||
<form action="{{ route('admin.servers') }}" method="GET">
|
||||
<div class="input-group input-group-sm" style="width: 300px;">
|
||||
<input type="text" name="query" class="form-control pull-right" value="{{ request()->input('query') }}" placeholder="Search">
|
||||
<div class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
|
||||
<a href="{{ route('admin.servers.new') }}"><button type="button" class="btn btn-sm btn-primary" style="border-radius: 0 3px 3px 0;margin-left:-1px;">Create New</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Server Name</th>
|
||||
<th>Owner</th>
|
||||
<th>Node</th>
|
||||
<th>Connection</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@foreach ($servers as $server)
|
||||
<tr data-server="{{ $server->uuidShort }}">
|
||||
<td><code>{{ $server->uuidShort }}</code></td>
|
||||
<td><a href="/admin/servers/view/{{ $server->id }}">{{ $server->name }}</a></td>
|
||||
<td><a href="/admin/users/view/{{ $server->user->id }}">{{ $server->user->email }}</a></td>
|
||||
<td><a href="/admin/nodes/view/{{ $server->node->id }}">{{ $server->node->name }}</a></td>
|
||||
<td>
|
||||
<code>{{ $server->allocation->alias }}:{{ $server->allocation->port }}</code>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if($server->suspended && ! $server->trashed())
|
||||
<span class="label bg-maroon">Suspended</span>
|
||||
@elseif($server->trashed())
|
||||
<span class="label label-danger">Pending Deletion</span>
|
||||
@elseif(! $server->installed)
|
||||
<span class="label label-warning">Installing</span>
|
||||
@else
|
||||
<span class="label label-success">Active</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer with-border">
|
||||
<div class="col-md-12 text-center">{!! $servers->render() !!}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
230
resources/themes/pterodactyl/admin/servers/new.blade.php
Normal file
230
resources/themes/pterodactyl/admin/servers/new.blade.php
Normal file
|
@ -0,0 +1,230 @@
|
|||
{{-- 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 Server
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>Create Server<small>Add a new server to the panel.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li><a href="{{ route('admin.servers') }}">Servers</a></li>
|
||||
<li class="active">Create Server</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<form action="{{ route('admin.servers.new') }}" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Core Details</h3>
|
||||
</div>
|
||||
<div class="box-body row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="pName">Server Name</label>
|
||||
<input type="text" class="form-control" id="pName" name="name" placeholder="Server Name">
|
||||
<p class="small text-muted no-margin">Character limits: <code>a-z A-Z 0-9 _ - .</code> and <code>[Space]</code> (max 200 characters).</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="pUserId">Server Owner</label>
|
||||
<select class="form-control" style="padding-left:0;" name="user_id" id="pUserId"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="overlay" id="allocationLoader" style="display:none;"><i class="fa fa-refresh fa-spin"></i></div>
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Allocation Management</h3>
|
||||
</div>
|
||||
<div class="box-body row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="pLocationId">Location</label>
|
||||
<select name="location_id" id="pLocationId" class="form-control">
|
||||
<option disabled selected>Select a Location</option>
|
||||
@foreach($locations as $location)
|
||||
<option value="{{ $location->id }}">{{ $location->long }} ({{ $location->short }})</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<p class="small text-muted no-margin">The location in which this server will be deployed.</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="pNodeId">Node</label>
|
||||
<select name="node_id" id="pNodeId" class="form-control">
|
||||
<option disabled selected>Select a Node</option>
|
||||
</select>
|
||||
<p class="small text-muted no-margin">The node which this server will be deployed to.</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="pIp">IP Address</label>
|
||||
<select name="ip" id="pIp" class="form-control">
|
||||
<option disabled selected>Select an IP</option>
|
||||
</select>
|
||||
<p class="small text-muted no-margin">The IP address that this server will be allocated to.</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="pPort">Port</label>
|
||||
<select name="port" id="pPort" class="form-control">
|
||||
<option disabled selected>Select a Port</option>
|
||||
</select>
|
||||
<p class="small text-muted no-margin">The port that this server will be allocated to.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<p class="text-muted small no-margin">
|
||||
<input type="checkbox" name="auto_deploy" id="pAutoDeploy" />
|
||||
<label for="pAutoDeploy">Check this box if you want the panel to automatically select a node and allocation for this server in the given location.</label>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#pLocationId').select2();
|
||||
$('#pNodeId').select2();
|
||||
$('#pIp').select2();
|
||||
$('#pPort').select2();
|
||||
|
||||
$('#pUserId').select2({
|
||||
ajax: {
|
||||
url: Router.route('admin.users.json'),
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function (params) {
|
||||
return {
|
||||
q: params.term, // search term
|
||||
page: params.page,
|
||||
};
|
||||
},
|
||||
processResults: function (data, params) {
|
||||
return { results: data };
|
||||
},
|
||||
cache: true,
|
||||
},
|
||||
escapeMarkup: function (markup) { return markup; },
|
||||
minimumInputLength: 2,
|
||||
templateResult: function (data) {
|
||||
if (data.loading) return data.text;
|
||||
|
||||
return '<div class="user-block"> \
|
||||
<img class="img-circle img-bordered-xs" src="https://www.gravatar.com/avatar/' + data.md5 + '?s=120" alt="User Image"> \
|
||||
<span class="username"> \
|
||||
<a href="#">' + data.name_first + ' ' + data.name_last +'</a> \
|
||||
</span> \
|
||||
<span class="description"><strong>' + data.email + '</strong> - ' + data.username + '</span> \
|
||||
</div>';
|
||||
},
|
||||
templateSelection: function (data) {
|
||||
return '<div> \
|
||||
<span> \
|
||||
<img class="img-rounded img-bordered-xs" src="https://www.gravatar.com/avatar/' + data.md5 + '?s=120" style="height:28px;margin-top:-4px;" alt="User Image"> \
|
||||
</span> \
|
||||
<span style="padding-left:5px;"> \
|
||||
' + data.name_first + ' ' + data.name_last + ' (<strong>' + data.email + '</strong>) \
|
||||
</span> \
|
||||
</div>';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function hideLoader() {
|
||||
$('#allocationLoader').hide();
|
||||
}
|
||||
|
||||
function showLoader() {
|
||||
$('#allocationLoader').show();
|
||||
}
|
||||
|
||||
var currentLocation = null;
|
||||
var curentNode = null;
|
||||
var currentIP = null;
|
||||
|
||||
var NodeDataIdentifier = null;
|
||||
var NodeData = [];
|
||||
var AllocationsForNode = null;
|
||||
|
||||
$('#pLocationId').on('change', function (event) {
|
||||
showLoader()
|
||||
currentLocation = $(this).val();
|
||||
currentNode = null;
|
||||
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: Router.route('admin.servers.new.get-nodes'),
|
||||
headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') },
|
||||
data: { location: currentLocation },
|
||||
}).done(function (data) {
|
||||
NodeData = data;
|
||||
console.log(data);
|
||||
$('#pNodeId').select2({data: data});
|
||||
}).fail(function (jqXHR) {
|
||||
cosole.error(jqXHR);
|
||||
currentLocation = null;
|
||||
}).always(hideLoader);
|
||||
});
|
||||
|
||||
$('#pNodeId').on('change', function (event) {
|
||||
currentNode = $(this).val();
|
||||
$.each(NodeData, function (i, v) {
|
||||
if (v.id == currentNode) {
|
||||
NodeDataIdentifier = i;
|
||||
$('#pIp').select2({
|
||||
data: $.map(v.allocations, function (item) {
|
||||
return {
|
||||
id: item.ip,
|
||||
text: item.ip,
|
||||
}
|
||||
}),
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#pIp').on('change', function (event) {
|
||||
currentIP = $(this).val();
|
||||
$.each(NodeData[NodeDataIdentifier].allocations, function (i, v) {
|
||||
if (v.ip == currentIP) {
|
||||
$('#pPort').val(null);
|
||||
$('#pPort').select2({
|
||||
data: $.map(v.ports, function (item) {
|
||||
return {
|
||||
id: item,
|
||||
text: item,
|
||||
}
|
||||
}),
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
Reference in a new issue