Merge branch 'develop' into feature/new-theme
# Conflicts: # .gitignore # public/themes/pterodactyl/js/frontend/files/filemanager.min.js # public/themes/pterodactyl/js/frontend/files/filemanager.min.js.map # public/themes/pterodactyl/js/frontend/serverlist.js # resources/themes/pterodactyl/server/files/list.blade.php
This commit is contained in:
commit
3a88deb97a
170 changed files with 9023 additions and 2222 deletions
|
@ -47,7 +47,7 @@
|
|||
<p class="login-box-msg">@lang('auth.authentication_required')</p>
|
||||
<form action="{{ route('auth.login') }}" method="POST">
|
||||
<div class="form-group has-feedback">
|
||||
<input type="email" name="email" class="form-control" value="{{ old('email') }}" placeholder="@lang('strings.email')">
|
||||
<input name="user" class="form-control" value="{{ old('user') }}" placeholder="@lang('strings.user_identifier')">
|
||||
<span class="fa fa-envelope form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="form-group has-feedback">
|
||||
|
@ -57,7 +57,7 @@
|
|||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<div class="form-group has-feedback">
|
||||
<input type="checkbox" name="remember_me" id="remember_me" /> <label for="remember_me" class="weight-300">@lang('auth.remember_me')</label>
|
||||
<input type="checkbox" name="remember" id="remember" /> <label for="remember" class="weight-300">@lang('auth.remember_me')</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
|
|
46
resources/themes/pterodactyl/auth/totp.blade.php
Normal file
46
resources/themes/pterodactyl/auth/totp.blade.php
Normal file
|
@ -0,0 +1,46 @@
|
|||
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
|
||||
|
||||
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
|
||||
{{-- of this software and associated documentation files (the "Software"), to deal --}}
|
||||
{{-- in the Software without restriction, including without limitation the rights --}}
|
||||
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
|
||||
{{-- copies of the Software, and to permit persons to whom the Software is --}}
|
||||
{{-- furnished to do so, subject to the following conditions: --}}
|
||||
|
||||
{{-- The above copyright notice and this permission notice shall be included in all --}}
|
||||
{{-- copies or substantial portions of the Software. --}}
|
||||
|
||||
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
|
||||
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
|
||||
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
|
||||
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
|
||||
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
|
||||
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
|
||||
{{-- SOFTWARE. --}}
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('title')
|
||||
2FA Checkpoint
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">@lang('auth.2fa_required')</p>
|
||||
<form action="{{ route('auth.totp') }}" method="POST">
|
||||
<div class="form-group">
|
||||
<input type="text" name="2fa_token" class="form-control" placeholder="@lang('strings.2fa_token')">
|
||||
<span class="fa fa-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="verify_token" value="{{ $verify_key }}" />
|
||||
@if($remember)
|
||||
<input type="hidden" name="remember" value="true" />
|
||||
@endif
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat">@lang('strings.submit')</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
|
@ -79,3 +79,48 @@
|
|||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('[data-action="delete"]').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', { key: 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 occured while attempting to revoke this key.'
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
|
@ -62,8 +62,8 @@
|
|||
<tr class="dynamic-update" data-server="{{ $server->uuidShort }}">
|
||||
<td><code>{{ $server->uuidShort }}</code></td>
|
||||
<td><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></td>
|
||||
<td>{{ $server->nodeName }}</td>
|
||||
<td><code>@if(!is_null($server->ip_alias)){{ $server->ip_alias }}@else{{ $server->ip }}@endif:{{ $server->port }}</code></td>
|
||||
<td>{{ $server->node->name }}</td>
|
||||
<td><code>{{ $server->allocation->alias }}:{{ $server->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" data-action="status">
|
||||
|
|
|
@ -44,10 +44,12 @@
|
|||
</div>
|
||||
@yield('content')
|
||||
<p class="small text-muted">
|
||||
Copyright © 2015 - {{ date('Y') }} <a href="https://pterodactyl.io/" target="_blank">Pterodactyl Software & Design</a>.<br />
|
||||
Copyright © 2015 - {{ date('Y') }} <a href="https://pterodactyl.io/" target="_blank">Pterodactyl Software</a>.<br />
|
||||
</p>
|
||||
</div>
|
||||
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
|
||||
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
|
||||
|
||||
@if(config('app.phrase_in_context')) {!! Theme::js('js/phraseapp.js') !!} @endif
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<div class="pull-right hidden-xs small text-gray">
|
||||
<strong>v</strong> {{ config('app.version') }}
|
||||
</div>
|
||||
Copyright © 2015 - {{ date('Y') }} <a href="https://pterodactyl.io/">Pterodactyl Software & Design</a>.
|
||||
Copyright © 2015 - {{ date('Y') }} <a href="https://pterodactyl.io/">Pterodactyl Software</a>.
|
||||
</footer>
|
||||
</div>
|
||||
@section('footer-scripts')
|
||||
|
|
|
@ -57,47 +57,21 @@
|
|||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<a href="{{ route('account') }}" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="https://www.gravatar.com/avatar/{{ md5(strtolower(Auth::user()->email)) }}?s=160" class="user-image" alt="User Image">
|
||||
<span class="hidden-xs">{{ Auth::user()->name_first }} {{ Auth::user()->name_last }}</span> <span class="caret"></span>
|
||||
<span class="hidden-xs">{{ Auth::user()->name_first }} {{ Auth::user()->name_last }}</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
@if(Auth::user()->isRootAdmin())
|
||||
<li><a href="{{ route('admin.index') }}">@lang('strings.admin_control')</a></li>
|
||||
@endif
|
||||
<li><a href="{{ route('auth.logout') }}">@lang('strings.sign_out')</a></li>
|
||||
</ul>
|
||||
{{-- <ul class="dropdown-menu">
|
||||
<li class="user-header">
|
||||
<p>
|
||||
<small>Member since Nov. 2012</small>
|
||||
</p>
|
||||
</li>
|
||||
<li class="user-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-center">
|
||||
<a href="#">Followers</a>
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
<a href="#">Sales</a>
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
<a href="#">Friends</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="user-footer">
|
||||
<div class="pull-left">
|
||||
<a href="{{ route('admin.index') }}" class="btn btn-default btn-flat">Admin Control</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{{ route('auth.logout') }}" class="btn btn-default btn-flat">Sign out</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul> --}}
|
||||
</li>
|
||||
@if(Auth::user()->isRootAdmin())
|
||||
<li>
|
||||
<li><a href="{{ route('admin.index') }}" data-toggle="tooltip" data-placement="bottom" title="{{ @trans('strings.admin_cp') }}"><i class="fa fa-gears" style="margin-top:4px;padding-bottom:2px;"></i></a></li>
|
||||
</li>
|
||||
@endif
|
||||
<li>
|
||||
<a href="#" data-action="control-sidebar" data-toggle="tooltip" data-placement="bottom" title="{{ @trans('strings.servers') }}"><i class="fa fa-server" style="margin-top:4px;padding-bottom:2px;"></i></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears" style="margin-top:4px;padding-bottom:2px;"></i></a>
|
||||
<li><a href="{{ route('auth.logout') }}" data-toggle="tooltip" data-placement="bottom" title="{{ @trans('strings.logout') }}"><i class="fa fa-power-off" style="margin-top:4px;padding-bottom:2px;"></i></a></li>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -116,7 +90,7 @@
|
|||
<ul class="sidebar-menu">
|
||||
<li class="header">@lang('navigation.account.header')</li>
|
||||
<li class="{{ Route::currentRouteName() !== 'account' ?: 'active' }}">
|
||||
<a href="{{ route('account')}}">
|
||||
<a href="{{ route('account') }}">
|
||||
<i class="fa fa-user"></i> <span>@lang('navigation.account.my_account')</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -142,63 +116,81 @@
|
|||
<i class="fa fa-terminal"></i> <span>@lang('navigation.server.console')</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview
|
||||
@if(in_array(Route::currentRouteName(), ['server.files.index', 'server.files.edit', 'server.files.add']))
|
||||
active
|
||||
@endif
|
||||
">
|
||||
<a href="#">
|
||||
<i class="fa fa-files-o"></i>
|
||||
<span>@lang('navigation.server.file_management')</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="{{ (Route::currentRouteName() !== 'server.files.index' && Route::currentRouteName() !== 'server.files.edit') ?: 'active' }}"><a href="{{ route('server.files.index', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.file_browser')</a></li>
|
||||
<li class="{{ Route::currentRouteName() !== 'server.files.add' ?: 'active' }}"><a href="{{ route('server.files.add', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.create_file')</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li
|
||||
@if(in_array(Route::currentRouteName(), ['server.subusers', 'server.subusers.new', 'server.subusers.view']))
|
||||
class="active"
|
||||
@endif
|
||||
>
|
||||
<a href="{{ route('server.subusers', $server->uuidShort)}}">
|
||||
<i class="fa fa-users"></i> <span>Subusers</span>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
@if(in_array(Route::currentRouteName(), ['server.tasks', 'server.tasks.new']))
|
||||
class="active"
|
||||
@endif
|
||||
>
|
||||
<a href="{{ route('server.tasks', $server->uuidShort)}}">
|
||||
<i class="fa fa-clock-o"></i> <span>@lang('navigation.server.task_management')</span>
|
||||
<span class="pull-right-container">
|
||||
<span class="label label-primary pull-right">{{ \Pterodactyl\Models\Task::select('id')->where('server', $server->id)->where('active', 1)->count() }}</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview
|
||||
@if(in_array(Route::currentRouteName(), ['server.settings.sftp', 'server.settings.databases', 'server.settings.startup', 'server.settings.allocation']))
|
||||
active
|
||||
@endif
|
||||
">
|
||||
<a href="#">
|
||||
<i class="fa fa-gears"></i>
|
||||
<span>@lang('navigation.server.configuration')</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="{{ Route::currentRouteName() !== 'server.settings.allocation' ?: 'active' }}"><a href="{{ route('server.settings.allocation', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.port_allocations')</a></li>
|
||||
<li class="{{ Route::currentRouteName() !== 'server.settings.sftp' ?: 'active' }}"><a href="{{ route('server.settings.sftp', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.sftp_settings')</a></li>
|
||||
<li class="{{ Route::currentRouteName() !== 'server.settings.startup' ?: 'active' }}"><a href="{{ route('server.settings.startup', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.startup_parameters')</a></li>
|
||||
<li class="{{ Route::currentRouteName() !== 'server.settings.databases' ?: 'active' }}"><a href="{{ route('server.settings.databases', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.databases')</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@can('list-files', $server)
|
||||
<li class="treeview
|
||||
@if(in_array(Route::currentRouteName(), ['server.files.index', 'server.files.edit', 'server.files.add']))
|
||||
active
|
||||
@endif
|
||||
">
|
||||
<a href="#">
|
||||
<i class="fa fa-files-o"></i>
|
||||
<span>@lang('navigation.server.file_management')</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="{{ (Route::currentRouteName() !== 'server.files.index' && Route::currentRouteName() !== 'server.files.edit') ?: 'active' }}"><a href="{{ route('server.files.index', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.file_browser')</a></li>
|
||||
@can('create-files', $server)
|
||||
<li class="{{ Route::currentRouteName() !== 'server.files.add' ?: 'active' }}"><a href="{{ route('server.files.add', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.create_file')</a></li>
|
||||
@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcan
|
||||
@can('list-subusers', $server)
|
||||
<li
|
||||
@if(in_array(Route::currentRouteName(), ['server.subusers', 'server.subusers.new', 'server.subusers.view']))
|
||||
class="active"
|
||||
@endif
|
||||
>
|
||||
<a href="{{ route('server.subusers', $server->uuidShort)}}">
|
||||
<i class="fa fa-users"></i> <span>Subusers</span>
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
@can('list-tasks', $server)
|
||||
<li
|
||||
@if(in_array(Route::currentRouteName(), ['server.tasks', 'server.tasks.new']))
|
||||
class="active"
|
||||
@endif
|
||||
>
|
||||
<a href="{{ route('server.tasks', $server->uuidShort)}}">
|
||||
<i class="fa fa-clock-o"></i> <span>@lang('navigation.server.task_management')</span>
|
||||
<span class="pull-right-container">
|
||||
<span class="label label-primary pull-right">{{ \Pterodactyl\Models\Task::select('id')->where('server', $server->id)->where('active', 1)->count() }}</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
@if(Gate::allows('view-startup', $server) || Gate::allows('view-sftp', $server) || Gate::allows('view-databases', $server) || Gate::allows('view-allocation', $server))
|
||||
<li class="treeview
|
||||
@if(in_array(Route::currentRouteName(), ['server.settings.sftp', 'server.settings.databases', 'server.settings.startup', 'server.settings.allocation']))
|
||||
active
|
||||
@endif
|
||||
">
|
||||
<a href="#">
|
||||
<i class="fa fa-gears"></i>
|
||||
<span>@lang('navigation.server.configuration')</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('view-allocation', $server)
|
||||
<li class="{{ Route::currentRouteName() !== 'server.settings.allocation' ?: 'active' }}"><a href="{{ route('server.settings.allocation', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.port_allocations')</a></li>
|
||||
@endcan
|
||||
@can('view-sftp', $server)
|
||||
<li class="{{ Route::currentRouteName() !== 'server.settings.sftp' ?: 'active' }}"><a href="{{ route('server.settings.sftp', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.sftp_settings')</a></li>
|
||||
@endcan
|
||||
@can('view-startup', $server)
|
||||
<li class="{{ Route::currentRouteName() !== 'server.settings.startup' ?: 'active' }}"><a href="{{ route('server.settings.startup', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.startup_parameters')</a></li>
|
||||
@endcan
|
||||
@can('view-databases', $server)
|
||||
<li class="{{ Route::currentRouteName() !== 'server.settings.databases' ?: 'active' }}"><a href="{{ route('server.settings.databases', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> @lang('navigation.server.databases')</a></li>
|
||||
@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endif
|
||||
@endif
|
||||
</ul>
|
||||
</section>
|
||||
|
@ -236,7 +228,7 @@
|
|||
<div class="pull-right hidden-xs small text-gray">
|
||||
<strong>v</strong> {{ config('app.version') }}
|
||||
</div>
|
||||
Copyright © 2015 - {{ date('Y') }} <a href="https://pterodactyl.io/">Pterodactyl Software & Design</a>.
|
||||
Copyright © 2015 - {{ date('Y') }} <a href="https://pterodactyl.io/">Pterodactyl Software</a>.
|
||||
</footer>
|
||||
<aside class="control-sidebar control-sidebar-dark">
|
||||
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
|
||||
|
@ -245,7 +237,7 @@
|
|||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="control-sidebar-servers-tab">
|
||||
<ul class="control-sidebar-menu">
|
||||
@foreach (Pterodactyl\Models\Server::getUserServers() as $s)
|
||||
@foreach (Auth::user()->serverAccessCollection(null, []) as $s)
|
||||
<li>
|
||||
<a
|
||||
@if(isset($server) && isset($node))
|
||||
|
@ -254,7 +246,7 @@
|
|||
@endif
|
||||
@endif
|
||||
href="{{ route('server.index', $s->uuidShort) }}">
|
||||
@if($s->owner === Auth::user()->id)
|
||||
@if($s->owner_id === Auth::user()->id)
|
||||
<i class="menu-icon fa fa-user bg-blue"></i>
|
||||
@else
|
||||
<i class="menu-icon fa fa-user-o bg-gray"></i>
|
||||
|
@ -281,6 +273,8 @@
|
|||
{!! Theme::js('vendor/adminlte/app.min.js') !!}
|
||||
{!! Theme::js('js/vendor/socketio/socket.io.min.js') !!}
|
||||
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js') !!}
|
||||
|
||||
@if(config('app.phrase_in_context')) {!! Theme::js('js/phraseapp.js') !!} @endif
|
||||
@show
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
</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-off', $server)<button class="btn btn-primary disabled" data-attr="power" data-action="restart">Restart</button>@endcan
|
||||
@can('power-restart', $server)<button class="btn btn-danger disabled" data-attr="power" data-action="stop">Stop</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>
|
||||
|
@ -88,7 +88,7 @@
|
|||
{!! Theme::js('js/frontend/console.js') !!}
|
||||
{!! Theme::js('js/vendor/chartjs/chart.min.js') !!}
|
||||
{!! Theme::js('js/vendor/jquery/jquery-dateFormat.min.js') !!}
|
||||
@if($server->a_serviceFile === 'minecraft')
|
||||
@if($server->service->file === 'minecraft')
|
||||
{!! Theme::js('js/plugins/minecraft/eula.js') !!}
|
||||
@endif
|
||||
@endsection
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<th>@lang('strings.port')</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@foreach ($allocations as $allocation)
|
||||
@foreach ($server->allocations as $allocation)
|
||||
<tr>
|
||||
<td>
|
||||
<code>{{ $allocation->ip }}</code>
|
||||
|
@ -63,7 +63,7 @@
|
|||
</td>
|
||||
<td><code>{{ $allocation->port }}</code></td>
|
||||
<td class="col-xs-2 middle">
|
||||
@if($allocation->id === $server->allocation)
|
||||
@if($allocation->id === $server->allocation_id)
|
||||
<span class="label label-success" data-allocation="{{ $allocation->id }}">@lang('strings.primary')</span>
|
||||
@else
|
||||
<span class="label label-default" data-action="set-connection" data-allocation="{{ $allocation->id }}">@lang('strings.make_primary')</span>
|
||||
|
|
|
@ -51,29 +51,29 @@
|
|||
@can('view-subuser', $server)<th></th>@endcan
|
||||
@can('delete-subuser', $server)<th></th>@endcan
|
||||
</tr>
|
||||
@foreach($subusers as $user)
|
||||
@foreach($subusers as $subuser)
|
||||
<tr>
|
||||
<td class="text-center middle"><img class="img-circle" src="https://www.gravatar.com/avatar/{{ md5($user->email) }}?s=128" style="height:20px;" alt="User Image"></td>
|
||||
<td class="middle">{{ $user->username }}
|
||||
<td class="middle"><code>{{ $user->email }}</code></td>
|
||||
<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($user->use_totp)
|
||||
@if($subuser->user->use_totp)
|
||||
<i class="fa fa-lock text-green"></i>
|
||||
@else
|
||||
<i class="fa fa-unlock text-red"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td class="middle hidden-xs">{{ $user->created_at }}</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, 'id' => md5($user->id)]) }}">
|
||||
<a href="{{ route('server.subusers.view', ['server' => $server->uuidShort, 'id' => $subuser->id]) }}">
|
||||
<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/{{ md5($user->id) }}" data-action="delete" data-id="{{ md5($user->id) }}">
|
||||
<a href="#/delete/{{ $subuser->id }}" data-action="delete" data-id="{{ $subuser->id }}">
|
||||
<button class="btn btn-xs btn-danger">@lang('strings.revoke')</button>
|
||||
</a>
|
||||
</td>
|
||||
|
@ -96,4 +96,51 @@
|
|||
@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.delete', {
|
||||
server: Pterodactyl.server.uuidShort,
|
||||
id: 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 occured 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
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
@section('content')
|
||||
@can('edit-subuser', $server)
|
||||
<form action="{{ route('server.subusers.view', [ 'uuid' => $server->uuidShort, 'id' => md5($subuser->id) ]) }}" method="POST">
|
||||
<form action="{{ route('server.subusers.view', [ 'uuid' => $server->uuidShort, 'id' => $subuser->id ]) }}" method="POST">
|
||||
@endcan
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
@ -45,7 +45,7 @@
|
|||
<label class="control-label">@lang('server.users.new.email')</label>
|
||||
<div>
|
||||
{!! csrf_field() !!}
|
||||
<input type="email" class="form-control" disabled value="{{ $subuser->a_userEmail }}" />
|
||||
<input type="email" class="form-control" disabled value="{{ $subuser->user->email }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in a new issue