Obliterate swaths of old template code
This commit is contained in:
parent
8965da6af0
commit
14b1f13fe0
31 changed files with 0 additions and 2874 deletions
|
@ -1,147 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('base.account.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('base.account.header')<small>@lang('base.account.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li class="active">@lang('strings.account')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('base.account.update_pass')</h3>
|
||||
</div>
|
||||
<form action="{{ route('account') }}" method="post">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="current_password" class="control-label">@lang('base.account.current_password')</label>
|
||||
<div>
|
||||
<input type="password" class="form-control" name="current_password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="new_password" class="control-label">@lang('base.account.new_password')</label>
|
||||
<div>
|
||||
<input type="password" class="form-control" name="new_password" />
|
||||
<p class="text-muted small no-margin">@lang('auth.password_requirements')</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="new_password_again" class="control-label">@lang('base.account.new_password_again')</label>
|
||||
<div>
|
||||
<input type="password" class="form-control" name="new_password_confirmation" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="do_action" value="password" />
|
||||
<input type="submit" class="btn btn-primary btn-sm" value="@lang('base.account.update_pass')" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<form action="{{ route('account') }}" method="POST">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('base.account.update_identity')</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="first_name" class="control-label">@lang('base.account.first_name')</label>
|
||||
<div>
|
||||
<input type="text" class="form-control" name="name_first" value="{{ Auth::user()->name_first }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="last_name" class="control-label">@lang('base.account.last_name')</label>
|
||||
<div>
|
||||
<input type="text" class="form-control" name="name_last" value="{{ Auth::user()->name_last }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12">
|
||||
<label for="password" class="control-label">@lang('strings.username')</label>
|
||||
<div>
|
||||
<input type="text" class="form-control" name="username" value="{{ Auth::user()->username }}" />
|
||||
<p class="text-muted small no-margin">@lang('base.account.username_help', [ 'requirements' => '<code>a-z A-Z 0-9 _ - .</code>'])</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12">
|
||||
<label for="language" class="control-label">@lang('base.account.language')</label>
|
||||
<div>
|
||||
<select name="language" id="language" class="form-control">
|
||||
@foreach($languages as $key => $value)
|
||||
<option value="{{ $key }}" {{ Auth::user()->language !== $key ?: 'selected' }}>{{ $value }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer with-border">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="do_action" value="identity" />
|
||||
<button type="submit" class="btn btn-sm btn-primary">@lang('base.account.update_identity')</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('base.account.update_email')</h3>
|
||||
</div>
|
||||
<form action="{{ route('account') }}" method="post">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="new_email" class="control-label">@lang('base.account.new_email')</label>
|
||||
<div>
|
||||
<input type="email" class="form-control" name="new_email" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="control-label">@lang('base.account.current_password')</label>
|
||||
<div>
|
||||
<input type="password" class="form-control" name="current_password" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="do_action" value="email" />
|
||||
<input type="submit" class="btn btn-primary btn-sm" value="@lang('base.account.update_email')" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
|
@ -1,123 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('base.api.index.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('base.api.index.header')<small>@lang('base.api.index.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li class="active">@lang('navigation.account.api_access')</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">Credentials List</h3>
|
||||
<div class="box-tools">
|
||||
<a href="{{ route('account.api.new') }}" class="btn btn-sm btn-primary">Create New</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>Key</th>
|
||||
<th>Memo</th>
|
||||
<th>Last Used</th>
|
||||
<th>Created</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@foreach($keys as $key)
|
||||
<tr>
|
||||
<td>
|
||||
<code class="toggle-display" style="cursor:pointer" data-toggle="tooltip" data-placement="right" title="Click to Reveal">
|
||||
<i class="fa fa-key"></i> ••••••••
|
||||
</code>
|
||||
<code class="hidden" data-attr="api-key">
|
||||
{{ $key->identifier }}{{ decrypt($key->token) }}
|
||||
</code>
|
||||
</td>
|
||||
<td>{{ $key->memo }}</td>
|
||||
<td>
|
||||
@if(!is_null($key->last_used_at))
|
||||
@datetimeHuman($key->last_used_at)
|
||||
@else
|
||||
—
|
||||
@endif
|
||||
</td>
|
||||
<td>@datetimeHuman($key->created_at)</td>
|
||||
<td>
|
||||
<a href="#" data-action="revoke-key" data-attr="{{ $key->identifier }}">
|
||||
<i class="fa fa-trash-o text-danger"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
});
|
||||
$('.toggle-display').on('click', function () {
|
||||
$(this).parent().find('code[data-attr="api-key"]').removeClass('hidden');
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
$('[data-action="revoke-key"]').click(function (event) {
|
||||
var self = $(this);
|
||||
event.preventDefault();
|
||||
swal({
|
||||
type: 'error',
|
||||
title: 'Revoke API Key',
|
||||
text: 'Once this API key is revoked any applications currently using it will stop working.',
|
||||
showCancelButton: true,
|
||||
allowOutsideClick: true,
|
||||
closeOnConfirm: false,
|
||||
confirmButtonText: 'Revoke',
|
||||
confirmButtonColor: '#d9534f',
|
||||
showLoaderOnConfirm: true
|
||||
}, function () {
|
||||
$.ajax({
|
||||
method: 'DELETE',
|
||||
url: Router.route('account.api.revoke', { identifier: self.data('attr') }),
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
}
|
||||
}).done(function (data) {
|
||||
swal({
|
||||
type: 'success',
|
||||
title: '',
|
||||
text: 'API Key has been revoked.'
|
||||
});
|
||||
self.parent().parent().slideUp();
|
||||
}).fail(function (jqXHR) {
|
||||
console.error(jqXHR);
|
||||
swal({
|
||||
type: 'error',
|
||||
title: 'Whoops!',
|
||||
text: 'An error occurred while attempting to revoke this key.'
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
|
@ -1,47 +0,0 @@
|
|||
@extends('layouts.master')
|
||||
|
||||
@section('title')
|
||||
@lang('base.api.new.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('base.api.new.header')<small>@lang('base.api.new.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li class="active">@lang('navigation.account.api_access')</li>
|
||||
<li class="active">@lang('base.api.new.header')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<form method="POST" action="{{ route('account.api.new') }}">
|
||||
<div class="col-sm-6 col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="memoField">Description <span class="field-required"></span></label>
|
||||
<input id="memoField" type="text" name="memo" class="form-control" value="{{ old('memo') }}">
|
||||
</div>
|
||||
<p class="text-muted">Set an easy to understand description for this API key to help you identify it later on.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="allowedIps">Allowed Connection IPs <span class="field-optional"></span></label>
|
||||
<textarea id="allowedIps" name="allowed_ips" class="form-control" rows="5">{{ old('allowed_ips') }}</textarea>
|
||||
</div>
|
||||
<p class="text-muted">If you would like to limit this API key to specific IP addresses enter them above, one per line. CIDR notation is allowed for each IP address. Leave blank to allow any IP address.</p>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{{ csrf_field() }}
|
||||
<button type="submit" class="btn btn-success btn-sm pull-right">Create</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
|
@ -1,108 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('base.index.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('base.index.header')<small>@lang('base.index.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li class="active">@lang('strings.servers')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">@lang('base.index.list')</h3>
|
||||
<div class="box-tools search01">
|
||||
<form action="{{ route('index') }}" method="GET">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" name="query" class="form-control pull-right" value="{{ request()->input('query') }}" placeholder="@lang('strings.search')">
|
||||
<div class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>@lang('strings.id')</th>
|
||||
<th>@lang('strings.name')</th>
|
||||
<th>@lang('strings.node')</th>
|
||||
<th>@lang('strings.connection')</th>
|
||||
<th class="text-center hidden-sm hidden-xs">@lang('strings.memory')</th>
|
||||
<th class="text-center hidden-sm hidden-xs">@lang('strings.cpu')</th>
|
||||
<th class="text-center hidden-sm hidden-xs">@lang('strings.disk')</th>
|
||||
<th class="text-center">@lang('strings.relation')</th>
|
||||
<th class="text-center">@lang('strings.status')</th>
|
||||
</tr>
|
||||
@foreach($servers as $server)
|
||||
<tr class="dynamic-update" data-server="{{ $server->uuidShort }}">
|
||||
<td @if(! empty($server->description)) rowspan="2" @endif><code>{{ $server->uuidShort }}</code></td>
|
||||
<td><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></td>
|
||||
<td>{{ $server->getRelation('node')->name }}</td>
|
||||
<td><code>{{ $server->getRelation('allocation')->alias }}:{{ $server->getRelation('allocation')->port }}</code></td>
|
||||
<td class="text-center hidden-sm hidden-xs"><span data-action="memory">--</span> / {{ $server->memory === 0 ? '∞' : $server->memory }} MB</td>
|
||||
<td class="text-center hidden-sm hidden-xs"><span data-action="cpu" data-cpumax="{{ $server->cpu }}">--</span> %</td>
|
||||
<td class="text-center hidden-sm hidden-xs"><span data-action="disk">--</span> / {{ $server->disk === 0 ? '∞' : $server->disk }} MB </td>
|
||||
<td class="text-center">
|
||||
@if($server->user->id === Auth::user()->id)
|
||||
<span class="label bg-purple">@lang('strings.owner')</span>
|
||||
@elseif(Auth::user()->root_admin)
|
||||
<span class="label bg-maroon">@lang('strings.admin')</span>
|
||||
@else
|
||||
<span class="label bg-blue">@lang('strings.subuser')</span>
|
||||
@endif
|
||||
</td>
|
||||
@if($server->node->maintenance_mode)
|
||||
<td class="text-center">
|
||||
<span class="label label-warning">@lang('strings.under_maintenance')</span>
|
||||
</td>
|
||||
@else
|
||||
<td class="text-center" data-action="status">
|
||||
<span class="label label-default"><i class="fa fa-refresh fa-fw fa-spin"></i></span>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@if (! empty($server->description))
|
||||
<tr class="server-description">
|
||||
<td colspan="7"><p class="text-muted small no-margin">{{ str_limit($server->description, 400) }}</p></td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@if($servers->hasPages())
|
||||
<div class="box-footer">
|
||||
<div class="col-md-12 text-center">{!! $servers->appends(['query' => Request::input('query')])->render() !!}</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('tr.server-description').on('mouseenter mouseleave', function (event) {
|
||||
$(this).prev('tr').css({
|
||||
'background-color': (event.type === 'mouseenter') ? '#f5f5f5' : '',
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{!! Theme::js('js/frontend/serverlist.js') !!}
|
||||
@endsection
|
|
@ -1,135 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('base.security.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('base.security.header')<small>@lang('base.security.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('account') }}">@lang('strings.account')</a></li>
|
||||
<li class="active">@lang('strings.security')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('base.security.sessions')</h3>
|
||||
</div>
|
||||
@if(!is_null($sessions))
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>@lang('strings.id')</th>
|
||||
<th>@lang('strings.ip')</th>
|
||||
<th>@lang('strings.last_activity')</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@foreach($sessions as $session)
|
||||
<tr>
|
||||
<td><code>{{ substr($session->id, 0, 6) }}</code></td>
|
||||
<td>{{ $session->ip_address }}</td>
|
||||
<td>{{ Carbon::createFromTimestamp($session->last_activity)->diffForHumans() }}</td>
|
||||
<td>
|
||||
<a href="{{ route('account.security.revoke', $session->id) }}">
|
||||
<button class="btn btn-xs btn-danger"><i class="fa fa-trash-o"></i> @lang('strings.revoke')</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<div class="box-body">
|
||||
<p class="text-muted">@lang('base.security.session_mgmt_disabled')</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="box {{ (Auth::user()->use_totp) ? 'box-success' : 'box-danger' }}">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('base.security.2fa_header')</h3>
|
||||
</div>
|
||||
@if(Auth::user()->use_totp)
|
||||
<form action="{{ route('account.security.totp') }}" method="post">
|
||||
<div class="box-body">
|
||||
<p>@lang('base.security.2fa_enabled')</p>
|
||||
<div class="form-group">
|
||||
<label for="new_password_again" class="control-label">@lang('strings.2fa_token')</label>
|
||||
<div>
|
||||
<input type="text" class="form-control" name="token" />
|
||||
<p class="text-muted small">@lang('base.security.2fa_token_help')</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
{{ method_field('DELETE') }}
|
||||
<button type="submit" class="btn btn-danger btn-sm">@lang('base.security.disable_2fa')</button>
|
||||
</div>
|
||||
</form>
|
||||
@else
|
||||
<form action="#" method="post" id="do_2fa">
|
||||
<div class="box-body">
|
||||
@lang('base.security.2fa_disabled')
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<button type="submit" class="btn btn-success btn-sm">@lang('base.security.enable_2fa')</button>
|
||||
</div>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="open2fa" tabindex="-1" role="dialog" aria-labelledby="open2fa" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="#" method="post" id="2fa_token_verify">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">@lang('base.security.2fa_qr')</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="modal_insert_content">
|
||||
<div class="row">
|
||||
<div class="col-md-12" id="notice_box_2fa" style="display:none;"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-center">
|
||||
<span id="hide_img_load"><i class="fa fa-spinner fa-spin"></i> Loading QR Code...</span><img src="" id="qr_image_insert" style="display:none;"/>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="alert alert-info">@lang('base.security.2fa_checkpoint_help')</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="2fa_token">@lang('strings.2fa_token')</label>
|
||||
{!! csrf_field() !!}
|
||||
<input class="form-control" type="text" name="2fa_token" id="2fa_token" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary btn-sm" id="submit_action">@lang('strings.submit')</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal" id="close_reload">@lang('strings.close')</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/2fa-modal.js') !!}
|
||||
@endsection
|
|
@ -1,45 +0,0 @@
|
|||
{{-- 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 --}}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ config('app.name', 'Pterodactyl') }} - Console → {{ $server->name }}</title>
|
||||
@include('layouts.scripts')
|
||||
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
|
||||
{!! Theme::css('css/terminal.css') !!}
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
</head>
|
||||
<body id="terminal-body">
|
||||
<div id="terminal" style="width:100%;max-height: none !important;"></div>
|
||||
<div id="terminal_input" class="form-group no-margin">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon terminal_input--prompt">container:~/$</div>
|
||||
<input type="text" class="form-control terminal_input--input">
|
||||
</div>
|
||||
</div>
|
||||
<div id="terminalNotify" class="terminal-notify hidden">
|
||||
<i class="fa fa-bell"></i>
|
||||
</div>
|
||||
</body>
|
||||
<script>window.SkipConsoleCharts = true</script>
|
||||
{!! Theme::js('js/laroute.js') !!}
|
||||
{!! Theme::js('vendor/ansi/ansi_up.js') !!}
|
||||
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
|
||||
{!! Theme::js('vendor/socketio/socket.io.v203.min.js') !!}
|
||||
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js') !!}
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
{!! Theme::js('vendor/mousewheel/jquery.mousewheel-min.js') !!}
|
||||
{!! Theme::js('js/frontend/console.js') !!}
|
||||
<script>
|
||||
$terminal.height($(window).innerHeight() - 40);
|
||||
$terminal.width($(window).innerWidth());
|
||||
$(window).on('resize', function () {
|
||||
window.scrollToBottom();
|
||||
$terminal.height($(window).innerHeight() - 40);
|
||||
$terminal.width($(window).innerWidth());
|
||||
});
|
||||
</script>
|
||||
</html>
|
|
@ -1,198 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.config.database.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.config.database.header')<small>@lang('server.config.database.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li>@lang('navigation.server.configuration')</li>
|
||||
<li class="active">@lang('navigation.server.databases')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="{{ $allowCreation && Gate::allows('create-database', $server) ? 'col-xs-12 col-sm-8' : 'col-xs-12' }}">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('server.config.database.your_dbs')</h3>
|
||||
</div>
|
||||
@if(count($databases) > 0)
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>@lang('strings.database')</th>
|
||||
<th>@lang('strings.username')</th>
|
||||
<th>@lang('strings.password')</th>
|
||||
<th>@lang('server.config.database.host')</th>
|
||||
@can('reset-db-password', $server)<td></td>@endcan
|
||||
</tr>
|
||||
@foreach($databases as $database)
|
||||
<tr>
|
||||
<td class="middle">{{ $database->database }}</td>
|
||||
<td class="middle">{{ $database->username }}</td>
|
||||
<td class="middle">
|
||||
<code class="toggle-display" style="cursor:pointer" data-toggle="tooltip" data-placement="right" title="Click to Reveal">
|
||||
<i class="fa fa-key"></i> ••••••••
|
||||
</code>
|
||||
<code class="hidden" data-attr="set-password">
|
||||
{{ Crypt::decrypt($database->password) }}
|
||||
</code>
|
||||
</td>
|
||||
<td class="middle"><code>{{ $database->host->host }}:{{ $database->host->port }}</code></td>
|
||||
@if(Gate::allows('reset-db-password', $server) || Gate::allows('delete-database', $server))
|
||||
<td>
|
||||
@can('delete-database', $server)
|
||||
<button class="btn btn-xs btn-danger pull-right" data-action="delete-database" data-id="{{ $database->id }}">
|
||||
<i class="fa fa-fw fa-trash-o"></i>
|
||||
</button>
|
||||
@endcan
|
||||
@can('reset-db-password', $server)
|
||||
<button class="btn btn-xs btn-primary pull-right" style="margin-right:10px;" data-action="reset-password" data-id="{{ $database->id }}">
|
||||
<i class="fa fa-fw fa-refresh"></i> @lang('server.config.database.reset_password')
|
||||
</button>
|
||||
@endcan
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<div class="box-body">
|
||||
<div class="alert alert-info no-margin-bottom">
|
||||
@lang('server.config.database.no_dbs')
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@if($allowCreation && Gate::allows('create-database', $server))
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Create New Database</h3>
|
||||
</div>
|
||||
@if($overLimit)
|
||||
<div class="box-body">
|
||||
<div class="alert alert-danger no-margin">
|
||||
You are currently using <strong>{{ count($databases) }}</strong> of your <strong>{{ $server->database_limit ?? '∞' }}</strong> allowed databases.
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<form action="{{ route('server.databases.new', $server->uuidShort) }}" method="POST">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pDatabaseName" class="control-label">Database</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">s{{ $server->id }}_</span>
|
||||
<input id="pDatabaseName" type="text" name="database" class="form-control" placeholder="database" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pRemote" class="control-label">Connections</label>
|
||||
<input id="pRemote" type="text" name="remote" class="form-control" value="%" />
|
||||
<p class="text-muted small">This should reflect the IP address that connections are allowed from. Uses standard MySQL notation. If unsure leave as <code>%</code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<p class="text-muted small">You are currently using <strong>{{ count($databases) }}</strong> of <strong>{{ $server->database_limit ?? '∞' }}</strong> databases. A username and password for this database will be randomly generated after form submission.</p>
|
||||
<input type="submit" class="btn btn-sm btn-success pull-right" value="Create Database" />
|
||||
</div>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
});
|
||||
$('.toggle-display').on('click', function () {
|
||||
$(this).parent().find('code[data-attr="set-password"]').removeClass('hidden');
|
||||
$(this).hide();
|
||||
});
|
||||
@can('reset-db-password', $server)
|
||||
$('[data-action="reset-password"]').click(function (e) {
|
||||
e.preventDefault();
|
||||
var block = $(this);
|
||||
$(this).addClass('disabled').find('i').addClass('fa-spin');
|
||||
$.ajax({
|
||||
type: 'PATCH',
|
||||
url: Router.route('server.databases.password', { server: Pterodactyl.server.uuidShort }),
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content'),
|
||||
},
|
||||
data: {
|
||||
database: $(this).data('id')
|
||||
}
|
||||
}).done(function (data) {
|
||||
block.parent().parent().find('[data-attr="set-password"]').html(data.password);
|
||||
}).fail(function(jqXHR) {
|
||||
console.error(jqXHR);
|
||||
var error = 'An error occurred while trying to process this request.';
|
||||
if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {
|
||||
error = jqXHR.responseJSON.error;
|
||||
}
|
||||
swal({
|
||||
type: 'error',
|
||||
title: 'Whoops!',
|
||||
text: error
|
||||
});
|
||||
}).always(function () {
|
||||
block.removeClass('disabled').find('i').removeClass('fa-spin');
|
||||
});
|
||||
});
|
||||
@endcan
|
||||
@can('delete-database', $server)
|
||||
$('[data-action="delete-database"]').click(function (event) {
|
||||
event.preventDefault();
|
||||
var self = $(this);
|
||||
swal({
|
||||
title: '',
|
||||
type: 'warning',
|
||||
text: 'Are you sure that you want to delete this database? There is no going back, all data will immediately be removed.',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Delete',
|
||||
confirmButtonColor: '#d9534f',
|
||||
closeOnConfirm: false,
|
||||
showLoaderOnConfirm: true,
|
||||
}, function () {
|
||||
$.ajax({
|
||||
method: 'DELETE',
|
||||
url: Router.route('server.databases.delete', { server: '{{ $server->uuidShort }}', database: self.data('id') }),
|
||||
headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') },
|
||||
}).done(function () {
|
||||
self.parent().parent().slideUp();
|
||||
swal.close();
|
||||
}).fail(function (jqXHR) {
|
||||
console.error(jqXHR);
|
||||
swal({
|
||||
type: 'error',
|
||||
title: 'Whoops!',
|
||||
text: (typeof jqXHR.responseJSON.error !== 'undefined') ? jqXHR.responseJSON.error : 'An error occurred while processing this request.'
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@endcan
|
||||
</script>
|
||||
@endsection
|
|
@ -1,98 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.files.add.header')
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
{{-- This has to be loaded before the AdminLTE theme to avoid dropdown issues. --}}
|
||||
{!! Theme::css('vendor/select2/select2.min.css') !!}
|
||||
@parent
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.files.add.header')<small>@lang('server.files.add.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li><a href="{{ route('server.files.index', $server->uuidShort) }}">@lang('navigation.server.file_browser')</a></li>
|
||||
<li class="active">@lang('navigation.server.create_file')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><code>/home/container/</code></span>
|
||||
<input type="text" class="form-control" placeholder="@lang('server.files.add.name')" id="file_name" value="{{ $directory }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body" style="height:500px;" id="editor"></div>
|
||||
<div class="box-footer with-border">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<button class="btn btn-sm btn-primary" id="create_file">@lang('server.files.add.create')</button>
|
||||
<a href="{{ route('server.files.index', [ 'server' => $server->uuidShort, 'dir' => $directory ]) }}"><button class="btn btn-default btn-sm">@lang('strings.cancel')</button></a>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<select name="aceMode" id="aceMode" class="form-control">
|
||||
<option value="assembly_x86">Assembly x86</option>
|
||||
<option value="c_cpp">C/C++</option>
|
||||
<option value="coffee">CoffeeScript</option>
|
||||
<option value="csharp">C#</option>
|
||||
<option value="css">CSS</option>
|
||||
<option value="golang">Go</option>
|
||||
<option value="haml">HAML</option>
|
||||
<option value="html">HTML</option>
|
||||
<option value="ini">INI</option>
|
||||
<option value="java">Java</option>
|
||||
<option value="javascript">JavaScript</option>
|
||||
<option value="json">JSON</option>
|
||||
<option value="kotlin">Kotlin</option>
|
||||
<option value="lua">Lua</option>
|
||||
<option value="markdown">Markdown</option>
|
||||
<option value="mysql">MySQL</option>
|
||||
<option value="objectivec">Objective-C</option>
|
||||
<option value="perl">Perl</option>
|
||||
<option value="php">PHP</option>
|
||||
<option value="plain_text" selected="selected">Plain Text</option>
|
||||
<option value="properties">Properties</option>
|
||||
<option value="python">Python</option>
|
||||
<option value="ruby">Ruby</option>
|
||||
<option value="rust">Rust</option>
|
||||
<option value="smarty">Smarty</option>
|
||||
<option value="sql">SQL</option>
|
||||
<option value="xml">XML</option>
|
||||
<option value="yaml">YAML</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('vendor/select2/select2.full.min.js') !!}
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
{!! Theme::js('vendor/ace/ace.js') !!}
|
||||
{!! Theme::js('vendor/ace/ext-modelist.js') !!}
|
||||
{!! Theme::js('vendor/ace/ext-whitespace.js') !!}
|
||||
{!! Theme::js('vendor/lodash/lodash.js') !!}
|
||||
{!! Theme::js('js/frontend/files/editor.js') !!}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#aceMode').select2();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
|
@ -1,59 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.files.edit.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.files.edit.header')<small>@lang('server.files.edit.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li><a href="{{ route('server.files.index', $server->uuidShort) }}">@lang('navigation.server.file_browser')</a></li>
|
||||
<li class="active">@lang('navigation.server.edit_file')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $file }}</h3>
|
||||
<div class="pull-right box-tools">
|
||||
<a href="/server/{{ $server->uuidShort }}/files#{{ rawurlencode($directory) }}" class="pull-right"><button class="btn btn-default btn-sm">@lang('server.files.edit.return')</button></a>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="file" value="{{ $file }}" />
|
||||
<textarea id="editorSetContent" class="hidden">{{ $contents }}</textarea>
|
||||
<div class="overlay" id="editorLoadingOverlay"><i class="fa fa-refresh fa-spin"></i></div>
|
||||
<div class="box-body" style="height:500px;" id="editor"></div>
|
||||
<div class="box-footer with-border">
|
||||
<button class="btn btn-sm btn-primary" id="save_file"><i class="fa fa-fw fa-save"></i> @lang('server.files.edit.save')</button>
|
||||
<a href="/server/{{ $server->uuidShort }}/files#{{ rawurlencode($directory) }}" class="pull-right"><button class="btn btn-default btn-sm">@lang('server.files.edit.return')</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
{!! Theme::js('vendor/ace/ace.js') !!}
|
||||
{!! Theme::js('vendor/ace/ext-modelist.js') !!}
|
||||
{!! Theme::js('vendor/ace/ext-whitespace.js') !!}
|
||||
{!! Theme::js('js/frontend/files/editor.js') !!}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
Editor.setValue($('#editorSetContent').val(), -1);
|
||||
Editor.getSession().setUndoManager(new ace.UndoManager());
|
||||
$('#editorLoadingOverlay').hide();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
|
@ -1,54 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.files.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.files.header')<small>@lang('server.files.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li>@lang('navigation.server.file_management')</li>
|
||||
<li class="active">@lang('navigation.server.file_browser')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="overlay file-overlay"><i class="fa fa-refresh fa-spin"></i></div>
|
||||
<div id="load_files">
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<div class="callout callout-info" style="margin:10px;">@lang('server.files.loading')</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer with-border">
|
||||
<p class="text-muted small" style="margin: 0 0 2px;">@lang('server.files.path', ['path' => '<code>/home/container</code>', 'size' => '<code>' . $node->upload_size . ' MB</code>'])</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
{!! Theme::js('vendor/async/async.min.js') !!}
|
||||
{!! Theme::js('vendor/lodash/lodash.js') !!}
|
||||
{!! Theme::js('vendor/siofu/client.min.js') !!}
|
||||
@if(App::environment('production'))
|
||||
{!! Theme::js('js/frontend/files/filemanager.min.js?hash=cd7ec731dc633e23ec36144929a237d18c07d2f0') !!}
|
||||
@else
|
||||
{!! Theme::js('js/frontend/files/src/index.js') !!}
|
||||
{!! Theme::js('js/frontend/files/src/contextmenu.js') !!}
|
||||
{!! Theme::js('js/frontend/files/src/actions.js') !!}
|
||||
@endif
|
||||
{!! Theme::js('js/frontend/files/upload.js') !!}
|
||||
@endsection
|
|
@ -1,170 +0,0 @@
|
|||
{{-- 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 --}}
|
||||
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">/home/container{{ $directory['header'] }}</h3>
|
||||
<div class="box-tools">
|
||||
<a href="/server/{{ $server->uuidShort }}/files/add/@if($directory['header'] !== '')?dir={{ $directory['header'] }}@endif">
|
||||
<button class="btn btn-success btn-sm btn-icon">
|
||||
New File <i class="fa fa-fw fa-file-text-o"></i>
|
||||
</button>
|
||||
</a>
|
||||
<button class="btn btn-sm btn-success btn-icon" data-action="add-folder">
|
||||
New Folder <i class="fa fa-fw fa-folder-open-o"></i>
|
||||
</button>
|
||||
<label class="btn btn-primary btn-sm btn-icon">
|
||||
Upload <i class="fa fa-fw fa-upload"></i><input type="file" id="files_touch_target" class="hidden">
|
||||
</label>
|
||||
<div class="btn-group hidden-xs">
|
||||
<button type="button" id="mass_actions" class="btn btn-sm btn-default dropdown-toggle disabled" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@lang('server.files.mass_actions') <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-massactions">
|
||||
<li><a href="#" id="selective-deletion" data-action="selective-deletion">@lang('server.files.delete') <i class="fa fa-fw fa-trash-o"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover" id="file_listing" data-current-dir="{{ rtrim($directory['header'], '/') . '/' }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="middle min-size">
|
||||
<input type="checkbox" class="select-all-files hidden-xs" data-action="selectAll"><i class="fa fa-refresh muted muted-hover use-pointer" data-action="reload-files" style="font-size:14px;"></i>
|
||||
</th>
|
||||
<th>@lang('server.files.file_name')</th>
|
||||
<th class="hidden-xs">@lang('server.files.size')</th>
|
||||
<th class="hidden-xs">@lang('server.files.last_modified')</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="append_files_to">
|
||||
@if (isset($directory['first']) && $directory['first'] === true)
|
||||
<tr data-type="disabled">
|
||||
<td class="middle min-size"><i class="fa fa-folder" style="margin-left: 0.859px;"></i></td>
|
||||
<td><a href="/server/{{ $server->uuidShort }}/files" data-action="directory-view">←</a></td>
|
||||
<td class="hidden-xs"></td>
|
||||
<td class="hidden-xs"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($directory['show']) && $directory['show'] === true)
|
||||
<tr data-type="disabled">
|
||||
<td class="middle min-size"><i class="fa fa-folder" style="margin-left: 0.859px;"></i></td>
|
||||
<td data-name="{{ rawurlencode($directory['link']) }}">
|
||||
<a href="/server/{{ $server->uuidShort }}/files" data-action="directory-view">← {{ $directory['link_show'] }}</a>
|
||||
</td>
|
||||
<td class="hidden-xs"></td>
|
||||
<td class="hidden-xs"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
@foreach ($folders as $folder)
|
||||
<tr data-type="folder">
|
||||
<td class="middle min-size" data-identifier="type">
|
||||
<input type="checkbox" class="select-folder hidden-xs" data-action="addSelection"><i class="fa fa-folder" style="margin-left: 0.859px;"></i>
|
||||
</td>
|
||||
<td data-identifier="name" data-name="{{ rawurlencode($folder['entry']) }}" data-path="@if($folder['directory'] !== ''){{ rawurlencode($folder['directory']) }}@endif/">
|
||||
<a href="/server/{{ $server->uuidShort }}/files" data-action="directory-view">{{ $folder['entry'] }}</a>
|
||||
</td>
|
||||
<td data-identifier="size" class="hidden-xs">{{ $folder['size'] }}</td>
|
||||
<td data-identifier="modified" class="hidden-xs">
|
||||
<?php $carbon = Carbon::createFromTimestamp($folder['date'])->timezone(config('app.timezone')); ?>
|
||||
@if($carbon->diffInMinutes(Carbon::now()) > 60)
|
||||
{{ $carbon->format('m/d/y H:i:s') }}
|
||||
@elseif($carbon->diffInSeconds(Carbon::now()) < 5 || $carbon->isFuture())
|
||||
<em>@lang('server.files.seconds_ago')</em>
|
||||
@else
|
||||
{{ $carbon->diffForHumans() }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="min-size">
|
||||
<button class="btn btn-xxs btn-default disable-menu-hide" data-action="toggleMenu" style="padding:2px 6px 0px;"><i class="fa fa-ellipsis-h disable-menu-hide"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@foreach ($files as $file)
|
||||
<tr data-type="file" data-mime="{{ $file['mime'] }}">
|
||||
<td class="middle min-size" data-identifier="type"><input type="checkbox" class="select-file hidden-xs" data-action="addSelection">
|
||||
{{-- oh boy --}}
|
||||
@if(in_array($file['mime'], [
|
||||
'application/x-7z-compressed',
|
||||
'application/zip',
|
||||
'application/x-compressed-zip',
|
||||
'application/x-tar',
|
||||
'application/x-gzip',
|
||||
'application/x-bzip',
|
||||
'application/x-bzip2',
|
||||
'application/java-archive'
|
||||
]))
|
||||
<i class="fa fa-file-archive-o" style="margin-left: 2px;"></i>
|
||||
@elseif(in_array($file['mime'], [
|
||||
'application/json',
|
||||
'application/javascript',
|
||||
'application/xml',
|
||||
'application/xhtml+xml',
|
||||
'text/xml',
|
||||
'text/css',
|
||||
'text/html',
|
||||
'text/x-perl',
|
||||
'text/x-shellscript'
|
||||
]))
|
||||
<i class="fa fa-file-code-o" style="margin-left: 2px;"></i>
|
||||
@elseif(starts_with($file['mime'], 'image'))
|
||||
<i class="fa fa-file-image-o" style="margin-left: 2px;"></i>
|
||||
@elseif(starts_with($file['mime'], 'video'))
|
||||
<i class="fa fa-file-video-o" style="margin-left: 2px;"></i>
|
||||
@elseif(starts_with($file['mime'], 'video'))
|
||||
<i class="fa fa-file-audio-o" style="margin-left: 2px;"></i>
|
||||
@elseif(starts_with($file['mime'], 'application/vnd.ms-powerpoint'))
|
||||
<i class="fa fa-file-powerpoint-o" style="margin-left: 2px;"></i>
|
||||
@elseif(in_array($file['mime'], [
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
||||
'application/msword'
|
||||
]) || starts_with($file['mime'], 'application/vnd.ms-word'))
|
||||
<i class="fa fa-file-word-o" style="margin-left: 2px;"></i>
|
||||
@elseif(in_array($file['mime'], [
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
|
||||
]) || starts_with($file['mime'], 'application/vnd.ms-excel'))
|
||||
<i class="fa fa-file-excel-o" style="margin-left: 2px;"></i>
|
||||
@elseif($file['mime'] === 'application/pdf')
|
||||
<i class="fa fa-file-pdf-o" style="margin-left: 2px;"></i>
|
||||
@else
|
||||
<i class="fa fa-file-text-o" style="margin-left: 2px;"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td data-identifier="name" data-name="{{ rawurlencode($file['entry']) }}" data-path="@if($file['directory'] !== ''){{ rawurlencode($file['directory']) }}@endif/">
|
||||
@if(in_array($file['mime'], $editableMime))
|
||||
@can('edit-files', $server)
|
||||
<a href="/server/{{ $server->uuidShort }}/files/edit/@if($file['directory'] !== ''){{ rawurlencode($file['directory']) }}/@endif{{ rawurlencode($file['entry']) }}" class="edit_file">{{ $file['entry'] }}</a>
|
||||
@else
|
||||
{{ $file['entry'] }}
|
||||
@endcan
|
||||
@else
|
||||
{{ $file['entry'] }}
|
||||
@endif
|
||||
</td>
|
||||
<td data-identifier="size" class="hidden-xs">{{ $file['size'] }}</td>
|
||||
<td data-identifier="modified" class="hidden-xs">
|
||||
<?php $carbon = Carbon::createFromTimestamp($file['date'])->timezone(config('app.timezone')); ?>
|
||||
@if($carbon->diffInMinutes(Carbon::now()) > 60)
|
||||
{{ $carbon->format('m/d/y H:i:s') }}
|
||||
@elseif($carbon->diffInSeconds(Carbon::now()) < 5 || $carbon->isFuture())
|
||||
<em>@lang('server.files.seconds_ago')</em>
|
||||
@else
|
||||
{{ $carbon->diffForHumans() }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="min-size">
|
||||
<button class="btn btn-xxs btn-default disable-menu-hide" data-action="toggleMenu" style="padding:2px 6px 0px;"><i class="fa fa-ellipsis-h disable-menu-hide"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
|
@ -1,85 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
{{ trans('server.index.title', [ 'name' => $server->name]) }}
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@parent
|
||||
{!! Theme::css('css/terminal.css') !!}
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.index.header')<small>@lang('server.index.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.servers')</a></li>
|
||||
<li class="active">{{ $server->name }}</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-body position-relative">
|
||||
<div id="terminal" style="width:100%;"></div>
|
||||
<div id="terminal_input" class="form-group no-margin">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon terminal_input--prompt">container:~/$</div>
|
||||
<input type="text" class="form-control terminal_input--input">
|
||||
</div>
|
||||
</div>
|
||||
<div id="terminalNotify" class="terminal-notify hidden">
|
||||
<i class="fa fa-bell"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer text-center">
|
||||
@can('power-start', $server)<button class="btn btn-success disabled" data-attr="power" data-action="start">Start</button>@endcan
|
||||
@can('power-restart', $server)<button class="btn btn-primary disabled" data-attr="power" data-action="restart">Restart</button>@endcan
|
||||
@can('power-stop', $server)<button class="btn btn-danger disabled" data-attr="power" data-action="stop">Stop</button>@endcan
|
||||
@can('power-kill', $server)<button class="btn btn-danger disabled" data-attr="power" data-action="kill">Kill</button>@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Memory Usage</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<canvas id="chart_memory" style="max-height:300px;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">CPU Usage</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<canvas id="chart_cpu" style="max-height:300px;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('vendor/ansi/ansi_up.js') !!}
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
{!! Theme::js('vendor/mousewheel/jquery.mousewheel-min.js') !!}
|
||||
{!! Theme::js('js/frontend/console.js') !!}
|
||||
{!! Theme::js('vendor/chartjs/chart.min.js') !!}
|
||||
{!! Theme::js('vendor/jquery/date-format.min.js') !!}
|
||||
@if($server->nest->name === 'Minecraft' && $server->nest->author === 'support@pterodactyl.io')
|
||||
{!! Theme::js('js/plugins/minecraft/eula.js') !!}
|
||||
@endif
|
||||
@endsection
|
|
@ -1,98 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.schedule.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.schedule.header')<small>@lang('server.schedule.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li class="active">@lang('navigation.server.schedules')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('server.schedule.current')</h3>
|
||||
<div class="box-tools">
|
||||
<a href="{{ route('server.schedules.new', $server->uuidShort) }}"><button class="btn btn-primary btn-sm">Create New</button></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>@lang('strings.name')</th>
|
||||
<th class="text-center">@lang('strings.queued')</th>
|
||||
<th class="text-center">@lang('strings.tasks')</th>
|
||||
<th>@lang('strings.last_run')</th>
|
||||
<th>@lang('strings.next_run')</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@foreach($schedules as $schedule)
|
||||
<tr @if(! $schedule->is_active)class="muted muted-hover"@endif>
|
||||
<td class="middle">
|
||||
@can('edit-schedule', $server)
|
||||
<a href="{{ route('server.schedules.view', ['server' => $server->uuidShort, '$schedule' => $schedule->hashid]) }}">
|
||||
{{ $schedule->name ?? trans('server.schedule.unnamed') }}
|
||||
</a>
|
||||
@else
|
||||
{{ $schedule->name ?? trans('server.schedule.unnamed') }}
|
||||
@endcan
|
||||
</td>
|
||||
<td class="middle text-center">
|
||||
@if ($schedule->is_processing)
|
||||
<span class="label label-success">@lang('strings.yes')</span>
|
||||
@else
|
||||
<span class="label label-default">@lang('strings.no')</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="middle text-center"><span class="label label-primary">{{ $schedule->tasks_count }}</span></td>
|
||||
<td class="middle">
|
||||
@if($schedule->last_run_at)
|
||||
{{ Carbon::parse($schedule->last_run_at)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($schedule->last_run_at)->diffForHumans() }})</span>
|
||||
@else
|
||||
<em class="text-muted">@lang('strings.not_run_yet')</em>
|
||||
@endif
|
||||
</td>
|
||||
<td class="middle">
|
||||
@if($schedule->is_active)
|
||||
{{ Carbon::parse($schedule->next_run_at)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($schedule->next_run_at)->diffForHumans() }})</span>
|
||||
@else
|
||||
<em>n/a</em>
|
||||
@endif
|
||||
</td>
|
||||
<td class="middle">
|
||||
@can('delete-schedule', $server)
|
||||
<a class="btn btn-xs btn-danger" href="#" data-action="delete-schedule" data-schedule-id="{{ $schedule->hashid }}" data-toggle="tooltip" data-placement="top" title="@lang('strings.delete')"><i class="fa fa-fw fa-trash-o"></i></a>
|
||||
@endcan
|
||||
@can('toggle-schedule', $server)
|
||||
<a class="btn btn-xs btn-default" href="#" data-action="toggle-schedule" data-active="{{ $schedule->active }}" data-schedule-id="{{ $schedule->hashid }}" data-toggle="tooltip" data-placement="top" title="@lang('server.schedule.toggle')"><i class="fa fa-fw fa-eye-slash"></i></a>
|
||||
<a class="btn btn-xs btn-default" href="#" data-action="trigger-schedule" data-schedule-id="{{ $schedule->hashid }}" data-toggle="tooltip" data-placement="top" title="@lang('server.schedule.run_now')"><i class="fa fa-fw fa-refresh"></i></a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
{!! Theme::js('js/frontend/tasks/management-actions.js') !!}
|
||||
@endsection
|
|
@ -1,145 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.schedules.new.header')
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
{{-- This has to be loaded before the AdminLTE theme to avoid dropdown issues. --}}
|
||||
{!! Theme::css('vendor/select2/select2.min.css') !!}
|
||||
@parent
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.schedule.new.header')<small>@lang('server.schedule.new.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li><a href="{{ route('server.schedules', $server->uuidShort) }}">@lang('navigation.server.schedules')</a></li>
|
||||
<li class="active">@lang('server.schedule.new.header')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<form action="{{ route('server.schedules.new', $server->uuidShort) }}" 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">@lang('server.schedule.setup')</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12">
|
||||
<label class="control-label" for="scheduleName">@lang('strings.name') <span class="field-optional"></span></label>
|
||||
<div>
|
||||
<input type="text" name="name" id="scheduleName" class="form-control" value="{{ old('name') }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="scheduleDayOfWeek" class="control-label">@lang('server.schedule.day_of_week')</label>
|
||||
<div>
|
||||
<select data-action="update-field" data-field="cron_day_of_week" class="form-control" multiple>
|
||||
<option value="0">@lang('strings.days.sun')</option>
|
||||
<option value="1">@lang('strings.days.mon')</option>
|
||||
<option value="2">@lang('strings.days.tues')</option>
|
||||
<option value="3">@lang('strings.days.wed')</option>
|
||||
<option value="4">@lang('strings.days.thurs')</option>
|
||||
<option value="5">@lang('strings.days.fri')</option>
|
||||
<option value="6">@lang('strings.days.sat')</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" id="scheduleDayOfWeek" class="form-control" name="cron_day_of_week" value="{{ old('cron_day_of_week') }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="scheduleDayOfMonth" class="control-label">@lang('server.schedule.day_of_month')</label>
|
||||
<div>
|
||||
<select data-action="update-field" data-field="cron_day_of_month" class="form-control" multiple>
|
||||
@foreach(range(1, 31) as $i)
|
||||
<option value="{{ $i }}">{{ $i }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" id="scheduleDayOfMonth" class="form-control" name="cron_day_of_month" value="{{ old('cron_day_of_month') }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="scheduleHour" class="control-label">@lang('server.schedule.hour')</label>
|
||||
<div>
|
||||
<select data-action="update-field" data-field="cron_hour" class="form-control" multiple>
|
||||
@foreach(range(0, 23) as $i)
|
||||
<option value="{{ $i }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}:00</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<input type="text" id="scheduleHour" class="form-control" name="cron_hour" value="{{ old('cron_hour') }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="scheduleMinute" class="control-label">@lang('server.schedule.minute')</label>
|
||||
<div>
|
||||
<select data-action="update-field" data-field="cron_minute" class="form-control" multiple>
|
||||
@foreach(range(0, 55) as $i)
|
||||
@if($i % 5 === 0)
|
||||
<option value="{{ $i }}">_ _:{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" id="scheduleMinute" class="form-control" name="cron_minute" value="{{ old('cron_minute') }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer with-border">
|
||||
<p class="small text-muted no-margin-bottom">@lang('server.schedule.time_help')</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary" id="containsTaskList">
|
||||
@include('partials.schedules.task-template')
|
||||
<div class="box-footer with-border" id="taskAppendBefore">
|
||||
<div>
|
||||
<p class="text-muted small">@lang('server.schedule.task_help')</p>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{!! csrf_field() !!}
|
||||
<button type="button" class="btn btn-sm btn-default" data-action="add-new-task"><i class="fa fa-plus"></i> @lang('server.schedule.task.add_more')</button>
|
||||
<button type="submit" class="btn btn-sm btn-success">@lang('server.schedule.new.submit')</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
{!! Theme::js('vendor/select2/select2.full.min.js') !!}
|
||||
{!! Theme::js('js/frontend/tasks/view-actions.js') !!}
|
||||
@endsection
|
|
@ -1,163 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.schedules.edit.header')
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
{{-- This has to be loaded before the AdminLTE theme to avoid dropdown issues. --}}
|
||||
{!! Theme::css('vendor/select2/select2.min.css') !!}
|
||||
@parent
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.schedule.manage.header')<small>{{ $schedule->name }}</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li><a href="{{ route('server.schedules', $server->uuidShort) }}">@lang('navigation.server.schedules')</a></li>
|
||||
<li class="active">@lang('server.schedule.manage.header')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<form action="{{ route('server.schedules.view', ['server' => $server->uuidShort, 'schedule' => $schedule->hashid]) }}" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12">
|
||||
<label class="control-label" for="scheduleName">@lang('strings.name') <span class="field-optional"></span></label>
|
||||
<div>
|
||||
<input type="text" name="name" class="form-control" id="scheduleName" value="{{ old('name', $schedule->name) }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="scheduleDayOfWeek" class="control-label">@lang('server.schedule.day_of_week')</label>
|
||||
<div>
|
||||
<select data-action="update-field" data-field="cron_day_of_week" class="form-control" multiple>
|
||||
<option value="0">@lang('strings.days.sun')</option>
|
||||
<option value="1">@lang('strings.days.mon')</option>
|
||||
<option value="2">@lang('strings.days.tues')</option>
|
||||
<option value="3">@lang('strings.days.wed')</option>
|
||||
<option value="4">@lang('strings.days.thurs')</option>
|
||||
<option value="5">@lang('strings.days.fri')</option>
|
||||
<option value="6">@lang('strings.days.sat')</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" id="scheduleDayOfWeek" class="form-control" name="cron_day_of_week" value="{{ old('cron_day_of_week', $schedule->cron_day_of_week) }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="scheduleDayOfMonth" class="control-label">@lang('server.schedule.day_of_month')</label>
|
||||
<div>
|
||||
<select data-action="update-field" data-field="cron_day_of_month" class="form-control" multiple>
|
||||
@foreach(range(1, 31) as $i)
|
||||
<option value="{{ $i }}">{{ $i }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" id="scheduleDayOfMonth" class="form-control" name="cron_day_of_month" value="{{ old('cron_day_of_month', $schedule->cron_day_of_month) }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="scheduleHour" class="control-label">@lang('server.schedule.hour')</label>
|
||||
<div>
|
||||
<select data-action="update-field" data-field="cron_hour" class="form-control" multiple>
|
||||
@foreach(range(0, 23) as $i)
|
||||
<option value="{{ $i }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}:00</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<input type="text" id="scheduleHour" class="form-control" name="cron_hour" value="{{ old('cron_hour', $schedule->cron_hour) }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="scheduleMinute" class="control-label">@lang('server.schedule.minute')</label>
|
||||
<div>
|
||||
<select data-action="update-field" data-field="cron_minute" class="form-control" multiple>
|
||||
@foreach(range(0, 55) as $i)
|
||||
@if($i % 5 === 0)
|
||||
<option value="{{ $i }}">_ _:{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" id="scheduleMinute" class="form-control" name="cron_minute" value="{{ old('cron_minute', $schedule->cron_minute) }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer with-border">
|
||||
<p class="small text-muted no-margin-bottom">@lang('server.schedule.time_help')</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary" id="containsTaskList">
|
||||
@include('partials.schedules.task-template')
|
||||
<div class="box-footer with-border" id="taskAppendBefore">
|
||||
<div>
|
||||
<p class="text-muted small">@lang('server.schedule.task_help')</p>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{!! csrf_field() !!}
|
||||
<button type="button" class="btn btn-sm btn-default" data-action="add-new-task"><i class="fa fa-plus"></i> @lang('server.schedule.task.add_more')</button>
|
||||
<button type="submit" class="btn btn-sm btn-success" name="_method" value="PATCH">@lang('server.schedule.manage.submit')</button>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="submit" class="btn btn-sm btn-danger muted muted-hover" id="deleteButton" name="_method" value="DELETE"><i class="fa fa-trash-o"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
{!! Theme::js('vendor/select2/select2.full.min.js') !!}
|
||||
{!! Theme::js('js/frontend/tasks/view-actions.js') !!}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#deleteButton').on('mouseenter', function () {
|
||||
$(this).find('i').html(' @lang('server.schedule.manage.delete')');
|
||||
}).on('mouseleave', function () {
|
||||
$(this).find('i').html('');
|
||||
});
|
||||
$.each(Pterodactyl.tasks, function (index, value) {
|
||||
var element = (index !== 0) ? $('button[data-action="add-new-task"]').trigger('click').data('element') : $('div[data-target="task-clone"]');
|
||||
var timeValue = (value.time_offset > 59) ? value.time_offset / 60 : value.time_offset;
|
||||
var timeInterval = (value.time_offset > 59) ? 'm' : 's';
|
||||
element.find('select[name="tasks[time_value][]"]').val(timeValue).trigger('change');
|
||||
element.find('select[name="tasks[time_interval][]"]').val(timeInterval).trigger('change');
|
||||
element.find('select[name="tasks[action][]"]').val(value.action).trigger('change');
|
||||
element.find('input[name="tasks[payload][]"]').val(value.payload);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
|
@ -1,120 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.config.allocation.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.config.allocation.header')<small>@lang('server.config.allocation.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li>@lang('navigation.server.configuration')</li>
|
||||
<li class="active">@lang('navigation.server.port_allocations')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('server.config.allocation.available')</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>@lang('strings.ip')</th>
|
||||
<th>@lang('strings.alias')</th>
|
||||
<th>@lang('strings.port')</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@foreach ($allocations as $allocation)
|
||||
<tr>
|
||||
<td>
|
||||
<code>{{ $allocation->ip }}</code>
|
||||
</td>
|
||||
<td class="middle">
|
||||
@if(is_null($allocation->ip_alias))
|
||||
<span class="label label-default">@lang('strings.none')</span>
|
||||
@else
|
||||
<code>{{ $allocation->ip_alias }}</code>
|
||||
@endif
|
||||
</td>
|
||||
<td><code>{{ $allocation->port }}</code></td>
|
||||
<td class="col-xs-2 middle">
|
||||
@if($allocation->id === $server->allocation_id)
|
||||
<a class="btn btn-xs btn-success disabled" data-action="set-default" data-allocation="{{ $allocation->hashid }}" role="button">@lang('strings.primary')</a>
|
||||
@else
|
||||
<a class="btn btn-xs btn-default" data-action="set-default" data-allocation="{{ $allocation->hashid }}" role="button">@lang('strings.make_primary')</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="toggleActivityOverlay" class="overlay hidden">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('server.config.allocation.help')</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>@lang('server.config.allocation.help_text')</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
@can('edit-allocation', $server)
|
||||
(function triggerClickHandler() {
|
||||
$('a[data-action="set-default"]:not(.disabled)').click(function (e) {
|
||||
$('#toggleActivityOverlay').removeClass('hidden');
|
||||
e.preventDefault();
|
||||
var self = $(this);
|
||||
$.ajax({
|
||||
type: 'PATCH',
|
||||
url: Router.route('server.settings.allocation', { server: Pterodactyl.server.uuidShort }),
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content'),
|
||||
},
|
||||
data: {
|
||||
'allocation': $(this).data('allocation')
|
||||
}
|
||||
}).done(function () {
|
||||
self.parents().eq(2).find('a[role="button"]').removeClass('btn-success disabled').addClass('btn-default').html('{{ trans('strings.make_primary') }}');
|
||||
self.removeClass('btn-default').addClass('btn-success disabled').html('{{ trans('strings.primary') }}');
|
||||
}).fail(function(jqXHR) {
|
||||
console.error(jqXHR);
|
||||
var error = 'An error occurred while trying to process this request.';
|
||||
if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {
|
||||
error = jqXHR.responseJSON.error;
|
||||
}
|
||||
swal({type: 'error', title: 'Whoops!', text: error});
|
||||
}).always(function () {
|
||||
triggerClickHandler();
|
||||
$('#toggleActivityOverlay').addClass('hidden');
|
||||
})
|
||||
});
|
||||
})();
|
||||
@endcan
|
||||
});
|
||||
</script>
|
||||
@endsection
|
|
@ -1,50 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.config.name.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.config.name.header')<small>@lang('server.config.name.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li>@lang('navigation.server.configuration')</li>
|
||||
<li class="active">@lang('navigation.server.server_name')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form action="{{ route('server.settings.name', $server->uuidShort) }}" method="POST">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<div class="form-group no-margin-bottom">
|
||||
<label class="control-label" for="pServerName">@lang('server.config.name.header')</label>
|
||||
<div>
|
||||
<input type="text" name="name" id="pServerName" class="form-control" value="{{ $server->name }}" />
|
||||
<p class="small text-muted no-margin-bottom">@lang('server.config.name.details')</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{{ method_field('PATCH') }}
|
||||
{{ csrf_field() }}
|
||||
<input type="submit" class="btn btn-sm btn-primary pull-right" value="@lang('strings.submit')" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
@endsection
|
|
@ -1,54 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.config.sftp.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.config.sftp.header')<small>@lang('server.config.sftp.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li>@lang('navigation.server.configuration')</li>
|
||||
<li class="active">@lang('navigation.server.sftp_settings')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('server.config.sftp.details')</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label">@lang('server.config.sftp.conn_addr')</label>
|
||||
<div>
|
||||
<input type="text" class="form-control" readonly value="sftp://{{ $node->fqdn }}:{{ $node->daemonSFTP }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="control-label">@lang('strings.username')</label>
|
||||
<div>
|
||||
<input type="text" class="form-control" readonly value="{{ auth()->user()->username }}.{{ $server->uuidShort }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<p class="small text-muted no-margin-bottom">@lang('server.config.sftp.warning')</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
@endsection
|
|
@ -1,87 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.config.startup.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.config.startup.header')<small>@lang('server.config.startup.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li>@lang('navigation.server.configuration')</li>
|
||||
<li class="active">@lang('navigation.server.startup_parameters')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('server.config.startup.command')</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group no-margin-bottom">
|
||||
<input type="text" class="form-control" readonly value="{{ $startup }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@can('edit-startup', $server)
|
||||
<form action="{{ route('server.settings.startup', $server->uuidShort) }}" method="POST">
|
||||
@foreach($variables as $v)
|
||||
<div class="col-xs-12 col-md-4 col-sm-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $v->name }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<input
|
||||
@if($v->user_editable)
|
||||
name="environment[{{ $v->env_variable }}]"
|
||||
@else
|
||||
readonly
|
||||
@endif
|
||||
class="form-control" type="text" value="{{ old('environment.' . $v->env_variable, $server_values[$v->env_variable]) }}" />
|
||||
<p class="small text-muted">{{ $v->description }}</p>
|
||||
<p class="no-margin">
|
||||
@if($v->required && $v->user_editable )
|
||||
<span class="label label-danger">@lang('strings.required')</span>
|
||||
@elseif(! $v->required && $v->user_editable)
|
||||
<span class="label label-default">@lang('strings.optional')</span>
|
||||
@endif
|
||||
@if(! $v->user_editable)
|
||||
<span class="label label-warning">@lang('strings.read_only')</span>
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<p class="no-margin text-muted small"><strong>@lang('server.config.startup.startup_regex'):</strong> <code>{{ $v->rules }}</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
{!! method_field('PATCH') !!}
|
||||
<input type="submit" class="btn btn-primary btn-sm pull-right" value="@lang('server.config.startup.update')" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endcan
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
@endsection
|
|
@ -1,132 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.users.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.users.header')<small>@lang('server.users.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li class="active">@lang('navigation.server.subusers')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('server.users.list')</h3>
|
||||
@can('create-subuser', $server)
|
||||
<div class="box-tools">
|
||||
<a href="{{ route('server.subusers.new', $server->uuidShort) }}"><button class="btn btn-primary btn-sm">Create New</button></a>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>@lang('strings.username')</th>
|
||||
<th>@lang('strings.email')</th>
|
||||
<th class="text-center">@lang('strings.2fa')</th>
|
||||
<th class="hidden-xs">@lang('strings.created_at')</th>
|
||||
@can('view-subuser', $server)<th></th>@endcan
|
||||
@can('delete-subuser', $server)<th></th>@endcan
|
||||
</tr>
|
||||
@foreach($subusers as $subuser)
|
||||
<tr>
|
||||
<td class="text-center middle"><img class="img-circle" src="https://www.gravatar.com/avatar/{{ md5($subuser->user->email) }}?s=128" style="height:20px;" alt="User Image"></td>
|
||||
<td class="middle">{{ $subuser->user->username }}
|
||||
<td class="middle"><code>{{ $subuser->user->email }}</code></td>
|
||||
<td class="middle text-center">
|
||||
@if($subuser->user->use_totp)
|
||||
<i class="fa fa-lock text-green-500"></i>
|
||||
@else
|
||||
<i class="fa fa-unlock text-red"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td class="middle hidden-xs">{{ $subuser->user->created_at }}</td>
|
||||
@can('view-subuser', $server)
|
||||
<td class="text-center middle">
|
||||
<a href="{{ route('server.subusers.view', ['server' => $server->uuidShort, 'subuser' => $subuser->hashid]) }}">
|
||||
<button class="btn btn-xs btn-primary">@lang('server.users.configure')</button>
|
||||
</a>
|
||||
</td>
|
||||
@endcan
|
||||
@can('delete-subuser', $server)
|
||||
<td class="text-center middle">
|
||||
<a href="#/delete/{{ $subuser->hashid }}" data-action="delete" data-id="{{ $subuser->hashid }}">
|
||||
<button class="btn btn-xs btn-danger">@lang('strings.revoke')</button>
|
||||
</a>
|
||||
</td>
|
||||
@endcan
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('[data-action="delete"]').click(function (event) {
|
||||
event.preventDefault();
|
||||
var self = $(this);
|
||||
swal({
|
||||
type: 'warning',
|
||||
title: 'Delete Subuser',
|
||||
text: 'This will immediately remove this user from this server and revoke all permissions.',
|
||||
showCancelButton: true,
|
||||
showConfirmButton: true,
|
||||
closeOnConfirm: false,
|
||||
showLoaderOnConfirm: true
|
||||
}, function () {
|
||||
$.ajax({
|
||||
method: 'DELETE',
|
||||
url: Router.route('server.subusers.view', {
|
||||
server: Pterodactyl.server.uuidShort,
|
||||
subuser: self.data('id'),
|
||||
}),
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content'),
|
||||
}
|
||||
}).done(function () {
|
||||
self.parent().parent().slideUp();
|
||||
swal({
|
||||
type: 'success',
|
||||
title: '',
|
||||
text: 'Subuser was successfully deleted.'
|
||||
});
|
||||
}).fail(function (jqXHR) {
|
||||
console.error(jqXHR);
|
||||
var error = 'An error occurred while trying to process this request.';
|
||||
if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {
|
||||
error = jqXHR.responseJSON.error;
|
||||
}
|
||||
swal({
|
||||
type: 'error',
|
||||
title: 'Whoops!',
|
||||
text: error
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
|
@ -1,91 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.users.new.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.users.new.header')<small>@lang('server.users.new.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li><a href="{{ route('server.subusers', $server->uuidShort) }}">@lang('navigation.server.subusers')</a></li>
|
||||
<li class="active">@lang('server.users.add')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<?php $oldInput = array_flip(is_array(old('permissions')) ? old('permissions') : []) ?>
|
||||
<form action="{{ route('server.subusers.new', $server->uuidShort) }}" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<div class="form-group">
|
||||
<label class="control-label">@lang('server.users.new.email')</label>
|
||||
<div>
|
||||
{!! csrf_field() !!}
|
||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}" />
|
||||
<p class="text-muted small">@lang('server.users.new.email_help')</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="btn-group pull-left">
|
||||
<a id="selectAllCheckboxes" class="btn btn-sm btn-default">@lang('strings.select_all')</a>
|
||||
<a id="unselectAllCheckboxes" class="btn btn-sm btn-default">@lang('strings.select_none')</a>
|
||||
</div>
|
||||
<input type="submit" name="submit" value="@lang('server.users.add')" class="pull-right btn btn-sm btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@foreach($permissions as $block => $perms)
|
||||
<div class="col-sm-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('server.users.new.' . $block . '_header')</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@foreach($perms as $permission => $daemon)
|
||||
<div class="form-group">
|
||||
<div class="checkbox checkbox-primary no-margin-bottom">
|
||||
<input id="{{ $permission }}" name="permissions[]" type="checkbox" value="{{ $permission }}"/>
|
||||
<label for="{{ $permission }}" class="strong">
|
||||
@lang('server.users.new.' . str_replace('-', '_', $permission) . '.title')
|
||||
</label>
|
||||
</div>
|
||||
<p class="text-muted small">@lang('server.users.new.' . str_replace('-', '_', $permission) . '.description')</p>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if ($loop->iteration % 2 === 0)
|
||||
<div class="clearfix visible-lg-block visible-md-block visible-sm-block"></div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('#selectAllCheckboxes').on('click', function () {
|
||||
$('input[type=checkbox]').prop('checked', true);
|
||||
});
|
||||
$('#unselectAllCheckboxes').on('click', function () {
|
||||
$('input[type=checkbox]').prop('checked', false);
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@endsection
|
|
@ -1,96 +0,0 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.users.new.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.users.edit.header')<small>@lang('server.users.edit.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li><a href="{{ route('server.subusers', $server->uuidShort) }}">@lang('navigation.server.subusers')</a></li>
|
||||
<li class="active">@lang('server.users.update')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@can('edit-subuser', $server)
|
||||
<form action="{{ route('server.subusers.view', [ 'uuid' => $server->uuidShort, 'subuser' => $subuser->hashid ]) }}" method="POST">
|
||||
@endcan
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<div class="form-group">
|
||||
<label class="control-label">@lang('server.users.new.email')</label>
|
||||
<div>
|
||||
{!! csrf_field() !!}
|
||||
<input type="email" class="form-control" disabled value="{{ $subuser->user->email }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@can('edit-subuser', $server)
|
||||
<div class="box-body">
|
||||
<div class="btn-group pull-left">
|
||||
<a id="selectAllCheckboxes" class="btn btn-sm btn-default">@lang('strings.select_all')</a>
|
||||
<a id="unselectAllCheckboxes" class="btn btn-sm btn-default">@lang('strings.select_none')</a>
|
||||
</div>
|
||||
{!! method_field('PATCH') !!}
|
||||
<input type="submit" name="submit" value="@lang('server.users.update')" class="pull-right btn btn-sm btn-primary" />
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@foreach($permlist as $block => $perms)
|
||||
<div class="col-sm-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('server.users.new.' . $block . '_header')</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@foreach($perms as $permission => $daemon)
|
||||
<div class="form-group">
|
||||
<div class="checkbox checkbox-primary no-margin-bottom">
|
||||
<input id="{{ $permission }}" name="permissions[]" type="checkbox" @if(isset($permissions[$permission]))checked="checked"@endif @cannot('edit-subuser', $server)disabled="disabled"@endcannot value="{{ $permission }}"/>
|
||||
<label for="{{ $permission }}" class="strong">
|
||||
@lang('server.users.new.' . str_replace('-', '_', $permission) . '.title')
|
||||
</label>
|
||||
</div>
|
||||
<p class="text-muted small">@lang('server.users.new.' . str_replace('-', '_', $permission) . '.description')</p>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if ($loop->iteration % 2 === 0)
|
||||
<div class="clearfix visible-lg-block visible-md-block visible-sm-block"></div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@can('edit-subuser', $server)
|
||||
</form>
|
||||
@endcan
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('#selectAllCheckboxes').on('click', function () {
|
||||
$('input[type=checkbox]').prop('checked', true);
|
||||
});
|
||||
$('#unselectAllCheckboxes').on('click', function () {
|
||||
$('input[type=checkbox]').prop('checked', false);
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@endsection
|
Loading…
Add table
Add a link
Reference in a new issue