From 659c33f0e8b909c64f6778af614efd5a79ca224f Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Mon, 7 Nov 2016 15:55:57 -0500 Subject: [PATCH 001/171] Fixes a bug that allows a user to bypass 2FA authentication requirements This bug was reported to us by a user (@Ferry#1704) on Discord on Monday, November 7th, 2016. It was disclosed that it was possible to bypass the 2FA checkpoint by clicking outside of the modal which would prompt the modal to close, but not submit the form. The user could then press the login button which would trigger an error. Due to this error being triggered the authentication attempt was not cancelled. On the next page load the application recognized the user as logged in and continued on to the panel. At no time was it possible to login without using the correct email address and password. As a result of this bug we have re-factored the Authentication code for logins to address the persistent session. Previously accounts were manually logged back out on 2FA failure. However, as this bug demonstrated, causing a fatal error in the code would prevent the logout code from firing, thus preserving their session state. This commit modifies the code to use a non-persistent login to handle 2FA checking. In order for the session to be saved the application must complete all portions of the login without any errors, at which point the user is persistently authenticated using Auth::login(). This resolves the ability to cause an exception and bypass 2FA verification. --- app/Http/Controllers/Auth/LoginController.php | 14 ++++++-------- resources/views/auth/login.blade.php | 5 ++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 197e6959..2a690314 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -103,7 +103,7 @@ class LoginController extends Controller } // Is the email & password valid? - if (!Auth::attempt([ + if (!Auth::once([ 'email' => $request->input('email'), 'password' => $request->input('password') ], $request->has('remember'))) { @@ -116,14 +116,10 @@ class LoginController extends Controller } - $G2FA = new Google2FA(); - $user = User::select('use_totp', 'totp_secret')->where('email', $request->input('email'))->first(); - // Verify TOTP Token was Valid - if($user->use_totp === 1) { - if(!$G2FA->verifyKey($user->totp_secret, $request->input('totp_token'))) { - - Auth::logout(); + if(Auth::user()->use_totp === 1) { + $G2FA = new Google2FA(); + if(is_null($request->input('totp_token')) || !$G2FA->verifyKey(Auth::user()->totp_secret, $request->input('totp_token'))) { if (!$lockedOut) { $this->incrementLoginAttempts($request); @@ -135,6 +131,8 @@ class LoginController extends Controller } } + // Successfully Authenticated. + Auth::login(Auth::user(), $request->has('remember')); return $this->sendLoginResponse($request); } diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 2000dad2..9ab5cdbf 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -125,7 +125,10 @@ $(document).ready(function() { } }).done(function (data) { if (typeof data.id !== 'undefined') { - $('#openTOTP').modal('show'); + $('#openTOTP').modal({ + backdrop: 'static', + keyboard: false + }); $('#openTOTP').on('shown.bs.modal', function() { $('#totp_token').focus(); }); From c52dfe67991910ba8e55a8cf7b8fc67ba1ac83e3 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Mon, 7 Nov 2016 15:59:52 -0500 Subject: [PATCH 002/171] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d612005e..952c5070 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ This file is a running track of new features and fixes to each version of the pa This project follows [Semantic Versioning](http://semver.org) guidelines. +## v0.5.1 (Bodacious Boreopterus) +### Fixed +* Fixes a bug that allowed a user to bypass 2FA authentication if using the correct username and password for an account. + ## v0.5.0 (Bodacious Boreopterus) After nearly a month in the works, version `v0.5.0` is finally here! 🎉 From b8a6a15b08215f130ad24adb170b364fa1798001 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Mon, 7 Nov 2016 20:08:25 -0500 Subject: [PATCH 003/171] Set version to 'canary' on development branch Official releases are either merged into master or branched off where their version number is then incremented. --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index 3093b43d..619e5103 100644 --- a/config/app.php +++ b/config/app.php @@ -4,7 +4,7 @@ return [ 'env' => env('APP_ENV', 'production'), - 'version' => env('APP_VERSION', 'v0.5.0'), + 'version' => env('APP_VERSION', 'canary'), /* |-------------------------------------------------------------------------- From cfd5e0e85415c412474d726f58028f0681228e74 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 9 Nov 2016 17:58:14 -0500 Subject: [PATCH 004/171] Implement base service file modification through panel --- app/Console/Commands/CleanServiceBackup.php | 73 +++++++ app/Console/Kernel.php | 1 + .../Controllers/Admin/ServiceController.php | 33 ++++ app/Http/Routes/AdminRoutes.php | 9 + app/Models/Checksum.php | 54 ++++++ .../ServiceRepository/Service.php | 41 ++++ .../2016_11_09_163911_add_checksums_table.php | 36 ++++ .../views/admin/services/config.blade.php | 180 ++++++++++++++++++ resources/views/admin/services/view.blade.php | 1 + resources/views/layouts/admin.blade.php | 17 ++ storage/app/.gitignore | 4 +- storage/app/services/minecraft/index.js | 60 ++++++ storage/app/services/minecraft/main.json | 75 ++++++++ storage/app/services/srcds/index.js | 57 ++++++ storage/app/services/srcds/main.json | 25 +++ storage/app/services/terraria/index.js | 57 ++++++ storage/app/services/terraria/main.json | 24 +++ storage/app/services/voice/index.js | 57 ++++++ storage/app/services/voice/main.json | 52 +++++ 19 files changed, 855 insertions(+), 1 deletion(-) create mode 100644 app/Console/Commands/CleanServiceBackup.php create mode 100644 app/Models/Checksum.php create mode 100644 database/migrations/2016_11_09_163911_add_checksums_table.php create mode 100644 resources/views/admin/services/config.blade.php create mode 100644 storage/app/services/minecraft/index.js create mode 100644 storage/app/services/minecraft/main.json create mode 100644 storage/app/services/srcds/index.js create mode 100644 storage/app/services/srcds/main.json create mode 100644 storage/app/services/terraria/index.js create mode 100644 storage/app/services/terraria/main.json create mode 100644 storage/app/services/voice/index.js create mode 100644 storage/app/services/voice/main.json diff --git a/app/Console/Commands/CleanServiceBackup.php b/app/Console/Commands/CleanServiceBackup.php new file mode 100644 index 00000000..82453d6c --- /dev/null +++ b/app/Console/Commands/CleanServiceBackup.php @@ -0,0 +1,73 @@ + + * + * 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. + */ +namespace Pterodactyl\Console\Commands; + +use Carbon; +use Storage; +use Illuminate\Console\Command; + +class CleanServiceBackup extends Command +{ + /** + * The name and signature of the console command. + * + * @var string + */ + protected $signature = 'pterodactyl:cleanservices'; + + /** + * The console command description. + * + * @var string + */ + protected $description = 'Cleans .bak files assocaited with service backups whene editing files through the panel.'; + + /** + * Create a new command instance. + * + * @return void + */ + public function __construct() + { + parent::__construct(); + } + + /** + * Execute the console command. + * + * @return mixed + */ + public function handle() + { + $files = Storage::files('services/.bak'); + + foreach($files as $file) { + $lastModified = Carbon::createFromTimestamp(Storage::lastModified($file)); + if ($lastModified->diffInMinutes(Carbon::now()) > 5) { + $this->info('Deleting ' . $file); + Storage::delete($file); + } + } + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index c8276b44..4cd65f46 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -21,6 +21,7 @@ class Kernel extends ConsoleKernel \Pterodactyl\Console\Commands\ClearTasks::class, \Pterodactyl\Console\Commands\ClearServices::class, \Pterodactyl\Console\Commands\UpdateEmailSettings::class, + \Pterodactyl\Console\Commands\CleanServiceBackup::class, ]; /** diff --git a/app/Http/Controllers/Admin/ServiceController.php b/app/Http/Controllers/Admin/ServiceController.php index dc597747..35294343 100644 --- a/app/Http/Controllers/Admin/ServiceController.php +++ b/app/Http/Controllers/Admin/ServiceController.php @@ -27,6 +27,7 @@ use Alert; use DB; use Log; use Validator; +use Storage; use Pterodactyl\Models; use Pterodactyl\Repositories\ServiceRepository; @@ -274,4 +275,36 @@ class ServiceController extends Controller return redirect()->route('admin.services.option', [$service, $option]); } + public function getConfiguration(Request $request, $serviceId) + { + $service = Models\Service::findOrFail($serviceId); + return view('admin.services.config', [ + 'service' => $service, + 'contents' => [ + 'json' => Storage::get('services/' . $service->file . '/main.json'), + 'index' => Storage::get('services/' . $service->file . '/index.js') + ] + ]); + } + + public function postConfiguration(Request $request, $serviceId) + { + try { + $repo = new ServiceRepository\Service; + $repo->updateFile($serviceId, $request->except([ + '_token' + ])); + return response('', 204); + } catch (DisplayException $ex) { + return response()->json([ + 'error' => $ex->getMessage() + ], 503); + } catch (\Exception $ex) { + Log::error($ex); + return response()->json([ + 'error' => 'An error occured while attempting to save the file.' + ], 503); + } + } + } diff --git a/app/Http/Routes/AdminRoutes.php b/app/Http/Routes/AdminRoutes.php index bfc07b72..726fccc2 100644 --- a/app/Http/Routes/AdminRoutes.php +++ b/app/Http/Routes/AdminRoutes.php @@ -379,6 +379,15 @@ class AdminRoutes { 'uses' => 'Admin\ServiceController@deleteService' ]); + $router->get('/service/{id}/configuration', [ + 'as' => 'admin.services.service.config', + 'uses' => 'Admin\ServiceController@getConfiguration' + ]); + + $router->post('/service/{id}/configuration', [ + 'uses' => 'Admin\ServiceController@postConfiguration' + ]); + $router->get('/service/{service}/option/new', [ 'as' => 'admin.services.option.new', 'uses' => 'Admin\ServiceController@newOption' diff --git a/app/Models/Checksum.php b/app/Models/Checksum.php new file mode 100644 index 00000000..8038b7bf --- /dev/null +++ b/app/Models/Checksum.php @@ -0,0 +1,54 @@ + + * + * 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. + */ +namespace Pterodactyl\Models; + +use Illuminate\Database\Eloquent\Model; + +class Checksum extends Model +{ + + /** + * The table associated with the model. + * + * @var string + */ + protected $table = 'checksums'; + + /** + * Fields that are not mass assignable. + * + * @var array + */ + protected $guarded = ['id', 'created_at', 'updated_at']; + + /** + * Cast values to correct type. + * + * @var array + */ + protected $casts = [ + 'service' => 'integer' + ]; + +} diff --git a/app/Repositories/ServiceRepository/Service.php b/app/Repositories/ServiceRepository/Service.php index 8feb92c1..4dc1755b 100644 --- a/app/Repositories/ServiceRepository/Service.php +++ b/app/Repositories/ServiceRepository/Service.php @@ -26,6 +26,7 @@ namespace Pterodactyl\Repositories\ServiceRepository; use DB; use Validator; use Uuid; +use Storage; use Pterodactyl\Models; use Pterodactyl\Services\UuidService; @@ -110,4 +111,44 @@ class Service } } + public function updateFile($id, array $data) + { + $service = Models\Service::findOrFail($id); + + $validator = Validator::make($data, [ + 'file' => 'required|in:index,main', + 'contents' => 'required|string' + ]); + + if ($validator->fails()) { + throw new DisplayValidationException($validator->errors()); + } + + $filename = ($data['file'] === 'main') ? 'main.json' : 'index.js'; + $filepath = 'services/' . $service->file . '/' . $filename; + $backup = 'services/.bak/' . str_random(12) . '.bak'; + + DB::beginTransaction(); + + try { + Storage::move($filepath, $backup); + Storage::put($filepath, $data['contents']); + + $checksum = Models\Checksum::firstOrNew([ + 'service' => $service->id, + 'filename' => $filename + ]); + + $checksum->checksum = sha1_file(storage_path('app/' . $filepath)); + $checksum->save(); + + DB::commit(); + } catch(\Exception $ex) { + DB::rollback(); + Storage::move($backup, $filepath); + throw $ex; + } + + } + } diff --git a/database/migrations/2016_11_09_163911_add_checksums_table.php b/database/migrations/2016_11_09_163911_add_checksums_table.php new file mode 100644 index 00000000..4935faaf --- /dev/null +++ b/database/migrations/2016_11_09_163911_add_checksums_table.php @@ -0,0 +1,36 @@ +increments('id'); + $table->integer('service')->unsigned(); + $table->string('filename'); + $table->char('checksum', 40); + $table->timestamps(); + + $table->foreign('service')->references('id')->on('services'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('checksums'); + } +} diff --git a/resources/views/admin/services/config.blade.php b/resources/views/admin/services/config.blade.php new file mode 100644 index 00000000..fbfa01d3 --- /dev/null +++ b/resources/views/admin/services/config.blade.php @@ -0,0 +1,180 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.admin') + +@section('title') + Manage Service Configuration +@endsection + +@section('content') +
+ +

Service Configuration


+ +
+
+
+
+
+
+
+
{{ $contents['json'] }}
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
{{ $contents['index'] }}
+
+
+
+
+ +
+
+
+
+
+
+
+{!! Theme::js('js/vendor/ace/ace.js') !!} +{!! Theme::js('js/vendor/ace/ext-modelist.js') !!} + +@endsection diff --git a/resources/views/admin/services/view.blade.php b/resources/views/admin/services/view.blade.php index e05d061f..4de4d6e9 100644 --- a/resources/views/admin/services/view.blade.php +++ b/resources/views/admin/services/view.blade.php @@ -106,6 +106,7 @@
{!! csrf_field() !!} +
diff --git a/resources/views/layouts/admin.blade.php b/resources/views/layouts/admin.blade.php index 803c222a..f8ff0a49 100644 --- a/resources/views/layouts/admin.blade.php +++ b/resources/views/layouts/admin.blade.php @@ -35,6 +35,23 @@ {!! Theme::js('js/vendor/sweetalert/sweetalert.min.js') !!} {!! Theme::js('js/vendor/fuelux/fuelux.min.js') !!} {!! Theme::js('js/admin.min.js') !!} + {!! Theme::js('js/bootstrap-notify.min.js') !!} + @show {{ Settings::get('company') }} - @yield('title') diff --git a/storage/app/.gitignore b/storage/app/.gitignore index c96a04f0..8d9045b3 100755 --- a/storage/app/.gitignore +++ b/storage/app/.gitignore @@ -1,2 +1,4 @@ * -!.gitignore \ No newline at end of file +!.gitignore +!services/* +services/.bak/* diff --git a/storage/app/services/minecraft/index.js b/storage/app/services/minecraft/index.js new file mode 100644 index 00000000..67c4dbb2 --- /dev/null +++ b/storage/app/services/minecraft/index.js @@ -0,0 +1,60 @@ +'use strict'; + +/** + * Pterodactyl - Daemon + * Copyright (c) 2015 - 2016 Dane Everitt + * + * 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. + */ +const rfr = require('rfr'); +const _ = require('lodash'); + +const Configuration = rfr('src/services/minecraft/main.json'); +const Core = rfr('src/services/index.js'); + +class Service extends Core { + constructor(server) { + super(server, Configuration); + } + + onPreflight(next) { + return super.onPreflight(next); + } + + onStart(next) { + return super.onStart(next); + } + + onConsole(data) { + // Hide the output spam from Bungeecord getting pinged. + if (_.endsWith(data, '<-> InitialHandler has connected')) return; + return super.onConsole(data); + } + + onStop(next) { + return super.onStop(next); + } + + doQuery(next) { + return super.doQuery(next); + } + +} + +module.exports = Service; diff --git a/storage/app/services/minecraft/main.json b/storage/app/services/minecraft/main.json new file mode 100644 index 00000000..1a94258a --- /dev/null +++ b/storage/app/services/minecraft/main.json @@ -0,0 +1,75 @@ +{ + "latest": { + "tag": "^(latest)$", + "symlink": "vanilla" + }, + "vanilla": { + "tag": "^(vanilla){1}(-[\\w\\d.-]+)?$", + "startup": { + "done": ")! For help, type ", + "userInteraction": [ + "Go to eula.txt for more info." + ] + }, + "stop": "stop", + "configs": { + "server.properties": { + "parser": "properties", + "find": { + "server-ip": "0.0.0.0", + "enable-query": "true", + "server-port": "{{ build.default.port }}", + "query.port": "{{ build.default.port }}" + } + } + }, + "log": { + "custom": false, + "location": "logs/latest.log" + }, + "query": "minecraftping" + }, + "spigot": { + "tag": "^(spigot)$", + "symlink": "vanilla", + "configs": { + "spigot.yml": { + "parser": "yaml", + "find": { + "settings.restart-on-crash": "false" + } + } + } + }, + "bungeecord": { + "tag": "^(bungeecord)$", + "startup": { + "done": "Listening on " + }, + "stop": "end", + "configs": { + "config.yml": { + "parser": "yaml", + "find": { + "listeners[0].query_enabled": true, + "listeners[0].query_port": "{{ build.default.port }}", + "listeners[0].host": "0.0.0.0:{{ build.default.port }}" + } + } + }, + "log": { + "custom": false, + "location": "proxy.log.0" + }, + "query": "minecraftping" + }, + "sponge": { + "tag": "^(sponge)$", + "symlink": "vanilla", + "startup": { + "userInteraction": [ + "You need to agree to the EULA" + ] + } + } +} diff --git a/storage/app/services/srcds/index.js b/storage/app/services/srcds/index.js new file mode 100644 index 00000000..29b0439f --- /dev/null +++ b/storage/app/services/srcds/index.js @@ -0,0 +1,57 @@ +'use strict'; + +/** + * Pterodactyl - Daemon + * Copyright (c) 2015 - 2016 Dane Everitt + * + * 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. + */ +const rfr = require('rfr'); + +const Configuration = rfr('src/services/srcds/main.json'); +const Core = rfr('src/services/index.js'); + +class Service extends Core { + constructor(server) { + super(server, Configuration); + } + + onPreflight(next) { + return super.onPreflight(next); + } + + onStart(next) { + return super.onStart(next); + } + + onConsole(data) { + return super.onConsole(data); + } + + onStop(next) { + return super.onStop(next); + } + + doQuery(next) { + return super.doQuery(next); + } + +} + +module.exports = Service; diff --git a/storage/app/services/srcds/main.json b/storage/app/services/srcds/main.json new file mode 100644 index 00000000..fdd65e33 --- /dev/null +++ b/storage/app/services/srcds/main.json @@ -0,0 +1,25 @@ +{ + "srcds": { + "tag": "^(srcds)$", + "startup": { + "done": "Assigned anonymous gameserver Steam ID", + "userInteraction": [] + }, + "stop": "quit", + "configs": {}, + "log": { + "custom": true, + "location": "logs/latest.log" + }, + "query": "protocol-valve" + }, + "ark": { + "tag": "^(ark)$", + "symlink": "srcds", + "startup": { + "done": "Setting breakpad minidump AppID" + }, + "stop": "^C", + "query": "none" + } +} diff --git a/storage/app/services/terraria/index.js b/storage/app/services/terraria/index.js new file mode 100644 index 00000000..55b396af --- /dev/null +++ b/storage/app/services/terraria/index.js @@ -0,0 +1,57 @@ +'use strict'; + +/** + * Pterodactyl - Daemon + * Copyright (c) 2015 - 2016 Dane Everitt + * + * 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. + */ +const rfr = require('rfr'); + +const Configuration = rfr('src/services/terraria/main.json'); +const Core = rfr('src/services/index.js'); + +class Service extends Core { + constructor(server) { + super(server, Configuration); + } + + onPreflight(next) { + return super.onPreflight(next); + } + + onStart(next) { + return super.onStart(next); + } + + onConsole(data) { + return super.onConsole(data); + } + + onStop(next) { + return super.onStop(next); + } + + doQuery(next) { + return super.doQuery(next); + } + +} + +module.exports = Service; diff --git a/storage/app/services/terraria/main.json b/storage/app/services/terraria/main.json new file mode 100644 index 00000000..c2a74d5b --- /dev/null +++ b/storage/app/services/terraria/main.json @@ -0,0 +1,24 @@ +{ + "tshock": { + "tag": "^(tshock)$", + "startup": { + "done": "Type 'help' for a list of commands", + "userInteraction": [] + }, + "stop": "exit", + "configs": { + "tshock/config.json": { + "parser": "json", + "find": { + "ServerPort": "{{ build.default.port }}", + "MaxSlots": "{{ build.env.MAX_SLOTS }}" + } + } + }, + "log": { + "custom": false, + "location": "ServerLog.txt" + }, + "query": "none" + } +} diff --git a/storage/app/services/voice/index.js b/storage/app/services/voice/index.js new file mode 100644 index 00000000..022b417a --- /dev/null +++ b/storage/app/services/voice/index.js @@ -0,0 +1,57 @@ +'use strict'; + +/** + * Pterodactyl - Daemon + * Copyright (c) 2015 - 2016 Dane Everitt + * + * 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. + */ +const rfr = require('rfr'); + +const Configuration = rfr('src/services/voice/main.json'); +const Core = rfr('src/services/index.js'); + +class Service extends Core { + constructor(server) { + super(server, Configuration); + } + + onPreflight(next) { + return super.onPreflight(next); + } + + onStart(next) { + return super.onStart(next); + } + + onConsole(data) { + return super.onConsole(data); + } + + onStop(next) { + return super.onStop(next); + } + + doQuery(next) { + return super.doQuery(next); + } + +} + +module.exports = Service; diff --git a/storage/app/services/voice/main.json b/storage/app/services/voice/main.json new file mode 100644 index 00000000..0479dd88 --- /dev/null +++ b/storage/app/services/voice/main.json @@ -0,0 +1,52 @@ +{ + "mumble": { + "tag": "^(mumble)$", + "startup": { + "done": "Server listening on", + "userInteraction": [ + "Generating new server certificate" + ] + }, + "stop": "^C", + "configs": { + "murmur.ini": { + "parser": "ini", + "find": { + "logfile": "murmur.log", + "port": "{{ build.default.port }}", + "host": "0.0.0.0", + "users": "{{ build.env.MAX_USERS }}" + } + } + }, + "log": { + "custom": true, + "location": "logs/murmur.log" + }, + "query": "mumbleping" + }, + "teamspeak": { + "tag": "^(ts3)$", + "startup": { + "done": "listening on 0.0.0.0:", + "userInteraction": [] + }, + "stop": "^C", + "configs": { + "ts3server.ini": { + "parser": "ini", + "find": { + "default_voice_port": "{{ build.default.port }}", + "voice_ip": "0.0.0.0", + "query_port": "{{ build.default.port }}", + "query_ip": "0.0.0.0" + } + } + }, + "log": { + "custom": true, + "location": "logs/ts3.log" + }, + "query": "none" + } +} From 1f47eda3b39f43ea578abf176e09f06fafc21f33 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 9 Nov 2016 17:59:57 -0500 Subject: [PATCH 005/171] Run 'pterodactyl:cleanservices' twice a day to prevent a huge file buildup --- app/Console/Kernel.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 4cd65f46..53f80281 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -34,5 +34,6 @@ class Kernel extends ConsoleKernel { $schedule->command('pterodactyl:tasks')->everyMinute()->withoutOverlapping(); $schedule->command('pterodactyl:tasks:clearlog')->twiceDaily(3, 15); + $schedule->command('pterodactyl:cleanservices')->twiceDaily(1, 13); } } From a1bc6fa2d3275aff647dd23f7202cb99aaeedacb Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 15 Nov 2016 20:20:32 -0500 Subject: [PATCH 006/171] Push changes that support creations of service packs and basic listing --- app/Http/Controllers/Admin/PackController.php | 108 ++++++++++ app/Http/Routes/AdminRoutes.php | 26 +++ app/Models/ServicePack.php | 60 ++++++ app/Repositories/ServiceRepository/Pack.php | 105 ++++++++++ .../ServiceRepository/Service.php | 15 +- .../2016_11_09_163911_add_checksums_table.php | 36 ---- .../2016_11_11_220649_add_pack_support.php | 46 +++++ ...6_11_11_231731_set_service_name_unique.php | 32 +++ public/themes/default/css/pterodactyl.css | 11 + .../admin/services/options/view.blade.php | 1 + .../views/admin/services/packs/edit.blade.php | 0 .../admin/services/packs/index.blade.php | 69 +++++++ .../views/admin/services/packs/new.blade.php | 192 ++++++++++++++++++ storage/app/.gitignore | 2 + storage/app/packs/.githold | 0 15 files changed, 654 insertions(+), 49 deletions(-) create mode 100644 app/Http/Controllers/Admin/PackController.php create mode 100644 app/Models/ServicePack.php create mode 100644 app/Repositories/ServiceRepository/Pack.php delete mode 100644 database/migrations/2016_11_09_163911_add_checksums_table.php create mode 100644 database/migrations/2016_11_11_220649_add_pack_support.php create mode 100644 database/migrations/2016_11_11_231731_set_service_name_unique.php create mode 100644 resources/views/admin/services/packs/edit.blade.php create mode 100644 resources/views/admin/services/packs/index.blade.php create mode 100644 resources/views/admin/services/packs/new.blade.php create mode 100644 storage/app/packs/.githold diff --git a/app/Http/Controllers/Admin/PackController.php b/app/Http/Controllers/Admin/PackController.php new file mode 100644 index 00000000..9d247439 --- /dev/null +++ b/app/Http/Controllers/Admin/PackController.php @@ -0,0 +1,108 @@ + + * + * 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. + */ +namespace Pterodactyl\Http\Controllers\Admin; + +use Alert; +use Log; +use Storage; + +use Pterodactyl\Models; +use Pterodactyl\Repositories\ServiceRepository\Pack; +use Pterodactyl\Http\Controllers\Controller; +use Pterodactyl\Exceptions\DisplayValidationException; +use Pterodactyl\Exceptions\DisplayException; + +use Illuminate\Http\Request; + +class PackController extends Controller +{ + public function __construct() + { + // + } + + public function list(Request $request, $id) + { + $option = Models\ServiceOptions::findOrFail($id); + return view('admin.services.packs.index', [ + 'packs' => Models\ServicePack::where('option', $option->id)->get(), + 'service' => Models\Service::findOrFail($option->parent_service), + 'option' => $option + ]); + } + + public function new(Request $request, $opt = null) + { + $options = Models\ServiceOptions::select( + 'services.name AS p_service', + 'service_options.id', + 'service_options.name' + )->join('services', 'services.id', '=', 'service_options.parent_service')->get(); + + $array = []; + foreach($options as &$option) { + if (!array_key_exists($option->p_service, $array)) { + $array[$option->p_service] = []; + } + + $array[$option->p_service] = array_merge($array[$option->p_service], [[ + 'id' => $option->id, + 'name' => $option->name + ]]); + } + + return view('admin.services.packs.new', [ + 'services' => $array, + 'packFor' => $opt, + ]); + } + + public function create(Request $request) + { + // dd($request->all()); + try { + $repo = new Pack; + $id = $repo->create($request->except([ + '_token' + ])); + Alert::success('Successfully created new service!')->flash(); + return redirect()->route('admin.services.packs.edit', $id)->withInput(); + } catch (DisplayValidationException $ex) { + return redirect()->route('admin.services.packs.new', $request->input('option'))->withErrors(json_decode($ex->getMessage()))->withInput(); + } catch (DisplayException $ex) { + Alert::danger($ex->getMessage())->flash(); + } catch (\Exception $ex) { + Log::error($ex); + Alert::danger('An error occured while attempting to add a new service pack.')->flash(); + } + return redirect()->route('admin.services.packs.new', $request->input('option'))->withInput(); + + } + + public function edit(Request $request, $id) + { + $pack = Models\ServicePack::findOrFail($id); + dd($pack, Storage::url('packs/' . $pack->uuid)); + } +} diff --git a/app/Http/Routes/AdminRoutes.php b/app/Http/Routes/AdminRoutes.php index 726fccc2..73679de6 100644 --- a/app/Http/Routes/AdminRoutes.php +++ b/app/Http/Routes/AdminRoutes.php @@ -430,6 +430,32 @@ class AdminRoutes { ]); }); + // Service Packs + $router->group([ + 'prefix' => 'admin/services/packs', + 'middleware' => [ + 'auth', + 'admin', + 'csrf' + ] + ], function () use ($router) { + $router->get('/new/{option?}', [ + 'as' => 'admin.services.packs.new', + 'uses' => 'Admin\PackController@new' + ]); + $router->post('/new', [ + 'uses' => 'Admin\PackController@create' + ]); + $router->get('/for/{option}', [ + 'as' => 'admin.services.packs.for', + 'uses' => 'Admin\PackController@list' + ]); + $router->get('/edit/{pack}', [ + 'as' => 'admin.services.packs.edit', + 'uses' => 'Admin\PackController@edit' + ]); + }); + } } diff --git a/app/Models/ServicePack.php b/app/Models/ServicePack.php new file mode 100644 index 00000000..f43be94b --- /dev/null +++ b/app/Models/ServicePack.php @@ -0,0 +1,60 @@ + + * + * 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. + */ +namespace Pterodactyl\Models; + +use Illuminate\Database\Eloquent\Model; + +class ServicePack extends Model +{ + + /** + * The table associated with the model. + * + * @var string + */ + protected $table = 'service_packs'; + + /** + * Fields that are not mass assignable. + * + * @var array + */ + protected $guarded = ['id', 'created_at', 'updated_at']; + + /** + * Cast values to correct type. + * + * @var array + */ + protected $casts = [ + 'option' => 'integer', + 'build_memory' => 'integer', + 'build_swap' => 'integer', + 'build_cpu' => 'integer', + 'build_io' => 'integer', + 'selectable' => 'boolean', + 'visible' => 'boolean' + ]; + +} diff --git a/app/Repositories/ServiceRepository/Pack.php b/app/Repositories/ServiceRepository/Pack.php new file mode 100644 index 00000000..b644dae5 --- /dev/null +++ b/app/Repositories/ServiceRepository/Pack.php @@ -0,0 +1,105 @@ + + * + * 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. + */ +namespace Pterodactyl\Repositories\ServiceRepository; + +use DB; +use Storage; +use Uuid; +use Validator; + +use Pterodactyl\Models; +use Pterodactyl\Services\UuidService; +use Pterodactyl\Exceptions\DisplayException; +use Pterodactyl\Exceptions\DisplayValidationException; + +class Pack +{ + + public function __construct() + { + // + } + + public function create(array $data) + { + $validator = Validator::make($data, [ + 'name' => 'required|string', + 'version' => 'required|string', + 'description' => 'string', + 'option' => 'required|exists:service_options,id', + 'selectable' => 'sometimes|boolean', + 'visible' => 'sometimes|boolean', + 'build_memory' => 'required|integer|min:0', + 'build_swap' => 'required|integer|min:0', + 'build_cpu' => 'required|integer|min:0', + 'build_io' => 'required|integer|min:10|max:1000', + 'build_container' => 'required|string', + 'build_script' => 'sometimes|string' + ]); + + if ($validator->fails()) { + throw new DisplayValidationException($validator->errors()); + } + + if (isset($data['file_upload'])) { + if (!$data['file_upload']->isValid()) { + throw new DisplayException('The file provided does not appear to be valid.'); + } + + if (!in_array($data['file_upload']->getMimeType(), [ + 'application/zip', + 'application/gzip' + ])) { + throw new DisplayException('The file provided does not meet the required filetypes of application/zip or application/gzip.'); + } + } + + DB::transaction(function () use ($data) { + $uuid = new UuidService; + $pack = Models\ServicePack::create([ + 'option' => $data['option'], + 'uuid' => $uuid->generate('servers', 'uuid'), + 'build_memory' => $data['build_memory'], + 'build_swap' => $data['build_swap'], + 'build_cpu' => $data['build_swap'], + 'build_io' => $data['build_io'], + 'build_script' => (empty($data['build_script'])) ? null : $data['build_script'], + 'build_container' => $data['build_container'], + 'name' => $data['name'], + 'version' => $data['version'], + 'description' => (empty($data['description'])) ? null : $data['description'], + 'selectable' => isset($data['selectable']), + 'visible' => isset($data['visible']) + ]); + + $filename = ($data['file_upload']->getMimeType() === 'application/zip') ? 'archive.zip' : 'archive.tar.gz'; + $data['file_upload']->storeAs('packs/' . $pack->uuid, $filename); + + $pack->save(); + + return $pack->id; + }); + } + +} diff --git a/app/Repositories/ServiceRepository/Service.php b/app/Repositories/ServiceRepository/Service.php index 4dc1755b..91062dcb 100644 --- a/app/Repositories/ServiceRepository/Service.php +++ b/app/Repositories/ServiceRepository/Service.php @@ -101,6 +101,8 @@ class Service DB::beginTransaction(); try { + Storage::deleteDirectory('services/' . $service->file); + Models\ServiceVariables::whereIn('option_id', $options->get()->toArray())->delete(); $options->delete(); $service->delete(); @@ -128,23 +130,10 @@ class Service $filepath = 'services/' . $service->file . '/' . $filename; $backup = 'services/.bak/' . str_random(12) . '.bak'; - DB::beginTransaction(); - try { Storage::move($filepath, $backup); Storage::put($filepath, $data['contents']); - - $checksum = Models\Checksum::firstOrNew([ - 'service' => $service->id, - 'filename' => $filename - ]); - - $checksum->checksum = sha1_file(storage_path('app/' . $filepath)); - $checksum->save(); - - DB::commit(); } catch(\Exception $ex) { - DB::rollback(); Storage::move($backup, $filepath); throw $ex; } diff --git a/database/migrations/2016_11_09_163911_add_checksums_table.php b/database/migrations/2016_11_09_163911_add_checksums_table.php deleted file mode 100644 index 4935faaf..00000000 --- a/database/migrations/2016_11_09_163911_add_checksums_table.php +++ /dev/null @@ -1,36 +0,0 @@ -increments('id'); - $table->integer('service')->unsigned(); - $table->string('filename'); - $table->char('checksum', 40); - $table->timestamps(); - - $table->foreign('service')->references('id')->on('services'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('checksums'); - } -} diff --git a/database/migrations/2016_11_11_220649_add_pack_support.php b/database/migrations/2016_11_11_220649_add_pack_support.php new file mode 100644 index 00000000..87a66b40 --- /dev/null +++ b/database/migrations/2016_11_11_220649_add_pack_support.php @@ -0,0 +1,46 @@ +increments('id'); + $table->unsignedInteger('option'); + $table->char('uuid', 36)->unique(); + $table->unsignedInteger('build_memory')->nullable(); + $table->unsignedInteger('build_swap')->nullable(); + $table->unsignedInteger('build_cpu')->nullable(); + $table->unsignedInteger('build_io')->nullable(); + $table->text('build_script')->nullable(); + $table->string('build_container')->default('alpine:latest'); + $table->string('name'); + $table->string('version'); + $table->text('description')->nullable(); + $table->boolean('selectable')->default(true); + $table->boolean('visible')->default(true); + $table->timestamps(); + + $table->foreign('option')->references('id')->on('service_options'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('service_packs'); + } +} diff --git a/database/migrations/2016_11_11_231731_set_service_name_unique.php b/database/migrations/2016_11_11_231731_set_service_name_unique.php new file mode 100644 index 00000000..4db76f8e --- /dev/null +++ b/database/migrations/2016_11_11_231731_set_service_name_unique.php @@ -0,0 +1,32 @@ +unique('name'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('services', function (Blueprint $table) { + $table->dropUnique('services_name_unique'); + }); + } +} diff --git a/public/themes/default/css/pterodactyl.css b/public/themes/default/css/pterodactyl.css index 607da8d1..fb24beda 100755 --- a/public/themes/default/css/pterodactyl.css +++ b/public/themes/default/css/pterodactyl.css @@ -307,3 +307,14 @@ td.has-progress { padding:0; border:0; } + +.fuelux .checkbox-formheight.checkbox-custom.checkbox-inline.highlight { + height: 36px; + padding: 10px 8px 4px 28px; + width: 100%; +} + +.fuelux .checkbox-formheight.checkbox-custom.checkbox-inline.highlight:before { + left: 8px; + top: 11px; +} diff --git a/resources/views/admin/services/options/view.blade.php b/resources/views/admin/services/options/view.blade.php index d5de1a91..414f8974 100644 --- a/resources/views/admin/services/options/view.blade.php +++ b/resources/views/admin/services/options/view.blade.php @@ -30,6 +30,7 @@
  • Services
  • {{ $service->name }}
  • {{ $option->name }}
  • +
  • Service Packs
  • Warning! This page contains advanced settings that the panel and daemon use to control servers. Modifying information on this page is not recommended unless you are absolutely sure of what you are doing.

    Settings


    diff --git a/resources/views/admin/services/packs/edit.blade.php b/resources/views/admin/services/packs/edit.blade.php new file mode 100644 index 00000000..e69de29b diff --git a/resources/views/admin/services/packs/index.blade.php b/resources/views/admin/services/packs/index.blade.php new file mode 100644 index 00000000..2ec5ed0e --- /dev/null +++ b/resources/views/admin/services/packs/index.blade.php @@ -0,0 +1,69 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.admin') + +@section('title') + Service Packs for {{ $option->name }} +@endsection + +@section('content') +
    + +

    Service Packs


    + + + + + + + + + + + + @foreach ($packs as $pack) + + + + + + + + @endforeach + + + + +
    NameVersionUUIDSelectableVisible
    {{ $pack->name }}{{ $pack->version }}{{ $pack->uuid }}@if($pack->selectable)@else@endif@if($pack->visible)@else@endif
    + + + + + + +
    +
    +@endsection diff --git a/resources/views/admin/services/packs/new.blade.php b/resources/views/admin/services/packs/new.blade.php new file mode 100644 index 00000000..0c75e8d0 --- /dev/null +++ b/resources/views/admin/services/packs/new.blade.php @@ -0,0 +1,192 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.admin') + +@section('title') + Add New Service Pack +@endsection + +@section('content') +
    + +

    New Service Pack


    +
    +
    +
    + +
    + +

    The name of the pack which will be seen in dropdown menus and to users.

    +
    +
    +
    + +
    + +

    The version of the program included in this pack.

    +
    +
    +
    + +
    + +

    Provide a description of the pack which will be shown to users.

    +
    +
    +
    +
    +
    + + +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    Build Parameters
    +
    +
    +
    + +
    + + MB +
    +
    +
    + +
    + + MB +
    +
    +
    + +
    + + % +
    +
    +
    + +
    + + I/O +
    +
    +
    +
    +

    If you would like to set limits on the build container you may do so above. Setting memory, swap, or cpu to 0 will allow unlimited resource utilization. IO must be in a range between 10 to 1000 and is a relative weighting to other container IO usage.

    +
    +
    +
    +
    +
    + +
    + +

    Provide the docker container image that will be used to build this service pack. This container is only used if a build script is provided below.

    +
    +
    +
    + +
    + +

    This script will be run inside the container if provided. You should use this script to download any additional dependencies or compile packages as necessary on the node. Your uploaded archive (if provided), will be available in /input as archive.tar.gz or as archive.zip depending on what format you uploaded as. Your completed pack should be saved as package.tar.gz in the /output directory (e.g. /output/package.tar.gz).

    +
    +
    +
    +
    +
    +
    +
    +
    +
    File Upload
    +
    +
    +
    + + +

    This package file must either be a .zip or .tar.gz archive of files to use for either building or running this pack.

    If your file is larger than 20MB we recommend uploading it using SFTP. Once you have added this pack to the system, a path will be provided where you should upload the file. + This is currently configured with the following limits: upload_max_filesize={{ ini_get('upload_max_filesize') }} and post_max_size={{ ini_get('post_max_size') }}. If your file is larger than either of those values this request will fail.

    +
    +
    +
    +
    +
    +
    +
    +
    +
    + {!! csrf_field() !!} + +
    +
    + +
    +{!! Theme::js('js/vendor/ace/ace.js') !!} +{!! Theme::js('js/vendor/ace/ext-modelist.js') !!} + +@endsection diff --git a/storage/app/.gitignore b/storage/app/.gitignore index 8d9045b3..104980aa 100755 --- a/storage/app/.gitignore +++ b/storage/app/.gitignore @@ -1,4 +1,6 @@ * !.gitignore !services/* +packs/**/* services/.bak/* +!packs/.githold diff --git a/storage/app/packs/.githold b/storage/app/packs/.githold new file mode 100644 index 00000000..e69de29b From 09c2dcc1b6123e4b70b938a81907cb6c7c2915dd Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 15 Nov 2016 23:12:47 -0500 Subject: [PATCH 007/171] Support for viewing and exporting packs --- app/Http/Controllers/Admin/PackController.php | 102 ++++++-- app/Http/Routes/AdminRoutes.php | 21 +- .../admin/services/options/view.blade.php | 1 - .../{index.blade.php => byoption.blade.php} | 13 +- .../admin/services/packs/byservice.blade.php | 67 ++++++ .../views/admin/services/packs/edit.blade.php | 217 ++++++++++++++++++ .../views/admin/services/packs/new.blade.php | 1 + resources/views/layouts/admin.blade.php | 2 + 8 files changed, 403 insertions(+), 21 deletions(-) rename resources/views/admin/services/packs/{index.blade.php => byoption.blade.php} (86%) create mode 100644 resources/views/admin/services/packs/byservice.blade.php diff --git a/app/Http/Controllers/Admin/PackController.php b/app/Http/Controllers/Admin/PackController.php index 9d247439..5a7ecf49 100644 --- a/app/Http/Controllers/Admin/PackController.php +++ b/app/Http/Controllers/Admin/PackController.php @@ -24,6 +24,7 @@ namespace Pterodactyl\Http\Controllers\Admin; use Alert; +use DB; use Log; use Storage; @@ -42,17 +43,7 @@ class PackController extends Controller // } - public function list(Request $request, $id) - { - $option = Models\ServiceOptions::findOrFail($id); - return view('admin.services.packs.index', [ - 'packs' => Models\ServicePack::where('option', $option->id)->get(), - 'service' => Models\Service::findOrFail($option->parent_service), - 'option' => $option - ]); - } - - public function new(Request $request, $opt = null) + protected function formatServices() { $options = Models\ServiceOptions::select( 'services.name AS p_service', @@ -72,8 +63,41 @@ class PackController extends Controller ]]); } + return $array; + } + + public function listAll(Request $request) + { + // + } + + public function listByOption(Request $request, $id) + { + $option = Models\ServiceOptions::findOrFail($id); + return view('admin.services.packs.byoption', [ + 'packs' => Models\ServicePack::where('option', $option->id)->get(), + 'service' => Models\Service::findOrFail($option->parent_service), + 'option' => $option + ]); + } + + public function listByService(Request $request, $id) + { + return view('admin.services.packs.byservice', [ + 'service' => Models\Service::findOrFail($id), + 'options' => Models\ServiceOptions::select( + 'service_options.id', + 'service_options.name', + DB::raw('(SELECT COUNT(id) FROM service_packs WHERE service_packs.option = service_options.id) AS p_count') + )->where('parent_service', $id)->get() + ]); + } + + public function new(Request $request, $opt = null) + { + return view('admin.services.packs.new', [ - 'services' => $array, + 'services' => $this->formatServices(), 'packFor' => $opt, ]); } @@ -103,6 +127,58 @@ class PackController extends Controller public function edit(Request $request, $id) { $pack = Models\ServicePack::findOrFail($id); - dd($pack, Storage::url('packs/' . $pack->uuid)); + $option = Models\ServiceOptions::select('id', 'parent_service', 'name')->where('id', $pack->option)->first(); + return view('admin.services.packs.edit', [ + 'pack' => $pack, + 'services' => $this->formatServices(), + 'files' => Storage::files('packs/' . $pack->uuid), + 'service' => Models\Service::findOrFail($option->parent_service), + 'option' => $option + ]); + } + + public function export(Request $request, $id, $files = false) + { + $pack = Models\ServicePack::findOrFail($id); + $json = [ + 'name' => $pack->name, + 'version' => $pack->version, + 'description' => $pack->dscription, + 'selectable' => (bool) $pack->selectable, + 'visible' => (bool) $pack->visible, + 'build' => [ + 'memory' => $pack->build_memory, + 'swap' => $pack->build_swap, + 'cpu' => $pack->build_cpu, + 'io' => $pack->build_io, + 'container' => $pack->build_container, + 'script' => $pack->build_script + ] + ]; + + $filename = tempnam(sys_get_temp_dir(), 'pterodactyl_'); + if ((bool) $files) { + $zip = new \ZipArchive; + if (!$zip->open($filename, \ZipArchive::CREATE)) { + exit("cannot open <$filename>\n"); + } + + $files = Storage::files('packs/' . $pack->uuid); + foreach ($files as $file) { + $zip->addFile(storage_path('app/' . $file), basename(storage_path('app/' . $file))); + } + + $zip->addFromString('import.json', json_encode($json, JSON_PRETTY_PRINT)); + $zip->close(); + + return response()->download($filename, 'pack-' . $pack->name . '.zip')->deleteFileAfterSend(true); + } else { + $fp = fopen($filename, 'a+'); + fwrite($fp, json_encode($json, JSON_PRETTY_PRINT)); + fclose($fp); + return response()->download($filename, 'pack-' . $pack->name . '.json', [ + 'Content-Type' => 'application/json' + ])->deleteFileAfterSend(true); + } } } diff --git a/app/Http/Routes/AdminRoutes.php b/app/Http/Routes/AdminRoutes.php index 73679de6..d84de184 100644 --- a/app/Http/Routes/AdminRoutes.php +++ b/app/Http/Routes/AdminRoutes.php @@ -446,14 +446,29 @@ class AdminRoutes { $router->post('/new', [ 'uses' => 'Admin\PackController@create' ]); - $router->get('/for/{option}', [ - 'as' => 'admin.services.packs.for', - 'uses' => 'Admin\PackController@list' + $router->get('/', [ + 'as' => 'admin.services.packs', + 'uses' => 'Admin\PackController@listAll' + ]); + $router->get('/for/option/{option}', [ + 'as' => 'admin.services.packs.option', + 'uses' => 'Admin\PackController@listByOption' + ]); + $router->get('/for/service/{service}', [ + 'as' => 'admin.services.packs.service', + 'uses' => 'Admin\PackController@listByService' ]); $router->get('/edit/{pack}', [ 'as' => 'admin.services.packs.edit', 'uses' => 'Admin\PackController@edit' ]); + $router->post('/edit/{pack}', [ + 'uses' => 'Admin\PackController@update' + ]); + $router->get('/edit/{pack}/export/{archive?}', [ + 'as' => 'admin.services.packs.export', + 'uses' => 'Admin\PackController@export' + ]); }); } diff --git a/resources/views/admin/services/options/view.blade.php b/resources/views/admin/services/options/view.blade.php index 414f8974..d5de1a91 100644 --- a/resources/views/admin/services/options/view.blade.php +++ b/resources/views/admin/services/options/view.blade.php @@ -30,7 +30,6 @@
  • Services
  • {{ $service->name }}
  • {{ $option->name }}
  • -
  • Service Packs
  • Warning! This page contains advanced settings that the panel and daemon use to control servers. Modifying information on this page is not recommended unless you are absolutely sure of what you are doing.

    Settings


    diff --git a/resources/views/admin/services/packs/index.blade.php b/resources/views/admin/services/packs/byoption.blade.php similarity index 86% rename from resources/views/admin/services/packs/index.blade.php rename to resources/views/admin/services/packs/byoption.blade.php index 2ec5ed0e..6ec8f03e 100644 --- a/resources/views/admin/services/packs/index.blade.php +++ b/resources/views/admin/services/packs/byoption.blade.php @@ -28,9 +28,9 @@

    Service Packs


    @@ -46,7 +46,7 @@ @foreach ($packs as $pack) - + @@ -66,4 +66,9 @@
    {{ $pack->name }}{{ $pack->name }} {{ $pack->version }} {{ $pack->uuid }} @if($pack->selectable)@else@endif
    + @endsection diff --git a/resources/views/admin/services/packs/byservice.blade.php b/resources/views/admin/services/packs/byservice.blade.php new file mode 100644 index 00000000..ddb538ac --- /dev/null +++ b/resources/views/admin/services/packs/byservice.blade.php @@ -0,0 +1,67 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.admin') + +@section('title') + Service Packs for {{ $service->name }} +@endsection + +@section('content') +
    + +

    Service Packs


    + + + + + + + + + @foreach ($options as $option) + + + + + @endforeach + + + + +
    NameTotal Packs
    {{ $option->name }}{{ $option->p_count }}
    + + + + + + +
    +
    + +@endsection diff --git a/resources/views/admin/services/packs/edit.blade.php b/resources/views/admin/services/packs/edit.blade.php index e69de29b..abc89fe9 100644 --- a/resources/views/admin/services/packs/edit.blade.php +++ b/resources/views/admin/services/packs/edit.blade.php @@ -0,0 +1,217 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.admin') + +@section('title') + Add New Service Pack +@endsection + +@section('content') +
    + +

    Manage Service Pack


    +
    +
    +
    + +
    + +

    The name of the pack which will be seen in dropdown menus and to users.

    +
    +
    +
    + +
    + +

    The version of the program included in this pack.

    +
    +
    +
    + +
    + +

    Provide a description of the pack which will be shown to users.

    +
    +
    +
    +
    +
    + + +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    Build Parameters
    +
    +
    +
    + +
    + + MB +
    +
    +
    + +
    + + MB +
    +
    +
    + +
    + + % +
    +
    +
    + +
    + + I/O +
    +
    +
    +
    +

    If you would like to set limits on the build container you may do so above. Setting memory, swap, or cpu to 0 will allow unlimited resource utilization. IO must be in a range between 10 to 1000 and is a relative weighting to other container IO usage.

    +
    +
    +
    +
    +
    + +
    + +

    Provide the docker container image that will be used to build this service pack. This container is only used if a build script is provided below.

    +
    +
    +
    + +
    {{ $pack->build_script }}
    + +

    This script will be run inside the container if provided. You should use this script to download any additional dependencies or compile packages as necessary on the node. Your uploaded archive (if provided), will be available in /input as archive.tar.gz or as archive.zip depending on what format you uploaded as. Your completed pack should be saved as package.tar.gz in the /output directory (e.g. /output/package.tar.gz).

    +
    +
    +
    +
    +
    +
    +
    +
    +
    Package Archive
    +
    +
    +
    + @if(count($files) > 1) +
    Warning! Service packs should only contain a single pack archive in either .zip or .tar.gz format. We've detected more than one file for this pack.
    + @endif + + + + + + + + + + + @foreach($files as &$file) + + + + + + + @endforeach + +
    FilenameFile SizeSHA1 HashLast Modified
    {{ basename($file) }}{{ Storage::size($file) }} Bytes{{ sha1_file(storage_path('app/' . $file)) }}{{ Carbon::createFromTimestamp(Storage::lastModified($file))->toDateTimeString() }}
    +

    If you wish to modify or upload a new file it should be uploaded to {{ storage_path('app/packs/' . $pack->uuid) }} as either archive.zip or archive.tar.gz.

    +
    +
    +
    +
    +
    +
    +
    +
    +
    + {!! csrf_field() !!} + + + +
    +
    + +
    +{!! Theme::js('js/vendor/ace/ace.js') !!} +{!! Theme::js('js/vendor/ace/ext-modelist.js') !!} + +@endsection diff --git a/resources/views/admin/services/packs/new.blade.php b/resources/views/admin/services/packs/new.blade.php index 0c75e8d0..b6895636 100644 --- a/resources/views/admin/services/packs/new.blade.php +++ b/resources/views/admin/services/packs/new.blade.php @@ -172,6 +172,7 @@ {!! Theme::js('js/vendor/ace/ext-modelist.js') !!} +@endsection From d4729427aa9a267b79edcfe8cab2c1e88f6f5279 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 16 Nov 2016 17:22:22 -0500 Subject: [PATCH 009/171] Support for uploading templates for installing packs --- app/Http/Controllers/Admin/PackController.php | 32 ++++++- app/Http/Routes/AdminRoutes.php | 7 ++ app/Repositories/ServiceRepository/Pack.php | 96 +++++++++++++++++-- .../admin/services/packs/byoption.blade.php | 18 +++- .../views/admin/services/packs/new.blade.php | 2 +- .../admin/services/packs/upload.blade.php | 45 +++++++++ 6 files changed, 187 insertions(+), 13 deletions(-) create mode 100644 resources/views/admin/services/packs/upload.blade.php diff --git a/app/Http/Controllers/Admin/PackController.php b/app/Http/Controllers/Admin/PackController.php index e16c9468..acb05c7a 100644 --- a/app/Http/Controllers/Admin/PackController.php +++ b/app/Http/Controllers/Admin/PackController.php @@ -97,7 +97,6 @@ class PackController extends Controller public function new(Request $request, $opt = null) { - return view('admin.services.packs.new', [ 'services' => $this->formatServices(), 'packFor' => $opt, @@ -106,7 +105,6 @@ class PackController extends Controller public function create(Request $request) { - // dd($request->all()); try { $repo = new Pack; $id = $repo->create($request->except([ @@ -123,7 +121,6 @@ class PackController extends Controller Alert::danger('An error occured while attempting to add a new service pack.')->flash(); } return redirect()->route('admin.services.packs.new', $request->input('option'))->withInput(); - } public function edit(Request $request, $id) @@ -179,7 +176,7 @@ class PackController extends Controller if ((bool) $files) { $zip = new \ZipArchive; if (!$zip->open($filename, \ZipArchive::CREATE)) { - exit("cannot open <$filename>\n"); + abort(503, 'Unable to open file for writing.'); } $files = Storage::files('packs/' . $pack->uuid); @@ -200,4 +197,31 @@ class PackController extends Controller ])->deleteFileAfterSend(true); } } + + public function uploadForm(Request $request, $for = null) { + return view('admin.services.packs.upload', [ + 'services' => $this->formatServices(), + 'for' => $for + ]); + } + + public function postUpload(Request $request) + { + try { + $repo = new Pack; + $id = $repo->createWithTemplate($request->except([ + '_token' + ])); + Alert::success('Successfully created new service!')->flash(); + return redirect()->route('admin.services.packs.edit', $id)->withInput(); + } catch (DisplayValidationException $ex) { + return redirect()->back()->withErrors(json_decode($ex->getMessage()))->withInput(); + } catch (DisplayException $ex) { + Alert::danger($ex->getMessage())->flash(); + } catch (\Exception $ex) { + Log::error($ex); + Alert::danger('An error occured while attempting to add a new service pack.')->flash(); + } + return redirect()->back(); + } } diff --git a/app/Http/Routes/AdminRoutes.php b/app/Http/Routes/AdminRoutes.php index d84de184..96819bbb 100644 --- a/app/Http/Routes/AdminRoutes.php +++ b/app/Http/Routes/AdminRoutes.php @@ -446,6 +446,13 @@ class AdminRoutes { $router->post('/new', [ 'uses' => 'Admin\PackController@create' ]); + $router->get('/upload/{option?}', [ + 'as' => 'admin.services.packs.uploadForm', + 'uses' => 'Admin\PackController@uploadForm' + ]); + $router->post('/upload', [ + 'uses' => 'Admin\PackController@postUpload' + ]); $router->get('/', [ 'as' => 'admin.services.packs', 'uses' => 'Admin\PackController@listAll' diff --git a/app/Repositories/ServiceRepository/Pack.php b/app/Repositories/ServiceRepository/Pack.php index 4e3d190b..c4b3529d 100644 --- a/app/Repositories/ServiceRepository/Pack.php +++ b/app/Repositories/ServiceRepository/Pack.php @@ -46,7 +46,7 @@ class Pack $validator = Validator::make($data, [ 'name' => 'required|string', 'version' => 'required|string', - 'description' => 'string', + 'description' => 'sometimes|nullable|string', 'option' => 'required|exists:service_options,id', 'selectable' => 'sometimes|boolean', 'visible' => 'sometimes|boolean', @@ -55,7 +55,7 @@ class Pack 'build_cpu' => 'required|integer|min:0', 'build_io' => 'required|integer|min:10|max:1000', 'build_container' => 'required|string', - 'build_script' => 'sometimes|string' + 'build_script' => 'sometimes|nullable|string' ]); if ($validator->fails()) { @@ -75,7 +75,8 @@ class Pack } } - DB::transaction(function () use ($data) { + DB::beginTransaction(); + try { $uuid = new UuidService; $pack = Models\ServicePack::create([ 'option' => $data['option'], @@ -93,13 +94,94 @@ class Pack 'visible' => isset($data['visible']) ]); - $filename = ($data['file_upload']->getMimeType() === 'application/zip') ? 'archive.zip' : 'archive.tar.gz'; - $data['file_upload']->storeAs('packs/' . $pack->uuid, $filename); + Storage::makeDirectory('packs/' . $pack->uuid); + if (isset($data['file_upload'])) { + $filename = ($data['file_upload']->getMimeType() === 'application/zip') ? 'archive.zip' : 'archive.tar.gz'; + $data['file_upload']->storeAs('packs/' . $pack->uuid, $filename); + } - $pack->save(); + DB::commit(); + } catch (\Exception $ex) { + DB::rollBack(); + throw $ex; + } + return $pack->id; + } + + public function createWithTemplate(array $data) + { + if (!isset($data['file_upload'])) { + throw new DisplayException('No template file was found submitted with this request.'); + } + + if (!$data['file_upload']->isValid()) { + throw new DisplayException('The file provided does not appear to be valid.'); + } + + if (!in_array($data['file_upload']->getMimeType(), [ + 'application/zip', + 'text/plain', + 'application/json' + ])) { + throw new DisplayException('The file provided (' . $data['file_upload']->getMimeType() . ') does not meet the required filetypes of application/zip or application/json.'); + } + + if ($data['file_upload']->getMimeType() === 'application/zip') { + $zip = new \ZipArchive; + if (!$zip->open($data['file_upload']->path())) { + throw new DisplayException('The uploaded archive was unable to be opened.'); + } + + $isZip = $zip->locateName('archive.zip'); + $isTar = $zip->locateName('archive.tar.gz'); + + if ($zip->locateName('import.json') === false || ($isZip === false && $isTar === false)) { + throw new DisplayException('This contents of the provided archive were in an invalid format.'); + } + + $json = json_decode($zip->getFromName('import.json')); + $id = $this->create([ + 'name' => $json->name, + 'version' => $json->version, + 'description' => $json->description, + 'option' => $data['option'], + 'selectable' => $json->selectable, + 'visible' => $json->visible, + 'build_memory' => $json->build->memory, + 'build_swap' => $json->build->swap, + 'build_cpu' => $json->build->cpu, + 'build_io' => $json->build->io, + 'build_container' => $json->build->container, + 'build_script' => $json->build->script + ]); + + $pack = Models\ServicePack::findOrFail($id); + if (!$zip->extractTo(storage_path('app/packs/' . $pack->uuid), ($isZip === false) ? 'archive.tar.gz' : 'archive.zip')) { + $pack->delete(); + throw new DisplayException('Unable to extract the archive file to the correct location.'); + } + + $zip->close(); return $pack->id; - }); + } else { + $json = json_decode(file_get_contents($data['file_upload']->path())); + return $this->create([ + 'name' => $json->name, + 'version' => $json->version, + 'description' => $json->description, + 'option' => $data['option'], + 'selectable' => $json->selectable, + 'visible' => $json->visible, + 'build_memory' => $json->build->memory, + 'build_swap' => $json->build->swap, + 'build_cpu' => $json->build->cpu, + 'build_io' => $json->build->io, + 'build_container' => $json->build->container, + 'build_script' => $json->build->script + ]); + } + } public function update($id, array $data) diff --git a/resources/views/admin/services/packs/byoption.blade.php b/resources/views/admin/services/packs/byoption.blade.php index 6ec8f03e..cc285d16 100644 --- a/resources/views/admin/services/packs/byoption.blade.php +++ b/resources/views/admin/services/packs/byoption.blade.php @@ -58,7 +58,7 @@ - + @@ -69,6 +69,22 @@ @endsection diff --git a/resources/views/admin/services/packs/new.blade.php b/resources/views/admin/services/packs/new.blade.php index b6895636..af658cce 100644 --- a/resources/views/admin/services/packs/new.blade.php +++ b/resources/views/admin/services/packs/new.blade.php @@ -152,7 +152,7 @@

    This package file must either be a .zip or .tar.gz archive of files to use for either building or running this pack.

    If your file is larger than 20MB we recommend uploading it using SFTP. Once you have added this pack to the system, a path will be provided where you should upload the file. - This is currently configured with the following limits: upload_max_filesize={{ ini_get('upload_max_filesize') }} and post_max_size={{ ini_get('post_max_size') }}. If your file is larger than either of those values this request will fail.

    + This server is currently configured with the following limits: upload_max_filesize={{ ini_get('upload_max_filesize') }} and post_max_size={{ ini_get('post_max_size') }}. If your file is larger than either of those values this request will fail.

    diff --git a/resources/views/admin/services/packs/upload.blade.php b/resources/views/admin/services/packs/upload.blade.php new file mode 100644 index 00000000..e9ca020f --- /dev/null +++ b/resources/views/admin/services/packs/upload.blade.php @@ -0,0 +1,45 @@ + From 5600f3201c85e43de14965c2ee2d522c8e77baba Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 18 Nov 2016 17:31:57 -0500 Subject: [PATCH 010/171] Add support for deleting service packs. --- app/Http/Controllers/Admin/PackController.php | 39 +++++++++++++------ app/Repositories/ServiceRepository/Pack.php | 9 +++++ .../views/admin/services/packs/edit.blade.php | 5 ++- 3 files changed, 39 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/Admin/PackController.php b/app/Http/Controllers/Admin/PackController.php index acb05c7a..c94a001d 100644 --- a/app/Http/Controllers/Admin/PackController.php +++ b/app/Http/Controllers/Admin/PackController.php @@ -138,19 +138,34 @@ class PackController extends Controller public function update(Request $request, $id) { - try { - $repo = new Pack; - $repo->update($id, $request->except([ - '_token' - ])); - Alert::success('Service pack has been successfully updated.')->flash(); - } catch (DisplayValidationException $ex) { - return redirect()->route('admin.services.packs.edit', $id)->withErrors(json_decode($ex->getMessage()))->withInput(); - } catch (\Exception $ex) { - Log::error($ex); - Alert::danger('An error occured while attempting to add edit this pack.')->flash(); + if (!is_null($request->input('action_delete'))) { + try { + $repo = new Pack; + $repo->delete($id); + Alert::success('The requested service pack has been deleted from the system.')->flash(); + return redirect()->route('admin.services.packs'); + } catch (DisplayException $ex) { + Alert::danger($ex->getMessage())->flash(); + } catch (\Exception $ex) { + Log::error($ex); + Alert::danger('An error occured while attempting to delete this pack.')->flash(); + } + return redirect()->route('admin.services.packs.edit', $id); + } else { + try { + $repo = new Pack; + $repo->update($id, $request->except([ + '_token' + ])); + Alert::success('Service pack has been successfully updated.')->flash(); + } catch (DisplayValidationException $ex) { + return redirect()->route('admin.services.packs.edit', $id)->withErrors(json_decode($ex->getMessage()))->withInput(); + } catch (\Exception $ex) { + Log::error($ex); + Alert::danger('An error occured while attempting to add edit this pack.')->flash(); + } + return redirect()->route('admin.services.packs.edit', $id); } - return redirect()->route('admin.services.packs.edit', $id); } public function export(Request $request, $id, $files = false) diff --git a/app/Repositories/ServiceRepository/Pack.php b/app/Repositories/ServiceRepository/Pack.php index c4b3529d..5d8591b6 100644 --- a/app/Repositories/ServiceRepository/Pack.php +++ b/app/Repositories/ServiceRepository/Pack.php @@ -225,4 +225,13 @@ class Pack }); } + public function delete($id) { + $pack = Models\ServicePack::findOrFail($id); + // @TODO Check for linked servers; foreign key should block this. + DB::transaction(function () use ($pack) { + $pack->delete(); + Storage::deleteDirectory('packs/' . $pack->uuid); + }); + } + } diff --git a/resources/views/admin/services/packs/edit.blade.php b/resources/views/admin/services/packs/edit.blade.php index abc89fe9..b71256fd 100644 --- a/resources/views/admin/services/packs/edit.blade.php +++ b/resources/views/admin/services/packs/edit.blade.php @@ -186,8 +186,9 @@
    {!! csrf_field() !!} - - + + +
    From fc2ce11a394a6ef0b6e9467d3b74bc9db6587e9a Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 18 Nov 2016 18:22:26 -0500 Subject: [PATCH 011/171] Add template, add files when new service is added. --- .../ServiceRepository/Service.php | 26 ++++++++++------ storage/app/services/.templates/index.js | 31 +++++++++++++++++++ 2 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 storage/app/services/.templates/index.js diff --git a/app/Repositories/ServiceRepository/Service.php b/app/Repositories/ServiceRepository/Service.php index 91062dcb..9e832883 100644 --- a/app/Repositories/ServiceRepository/Service.php +++ b/app/Repositories/ServiceRepository/Service.php @@ -47,7 +47,7 @@ class Service $validator = Validator::make($data, [ 'name' => 'required|string|min:1|max:255', 'description' => 'required|string', - 'file' => 'required|regex:/^[\w.-]{1,50}$/', + 'file' => 'required|unique:services,file|regex:/^[\w.-]{1,50}$/', 'executable' => 'max:255|regex:/^(.*)$/', 'startup' => 'string' ]); @@ -56,15 +56,23 @@ class Service throw new DisplayValidationException($validator->errors()); } - if (Models\Service::where('file', $data['file'])->first()) { - throw new DisplayException('A service using that configuration file already exists on the system.'); - } - $data['author'] = env('SERVICE_AUTHOR', (string) Uuid::generate(4)); $service = new Models\Service; - $service->fill($data); - $service->save(); + DB::beginTransaction(); + + try { + $service->fill($data); + $service->save(); + + Storage::put('services/' . $data['file'] . '/main.json', '{}'); + Storage::copy('services/.templates/index.js', 'services/' . $data['file'] . '/index.js'); + + DB::commit(); + } catch (\Exception $ex) { + DB::rollBack(); + throw $ex; + } return $service->id; } @@ -101,11 +109,11 @@ class Service DB::beginTransaction(); try { - Storage::deleteDirectory('services/' . $service->file); - Models\ServiceVariables::whereIn('option_id', $options->get()->toArray())->delete(); $options->delete(); $service->delete(); + + Storage::deleteDirectory('services/' . $service->file); DB::commit(); } catch (\Exception $ex) { DB::rollBack(); diff --git a/storage/app/services/.templates/index.js b/storage/app/services/.templates/index.js new file mode 100644 index 00000000..aa60eec1 --- /dev/null +++ b/storage/app/services/.templates/index.js @@ -0,0 +1,31 @@ +'use strict'; + +/** + * Pterodactyl - Daemon + * Copyright (c) 2015 - 2016 Dane Everitt + * + * 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. + */ +const rfr = require('rfr'); + +const Core = rfr('src/services/index.js'); + +class Service extends Core {} + +module.exports = Service; From 00e125c042f5b2297108c47e887c3ec09045a9d7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 18 Nov 2016 18:22:34 -0500 Subject: [PATCH 012/171] Update templates --- storage/app/services/minecraft/index.js | 22 ------------------- storage/app/services/minecraft/main.json | 8 ------- storage/app/services/srcds/index.js | 28 +----------------------- storage/app/services/srcds/main.json | 2 -- storage/app/services/terraria/index.js | 28 +----------------------- storage/app/services/terraria/main.json | 1 - storage/app/services/voice/index.js | 28 +----------------------- storage/app/services/voice/main.json | 2 -- 8 files changed, 3 insertions(+), 116 deletions(-) diff --git a/storage/app/services/minecraft/index.js b/storage/app/services/minecraft/index.js index 67c4dbb2..2d7f812c 100644 --- a/storage/app/services/minecraft/index.js +++ b/storage/app/services/minecraft/index.js @@ -25,36 +25,14 @@ const rfr = require('rfr'); const _ = require('lodash'); -const Configuration = rfr('src/services/minecraft/main.json'); const Core = rfr('src/services/index.js'); class Service extends Core { - constructor(server) { - super(server, Configuration); - } - - onPreflight(next) { - return super.onPreflight(next); - } - - onStart(next) { - return super.onStart(next); - } - onConsole(data) { // Hide the output spam from Bungeecord getting pinged. if (_.endsWith(data, '<-> InitialHandler has connected')) return; return super.onConsole(data); } - - onStop(next) { - return super.onStop(next); - } - - doQuery(next) { - return super.doQuery(next); - } - } module.exports = Service; diff --git a/storage/app/services/minecraft/main.json b/storage/app/services/minecraft/main.json index 1a94258a..b131d988 100644 --- a/storage/app/services/minecraft/main.json +++ b/storage/app/services/minecraft/main.json @@ -1,10 +1,5 @@ { - "latest": { - "tag": "^(latest)$", - "symlink": "vanilla" - }, "vanilla": { - "tag": "^(vanilla){1}(-[\\w\\d.-]+)?$", "startup": { "done": ")! For help, type ", "userInteraction": [ @@ -30,7 +25,6 @@ "query": "minecraftping" }, "spigot": { - "tag": "^(spigot)$", "symlink": "vanilla", "configs": { "spigot.yml": { @@ -42,7 +36,6 @@ } }, "bungeecord": { - "tag": "^(bungeecord)$", "startup": { "done": "Listening on " }, @@ -64,7 +57,6 @@ "query": "minecraftping" }, "sponge": { - "tag": "^(sponge)$", "symlink": "vanilla", "startup": { "userInteraction": [ diff --git a/storage/app/services/srcds/index.js b/storage/app/services/srcds/index.js index 29b0439f..aa60eec1 100644 --- a/storage/app/services/srcds/index.js +++ b/storage/app/services/srcds/index.js @@ -24,34 +24,8 @@ */ const rfr = require('rfr'); -const Configuration = rfr('src/services/srcds/main.json'); const Core = rfr('src/services/index.js'); -class Service extends Core { - constructor(server) { - super(server, Configuration); - } - - onPreflight(next) { - return super.onPreflight(next); - } - - onStart(next) { - return super.onStart(next); - } - - onConsole(data) { - return super.onConsole(data); - } - - onStop(next) { - return super.onStop(next); - } - - doQuery(next) { - return super.doQuery(next); - } - -} +class Service extends Core {} module.exports = Service; diff --git a/storage/app/services/srcds/main.json b/storage/app/services/srcds/main.json index fdd65e33..989a6753 100644 --- a/storage/app/services/srcds/main.json +++ b/storage/app/services/srcds/main.json @@ -1,6 +1,5 @@ { "srcds": { - "tag": "^(srcds)$", "startup": { "done": "Assigned anonymous gameserver Steam ID", "userInteraction": [] @@ -14,7 +13,6 @@ "query": "protocol-valve" }, "ark": { - "tag": "^(ark)$", "symlink": "srcds", "startup": { "done": "Setting breakpad minidump AppID" diff --git a/storage/app/services/terraria/index.js b/storage/app/services/terraria/index.js index 55b396af..aa60eec1 100644 --- a/storage/app/services/terraria/index.js +++ b/storage/app/services/terraria/index.js @@ -24,34 +24,8 @@ */ const rfr = require('rfr'); -const Configuration = rfr('src/services/terraria/main.json'); const Core = rfr('src/services/index.js'); -class Service extends Core { - constructor(server) { - super(server, Configuration); - } - - onPreflight(next) { - return super.onPreflight(next); - } - - onStart(next) { - return super.onStart(next); - } - - onConsole(data) { - return super.onConsole(data); - } - - onStop(next) { - return super.onStop(next); - } - - doQuery(next) { - return super.doQuery(next); - } - -} +class Service extends Core {} module.exports = Service; diff --git a/storage/app/services/terraria/main.json b/storage/app/services/terraria/main.json index c2a74d5b..6eacd749 100644 --- a/storage/app/services/terraria/main.json +++ b/storage/app/services/terraria/main.json @@ -1,6 +1,5 @@ { "tshock": { - "tag": "^(tshock)$", "startup": { "done": "Type 'help' for a list of commands", "userInteraction": [] diff --git a/storage/app/services/voice/index.js b/storage/app/services/voice/index.js index 022b417a..aa60eec1 100644 --- a/storage/app/services/voice/index.js +++ b/storage/app/services/voice/index.js @@ -24,34 +24,8 @@ */ const rfr = require('rfr'); -const Configuration = rfr('src/services/voice/main.json'); const Core = rfr('src/services/index.js'); -class Service extends Core { - constructor(server) { - super(server, Configuration); - } - - onPreflight(next) { - return super.onPreflight(next); - } - - onStart(next) { - return super.onStart(next); - } - - onConsole(data) { - return super.onConsole(data); - } - - onStop(next) { - return super.onStop(next); - } - - doQuery(next) { - return super.doQuery(next); - } - -} +class Service extends Core {} module.exports = Service; diff --git a/storage/app/services/voice/main.json b/storage/app/services/voice/main.json index 0479dd88..6bc8e5c9 100644 --- a/storage/app/services/voice/main.json +++ b/storage/app/services/voice/main.json @@ -1,6 +1,5 @@ { "mumble": { - "tag": "^(mumble)$", "startup": { "done": "Server listening on", "userInteraction": [ @@ -26,7 +25,6 @@ "query": "mumbleping" }, "teamspeak": { - "tag": "^(ts3)$", "startup": { "done": "listening on 0.0.0.0:", "userInteraction": [] From ee78a3947b38106b4df82d3849696dfb2c23cc8c Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 18 Nov 2016 18:34:45 -0500 Subject: [PATCH 013/171] Grammatical display changes --- resources/views/admin/services/new.blade.php | 2 +- resources/views/admin/services/packs/byoption.blade.php | 4 ++-- resources/views/admin/services/packs/byservice.blade.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/admin/services/new.blade.php b/resources/views/admin/services/new.blade.php index cd421ef9..ce7f0f4f 100644 --- a/resources/views/admin/services/new.blade.php +++ b/resources/views/admin/services/new.blade.php @@ -55,7 +55,7 @@ /index.js -

    This should be the name of the folder on the daemon that contains all of the service logic.

    +

    This should be a unique alpha-numeric (a-z) name used to identify the service.

    diff --git a/resources/views/admin/services/packs/byoption.blade.php b/resources/views/admin/services/packs/byoption.blade.php index cc285d16..62695856 100644 --- a/resources/views/admin/services/packs/byoption.blade.php +++ b/resources/views/admin/services/packs/byoption.blade.php @@ -36,7 +36,7 @@ - + @@ -47,7 +47,7 @@ @foreach ($packs as $pack) - + diff --git a/resources/views/admin/services/packs/byservice.blade.php b/resources/views/admin/services/packs/byservice.blade.php index ddb538ac..f73572c3 100644 --- a/resources/views/admin/services/packs/byservice.blade.php +++ b/resources/views/admin/services/packs/byservice.blade.php @@ -35,7 +35,7 @@
    NamePack Name Version UUID Selectable
    {{ $pack->name }}{{ $pack->version }}{{ $pack->version }} {{ $pack->uuid }} @if($pack->selectable)@else@endif @if($pack->visible)@else@endif
    - + From 57d62c4ed39ad847caed3448bfb410932054db52 Mon Sep 17 00:00:00 2001 From: Bent Haase Date: Sat, 19 Nov 2016 21:57:58 +0100 Subject: [PATCH 014/171] Fix time axis for node and server view Nope, the current month is not a valid minute --- resources/views/admin/nodes/view.blade.php | 2 +- resources/views/server/index.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/admin/nodes/view.blade.php b/resources/views/admin/nodes/view.blade.php index 010e0910..cf71bd69 100644 --- a/resources/views/admin/nodes/view.blade.php +++ b/resources/views/admin/nodes/view.blade.php @@ -674,7 +674,7 @@ $(document).ready(function () { memoryData.push(parseInt(data.stats.memory / (1024 * 1024))); var m = new Date(); - timeLabels.push($.format.date(new Date(), 'HH:MM:ss')); + timeLabels.push($.format.date(new Date(), 'HH:mm:ss')); CPUChart.update(); MemoryChart.update(); diff --git a/resources/views/server/index.blade.php b/resources/views/server/index.blade.php index 5cfec8a2..0b59be40 100644 --- a/resources/views/server/index.blade.php +++ b/resources/views/server/index.blade.php @@ -300,7 +300,7 @@ $(window).load(function () { memoryData.push(parseInt(proc.data.memory.total / (1024 * 1024))); var m = new Date(); - timeLabels.push($.format.date(new Date(), 'HH:MM:ss')); + timeLabels.push($.format.date(new Date(), 'HH:mm:ss')); CPUChart.update(); MemoryChart.update(); From 0e89ecb42737a0eb3de2facbe3faf1f0b5e9bca5 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Nov 2016 16:19:25 -0500 Subject: [PATCH 015/171] Handle node: properly when doing server searches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uses the node name rather than the node’s ID by default. --- .../Controllers/Admin/ServersController.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Admin/ServersController.php b/app/Http/Controllers/Admin/ServersController.php index 8f0b184c..15dd1abd 100644 --- a/app/Http/Controllers/Admin/ServersController.php +++ b/app/Http/Controllers/Admin/ServersController.php @@ -68,14 +68,21 @@ class ServersController extends Controller $match = str_replace('"', '', $match); if (strpos($match, ':')) { list($field, $term) = explode(':', $match); - $field = (strpos($field, '.')) ? $field : 'servers.' . $field; + if ($field === 'node') { + $field = 'nodes.name'; + } else if (!strpos($field, '.')) { + $field = 'servers.' . $field; + } + $query->orWhere($field, 'LIKE', '%' . $term . '%'); } else { $query->where('servers.name', 'LIKE', '%' . $match . '%'); - $query->orWhere('servers.username', 'LIKE', '%' . $match . '%'); - $query->orWhere('users.email', 'LIKE', '%' . $match . '%'); - $query->orWhere('allocations.port', 'LIKE', '%' . $match . '%'); - $query->orWhere('allocations.ip', 'LIKE', '%' . $match . '%'); + $query->orWhere([ + ['servers.username', 'LIKE', '%' . $match . '%'], + ['users.email', 'LIKE', '%' . $match . '%'], + ['allocations.port', 'LIKE', '%' . $match . '%'], + ['allocations.ip', 'LIKE', '%' . $match . '%'], + ]); } } } From 723b608e0c9321843552919c8db3e12703194c47 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Nov 2016 16:29:13 -0500 Subject: [PATCH 016/171] Implement node deletion properly, fixes #173 --- .../Controllers/Admin/NodesController.php | 26 ++++++++++--------- app/Repositories/NodeRepository.php | 26 +++++++++++++++++-- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/Admin/NodesController.php b/app/Http/Controllers/Admin/NodesController.php index 24ac3761..ef77da4e 100644 --- a/app/Http/Controllers/Admin/NodesController.php +++ b/app/Http/Controllers/Admin/NodesController.php @@ -253,20 +253,22 @@ class NodesController extends Controller public function deleteNode(Request $request, $id) { - $node = Models\Node::findOrFail($id); - $servers = Models\Server::where('node', $id)->count(); - if ($servers > 0) { - Alert::danger('You cannot delete a node with servers currently attached to it.')->flash(); - return redirect()->route('admin.nodes.view', [ - 'id' => $id, - 'tab' => 'tab_delete' - ]); + try { + $repo = new NodeRepository; + $repo->delete($id); + Alert::success('Successfully deleted the requested node from the panel.')->flash(); + return redirect()->route('admin.nodes'); + } catch (DisplayException $e) { + Alert::danger($e->getMessage())->flash(); + } catch (\Exception $e) { + Log::error($e); + Alert::danger('An unhandled exception occured while attempting to delete this node. Please try again.')->flash(); } - $node->delete(); - Alert::success('Node successfully deleted.')->flash(); - return redirect()->route('admin.nodes'); - + return redirect()->route('admin.nodes.view', [ + 'id' => $id, + 'tab' => 'tab_delete' + ]); } } diff --git a/app/Repositories/NodeRepository.php b/app/Repositories/NodeRepository.php index a23cc745..2d579f27 100644 --- a/app/Repositories/NodeRepository.php +++ b/app/Repositories/NodeRepository.php @@ -229,8 +229,30 @@ class NodeRepository { public function delete($id) { - // @TODO: add logic; - return true; + $node = Models\Node::findOrFail($id); + if (Models\Server::where('node', $id)->count() > 0) { + throw new DisplayException('You cannot delete a node with servers currently attached to it.'); + } + + DB::beginTransaction(); + + try { + // Unlink Database Servers + Models\DatabaseServer::where('linked_node', $node->id)->update([ + 'linked_node' => null, + ]); + + // Delete Allocations + Models\Allocation::where('node', $node->id)->delete(); + + // Delete Node + $node->delete(); + + DB::commit(); + } catch (\Exception $ex) { + DB::rollback(); + throw $ex; + } } } From 1ad715f1a3192524efff9ec5e241d431ec94d5b1 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Nov 2016 17:34:14 -0500 Subject: [PATCH 017/171] Improve database management for servers, fixes #181 --- app/Repositories/DatabaseRepository.php | 40 +++++++++++++------- resources/views/admin/servers/view.blade.php | 2 +- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/app/Repositories/DatabaseRepository.php b/app/Repositories/DatabaseRepository.php index c1c9b4e3..8861549b 100644 --- a/app/Repositories/DatabaseRepository.php +++ b/app/Repositories/DatabaseRepository.php @@ -56,13 +56,12 @@ class DatabaseRepository { } DB::beginTransaction(); - try { $db = new Models\Database; $db->fill([ 'server_id' => $server->id, 'db_server' => $options['db_server'], - 'database' => $server->uuidShort . '_' . $options['database'], + 'database' => "s{$server->id}_{$options['database']}", 'username' => $server->uuidShort . '_' . str_random(7), 'remote' => $options['remote'], 'password' => Crypt::encrypt(str_random(20)) @@ -90,16 +89,29 @@ class DatabaseRepository { $capsule->setAsGlobal(); - Capsule::statement('CREATE DATABASE ' . $db->database); - Capsule::statement('CREATE USER \'' . $db->username . '\'@\'' . $db->remote . '\' IDENTIFIED BY \'' . Crypt::decrypt($db->password) . '\''); - Capsule::statement('GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON ' . $db->database . '.* TO \'' . $db->username . '\'@\'' . $db->remote . '\''); - Capsule::statement('FLUSH PRIVILEGES'); - - DB::commit(); - return true; } catch (\Exception $ex) { - DB::rollback(); - throw $ex; + DB::rollBack(); + throw new DisplayException('There was an error while connecting to the Database Host Server. Please check the error logs.', $ex); + } + + try { + Capsule::statement('CREATE DATABASE `' . $db->database . '`'); + Capsule::statement('CREATE USER `' . $db->username . '`@`' . $db->remote . '` IDENTIFIED BY \'' . Crypt::decrypt($db->password) . '\''); + Capsule::statement('GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON `' . $db->database . '`.* TO `' . $db->username . '`@`' . $db->remote . '`'); + Capsule::statement('FLUSH PRIVILEGES'); + DB::commit(); + } catch (\Exception $ex) { + try { + Capsule::statement('DROP DATABASE `' . $db->database . '`'); + Capsule::statement('DROP USER `' . $db->username . '`@`' . $db->remote . '`'); + } catch (\Exception $exi) { + // ignore it, if it fails its probably + // because we failed to ever make the DB + // or the user on the system. + } finally { + DB::rollBack(); + throw $ex; + } } } @@ -138,7 +150,7 @@ class DatabaseRepository { $capsule->setAsGlobal(); Capsule::statement(sprintf( - 'SET PASSWORD FOR \'%s\'@\'%s\' = PASSWORD(\'%s\')', + 'SET PASSWORD FOR `%s`@`%s` = PASSWORD(\'%s\')', $db->username, $db->remote, $password @@ -182,8 +194,8 @@ class DatabaseRepository { $capsule->setAsGlobal(); - Capsule::statement('DROP USER \'' . $db->username . '\'@\'' . $db->remote . '\''); - Capsule::statement('DROP DATABASE ' . $db->database); + Capsule::statement('DROP USER `' . $db->username . '`@`' . $db->remote . '`'); + Capsule::statement('DROP DATABASE `' . $db->database . '`'); $db->delete(); diff --git a/resources/views/admin/servers/view.blade.php b/resources/views/admin/servers/view.blade.php index d6178d87..cb429ebe 100644 --- a/resources/views/admin/servers/view.blade.php +++ b/resources/views/admin/servers/view.blade.php @@ -373,7 +373,7 @@
    -
    {{ $server->uuidShort }}_
    +
    s{{ $server->id }}_
    From d93f88f4713164b7947b8f51dca820c6f960d810 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Nov 2016 17:49:56 -0500 Subject: [PATCH 018/171] Properly display node status with newer daemon versions --- resources/views/admin/nodes/index.blade.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/views/admin/nodes/index.blade.php b/resources/views/admin/nodes/index.blade.php index dcfd4162..689a9dda 100644 --- a/resources/views/admin/nodes/index.blade.php +++ b/resources/views/admin/nodes/index.blade.php @@ -78,6 +78,9 @@ function pingNodes() { $.ajax({ type: 'GET', url: $(element).data('location'), + headers: { + 'X-Access-Token': '{{ $node->daemonSecret }}' + }, timeout: 5000 }).done(function (data) { $(element).removeClass('text-muted').find('i').removeClass().addClass('fa fa-fw fa-heartbeat faa-pulse animated').css('color', '#50af51'); From edaae40df939bd6ad182e8bd7fa135202ef512b7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Nov 2016 18:23:10 -0500 Subject: [PATCH 019/171] Add some quick daemon information when viewing nodes --- resources/views/admin/nodes/index.blade.php | 37 +++++++++++---------- resources/views/admin/nodes/view.blade.php | 30 +++++++++++++++++ 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/resources/views/admin/nodes/index.blade.php b/resources/views/admin/nodes/index.blade.php index 689a9dda..114f3a0c 100644 --- a/resources/views/admin/nodes/index.blade.php +++ b/resources/views/admin/nodes/index.blade.php @@ -70,24 +70,27 @@ @endsection diff --git a/resources/views/admin/nodes/view.blade.php b/resources/views/admin/nodes/view.blade.php index cf71bd69..b67505c3 100644 --- a/resources/views/admin/nodes/view.blade.php +++ b/resources/views/admin/nodes/view.blade.php @@ -69,6 +69,18 @@
    NameService Option Total Packs
    + + + + + + + + + + + + @@ -777,6 +789,24 @@ $(document).ready(function () { element.parent().removeClass('has-error has-success'); } + (function getInformation() { + $.ajax({ + method: 'GET', + url: '{{ $node->scheme }}://{{ $node->fqdn }}:{{ $node->daemonListen }}', + timeout: 5000, + headers: { + 'X-Access-Token': '{{ $node->daemonSecret }}' + }, + }).done(function (data) { + $('[data-attr="info-version"]').html(data.version); + $('[data-attr="info-system"]').html(data.system.type + '(' + data.system.arch + ') ' + data.system.release + ''); + $('[data-attr="info-cpus"]').html(data.system.cpus); + }).fail(function (jqXHR) { + + }).always(function() { + setTimeout(getInformation, 10000); + }); + })(); }); @endsection From 261535d83dc6dbaf28f0fa509453d87c844bc709 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Nov 2016 18:52:19 -0500 Subject: [PATCH 020/171] Fix broken block ending for script --- resources/views/admin/nodes/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/admin/nodes/index.blade.php b/resources/views/admin/nodes/index.blade.php index 114f3a0c..ea375243 100644 --- a/resources/views/admin/nodes/index.blade.php +++ b/resources/views/admin/nodes/index.blade.php @@ -91,6 +91,6 @@ $(document).ready(function () { }); }); })(); -} +}); @endsection From 90cd2b677e696901934d9a44c7a5ab107ffd1b5f Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Nov 2016 19:29:57 -0500 Subject: [PATCH 021/171] Add version checking to daemon and panel Also includes some buttons for users to get help from the panel. --- app/Console/Commands/ShowVersion.php | 3 +- app/Facades/Version.php | 35 ++++++++ app/Services/VersionService.php | 93 ++++++++++++++++++++++ config/app.php | 1 + resources/views/admin/index.blade.php | 32 ++++++-- resources/views/admin/nodes/view.blade.php | 2 +- 6 files changed, 157 insertions(+), 9 deletions(-) create mode 100644 app/Facades/Version.php create mode 100644 app/Services/VersionService.php diff --git a/app/Console/Commands/ShowVersion.php b/app/Console/Commands/ShowVersion.php index 0dcce04a..2033f9b0 100644 --- a/app/Console/Commands/ShowVersion.php +++ b/app/Console/Commands/ShowVersion.php @@ -24,6 +24,7 @@ namespace Pterodactyl\Console\Commands; use Illuminate\Console\Command; +use Version; class ShowVersion extends Command { @@ -58,6 +59,6 @@ class ShowVersion extends Command */ public function handle() { - $this->info('You are running Pterodactyl Panel ' . config('app.version')); + $this->info('You are running Pterodactyl Panel v' . Version::getCurrentPanel() . ' (' . ((Version::isLatestPanel()) ? 'Up to Date' : 'Latest: ' . Version::getDaemon()) . ')'); } } diff --git a/app/Facades/Version.php b/app/Facades/Version.php new file mode 100644 index 00000000..84086260 --- /dev/null +++ b/app/Facades/Version.php @@ -0,0 +1,35 @@ + + * + * 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. + */ +namespace Pterodactyl\Facades; + +use Illuminate\Support\Facades\Facade; + +class Version extends Facade +{ + + protected static function getFacadeAccessor() + { + return '\Pterodactyl\Services\VersionService'; + } +} diff --git a/app/Services/VersionService.php b/app/Services/VersionService.php new file mode 100644 index 00000000..5afb97e4 --- /dev/null +++ b/app/Services/VersionService.php @@ -0,0 +1,93 @@ + + * + * 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. + */ +namespace Pterodactyl\Services; + +use Cache; +use GuzzleHttp\Client; + +class VersionService +{ + + protected static $versions; + + /** + * Constructor + */ + public function __construct() + { + self::$versions = Cache::remember('versions', env('VERSION_CACHE_TIME', 60), function () { + $client = new Client(); + + try { + $response = $client->request('GET', env('VERSION_CHECK_URL', 'https://cdn.pterodactyl.io/releases/latest.json')); + + if ($response->getStatusCode() === 200) { + return json_decode($response->getBody()); + } else { + throw new \Exception('Invalid response code.'); + } + } catch (\Exception $ex) { + // Failed request, just return errored version. + return (object) [ + 'panel' => 'error', + 'daemon' => 'error', + ]; + } + }); + } + + public static function getPanel() + { + return self::$versions->panel; + } + + public static function getDaemon() + { + return self::$versions->daemon; + } + + public function getCurrentPanel() + { + return config('app.version'); + } + + public static function isLatestPanel() + { + if (config('app.version') === 'canary') { + return true; + } + + return (version_compare(config('app.version'), self::$versions->panel) >= 0); + } + + public static function isLatestDaemon($daemon) + { + if ($daemon === '0.0.0-canary') { + return true; + } + + return (version_compare($daemon, self::$versions->daemon) >= 0); + } + +} diff --git a/config/app.php b/config/app.php index 619e5103..a3c3ff53 100644 --- a/config/app.php +++ b/config/app.php @@ -217,6 +217,7 @@ return [ 'URL' => Illuminate\Support\Facades\URL::class, 'Uuid' => Webpatser\Uuid\Uuid::class, 'Validator' => Illuminate\Support\Facades\Validator::class, + 'Version' => Pterodactyl\Facades\Version::class, 'View' => Illuminate\Support\Facades\View::class, ], diff --git a/resources/views/admin/index.blade.php b/resources/views/admin/index.blade.php index 27e8d52e..85ffa570 100644 --- a/resources/views/admin/index.blade.php +++ b/resources/views/admin/index.blade.php @@ -24,13 +24,31 @@ @endsection @section('content') -
    - -

    Pterodactyl Admin Control Panel


    -

    Welcome to the most advanced, lightweight, and user-friendly open source game server control panel.

    -

    You are running version {{ config('app.version') }}.

    +
    +
    + +

    Pterodactyl Admin Control Panel


    + @if (Version::isLatestPanel()) +
    You are running Pterodactyl Panel version {{ Version::getCurrentPanel() }}. Your panel is up-to-date!
    + @else +
    + Your panel is not up-to-date! The latest version is {{ Version::getPanel() }} and you are currently running version {{ Version::getCurrentPanel() }}. +
    + @endif +
    +
    + - - +{!! Theme::js('js/files/index.js') !!} +{!! Theme::js('js/files/contextmenu.js') !!} +{!! Theme::js('js/files/actions.js') !!} + {!! Theme::js('js/plugins/minecraft/eula.js') !!} @endif +@endsection diff --git a/resources/themes/pterodactyl/server/settings/sftp.blade.php b/resources/themes/pterodactyl/server/settings/sftp.blade.php new file mode 100644 index 00000000..7f85c152 --- /dev/null +++ b/resources/themes/pterodactyl/server/settings/sftp.blade.php @@ -0,0 +1,114 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.master') + +@section('title') + SFTP Settings +@endsection + +@section('content-header') +

    SFTP ConfigurationAccount details for SFTP connections.

    + +@endsection + +@section('content') +
    +
    +
    +
    +

    Change SFTP Password

    +
    + @can('reset-sftp', $server) +
    +
    +
    + +
    + +

    {{ trans('auth.password_requirements') }}

    +
    +
    +
    + + + @else +
    +
    +

    You are not authorized to perform this action.

    +
    +
    + @endcan +
    +
    +
    +
    +
    +

    SFTP Details

    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    + @can('view-sftp-password', $server) +
    + +
    + sftp_password))value="{{ Crypt::decrypt($server->sftp_password) }}"@endif /> +
    +
    + @endcan +
    + +
    +
    +
    +@endsection + +@section('footer-scripts') + @parent + {!! Theme::js('js/frontend/server.socket.js') !!} +@endsection From 1a6532d3690d7cbe06567037a456948855c1c9f5 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Mon, 16 Jan 2017 16:36:48 -0500 Subject: [PATCH 117/171] Correct link to new Discord channel invite --- resources/views/admin/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/admin/index.blade.php b/resources/views/admin/index.blade.php index 85ffa570..6c2481a9 100644 --- a/resources/views/admin/index.blade.php +++ b/resources/views/admin/index.blade.php @@ -41,7 +41,7 @@
    From 31b4589eabf717a2b89890b6d869726ec1e6f87f Mon Sep 17 00:00:00 2001 From: Jakob Date: Wed, 18 Jan 2017 00:21:05 +0100 Subject: [PATCH 118/171] Contribution to feature/new-theme (#254) * add translation to navigation * redesign base.api.index view add translations * remove license derp * translate never in base.api.index view * simplify user drop down for now add translations --- resources/lang/en/base.php | 8 ++ resources/lang/en/navigation.php | 27 +++++++ resources/lang/en/strings.php | 8 ++ .../pterodactyl/base/api/index.blade.php | 81 +++++++++++++++++++ .../pterodactyl/layouts/master.blade.php | 46 ++++++----- 5 files changed, 149 insertions(+), 21 deletions(-) create mode 100644 resources/lang/en/navigation.php create mode 100644 resources/themes/pterodactyl/base/api/index.blade.php diff --git a/resources/lang/en/base.php b/resources/lang/en/base.php index 49f90ff3..bc057191 100644 --- a/resources/lang/en/base.php +++ b/resources/lang/en/base.php @@ -7,6 +7,14 @@ return [ 'header_sub' => 'Servers you own and have access to.', 'list' => 'Server List', ], + 'api' => [ + 'index' => [ + 'header' => 'API Access', + 'header_sub' => 'Manage your API access keys.', + 'list' => 'API Keys', + 'create_new' => 'Create new API key' + ], + ], 'account' => [ 'header' => 'Your Account', 'header_sub' => 'Manage your account details.', diff --git a/resources/lang/en/navigation.php b/resources/lang/en/navigation.php new file mode 100644 index 00000000..679188e4 --- /dev/null +++ b/resources/lang/en/navigation.php @@ -0,0 +1,27 @@ + 'Home', + 'account' => [ + 'header' => 'ACCOUNT MANAGEMENT', + 'my_account' => 'My Account', + 'security_controls' => 'Security Controls', + 'api_access' => 'API Access', + 'my_servers' => 'My Servers' + ], + 'server' => [ + 'header' => 'SERVER MANAGEMENT', + 'console' => 'Console', + 'file_management' => 'File Management', + 'file_browser' => 'File Browser', + 'create_file' => 'Create File', + 'upload_files' => 'Upload Files', + 'subusers' => 'Subusers', + 'task_management' => 'Task Management', + 'configuration' => 'Configuration', + 'port_allocations' => 'Port Allocations', + 'sftp_settings' => 'SFTP Settings', + 'startup_parameters' => 'Startup Parameters', + 'databases' => 'Databases' + ], +]; diff --git a/resources/lang/en/strings.php b/resources/lang/en/strings.php index 95d6bc34..98b3304f 100644 --- a/resources/lang/en/strings.php +++ b/resources/lang/en/strings.php @@ -28,4 +28,12 @@ return [ 'configuration' => 'Configuration', 'sftp' => 'SFTP', 'databases' => 'Databases', + 'memo' => 'Memo', + 'created' => 'Created', + 'expires' => 'Expires', + 'public_key' => 'Public key', + 'api_access' => 'Api Access', + 'never' => 'never', + 'sign_out' => 'Sign out', + 'admin_control' => 'Admin Control' ]; diff --git a/resources/themes/pterodactyl/base/api/index.blade.php b/resources/themes/pterodactyl/base/api/index.blade.php new file mode 100644 index 00000000..8d59ba15 --- /dev/null +++ b/resources/themes/pterodactyl/base/api/index.blade.php @@ -0,0 +1,81 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.master') + +@section('title') + {{ trans('base.api.index.header') }} +@endsection + +@section('content-header') +

    {{ trans('base.api.index.header') }}{{ trans('base.api.index.header_sub')}}

    + +@endsection + +@section('content') +
    +
    +
    +
    +

    {{ trans('base.api.index.list')}}

    +
    +
    +
    Daemon Version
    System Information
    Total CPU Cores
    Total Servers {{ count($servers) }}
    + + + + + + + + + @foreach ($keys as $key) + + + + + + + + @endforeach + +
    {{ trans('strings.public_key') }}{{ trans('strings.memo') }}
    {{ $key->public }}{{ $key->memo }} + +
    +
    + + + + +@endsection diff --git a/resources/themes/pterodactyl/layouts/master.blade.php b/resources/themes/pterodactyl/layouts/master.blade.php index a7200587..048cd6db 100644 --- a/resources/themes/pterodactyl/layouts/master.blade.php +++ b/resources/themes/pterodactyl/layouts/master.blade.php @@ -55,12 +55,16 @@ - + --}}
  • @@ -107,46 +111,46 @@ @endif ",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(''),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('
      '),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('
    • ×
    • ');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('×');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change"); +if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('
    • '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(""),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null; +},e.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&(f=d(this),null!=f&&g.push(f))})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;return this._isInitialized?void b.call(this,c):void this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery"],function(a){function b(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a ` + + +
      + + + + +@endsection + +@section('footer-scripts') + @parent + {!! Theme::js('vendor/select2/select2.full.min.js') !!} + {!! Theme::js('js/frontend/server.socket.js') !!} + {!! Theme::js('js/vendor/ace/ace.js') !!} + {!! Theme::js('js/vendor/ace/ext-modelist.js') !!} + {!! Theme::js('js/vendor/lodash/lodash.js') !!} + {!! Theme::js('js/frontend/files/editor.js') !!} + +@endsection From 994588c82d30dabde831d87b9ee2c2b29b9a800a Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 20 Jan 2017 17:19:42 -0500 Subject: [PATCH 137/171] Set the old theme on admin center until new theme is done --- app/Http/Middleware/AdminAuthenticate.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Middleware/AdminAuthenticate.php b/app/Http/Middleware/AdminAuthenticate.php index 78b73fb7..505d7c08 100644 --- a/app/Http/Middleware/AdminAuthenticate.php +++ b/app/Http/Middleware/AdminAuthenticate.php @@ -24,6 +24,7 @@ namespace Pterodactyl\Http\Middleware; +use Theme; use Closure; use Illuminate\Contracts\Auth\Guard; @@ -68,6 +69,8 @@ class AdminAuthenticate return abort(403); } + // @TODO: eventually update admin themes + Theme::set('default'); return $next($request); } } From 3d2278ba3e0d979125ccf45c09e3735467996851 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 20 Jan 2017 23:39:37 -0500 Subject: [PATCH 138/171] Add subuser list and new subuser views Holy :cow2: translations are annoying to implement for these views. --- .../Controllers/Server/SubuserController.php | 2 +- public/themes/pterodactyl/css/pterodactyl.css | 8 + resources/lang/en/server.php | 160 +++++++ resources/lang/en/strings.php | 1 + .../pterodactyl/server/users/index.blade.php | 86 ++++ .../pterodactyl/server/users/new.blade.php | 412 ++++++++++++++++++ 6 files changed, 668 insertions(+), 1 deletion(-) create mode 100644 resources/themes/pterodactyl/server/users/index.blade.php create mode 100644 resources/themes/pterodactyl/server/users/new.blade.php diff --git a/app/Http/Controllers/Server/SubuserController.php b/app/Http/Controllers/Server/SubuserController.php index 48de4621..69db75bf 100644 --- a/app/Http/Controllers/Server/SubuserController.php +++ b/app/Http/Controllers/Server/SubuserController.php @@ -55,7 +55,7 @@ class SubuserController extends Controller return view('server.users.index', [ 'server' => $server, 'node' => Models\Node::find($server->node), - 'subusers' => Models\Subuser::select('subusers.*', 'users.email as a_userEmail') + 'subusers' => Models\Subuser::select('subusers.*', 'users.email', 'users.username') ->join('users', 'users.id', '=', 'subusers.user_id') ->where('server_id', $server->id) ->get(), diff --git a/public/themes/pterodactyl/css/pterodactyl.css b/public/themes/pterodactyl/css/pterodactyl.css index 4d1e94bf..f9e8d8a7 100644 --- a/public/themes/pterodactyl/css/pterodactyl.css +++ b/public/themes/pterodactyl/css/pterodactyl.css @@ -113,3 +113,11 @@ td.has-progress { color: #cccccc; height: 0; } + +.box-header > .form-group { + margin-bottom: 0; +} + +.box-header > .form-group > div > p.small { + margin: 0; +} diff --git a/resources/lang/en/server.php b/resources/lang/en/server.php index e0fe67ad..656430da 100644 --- a/resources/lang/en/server.php +++ b/resources/lang/en/server.php @@ -6,6 +6,166 @@ return [ 'header' => 'Server Console', 'header_sub' => 'Control your server in real time.', ], + 'users' => [ + 'header' => 'Manage Users', + 'header_sub' => 'Control who can access your server.', + 'configure' => 'Configure Permissions', + 'list' => 'Accounts with Access', + 'add' => 'Add New Subuser', + 'new' => [ + 'header' => 'Add New User', + 'header_sub' => 'Add a new user with permissions to this server.', + 'email' => 'Email Address', + 'email_help' => 'Enter the email address for the user you wish to invite to manage this server.', + 'power_header' => 'Power Management', + 'file_header' => 'File Management', + 'subuser_header' => 'Subuser Management', + 'server_header' => 'Server Management', + 'task_header' => 'Task Management', + 'sftp_header' => 'SFTP Management', + 'db_header' => 'Database Management', + 'start' => [ + 'title' => 'Start Server', + 'description' => 'Allows user to start the server.', + ], + 'stop' => [ + 'title' => 'Stop Server', + 'description' => 'Allows user to stop the server.', + ], + 'restart' => [ + 'title' => 'Stop Server', + 'description' => 'Allows user to restart the server.', + ], + 'kill' => [ + 'title' => 'Stop Server', + 'description' => 'Allows user to kill the server process.', + ], + 'command' => [ + 'title' => 'Send Console Command', + 'description' => 'Allows sending a command from the console. If the user does not have stop or restart permissions they cannot send the application\'s stop command.', + ], + 'list_files' => [ + 'title' => 'List Files', + 'description' => 'Allows user to list all files and folders on the server but not view file contents.', + ], + 'edit_files' => [ + 'title' => 'Edit Files', + 'description' => 'Allows user to open a file for viewing only.', + ], + 'save_files' => [ + 'title' => 'Save Files', + 'description' => 'Allows user to save modified file contents.', + ], + 'move_files' => [ + 'title' => 'Rename & Move Files', + 'description' => 'Allows user to move and rename files and folders on the filesystem.', + ], + 'copy_files' => [ + 'title' => 'Copy Files', + 'description' => 'Allows user to copy files and folders on the filesystem.', + ], + 'compress_files' => [ + 'title' => 'Compress Files', + 'description' => 'Allows user to make archives of files and folders on the system.', + ], + 'decompress_files' => [ + 'title' => 'Decompress Files', + 'description' => 'Allows user to decompress .zip and .tar(.gz) archives.', + ], + 'create_files' => [ + 'title' => 'Create Files', + 'description' => 'Allows user to create a new file within the panel.', + ], + 'upload_files' => [ + 'title' => 'Upload Files', + 'description' => 'Allows user to upload files through the file manager.', + ], + 'delete_files' => [ + 'title' => 'Delete Files', + 'description' => 'Allows user to delete files from the system.', + ], + 'download_files' => [ + 'title' => 'Download Files', + 'description' => 'Allows user to download files. If a user is given this permission they can download and view file contents even if that permission is not assigned on the panel.', + ], + 'list_subusers' => [ + 'title' => 'List Subusers', + 'description' => 'Allows user to view a listing of all subusers assigned to the server.', + ], + 'view_subuser' => [ + 'title' => 'View Subuser', + 'description' => 'Allows user to view permissions assigned to subusers.', + ], + 'edit_subuser' => [ + 'title' => 'Edit Subuser', + 'description' => 'Allows a user to edit permissions assigned to other subusers.', + ], + 'create_subuser' => [ + 'title' => 'Create Subuser', + 'description' => 'Allows user to create additional subusers on the server.', + ], + 'delete_subuser' => [ + 'title' => 'Delete Subuser', + 'description' => 'Allows a user to delete other subusers on the server.', + ], + 'set_connection' => [ + 'title' => 'Set Default Connection', + 'description' => 'Allows user to set the default connection used for a server as well as view avaliable ports.', + ], + 'view_startup' => [ + 'title' => 'View Startup Command', + 'description' => 'Allows user to view the startup command and associated variables for a server.', + ], + 'edit_startup' => [ + 'title' => 'Edit Startup Command', + 'description' => 'Allows a user to modify startup variables for a server.', + ], + 'list_tasks' => [ + 'title' => 'List Tasks', + 'description' => 'Allows a user to list all tasks (enabled and disabled) on a server.', + ], + 'view_task' => [ + 'title' => 'View Task', + 'description' => 'Allows a user to view a specific task\'s details.', + ], + 'toggle_task' => [ + 'title' => 'Toggle Task', + 'description' => 'Allows a user to toggle a task on or off.', + ], + 'queue_task' => [ + 'title' => 'Queue Task', + 'description' => 'Allows a user to queue a task to run on next cycle.', + ], + 'create_task' => [ + 'title' => 'Create Task', + 'description' => 'Allows a user to create new tasks.', + ], + 'delete_task' => [ + 'title' => 'Delete Task', + 'description' => 'Allows a user to delete a task.', + ], + 'view_sftp' => [ + 'title' => 'View SFTP Details', + 'description' => 'Allows user to view the server\'s SFTP information but not the password.', + ], + 'view_sftp_password' => [ + 'title' => 'View SFTP Password', + 'description' => 'Allows user to view the SFTP password for the server.', + ], + 'reset_sftp' => [ + 'title' => 'Reset SFTP Password', + 'description' => 'Allows user to change the SFTP password for the server.', + ], + 'view_databases' => [ + 'title' => 'View Database Details', + 'description' => 'Allows user to view all databases associated with this server including the usernames and passwords for the databases.', + ], + 'reset_db_password' => [ + 'title' => 'Reset Database Password', + 'description' => 'Allows a user to reset passwords for databases.', + ], + ], + ], 'files' => [ 'header' => 'File Manager', 'header_sub' => 'Manage all of your files directly from the web.', diff --git a/resources/lang/en/strings.php b/resources/lang/en/strings.php index 01062a6d..324f956a 100644 --- a/resources/lang/en/strings.php +++ b/resources/lang/en/strings.php @@ -50,4 +50,5 @@ return [ 'make_primary' => 'Make Primary', 'none' => 'None', 'cancel' => 'Cancel', + 'created_at' => 'Created At', ]; diff --git a/resources/themes/pterodactyl/server/users/index.blade.php b/resources/themes/pterodactyl/server/users/index.blade.php new file mode 100644 index 00000000..6e63bd10 --- /dev/null +++ b/resources/themes/pterodactyl/server/users/index.blade.php @@ -0,0 +1,86 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.master') + +@section('title') + @lang('server.users.header') +@endsection + +@section('content-header') +

      @lang('server.users.header')@lang('server.users.header_sub')

      + +@endsection + +@section('content') +
      +
      +
      +
      +

      @lang('server.users.list')

      +
      +
      + + + + + + + + @can('view-subuser', $server)@endcan + @can('delete-subuser', $server)@endcan + + @foreach($subusers as $user) + + + + + @can('view-subuser', $server) + + @endcan + @can('delete-subuser', $server) + + @endcan + + @endforeach + +
      @lang('strings.username')@lang('strings.email')
      User Image{{ $user->username }} + {{ $user->email }} + + + + + + + +
      +
      + @can('create-subuser', $server) + + @endcan +
      +
      +
      +@endsection diff --git a/resources/themes/pterodactyl/server/users/new.blade.php b/resources/themes/pterodactyl/server/users/new.blade.php new file mode 100644 index 00000000..3ee194c4 --- /dev/null +++ b/resources/themes/pterodactyl/server/users/new.blade.php @@ -0,0 +1,412 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.master') + +@section('title') + @lang('server.users.new.header') +@endsection + +@section('content-header') +

      @lang('server.users.new.header')@lang('server.users.new.header_sub')

      + +@endsection + +@section('content') + + +
      +
      +
      +
      +
      + +
      + +

      @lang('server.users.new.email_help')

      +
      +
      +
      + +
      +
      +
      +
      +
      + {{-- Left Side --}} +
      +
      +
      +
      +

      @lang('server.users.new.power_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      @lang('server.users.new.subuser_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      @lang('server.users.new.server_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      @lang('server.users.new.sftp_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      + {{-- Right Side --}} +
      +
      +
      +
      +

      @lang('server.users.new.file_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      @lang('server.users.new.task_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      @lang('server.users.new.db_header')

      +
      +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      + +@endsection + +@section('footer-scripts') + @parent + +@endsection From 95f574ec674b7d4c85c62182ff8291025600a15e Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 20 Jan 2017 23:48:12 -0500 Subject: [PATCH 139/171] Sidebar and API View tweaks --- resources/lang/en/base.php | 6 +- .../themes/pterodactyl/base/api/new.blade.php | 124 +++++++++--------- .../pterodactyl/layouts/master.blade.php | 8 +- 3 files changed, 71 insertions(+), 67 deletions(-) diff --git a/resources/lang/en/base.php b/resources/lang/en/base.php index fc1d3e8c..392a23d1 100644 --- a/resources/lang/en/base.php +++ b/resources/lang/en/base.php @@ -24,7 +24,7 @@ return [ 'header' => 'API Access', 'header_sub' => 'Manage your API access keys.', 'list' => 'API Keys', - 'create_new' => 'Create new API key', + 'create_new' => 'Create New API key', ], 'new' => [ 'header' => 'New API Key', @@ -32,7 +32,7 @@ return [ 'form_title' => 'Details', 'descriptive_memo' => [ 'title' => 'Descriptive Memo', - 'description' => 'Enter a breif description of what this API key will be used for.' + 'description' => 'Enter a brief description of what this API key will be used for.' ], 'allowed_ips' => [ 'title' => 'Allowed IPs', @@ -103,7 +103,7 @@ return [ ], 'view' => [ 'title' => 'Show Single Server', - 'description' => 'Allows viewing details about a specific server including the daemon_token as current process information.', + 'description' => 'Allows viewing details about a specific server including the daemon_token as well as current process information.', ], 'list' => [ 'title' => 'List Servers', diff --git a/resources/themes/pterodactyl/base/api/new.blade.php b/resources/themes/pterodactyl/base/api/new.blade.php index 9afe90bd..8030d671 100644 --- a/resources/themes/pterodactyl/base/api/new.blade.php +++ b/resources/themes/pterodactyl/base/api/new.blade.php @@ -89,14 +89,14 @@
      @lang('base.api.new.base.title')
      -
      +
      @@ -107,54 +107,54 @@
      @lang('base.api.new.user_management.title')
      -
      +
      -
      +
      -
      +
      -
      +
      -
      +
      @@ -164,54 +164,54 @@
      @lang('base.api.new.node_management.title')
      -
      +
      -
      +
      -
      +
      -
      +
      -
      +
      @@ -229,9 +229,9 @@ GET @lang('base.api.new.server_management.server.title') -

      +

      @lang('base.api.new.server_management.server.description') -

      +

      @@ -239,9 +239,9 @@ GET @lang('base.api.new.server_management.power.title') -

      +

      @lang('base.api.new.server_management.power.description') -

      +

      @if(Auth::user()->isRootAdmin()) @@ -250,10 +250,10 @@ GET @lang('base.api.new.server_management.view.title') -

      +

      @lang('strings.danger') @lang('base.api.new.server_management.view.description') -

      +

      @@ -261,9 +261,9 @@ GET @lang('base.api.new.server_management.list.title') -

      +

      @lang('base.api.new.server_management.list.description') -

      +

      @@ -271,9 +271,9 @@ POST @lang('base.api.new.server_management.create.title') -

      +

      @lang('base.api.new.server_management.create.description') -

      +

      @@ -281,9 +281,9 @@ PATCH @lang('base.api.new.server_management.config.title') -

      +

      @lang('base.api.new.server_management.config.description') -

      +

      @@ -291,9 +291,9 @@ PATCH @lang('base.api.new.server_management.build.title') -

      +

      @lang('base.api.new.server_management.build.description') -

      +

      @@ -301,9 +301,9 @@ POST @lang('base.api.new.server_management.suspend.title') -

      +

      @lang('base.api.new.server_management.suspend.description') -

      +

      @@ -311,9 +311,9 @@ POST @lang('base.api.new.server_management.unsuspend.title') -

      +

      @lang('base.api.new.server_management.unsuspend.description') -

      +

      @@ -321,9 +321,9 @@ DELETE @lang('base.api.new.server_management.delete.title') -

      +

      @lang('base.api.new.server_management.delete.description') -

      +

      @endif @@ -335,26 +335,26 @@
      @lang('base.api.new.service_management.title')
      -
      +
      -
      +
      @@ -364,15 +364,15 @@
      @lang('base.api.new.location_management.title')
      -
      +
      diff --git a/resources/themes/pterodactyl/layouts/master.blade.php b/resources/themes/pterodactyl/layouts/master.blade.php index 8399d0bc..260a1a6a 100644 --- a/resources/themes/pterodactyl/layouts/master.blade.php +++ b/resources/themes/pterodactyl/layouts/master.blade.php @@ -123,7 +123,7 @@ @lang('navigation.account.security_controls') -
    • +
    • @lang('navigation.account.api_access') @@ -157,7 +157,11 @@
    • @lang('navigation.server.create_file')
    • -
    • +
    • Subusers From 8e9069cced6f7d41321deb00cedd0a2086389894 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 21 Jan 2017 00:04:09 -0500 Subject: [PATCH 140/171] Subuser updates --- app/Repositories/SubuserRepository.php | 9 +- resources/lang/en/server.php | 9 +- .../pterodactyl/server/users/new.blade.php | 3 +- .../pterodactyl/server/users/view.blade.php | 417 ++++++++++++++++++ 4 files changed, 433 insertions(+), 5 deletions(-) create mode 100644 resources/themes/pterodactyl/server/users/view.blade.php diff --git a/app/Repositories/SubuserRepository.php b/app/Repositories/SubuserRepository.php index dfc72b38..a25c7f12 100644 --- a/app/Repositories/SubuserRepository.php +++ b/app/Repositories/SubuserRepository.php @@ -133,10 +133,15 @@ class SubuserRepository // Determine if this user exists or if we need to make them an account. $user = Models\User::where('email', $data['email'])->first(); if (! $user) { - $password = str_random(16); try { $repo = new UserRepository; - $uid = $repo->create($data['email'], $password); + $uid = $repo->create([ + 'email' => $data['email'], + 'username' => substr(str_replace('@', '', $data['email']), 0, 8), + 'name_first' => 'John', + 'name_last' => 'Doe', + 'root_admin' => false, + ]); $user = Models\User::findOrFail($uid); } catch (\Exception $ex) { throw $ex; diff --git a/resources/lang/en/server.php b/resources/lang/en/server.php index 656430da..bfb304f5 100644 --- a/resources/lang/en/server.php +++ b/resources/lang/en/server.php @@ -12,6 +12,11 @@ return [ 'configure' => 'Configure Permissions', 'list' => 'Accounts with Access', 'add' => 'Add New Subuser', + 'update' => 'Update Subuser', + 'edit' => [ + 'header' => 'Edit Subuser', + 'header_sub' => 'Modify user\'s access to server.' + ], 'new' => [ 'header' => 'Add New User', 'header_sub' => 'Add a new user with permissions to this server.', @@ -33,11 +38,11 @@ return [ 'description' => 'Allows user to stop the server.', ], 'restart' => [ - 'title' => 'Stop Server', + 'title' => 'Restart Server', 'description' => 'Allows user to restart the server.', ], 'kill' => [ - 'title' => 'Stop Server', + 'title' => 'Kill Server', 'description' => 'Allows user to kill the server process.', ], 'command' => [ diff --git a/resources/themes/pterodactyl/server/users/new.blade.php b/resources/themes/pterodactyl/server/users/new.blade.php index 3ee194c4..6236be98 100644 --- a/resources/themes/pterodactyl/server/users/new.blade.php +++ b/resources/themes/pterodactyl/server/users/new.blade.php @@ -43,7 +43,8 @@
      - + {!! csrf_field() !!} +

      @lang('server.users.new.email_help')

      diff --git a/resources/themes/pterodactyl/server/users/view.blade.php b/resources/themes/pterodactyl/server/users/view.blade.php new file mode 100644 index 00000000..129a403b --- /dev/null +++ b/resources/themes/pterodactyl/server/users/view.blade.php @@ -0,0 +1,417 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.master') + +@section('title') + @lang('server.users.new.header') +@endsection + +@section('content-header') +

      @lang('server.users.edit.header')@lang('server.users.edit.header_sub')

      + +@endsection + +@section('content') +@can('edit-subuser', $server) +
      +@endcan +
      +
      +
      +
      +
      + +
      + {!! csrf_field() !!} + +
      +
      +
      + @can('edit-subuser', $server) + + @endcan +
      +
      +
      +
      +
      + {{-- Left Side --}} +
      +
      +
      +
      +

      @lang('server.users.new.power_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      @lang('server.users.new.subuser_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      @lang('server.users.new.server_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      @lang('server.users.new.sftp_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      + {{-- Right Side --}} +
      +
      +
      +
      +

      @lang('server.users.new.file_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      @lang('server.users.new.task_header')

      +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      @lang('server.users.new.db_header')

      +
      +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +@can('edit-subuser', $server) +
      +@endcan +@endsection + +@section('footer-scripts') + @parent + +@endsection From db7b741b286b3c44d6c3435a0593f87dd3293ab5 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 21 Jan 2017 13:49:14 -0500 Subject: [PATCH 141/171] Show server status in sidebar properly on subuser views --- .../Controllers/Server/SubuserController.php | 25 ++++++++++++++++--- .../pterodactyl/server/users/index.blade.php | 5 ++++ .../pterodactyl/server/users/new.blade.php | 1 + .../pterodactyl/server/users/view.blade.php | 1 + 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Server/SubuserController.php b/app/Http/Controllers/Server/SubuserController.php index 69db75bf..97c4e5ab 100644 --- a/app/Http/Controllers/Server/SubuserController.php +++ b/app/Http/Controllers/Server/SubuserController.php @@ -28,6 +28,7 @@ use DB; use Log; use Auth; use Alert; +use Javascript; use Pterodactyl\Models; use Illuminate\Http\Request; use Pterodactyl\Exceptions\DisplayException; @@ -51,10 +52,16 @@ class SubuserController extends Controller { $server = Models\Server::getByUUID($uuid); $this->authorize('list-subusers', $server); + $node = Models\Node::find($server->node); + + Javascript::put([ + 'server' => collect($server->makeVisible('daemonSecret'))->only(['uuid', 'uuidShort', 'daemonSecret', 'username']), + 'node' => collect($node)->only('fqdn', 'scheme', 'daemonListen'), + ]); return view('server.users.index', [ 'server' => $server, - 'node' => Models\Node::find($server->node), + 'node' => $node, 'subusers' => Models\Subuser::select('subusers.*', 'users.email', 'users.username') ->join('users', 'users.id', '=', 'subusers.user_id') ->where('server_id', $server->id) @@ -66,6 +73,12 @@ class SubuserController extends Controller { $server = Models\Server::getByUUID($uuid); $this->authorize('view-subuser', $server); + $node = Models\Node::find($server->node); + + Javascript::put([ + 'server' => collect($server->makeVisible('daemonSecret'))->only(['uuid', 'uuidShort', 'daemonSecret', 'username']), + 'node' => collect($node)->only('fqdn', 'scheme', 'daemonListen'), + ]); $subuser = Models\Subuser::select('subusers.*', 'users.email as a_userEmail') ->join('users', 'users.id', '=', 'subusers.user_id') @@ -87,7 +100,7 @@ class SubuserController extends Controller return view('server.users.view', [ 'server' => $server, - 'node' => Models\Node::find($server->node), + 'node' => $node, 'subuser' => $subuser, 'permissions' => $permissions, ]); @@ -137,10 +150,16 @@ class SubuserController extends Controller { $server = Models\Server::getByUUID($uuid); $this->authorize('create-subuser', $server); + $node = Models\Node::find($server->node); + + Javascript::put([ + 'server' => collect($server->makeVisible('daemonSecret'))->only(['uuid', 'uuidShort', 'daemonSecret', 'username']), + 'node' => collect($node)->only('fqdn', 'scheme', 'daemonListen'), + ]); return view('server.users.new', [ 'server' => $server, - 'node' => Models\Node::find($server->node), + 'node' => $node, ]); } diff --git a/resources/themes/pterodactyl/server/users/index.blade.php b/resources/themes/pterodactyl/server/users/index.blade.php index 6e63bd10..ebb675d2 100644 --- a/resources/themes/pterodactyl/server/users/index.blade.php +++ b/resources/themes/pterodactyl/server/users/index.blade.php @@ -84,3 +84,8 @@
    • @endsection + +@section('footer-scripts') + @parent + {!! Theme::js('js/frontend/server.socket.js') !!} +@endsection diff --git a/resources/themes/pterodactyl/server/users/new.blade.php b/resources/themes/pterodactyl/server/users/new.blade.php index 6236be98..5bec326b 100644 --- a/resources/themes/pterodactyl/server/users/new.blade.php +++ b/resources/themes/pterodactyl/server/users/new.blade.php @@ -400,6 +400,7 @@ @section('footer-scripts') @parent + {!! Theme::js('js/frontend/server.socket.js') !!} +@endsection From fa0f32584e075bc79a4598ccaa8994a6dbf7e493 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 21 Jan 2017 15:44:06 -0500 Subject: [PATCH 144/171] Update laroute --- public/js/laroute.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/laroute.js b/public/js/laroute.js index 0a6634c7..f9a87a66 100644 --- a/public/js/laroute.js +++ b/public/js/laroute.js @@ -6,7 +6,7 @@ absolute: false, rootUrl: 'http://pterodactyl.app', - routes : [{"host":null,"methods":["GET","HEAD"],"uri":"admin","name":"admin.index","action":"Pterodactyl\Http\Controllers\Admin\BaseController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/settings","name":"admin.settings","action":"Pterodactyl\Http\Controllers\Admin\BaseController@getSettings"},{"host":null,"methods":["POST"],"uri":"admin\/settings","name":null,"action":"Pterodactyl\Http\Controllers\Admin\BaseController@postSettings"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/users","name":"admin.users","action":"Pterodactyl\Http\Controllers\Admin\UserController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/users\/accounts.json","name":"admin.users.json","action":"Pterodactyl\Http\Controllers\Admin\UserController@getJson"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/users\/view\/{id}","name":"admin.users.view","action":"Pterodactyl\Http\Controllers\Admin\UserController@getView"},{"host":null,"methods":["POST"],"uri":"admin\/users\/view\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\UserController@updateUser"},{"host":null,"methods":["DELETE"],"uri":"admin\/users\/view\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\UserController@deleteUser"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/users\/new","name":"admin.users.new","action":"Pterodactyl\Http\Controllers\Admin\UserController@getNew"},{"host":null,"methods":["POST"],"uri":"admin\/users\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\UserController@postNew"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/servers","name":"admin.servers","action":"Pterodactyl\Http\Controllers\Admin\ServersController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/servers\/new","name":"admin.servers.new","action":"Pterodactyl\Http\Controllers\Admin\ServersController@getNew"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postNewServer"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/new\/get-nodes","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postNewServerGetNodes"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/new\/get-ips","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postNewServerGetIps"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/new\/service-options","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postNewServerServiceOptions"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/new\/option-details","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postNewServerOptionDetails"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/servers\/view\/{id}","name":"admin.servers.view","action":"Pterodactyl\Http\Controllers\Admin\ServersController@getView"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/database","name":"admin.servers.database","action":"Pterodactyl\Http\Controllers\Admin\ServersController@postDatabase"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/details","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUpdateServerDetails"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/container","name":"admin.servers.post.container","action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUpdateContainerDetails"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/startup","name":"admin.servers.post.startup","action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUpdateServerStartup"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/rebuild","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUpdateServerToggleBuild"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/build","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUpdateServerUpdateBuild"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/suspend","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postSuspendServer"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/unsuspend","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUnsuspendServer"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/installed","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postToggleInstall"},{"host":null,"methods":["DELETE"],"uri":"admin\/servers\/view\/{id}\/{force?}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@deleteServer"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/queuedDeletion","name":"admin.servers.post.queuedDeletion","action":"Pterodactyl\Http\Controllers\Admin\ServersController@postQueuedDeletionHandler"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes","name":"admin.nodes","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes\/new","name":"admin.nodes.new","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getNew"},{"host":null,"methods":["POST"],"uri":"admin\/nodes\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\NodesController@postNew"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes\/view\/{id}","name":"admin.nodes.view","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getView"},{"host":null,"methods":["POST"],"uri":"admin\/nodes\/view\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\NodesController@postView"},{"host":null,"methods":["DELETE"],"uri":"admin\/nodes\/view\/{id}\/deallocate\/single\/{allocation}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\NodesController@deallocateSingle"},{"host":null,"methods":["POST"],"uri":"admin\/nodes\/view\/{id}\/deallocate\/block","name":null,"action":"Pterodactyl\Http\Controllers\Admin\NodesController@deallocateBlock"},{"host":null,"methods":["POST"],"uri":"admin\/nodes\/view\/{id}\/alias","name":"admin.nodes.alias","action":"Pterodactyl\Http\Controllers\Admin\NodesController@setAlias"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes\/view\/{id}\/allocations.json","name":"admin.nodes.view.allocations","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getAllocationsJson"},{"host":null,"methods":["POST"],"uri":"admin\/nodes\/view\/{id}\/allocations","name":"admin.nodes.post.allocations","action":"Pterodactyl\Http\Controllers\Admin\NodesController@postAllocations"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes\/view\/{id}\/deploy","name":"admin.nodes.deply","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getScript"},{"host":null,"methods":["DELETE"],"uri":"admin\/nodes\/view\/{id}","name":"admin.nodes.delete","action":"Pterodactyl\Http\Controllers\Admin\NodesController@deleteNode"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes\/{id}\/configurationtoken","name":"admin.nodes.configuration-token","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getConfigurationToken"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/locations","name":"admin.locations","action":"Pterodactyl\Http\Controllers\Admin\LocationsController@getIndex"},{"host":null,"methods":["DELETE"],"uri":"admin\/locations\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\LocationsController@deleteLocation"},{"host":null,"methods":["PATCH"],"uri":"admin\/locations\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\LocationsController@patchLocation"},{"host":null,"methods":["POST"],"uri":"admin\/locations","name":null,"action":"Pterodactyl\Http\Controllers\Admin\LocationsController@postLocation"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/databases","name":"admin.databases","action":"Pterodactyl\Http\Controllers\Admin\DatabaseController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/databases\/new","name":"admin.databases.new","action":"Pterodactyl\Http\Controllers\Admin\DatabaseController@getNew"},{"host":null,"methods":["POST"],"uri":"admin\/databases\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\DatabaseController@postNew"},{"host":null,"methods":["DELETE"],"uri":"admin\/databases\/delete\/{id}","name":"admin.databases.delete","action":"Pterodactyl\Http\Controllers\Admin\DatabaseController@deleteDatabase"},{"host":null,"methods":["DELETE"],"uri":"admin\/databases\/delete-server\/{id}","name":"admin.databases.delete-server","action":"Pterodactyl\Http\Controllers\Admin\DatabaseController@deleteServer"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services","name":"admin.services","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/new","name":"admin.services.new","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getNew"},{"host":null,"methods":["POST"],"uri":"admin\/services\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postNew"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{id}","name":"admin.services.service","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getService"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postService"},{"host":null,"methods":["DELETE"],"uri":"admin\/services\/service\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@deleteService"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{id}\/configuration","name":"admin.services.service.config","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getConfiguration"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{id}\/configuration","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postConfiguration"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{service}\/option\/new","name":"admin.services.option.new","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@newOption"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{service}\/option\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postNewOption"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{service}\/option\/{option}","name":"admin.services.option","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getOption"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{service}\/option\/{option}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postOption"},{"host":null,"methods":["DELETE"],"uri":"admin\/services\/service\/{service}\/option\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@deleteOption"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{service}\/option\/{option}\/variable\/new","name":"admin.services.option.variable.new","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getNewVariable"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{service}\/option\/{option}\/variable\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postNewVariable"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{service}\/option\/{option}\/variable\/{variable}","name":"admin.services.option.variable","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postOptionVariable"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{service}\/option\/{option}\/variable\/{variable}\/delete","name":"admin.services.option.variable.delete","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@deleteVariable"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/new\/{option?}","name":"admin.services.packs.new","action":"Pterodactyl\Http\Controllers\Admin\PackController@new"},{"host":null,"methods":["POST"],"uri":"admin\/services\/packs\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\PackController@create"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/upload\/{option?}","name":"admin.services.packs.uploadForm","action":"Pterodactyl\Http\Controllers\Admin\PackController@uploadForm"},{"host":null,"methods":["POST"],"uri":"admin\/services\/packs\/upload","name":null,"action":"Pterodactyl\Http\Controllers\Admin\PackController@postUpload"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs","name":"admin.services.packs","action":"Pterodactyl\Http\Controllers\Admin\PackController@listAll"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/for\/option\/{option}","name":"admin.services.packs.option","action":"Pterodactyl\Http\Controllers\Admin\PackController@listByOption"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/for\/service\/{service}","name":"admin.services.packs.service","action":"Pterodactyl\Http\Controllers\Admin\PackController@listByService"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/edit\/{pack}","name":"admin.services.packs.edit","action":"Pterodactyl\Http\Controllers\Admin\PackController@edit"},{"host":null,"methods":["POST"],"uri":"admin\/services\/packs\/edit\/{pack}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\PackController@update"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/edit\/{pack}\/export\/{archive?}","name":"admin.services.packs.export","action":"Pterodactyl\Http\Controllers\Admin\PackController@export"},{"host":null,"methods":["GET","HEAD"],"uri":"auth\/login","name":"auth.login","action":"Pterodactyl\Http\Controllers\Auth\LoginController@showLoginForm"},{"host":null,"methods":["POST"],"uri":"auth\/login","name":null,"action":"Pterodactyl\Http\Controllers\Auth\LoginController@login"},{"host":null,"methods":["POST"],"uri":"auth\/login\/totp","name":null,"action":"Pterodactyl\Http\Controllers\Auth\LoginController@checkTotp"},{"host":null,"methods":["GET","HEAD"],"uri":"auth\/password","name":"auth.password","action":"Pterodactyl\Http\Controllers\Auth\ForgotPasswordController@showLinkRequestForm"},{"host":null,"methods":["POST"],"uri":"auth\/password","name":null,"action":"Pterodactyl\Http\Controllers\Auth\ForgotPasswordController@sendResetLinkEmail"},{"host":null,"methods":["GET","HEAD"],"uri":"auth\/password\/reset\/{token}","name":"auth.reset","action":"Pterodactyl\Http\Controllers\Auth\ResetPasswordController@showResetForm"},{"host":null,"methods":["POST"],"uri":"auth\/password\/reset","name":"auth.reset.post","action":"Pterodactyl\Http\Controllers\Auth\ResetPasswordController@reset"},{"host":null,"methods":["GET","HEAD"],"uri":"auth\/logout","name":"auth.logout","action":"Pterodactyl\Http\Controllers\Auth\LoginController@logout"},{"host":null,"methods":["GET","HEAD"],"uri":"\/","name":"index","action":"Pterodactyl\Http\Controllers\Base\IndexController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"index","name":null,"action":"Closure"},{"host":null,"methods":["GET","HEAD"],"uri":"password-gen\/{length}","name":"password-gen","action":"Pterodactyl\Http\Controllers\Base\IndexController@getPassword"},{"host":null,"methods":["GET","HEAD"],"uri":"account","name":"account","action":"Pterodactyl\Http\Controllers\Base\AccountController@index"},{"host":null,"methods":["POST"],"uri":"account\/password","name":"account.password","action":"Pterodactyl\Http\Controllers\Base\AccountController@password"},{"host":null,"methods":["POST"],"uri":"account\/email","name":"account.email","action":"Pterodactyl\Http\Controllers\Base\AccountController@email"},{"host":null,"methods":["GET","HEAD"],"uri":"account\/api","name":"account.api","action":"Pterodactyl\Http\Controllers\Base\APIController@index"},{"host":null,"methods":["GET","HEAD"],"uri":"account\/api\/new","name":"account.api.new","action":"Pterodactyl\Http\Controllers\Base\APIController@create"},{"host":null,"methods":["POST"],"uri":"account\/api\/new","name":null,"action":"Pterodactyl\Http\Controllers\Base\APIController@save"},{"host":null,"methods":["DELETE"],"uri":"account\/api\/revoke\/{key}","name":null,"action":"Pterodactyl\Http\Controllers\Base\APIController@revoke"},{"host":null,"methods":["GET","HEAD"],"uri":"account\/security","name":"account.security","action":"Pterodactyl\Http\Controllers\Base\SecurityController@index"},{"host":null,"methods":["GET","HEAD"],"uri":"account\/security\/revoke\/{id}","name":"account.security.revoke","action":"Pterodactyl\Http\Controllers\Base\SecurityController@revoke"},{"host":null,"methods":["PUT"],"uri":"account\/security\/totp","name":"account.security.totp","action":"Pterodactyl\Http\Controllers\Base\SecurityController@generateTotp"},{"host":null,"methods":["POST"],"uri":"account\/security\/totp","name":null,"action":"Pterodactyl\Http\Controllers\Base\SecurityController@setTotp"},{"host":null,"methods":["DELETE"],"uri":"account\/security\/totp","name":null,"action":"Pterodactyl\Http\Controllers\Base\SecurityController@disableTotp"},{"host":null,"methods":["GET","HEAD"],"uri":"daemon\/services","name":"daemon.services","action":"Pterodactyl\Http\Controllers\Daemon\ServiceController@list"},{"host":null,"methods":["GET","HEAD"],"uri":"daemon\/services\/pull\/{service}\/{file}","name":"remote.install","action":"Pterodactyl\Http\Controllers\Daemon\ServiceController@pull"},{"host":null,"methods":["GET","HEAD"],"uri":"language\/{lang}","name":"langauge.set","action":"Pterodactyl\Http\Controllers\Base\LanguageController@setLanguage"},{"host":null,"methods":["POST"],"uri":"remote\/download","name":"remote.download","action":"Pterodactyl\Http\Controllers\Remote\RemoteController@postDownload"},{"host":null,"methods":["POST"],"uri":"remote\/install","name":"remote.install","action":"Pterodactyl\Http\Controllers\Remote\RemoteController@postInstall"},{"host":null,"methods":["POST"],"uri":"remote\/event","name":"remote.event","action":"Pterodactyl\Http\Controllers\Remote\RemoteController@event"},{"host":null,"methods":["GET","HEAD"],"uri":"remote\/configuration\/{token}","name":"remote.configuration","action":"Pterodactyl\Http\Controllers\Remote\RemoteController@getConfiguration"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}","name":"server.index","action":"Pterodactyl\Http\Controllers\Server\ServerController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/settings","name":"server.settings","action":"Pterodactyl\Http\Controllers\Server\ServerController@getSettings"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/settings\/databases","name":"server.settings.databases","action":"Pterodactyl\Http\Controllers\Server\ServerController@getDatabases"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/settings\/sftp","name":"server.settings.sftp","action":"Pterodactyl\Http\Controllers\Server\ServerController@getSFTP"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/settings\/sftp","name":null,"action":"Pterodactyl\Http\Controllers\Server\ServerController@postSettingsSFTP"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/settings\/startup","name":"server.settings.startup","action":"Pterodactyl\Http\Controllers\Server\ServerController@postSettingsStartup"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/files","name":"server.files.index","action":"Pterodactyl\Http\Controllers\Server\ServerController@getFiles"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/files\/edit\/{file}","name":"server.files.edit","action":"Pterodactyl\Http\Controllers\Server\ServerController@getEditFile"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/files\/download\/{file}","name":"server.files.download","action":"Pterodactyl\Http\Controllers\Server\ServerController@getDownloadFile"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/files\/add","name":"server.files.add","action":"Pterodactyl\Http\Controllers\Server\ServerController@getAddFile"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/files\/directory-list","name":"server.files.directory-list","action":"Pterodactyl\Http\Controllers\Server\AjaxController@postDirectoryList"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/files\/save","name":"server.files.save","action":"Pterodactyl\Http\Controllers\Server\AjaxController@postSaveFile"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/users","name":"server.subusers","action":"Pterodactyl\Http\Controllers\Server\SubuserController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/users\/new","name":"server.subusers.new","action":"Pterodactyl\Http\Controllers\Server\SubuserController@getNew"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/users\/new","name":null,"action":"Pterodactyl\Http\Controllers\Server\SubuserController@postNew"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/users\/view\/{id}","name":"server.subusers.view","action":"Pterodactyl\Http\Controllers\Server\SubuserController@getView"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/users\/view\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Server\SubuserController@postView"},{"host":null,"methods":["DELETE"],"uri":"server\/{server}\/users\/delete\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Server\SubuserController@deleteSubuser"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/tasks","name":"server.tasks","action":"Pterodactyl\Http\Controllers\Server\TaskController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/tasks\/view\/{id}","name":"server.tasks.view","action":"Pterodactyl\Http\Controllers\Server\TaskController@getView"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/tasks\/new","name":"server.tasks.new","action":"Pterodactyl\Http\Controllers\Server\TaskController@getNew"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/tasks\/new","name":null,"action":"Pterodactyl\Http\Controllers\Server\TaskController@postNew"},{"host":null,"methods":["DELETE"],"uri":"server\/{server}\/tasks\/delete\/{id}","name":"server.tasks.delete","action":"Pterodactyl\Http\Controllers\Server\TaskController@deleteTask"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/tasks\/toggle\/{id}","name":"server.tasks.toggle","action":"Pterodactyl\Http\Controllers\Server\TaskController@toggleTask"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/ajax\/status","name":"server.ajax.status","action":"Pterodactyl\Http\Controllers\Server\AjaxController@getStatus"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/ajax\/set-primary","name":null,"action":"Pterodactyl\Http\Controllers\Server\AjaxController@postSetPrimary"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/ajax\/settings\/reset-database-password","name":"server.ajax.reset-database-password","action":"Pterodactyl\Http\Controllers\Server\AjaxController@postResetDatabasePassword"},{"host":null,"methods":["GET","HEAD"],"uri":"_debugbar\/open","name":"debugbar.openhandler","action":"Barryvdh\Debugbar\Controllers\OpenHandlerController@handle"},{"host":null,"methods":["GET","HEAD"],"uri":"_debugbar\/clockwork\/{id}","name":"debugbar.clockwork","action":"Barryvdh\Debugbar\Controllers\OpenHandlerController@clockwork"},{"host":null,"methods":["GET","HEAD"],"uri":"_debugbar\/assets\/stylesheets","name":"debugbar.assets.css","action":"Barryvdh\Debugbar\Controllers\AssetController@css"},{"host":null,"methods":["GET","HEAD"],"uri":"_debugbar\/assets\/javascript","name":"debugbar.assets.js","action":"Barryvdh\Debugbar\Controllers\AssetController@js"}], + routes : [{"host":null,"methods":["GET","HEAD"],"uri":"admin","name":"admin.index","action":"Pterodactyl\Http\Controllers\Admin\BaseController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/settings","name":"admin.settings","action":"Pterodactyl\Http\Controllers\Admin\BaseController@getSettings"},{"host":null,"methods":["POST"],"uri":"admin\/settings","name":null,"action":"Pterodactyl\Http\Controllers\Admin\BaseController@postSettings"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/users","name":"admin.users","action":"Pterodactyl\Http\Controllers\Admin\UserController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/users\/accounts.json","name":"admin.users.json","action":"Pterodactyl\Http\Controllers\Admin\UserController@getJson"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/users\/view\/{id}","name":"admin.users.view","action":"Pterodactyl\Http\Controllers\Admin\UserController@getView"},{"host":null,"methods":["POST"],"uri":"admin\/users\/view\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\UserController@updateUser"},{"host":null,"methods":["DELETE"],"uri":"admin\/users\/view\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\UserController@deleteUser"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/users\/new","name":"admin.users.new","action":"Pterodactyl\Http\Controllers\Admin\UserController@getNew"},{"host":null,"methods":["POST"],"uri":"admin\/users\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\UserController@postNew"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/servers","name":"admin.servers","action":"Pterodactyl\Http\Controllers\Admin\ServersController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/servers\/new","name":"admin.servers.new","action":"Pterodactyl\Http\Controllers\Admin\ServersController@getNew"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postNewServer"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/new\/get-nodes","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postNewServerGetNodes"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/new\/get-ips","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postNewServerGetIps"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/new\/service-options","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postNewServerServiceOptions"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/new\/option-details","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postNewServerOptionDetails"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/servers\/view\/{id}","name":"admin.servers.view","action":"Pterodactyl\Http\Controllers\Admin\ServersController@getView"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/database","name":"admin.servers.database","action":"Pterodactyl\Http\Controllers\Admin\ServersController@postDatabase"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/details","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUpdateServerDetails"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/container","name":"admin.servers.post.container","action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUpdateContainerDetails"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/startup","name":"admin.servers.post.startup","action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUpdateServerStartup"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/rebuild","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUpdateServerToggleBuild"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/build","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUpdateServerUpdateBuild"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/suspend","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postSuspendServer"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/unsuspend","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postUnsuspendServer"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/installed","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@postToggleInstall"},{"host":null,"methods":["DELETE"],"uri":"admin\/servers\/view\/{id}\/{force?}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServersController@deleteServer"},{"host":null,"methods":["POST"],"uri":"admin\/servers\/view\/{id}\/queuedDeletion","name":"admin.servers.post.queuedDeletion","action":"Pterodactyl\Http\Controllers\Admin\ServersController@postQueuedDeletionHandler"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes","name":"admin.nodes","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes\/new","name":"admin.nodes.new","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getNew"},{"host":null,"methods":["POST"],"uri":"admin\/nodes\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\NodesController@postNew"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes\/view\/{id}","name":"admin.nodes.view","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getView"},{"host":null,"methods":["POST"],"uri":"admin\/nodes\/view\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\NodesController@postView"},{"host":null,"methods":["DELETE"],"uri":"admin\/nodes\/view\/{id}\/deallocate\/single\/{allocation}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\NodesController@deallocateSingle"},{"host":null,"methods":["POST"],"uri":"admin\/nodes\/view\/{id}\/deallocate\/block","name":null,"action":"Pterodactyl\Http\Controllers\Admin\NodesController@deallocateBlock"},{"host":null,"methods":["POST"],"uri":"admin\/nodes\/view\/{id}\/alias","name":"admin.nodes.alias","action":"Pterodactyl\Http\Controllers\Admin\NodesController@setAlias"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes\/view\/{id}\/allocations.json","name":"admin.nodes.view.allocations","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getAllocationsJson"},{"host":null,"methods":["POST"],"uri":"admin\/nodes\/view\/{id}\/allocations","name":"admin.nodes.post.allocations","action":"Pterodactyl\Http\Controllers\Admin\NodesController@postAllocations"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes\/view\/{id}\/deploy","name":"admin.nodes.deply","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getScript"},{"host":null,"methods":["DELETE"],"uri":"admin\/nodes\/view\/{id}","name":"admin.nodes.delete","action":"Pterodactyl\Http\Controllers\Admin\NodesController@deleteNode"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/nodes\/{id}\/configurationtoken","name":"admin.nodes.configuration-token","action":"Pterodactyl\Http\Controllers\Admin\NodesController@getConfigurationToken"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/locations","name":"admin.locations","action":"Pterodactyl\Http\Controllers\Admin\LocationsController@getIndex"},{"host":null,"methods":["DELETE"],"uri":"admin\/locations\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\LocationsController@deleteLocation"},{"host":null,"methods":["PATCH"],"uri":"admin\/locations\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\LocationsController@patchLocation"},{"host":null,"methods":["POST"],"uri":"admin\/locations","name":null,"action":"Pterodactyl\Http\Controllers\Admin\LocationsController@postLocation"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/databases","name":"admin.databases","action":"Pterodactyl\Http\Controllers\Admin\DatabaseController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/databases\/new","name":"admin.databases.new","action":"Pterodactyl\Http\Controllers\Admin\DatabaseController@getNew"},{"host":null,"methods":["POST"],"uri":"admin\/databases\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\DatabaseController@postNew"},{"host":null,"methods":["DELETE"],"uri":"admin\/databases\/delete\/{id}","name":"admin.databases.delete","action":"Pterodactyl\Http\Controllers\Admin\DatabaseController@deleteDatabase"},{"host":null,"methods":["DELETE"],"uri":"admin\/databases\/delete-server\/{id}","name":"admin.databases.delete-server","action":"Pterodactyl\Http\Controllers\Admin\DatabaseController@deleteServer"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services","name":"admin.services","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/new","name":"admin.services.new","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getNew"},{"host":null,"methods":["POST"],"uri":"admin\/services\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postNew"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{id}","name":"admin.services.service","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getService"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postService"},{"host":null,"methods":["DELETE"],"uri":"admin\/services\/service\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@deleteService"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{id}\/configuration","name":"admin.services.service.config","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getConfiguration"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{id}\/configuration","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postConfiguration"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{service}\/option\/new","name":"admin.services.option.new","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@newOption"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{service}\/option\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postNewOption"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{service}\/option\/{option}","name":"admin.services.option","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getOption"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{service}\/option\/{option}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postOption"},{"host":null,"methods":["DELETE"],"uri":"admin\/services\/service\/{service}\/option\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@deleteOption"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{service}\/option\/{option}\/variable\/new","name":"admin.services.option.variable.new","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@getNewVariable"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{service}\/option\/{option}\/variable\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postNewVariable"},{"host":null,"methods":["POST"],"uri":"admin\/services\/service\/{service}\/option\/{option}\/variable\/{variable}","name":"admin.services.option.variable","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@postOptionVariable"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/service\/{service}\/option\/{option}\/variable\/{variable}\/delete","name":"admin.services.option.variable.delete","action":"Pterodactyl\Http\Controllers\Admin\ServiceController@deleteVariable"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/new\/{option?}","name":"admin.services.packs.new","action":"Pterodactyl\Http\Controllers\Admin\PackController@new"},{"host":null,"methods":["POST"],"uri":"admin\/services\/packs\/new","name":null,"action":"Pterodactyl\Http\Controllers\Admin\PackController@create"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/upload\/{option?}","name":"admin.services.packs.uploadForm","action":"Pterodactyl\Http\Controllers\Admin\PackController@uploadForm"},{"host":null,"methods":["POST"],"uri":"admin\/services\/packs\/upload","name":null,"action":"Pterodactyl\Http\Controllers\Admin\PackController@postUpload"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs","name":"admin.services.packs","action":"Pterodactyl\Http\Controllers\Admin\PackController@listAll"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/for\/option\/{option}","name":"admin.services.packs.option","action":"Pterodactyl\Http\Controllers\Admin\PackController@listByOption"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/for\/service\/{service}","name":"admin.services.packs.service","action":"Pterodactyl\Http\Controllers\Admin\PackController@listByService"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/edit\/{pack}","name":"admin.services.packs.edit","action":"Pterodactyl\Http\Controllers\Admin\PackController@edit"},{"host":null,"methods":["POST"],"uri":"admin\/services\/packs\/edit\/{pack}","name":null,"action":"Pterodactyl\Http\Controllers\Admin\PackController@update"},{"host":null,"methods":["GET","HEAD"],"uri":"admin\/services\/packs\/edit\/{pack}\/export\/{archive?}","name":"admin.services.packs.export","action":"Pterodactyl\Http\Controllers\Admin\PackController@export"},{"host":null,"methods":["GET","HEAD"],"uri":"auth\/login","name":"auth.login","action":"Pterodactyl\Http\Controllers\Auth\LoginController@showLoginForm"},{"host":null,"methods":["POST"],"uri":"auth\/login","name":null,"action":"Pterodactyl\Http\Controllers\Auth\LoginController@login"},{"host":null,"methods":["POST"],"uri":"auth\/login\/totp","name":null,"action":"Pterodactyl\Http\Controllers\Auth\LoginController@checkTotp"},{"host":null,"methods":["GET","HEAD"],"uri":"auth\/password","name":"auth.password","action":"Pterodactyl\Http\Controllers\Auth\ForgotPasswordController@showLinkRequestForm"},{"host":null,"methods":["POST"],"uri":"auth\/password","name":null,"action":"Pterodactyl\Http\Controllers\Auth\ForgotPasswordController@sendResetLinkEmail"},{"host":null,"methods":["GET","HEAD"],"uri":"auth\/password\/reset\/{token}","name":"auth.reset","action":"Pterodactyl\Http\Controllers\Auth\ResetPasswordController@showResetForm"},{"host":null,"methods":["POST"],"uri":"auth\/password\/reset","name":"auth.reset.post","action":"Pterodactyl\Http\Controllers\Auth\ResetPasswordController@reset"},{"host":null,"methods":["GET","HEAD"],"uri":"auth\/logout","name":"auth.logout","action":"Pterodactyl\Http\Controllers\Auth\LoginController@logout"},{"host":null,"methods":["GET","HEAD"],"uri":"\/","name":"index","action":"Pterodactyl\Http\Controllers\Base\IndexController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"index","name":null,"action":"Closure"},{"host":null,"methods":["GET","HEAD"],"uri":"password-gen\/{length}","name":"password-gen","action":"Pterodactyl\Http\Controllers\Base\IndexController@getPassword"},{"host":null,"methods":["GET","HEAD"],"uri":"account","name":"account","action":"Pterodactyl\Http\Controllers\Base\AccountController@index"},{"host":null,"methods":["POST"],"uri":"account\/password","name":"account.password","action":"Pterodactyl\Http\Controllers\Base\AccountController@password"},{"host":null,"methods":["POST"],"uri":"account\/email","name":"account.email","action":"Pterodactyl\Http\Controllers\Base\AccountController@email"},{"host":null,"methods":["GET","HEAD"],"uri":"account\/api","name":"account.api","action":"Pterodactyl\Http\Controllers\Base\APIController@index"},{"host":null,"methods":["GET","HEAD"],"uri":"account\/api\/new","name":"account.api.new","action":"Pterodactyl\Http\Controllers\Base\APIController@create"},{"host":null,"methods":["POST"],"uri":"account\/api\/new","name":null,"action":"Pterodactyl\Http\Controllers\Base\APIController@save"},{"host":null,"methods":["DELETE"],"uri":"account\/api\/revoke\/{key}","name":null,"action":"Pterodactyl\Http\Controllers\Base\APIController@revoke"},{"host":null,"methods":["GET","HEAD"],"uri":"account\/security","name":"account.security","action":"Pterodactyl\Http\Controllers\Base\SecurityController@index"},{"host":null,"methods":["GET","HEAD"],"uri":"account\/security\/revoke\/{id}","name":"account.security.revoke","action":"Pterodactyl\Http\Controllers\Base\SecurityController@revoke"},{"host":null,"methods":["PUT"],"uri":"account\/security\/totp","name":"account.security.totp","action":"Pterodactyl\Http\Controllers\Base\SecurityController@generateTotp"},{"host":null,"methods":["POST"],"uri":"account\/security\/totp","name":null,"action":"Pterodactyl\Http\Controllers\Base\SecurityController@setTotp"},{"host":null,"methods":["DELETE"],"uri":"account\/security\/totp","name":null,"action":"Pterodactyl\Http\Controllers\Base\SecurityController@disableTotp"},{"host":null,"methods":["GET","HEAD"],"uri":"daemon\/services","name":"daemon.services","action":"Pterodactyl\Http\Controllers\Daemon\ServiceController@list"},{"host":null,"methods":["GET","HEAD"],"uri":"daemon\/services\/pull\/{service}\/{file}","name":"remote.install","action":"Pterodactyl\Http\Controllers\Daemon\ServiceController@pull"},{"host":null,"methods":["GET","HEAD"],"uri":"language\/{lang}","name":"langauge.set","action":"Pterodactyl\Http\Controllers\Base\LanguageController@setLanguage"},{"host":null,"methods":["POST"],"uri":"remote\/download","name":"remote.download","action":"Pterodactyl\Http\Controllers\Remote\RemoteController@postDownload"},{"host":null,"methods":["POST"],"uri":"remote\/install","name":"remote.install","action":"Pterodactyl\Http\Controllers\Remote\RemoteController@postInstall"},{"host":null,"methods":["POST"],"uri":"remote\/event","name":"remote.event","action":"Pterodactyl\Http\Controllers\Remote\RemoteController@event"},{"host":null,"methods":["GET","HEAD"],"uri":"remote\/configuration\/{token}","name":"remote.configuration","action":"Pterodactyl\Http\Controllers\Remote\RemoteController@getConfiguration"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}","name":"server.index","action":"Pterodactyl\Http\Controllers\Server\ServerController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/settings","name":"server.settings","action":"Pterodactyl\Http\Controllers\Server\ServerController@getSettings"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/settings\/databases","name":"server.settings.databases","action":"Pterodactyl\Http\Controllers\Server\ServerController@getDatabases"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/settings\/sftp","name":"server.settings.sftp","action":"Pterodactyl\Http\Controllers\Server\ServerController@getSFTP"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/settings\/sftp","name":null,"action":"Pterodactyl\Http\Controllers\Server\ServerController@postSettingsSFTP"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/settings\/startup","name":"server.settings.startup","action":"Pterodactyl\Http\Controllers\Server\ServerController@getStartup"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/settings\/startup","name":null,"action":"Pterodactyl\Http\Controllers\Server\ServerController@postSettingsStartup"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/settings\/allocation","name":"server.settings.allocation","action":"Pterodactyl\Http\Controllers\Server\ServerController@getAllocation"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/files","name":"server.files.index","action":"Pterodactyl\Http\Controllers\Server\ServerController@getFiles"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/files\/edit\/{file}","name":"server.files.edit","action":"Pterodactyl\Http\Controllers\Server\ServerController@getEditFile"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/files\/download\/{file}","name":"server.files.download","action":"Pterodactyl\Http\Controllers\Server\ServerController@getDownloadFile"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/files\/add","name":"server.files.add","action":"Pterodactyl\Http\Controllers\Server\ServerController@getAddFile"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/files\/directory-list","name":"server.files.directory-list","action":"Pterodactyl\Http\Controllers\Server\AjaxController@postDirectoryList"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/files\/save","name":"server.files.save","action":"Pterodactyl\Http\Controllers\Server\AjaxController@postSaveFile"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/users","name":"server.subusers","action":"Pterodactyl\Http\Controllers\Server\SubuserController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/users\/new","name":"server.subusers.new","action":"Pterodactyl\Http\Controllers\Server\SubuserController@getNew"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/users\/new","name":null,"action":"Pterodactyl\Http\Controllers\Server\SubuserController@postNew"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/users\/view\/{id}","name":"server.subusers.view","action":"Pterodactyl\Http\Controllers\Server\SubuserController@getView"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/users\/view\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Server\SubuserController@postView"},{"host":null,"methods":["DELETE"],"uri":"server\/{server}\/users\/delete\/{id}","name":null,"action":"Pterodactyl\Http\Controllers\Server\SubuserController@deleteSubuser"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/tasks","name":"server.tasks","action":"Pterodactyl\Http\Controllers\Server\TaskController@getIndex"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/tasks\/view\/{id}","name":"server.tasks.view","action":"Pterodactyl\Http\Controllers\Server\TaskController@getView"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/tasks\/new","name":"server.tasks.new","action":"Pterodactyl\Http\Controllers\Server\TaskController@getNew"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/tasks\/new","name":null,"action":"Pterodactyl\Http\Controllers\Server\TaskController@postNew"},{"host":null,"methods":["DELETE"],"uri":"server\/{server}\/tasks\/delete\/{id}","name":"server.tasks.delete","action":"Pterodactyl\Http\Controllers\Server\TaskController@deleteTask"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/tasks\/toggle\/{id}","name":"server.tasks.toggle","action":"Pterodactyl\Http\Controllers\Server\TaskController@toggleTask"},{"host":null,"methods":["GET","HEAD"],"uri":"server\/{server}\/ajax\/status","name":"server.ajax.status","action":"Pterodactyl\Http\Controllers\Server\AjaxController@getStatus"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/ajax\/set-primary","name":null,"action":"Pterodactyl\Http\Controllers\Server\AjaxController@postSetPrimary"},{"host":null,"methods":["POST"],"uri":"server\/{server}\/ajax\/settings\/reset-database-password","name":"server.ajax.reset-database-password","action":"Pterodactyl\Http\Controllers\Server\AjaxController@postResetDatabasePassword"},{"host":null,"methods":["GET","HEAD"],"uri":"_debugbar\/open","name":"debugbar.openhandler","action":"Barryvdh\Debugbar\Controllers\OpenHandlerController@handle"},{"host":null,"methods":["GET","HEAD"],"uri":"_debugbar\/clockwork\/{id}","name":"debugbar.clockwork","action":"Barryvdh\Debugbar\Controllers\OpenHandlerController@clockwork"},{"host":null,"methods":["GET","HEAD"],"uri":"_debugbar\/assets\/stylesheets","name":"debugbar.assets.css","action":"Barryvdh\Debugbar\Controllers\AssetController@css"},{"host":null,"methods":["GET","HEAD"],"uri":"_debugbar\/assets\/javascript","name":"debugbar.assets.js","action":"Barryvdh\Debugbar\Controllers\AssetController@js"}], prefix: '', route : function (name, parameters, route) { From 19da4eda042c514cb625e878d0a746cdccf0de48 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 21 Jan 2017 15:51:05 -0500 Subject: [PATCH 145/171] Update views, remove old theme views --- CHANGELOG.md | 1 + README.md | 6 + resources/views/auth/login.blade.php | 148 ----- .../views/auth/passwords/email.blade.php | 63 --- .../views/auth/passwords/reset.blade.php | 82 --- resources/views/base/account.blade.php | 90 --- resources/views/base/api/index.blade.php | 109 ---- resources/views/base/api/new.blade.php | 278 ---------- resources/views/base/index.blade.php | 124 ----- resources/views/base/security.blade.php | 205 ------- resources/views/layouts/master.blade.php | 313 ----------- resources/views/server/files/add.blade.php | 290 ---------- resources/views/server/files/edit.blade.php | 103 ---- resources/views/server/files/index.blade.php | 190 ------- resources/views/server/files/list.blade.php | 160 ------ resources/views/server/index.blade.php | 522 ------------------ resources/views/server/settings.blade.php | 246 --------- resources/views/server/tasks/index.blade.php | 156 ------ resources/views/server/tasks/new.blade.php | 172 ------ resources/views/server/tasks/view.blade.php | 0 resources/views/server/users/index.blade.php | 107 ---- resources/views/server/users/new.blade.php | 301 ---------- resources/views/server/users/view.blade.php | 290 ---------- 23 files changed, 7 insertions(+), 3949 deletions(-) delete mode 100644 resources/views/auth/login.blade.php delete mode 100644 resources/views/auth/passwords/email.blade.php delete mode 100644 resources/views/auth/passwords/reset.blade.php delete mode 100644 resources/views/base/account.blade.php delete mode 100644 resources/views/base/api/index.blade.php delete mode 100644 resources/views/base/api/new.blade.php delete mode 100644 resources/views/base/index.blade.php delete mode 100644 resources/views/base/security.blade.php delete mode 100644 resources/views/layouts/master.blade.php delete mode 100644 resources/views/server/files/add.blade.php delete mode 100644 resources/views/server/files/edit.blade.php delete mode 100644 resources/views/server/files/index.blade.php delete mode 100644 resources/views/server/files/list.blade.php delete mode 100644 resources/views/server/index.blade.php delete mode 100644 resources/views/server/settings.blade.php delete mode 100644 resources/views/server/tasks/index.blade.php delete mode 100644 resources/views/server/tasks/new.blade.php delete mode 100644 resources/views/server/tasks/view.blade.php delete mode 100644 resources/views/server/users/index.blade.php delete mode 100644 resources/views/server/users/new.blade.php delete mode 100644 resources/views/server/users/view.blade.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d4d6b61..f2ee47a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * Basic service pack implementation to allow assignment of modpacks or software to a server to pre-install applications and allow users to update. * Users can now have a username as well as client name assigned to their account. * Ability to create a node through the CLI using `pterodactyl:node` as well as locations via `pterodactyl:location`. +* New theme (AdminLTE) for front-end with tweaks to backend files to work properly with it. ### Fixed * Bug causing error logs to be spammed if someone timed out on an ajax based page. diff --git a/README.md b/README.md index 88c02a17..a26d4146 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ A huge thanks to [PhraseApp](https://phraseapp.com) who provide us the software Ace Editor - [license](https://github.com/ajaxorg/ace/blob/master/LICENSE) - [homepage](https://ace.c9.io) +AdminLTE - [license](https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE) - [homepage](https://almsaeedstudio.com) + Animate.css - [license](https://github.com/daneden/animate.css/blob/master/LICENSE) - [homepage](http://daneden.github.io/animate.css/) Async.js - [license](https://github.com/caolan/async/blob/master/LICENSE) - [homepage](https://github.com/caolan/async/) @@ -57,8 +59,12 @@ jQuery Terminal - [license](https://github.com/jcubic/jquery.terminal/blob/maste Lodash - [license](https://github.com/lodash/lodash/blob/master/LICENSE) - [homepage](https://lodash.com/) +Select2 - [license](https://github.com/select2/select2/blob/master/LICENSE.md) - [homepage](https://select2.github.io) + Socket.io - [license](https://github.com/socketio/socket.io/blob/master/LICENSE) - [homepage](http://socket.io) +Socket.io File Upload - [license](https://github.com/vote539/socketio-file-upload/blob/master/server.js#L1-L27) - [homepage](https://github.com/vote539/socketio-file-upload) + SweetAlert - [license](https://github.com/t4t5/sweetalert/blob/master/LICENSE) - [homepage](http://t4t5.github.io/sweetalert/) Typeahead — [license](https://github.com/bassjobsen/Bootstrap-3-Typeahead/blob/master/bootstrap3-typeahead.js) — [homepage](https://github.com/bassjobsen/Bootstrap-3-Typeahead) diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php deleted file mode 100644 index 9ab5cdbf..00000000 --- a/resources/views/auth/login.blade.php +++ /dev/null @@ -1,148 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} -{{-- Some Modifications (c) 2015 Dylan Seidt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title', 'Login') - - -@section('right-nav') -@endsection - -@section('sidebar') -@endsection - -@section('resp-alerts') -@endsection - -@section('resp-errors') -@endsection - -@section('content') -
      - @if (count($errors) > 0) -
      - - {{ trans('strings.whoops') }}! {{ trans('auth.errorencountered') }}

      -
        - @foreach ($errors->all() as $error) -
      • {{ $error }}
      • - @endforeach -
      -
      - @endif - @foreach (Alert::getMessages() as $type => $messages) - @foreach ($messages as $message) - - @endforeach - @endforeach -
      - {{ trans('strings.login') }} -
      -
      - -
      - -
      -
      -
      - -
      - -
      -
      -
      -
      - -
      -
      -
      -
      - {!! csrf_field() !!} - - -
      -
      -
      -
      -
      - -
      - -@endsection diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php deleted file mode 100644 index 064373a5..00000000 --- a/resources/views/auth/passwords/email.blade.php +++ /dev/null @@ -1,63 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} -{{-- Some Modifications (c) 2015 Dylan Seidt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title', 'Reset Password') - - -@section('right-nav') -@endsection - -@section('sidebar') -@endsection - -@section('content') -
      -
      - {{ trans('auth.resetpassword') }} -
      - @if (session('status')) -
      - {{ trans('strings.success') }}! {{ trans('auth.emailsent') }} -
      - @endif -
      - -
      - - @if ($errors->has('email')) - - {{ $errors->first('email') }} - - @endif -
      -
      -
      -
      - {!! csrf_field() !!} - -
      -
      -
      -
      -
      -
      -@endsection diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php deleted file mode 100644 index 5151ce7a..00000000 --- a/resources/views/auth/passwords/reset.blade.php +++ /dev/null @@ -1,82 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} -{{-- Some Modifications (c) 2015 Dylan Seidt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title', 'Reset Password') - - -@section('right-nav') -@endsection - -@section('sidebar') -@endsection - -@section('content') -
      -
      - {{ trans('auth.resetpassword') }} -
      - -
      - -
      - - @if ($errors->has('email')) - - {{ $errors->first('email') }} - - @endif -
      -
      -
      - -
      - - @if ($errors->has('password')) - - {{ $errors->first('password') }} - - @endif -

      {{ trans('base.password_req') }}

      -
      -
      -
      - -
      - - @if ($errors->has('password_confirmation')) - - {{ $errors->first('password_confirmation') }} - - @endif -
      -
      -
      -
      - {!! csrf_field() !!} - -
      -
      -
      -
      -
      -
      -@endsection diff --git a/resources/views/base/account.blade.php b/resources/views/base/account.blade.php deleted file mode 100644 index 629d5885..00000000 --- a/resources/views/base/account.blade.php +++ /dev/null @@ -1,90 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title', 'Your Account') - -@section('sidebar-server') -@endsection - -@section('content') -
      -
      -
      -

      {{ trans('base.account.update_pass') }}


      -
      -
      - -
      - -
      -
      -
      - -
      - -

      {{ trans('base.password_req') }}

      -
      -
      -
      - -
      - -
      -
      -
      -
      - {!! csrf_field() !!} - -
      -
      -
      -
      -
      -

      {{ trans('base.account.update_email') }}


      -
      -
      - -
      - -
      -
      -
      - -
      - -
      -
      -
      -
      - {!! csrf_field() !!} - -
      -
      -
      -
      -
      -
      - -@endsection diff --git a/resources/views/base/api/index.blade.php b/resources/views/base/api/index.blade.php deleted file mode 100644 index 0fcc69a7..00000000 --- a/resources/views/base/api/index.blade.php +++ /dev/null @@ -1,109 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title', 'API Access') - -@section('sidebar-server') -@endsection - -@section('scripts') - @parent - {!! Theme::css('css/vendor/sweetalert/sweetalert.min.css') !!} - {!! Theme::js('js/vendor/sweetalert/sweetalert.min.js') !!} -@endsection - -@section('content') -
      - - - - - - - - - - - - @foreach ($keys as $key) - - - - - - - - @endforeach - -
      Public KeyMemoCreatedExpires
      {{ $key->public }}{{ $key->memo }}{{ (new Carbon($key->created_at))->toDayDateTimeString() }} - @if(is_null($key->expires_at)) - Never - @else - {{ (new Carbon($key->expires_at))->toDayDateTimeString() }} - @endif -
      - -
      - -@endsection diff --git a/resources/views/base/api/new.blade.php b/resources/views/base/api/new.blade.php deleted file mode 100644 index 0fb75caa..00000000 --- a/resources/views/base/api/new.blade.php +++ /dev/null @@ -1,278 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title', 'API Access') - -@section('sidebar-server') -@endsection - -@section('content') -
      -
      -
      -
        -
      • - 1Permissions - -
      • - @if(Auth::user()->root_admin === 1) -
      • - 2Admin - -
      • - @endif -
      • - @if(Auth::user()->root_admin === 1)3 @else 2 @endifSecurity - -
      • -
      -
      -
      - - -
      -
      -
      -
      -
      Any servers that you are a subuser for will be accessible through this API with the same permissions that you currently have.
      -
      -
      -

      Base Information


      -
      -
      -
      -
      -
      -
      -

      Server Management


      -
      -
      -
      -
      -
      -
      -
      - @if(Auth::user()->root_admin === 1) -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      User Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Server Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Node Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Service Management


      -
      -
      -
      -
      -

      Location Management


      -
      -
      -
      -
      -
      - @endif -
      -
      - -
      - -

      Enter a breif description of what this API key will be used for.

      -
      -
      -
      - -
      - -

      Enter a line delimitated list of IPs that are allowed to access the API using this key. CIDR notation is allowed. Leave blank to allow any IP.

      -
      -
      -
      -
      - {!! csrf_field() !!} -
      -
      -
      - -@endsection diff --git a/resources/views/base/index.blade.php b/resources/views/base/index.blade.php deleted file mode 100644 index 00472d98..00000000 --- a/resources/views/base/index.blade.php +++ /dev/null @@ -1,124 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title', 'Your Servers') - -@section('sidebar-server') -@endsection - -@section('content') -
      - @if (Auth::user()->root_admin == 1) -
      {{ trans('base.view_as_admin') }}
      - @endif - @if (!$servers->isEmpty()) - - - - @if (Auth::user()->root_admin == 1) - - @endif - - - - - - - - - - @foreach ($servers as $server) - - @if (Auth::user()->root_admin == 1) - - @endif - - - - - - - - @endforeach - -
      {{ trans('base.server_name') }}{{ trans('strings.node') }}{{ trans('strings.connection') }}{{ trans('strings.status') }}
      - @if ($server->owner === Auth::user()->id) - - @else - - @endif - {{ $server->name }}{{ $server->nodeName }}@if(!is_null($server->ip_alias)){{ $server->ip_alias }}@else{{ $server->ip }}@endif:{{ $server->port }}@if($server->suspended === 1)Suspended@else--@endif
      -
      -
      {!! $servers->render() !!}
      -
      - @else -
      {{ trans('base.no_servers') }}
      - @endif -
      - -@endsection diff --git a/resources/views/base/security.blade.php b/resources/views/base/security.blade.php deleted file mode 100644 index 48b73055..00000000 --- a/resources/views/base/security.blade.php +++ /dev/null @@ -1,205 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title', 'Account Security') - -@section('sidebar-server') -@endsection - -@section('content') -
      - @foreach (Alert::getMessages() as $type => $messages) - @foreach ($messages as $message) - - @endforeach - @endforeach -

      Active Sessions


      - - - - - - - - - - - - @foreach($sessions as $session) - - payload)) ?> - - - - - - - @endforeach - -
      Session IDIP AddressUser AgentLast Activity
      {{ substr($session->id, 0, 8) }}{{ $session->ip_address }}{{ $session->user_agent }} - @if((time() - $session->last_activity < 10)) - just now - @else - {{ date('D, M j \a\t H:i:s', $session->last_activity) }} - @endif -
      - -

      {{ trans('base.account.totp_header') }} @if (Auth::user()->use_totp === 1){{ trans('strings.enabled') }}@else{{ trans('strings.disabled') }}@endif


      - @if (Auth::user()->use_totp === 1) -
      -
      {{ trans('base.account.totp_disable') }}
      -
      -

      {{ trans('base.account.totp_disable_help') }}

      -
      -
      -
      -
      - {{ trans('base.account.totp_token') }} - - - {!! csrf_field() !!} - {{ method_field('DELETE') }} - - -
      -
      -
      -
      -
      - @else -
      -
      -

      {{ trans('base.account.totp_header') }}

      -
      -
      -

      {{ trans('base.account.totp_enable_help') }}

      -
      {{ trans('base.account.totp_apps') }}
      -
      -
      -
      -
      -
      - {!! csrf_field() !!} - -
      -
      -
      - @endif - - -
      - -@endsection diff --git a/resources/views/layouts/master.blade.php b/resources/views/layouts/master.blade.php deleted file mode 100644 index 1f6feb8e..00000000 --- a/resources/views/layouts/master.blade.php +++ /dev/null @@ -1,313 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- 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. --}} - - - - @section('scripts') - - - - {!! Theme::css('css/vendor/bootstrap/bootstrap.css') !!} - {!! Theme::css('css/pterodactyl.css') !!} - {!! Theme::css('css/animate.css') !!} - {!! Theme::css('css/vendor/fontawesome/font-awesome.min.css') !!} - {!! Theme::css('css/vendor/sweetalert/sweetalert.min.css') !!} - {!! Theme::css('css/vendor/fuelux/fuelux.min.css') !!} - {!! Theme::js('js/vendor/jquery/jquery.min.js') !!} - {!! Theme::js('js/vendor/bootstrap/bootstrap.min.js') !!} - {!! Theme::js('js/vendor/socketio/socket.io.min.js') !!} - {!! Theme::js('js/vendor/sweetalert/sweetalert.min.js') !!} - {!! Theme::js('js/vendor/fuelux/fuelux.min.js') !!} - {!! Theme::js('js/admin.min.js') !!} - {!! Theme::js('js/bootstrap-notify.min.js') !!} - - @section('server-socket') - @if (isset($server->name) && isset($node->name)) - - @endif - @show - @show - {{ Settings::get('company') }} - @yield('title') - - -
      - -
      - -
      -
      -
      - @section('resp-errors') - @if (count($errors) > 0) -
      - - {{ trans('strings.whoops') }}! {{ trans('auth.errorencountered') }}

      -
        - @foreach ($errors->all() as $error) -
      • {{ $error }}
      • - @endforeach -
      -
      - @endif - @show - @section('resp-alerts') - @foreach (Alert::getMessages() as $type => $messages) - @foreach ($messages as $message) - - @endforeach - @endforeach - @show -
      -
      -
      - @yield('content') -
      -
      -
      - -
      - - - diff --git a/resources/views/server/files/add.blade.php b/resources/views/server/files/add.blade.php deleted file mode 100644 index ac3fdade..00000000 --- a/resources/views/server/files/add.blade.php +++ /dev/null @@ -1,290 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title') - Add File to: {{ $server->name }} -@endsection - -@section('scripts') - @parent - {!! Theme::js('js/vendor/upload/client.min.js') !!} - {!! Theme::js('js/vendor/lodash/lodash.js') !!} -@endsection - -@section('content') -
      - -
      -
      -
      -
      -
      - Save As: - -
      -

      All files are saved relative to /home/container. You can enter more of the path into the Save As field to save the file into a specific folder.

      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      - - -
      -
      - -
      -
      -
      - @can('upload-files', $server) -
      -
      -
      -
      - Upload Directory: - -
      -

      All files are saved relative to /home/container. You can enter more of the path into the Save As field to save the file into a specific folder.

      -
      -
      - -
      Edit the path location above before you upload files. They will automatically be placed in the directory you specify above. You can change this each time you upload a new file without having to press anything else. The directory must exist before performing an upload.
      - - -
      -
      -

      Drag and Drop File(s) Here

      -

      The maximum size for web-based file uploads is currently {{ $node->upload_size }} MB.

      -
      -
      - -
      - @endcan -
      -
      -{!! Theme::js('js/vendor/ace/ace.js') !!} -{!! Theme::js('js/vendor/ace/ext-modelist.js') !!} - -@endsection diff --git a/resources/views/server/files/edit.blade.php b/resources/views/server/files/edit.blade.php deleted file mode 100644 index ed6c3863..00000000 --- a/resources/views/server/files/edit.blade.php +++ /dev/null @@ -1,103 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title') - Managing Files for: {{ $server->name }} -@endsection - -@section('content') -
      -

      Editing File: /home/container/{{ $file }}

      -
      -
      -
      {{ $contents }}
      -
      -
      - @can('save-files', $server) -
      -
      -
      - - - {{ trans('server.files.back') }} -
      -
      - @endcan -
      -{!! Theme::js('js/vendor/ace/ace.js') !!} -{!! Theme::js('js/vendor/ace/ext-modelist.js') !!} - -@endsection diff --git a/resources/views/server/files/index.blade.php b/resources/views/server/files/index.blade.php deleted file mode 100644 index 987556b6..00000000 --- a/resources/views/server/files/index.blade.php +++ /dev/null @@ -1,190 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title') - Managing Files for: {{ $server->name }} -@endsection - -@section('scripts') - @parent - {!! Theme::js('js/vendor/async/async.min.js') !!} - {!! Theme::js('js/vendor/lodash/lodash.js') !!} - {!! Theme::js('js/vendor/upload/client.min.js') !!} -@endsection - -@section('content') -
      -
      -
      -
      - {{ trans('server.files.loading') }} -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      File Path Information

      -
      -
      - When configuring any file paths in your server plugins or settings you should use /home/container as your base path. The maximum size for web-based file uploads is currently {{ $node->upload_size }} MB. -
      -
      -
      -
      -
      -@if(App::environment('production')) - {!! Theme::js('js/filemanager.min.js') !!} -@else - {!! Theme::js('js/files/index.js') !!} - {!! Theme::js('js/files/contextmenu.js') !!} - {!! Theme::js('js/files/actions.js') !!} -@endif - -@endsection diff --git a/resources/views/server/files/list.blade.php b/resources/views/server/files/list.blade.php deleted file mode 100644 index ea56a580..00000000 --- a/resources/views/server/files/list.blade.php +++ /dev/null @@ -1,160 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- 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. --}} - - - - - - - - - - - - - - - - @if (isset($directory['first']) && $directory['first'] === true) - - - - - - - - @endif - @if (isset($directory['show']) && $directory['show'] === true) - - - - - - - - @endif - @foreach ($folders as $folder) - - - - - - - - @endforeach - @foreach ($files as $file) - - - - - - - - @endforeach - -
      File NameSizeLast Modified
      - /home/container{{ $directory['header'] }} - - - - - -
      - ← {{ $directory['link_show'] }} -
      - {{ $folder['entry'] }} - {{ $folder['size'] }} - timezone(env('APP_TIMEZONE', 'America/New_York')); ?> - @if($carbon->diffInMinutes(Carbon::now()) > 60) - {{ $carbon->format('m/d/y H:i:s') }} - @elseif($carbon->diffInSeconds(Carbon::now()) < 5 || $carbon->isFuture()) - seconds ago - @else - {{ $carbon->diffForHumans() }} - @endif -
      - {{-- 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' - ])) - - @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' - ])) - - @elseif(starts_with($file['mime'], 'image')) - - @elseif(starts_with($file['mime'], 'video')) - - @elseif(starts_with($file['mime'], 'video')) - - @elseif(starts_with($file['mime'], 'application/vnd.ms-powerpoint')) - - @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')) - - @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')) - - @elseif($file['mime'] === 'application/pdf') - - @else - - @endif - - @if(in_array($file['mime'], $editableMime)) - @can('edit-files', $server) - {{ $file['entry'] }} - @else - {{ $file['entry'] }} - @endcan - @else - {{ $file['entry'] }} - @endif - {{ $file['size'] }} - timezone(env('APP_TIMEZONE', 'America/New_York')); ?> - @if($carbon->diffInMinutes(Carbon::now()) > 60) - {{ $carbon->format('m/d/y H:i:s') }} - @elseif($carbon->diffInSeconds(Carbon::now()) < 5 || $carbon->isFuture()) - seconds ago - @else - {{ $carbon->diffForHumans() }} - @endif -
      diff --git a/resources/views/server/index.blade.php b/resources/views/server/index.blade.php deleted file mode 100644 index 8da04161..00000000 --- a/resources/views/server/index.blade.php +++ /dev/null @@ -1,522 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title') - Viewing Server: {{ $server->name }} -@endsection - -@section('scripts') - @parent - {!! Theme::css('css/jquery.terminal.css') !!} - {!! Theme::js('js/jquery.mousewheel-min.js') !!} - {!! Theme::js('js/jquery.terminal-0.11.23.min.js') !!} - {!! Theme::js('js/unix_formatting.js') !!} - {!! Theme::js('js/vendor/chartjs/chart.min.js') !!} - {!! Theme::js('js/vendor/jquery/jquery-dateFormat.min.js') !!} -@endsection - -@section('content') -
      - -
      -
      -
      -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - @can('power-start', $server)@endcan - @can('power-restart', $server)@endcan - @can('power-stop', $server)@endcan - @can('power-kill', $server)@endcan - - -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      - -
      -
      -
      -
      - -
      -
      -
      -
      -
      - @can('view-allocation', $server) -
      -
      -
      -
      -
      Below is a listing of all avaliable IPs and Ports for your service. To change the default connection address for your server, simply click on the one you would like to make default below.
      - - - - - - - - @foreach ($allocations as $allocation) - - - - - - - @endforeach -
      IP AddressAliasPort
      - {{ $allocation->ip }} - ip_alias))class="muted"@endif> - @if(is_null($allocation->ip_alias)) - none - @else - {{ $allocation->ip_alias }} - @endif - {{ $allocation->port }} - @if($allocation->id === $server->allocation) - Primary - @else - Make Primary - @endif -
      -
      -
      -
      - @endcan -
      -
      - -@if($server->a_serviceFile === 'minecraft') - {!! Theme::js('js/plugins/minecraft/eula.js') !!} -@endif - -@endsection diff --git a/resources/views/server/settings.blade.php b/resources/views/server/settings.blade.php deleted file mode 100644 index 4acead9e..00000000 --- a/resources/views/server/settings.blade.php +++ /dev/null @@ -1,246 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title') - Server Settings -@endsection - -@section('content') -
      -

      Server Settings


      - -
      - @can('view-sftp', $server) -
      -
      -
      -
      -
      -
      - -
      - -
      -
      -
      - -
      - -
      -
      -
      -
      -
      - -
      -
      - @can('reset-sftp', $server) -
      - -
      - - - {!! csrf_field() !!} - - -
      -

      Passwords must meet the following requirements: at least one uppercase character, one lowercase character, one digit, and be at least 8 characters in length. Click here to generate one to use.

      -
      - @endcan -
      -
      - @can('view-sftp-password', $server) - -
      - -
      - @endcan -
      -
      -
      -
      -
      - @endcan - @can('view-startup', $server) -
      -
      -
      -
      -
      -
      -
      - -
      - {{ $service->executable }} - -
      -
      -
      -
      - @can('edit-startup', $server) -
      -
      -
      - @foreach($variables as $item) -
      - -
      - user_editable === 1) - name="{{ $item->env_variable }}" - @else - readonly="readonly" - @endif - class="form-control" value="{{ old($item->env_variable, $item->a_serverValue) }}" data-action="matchRegex" data-regex="{{ $item->regex }}" /> -
      -

      {!! $item->description !!}

      -
      - @endforeach -
      -
      -
      -
      -
      -
      - {!! csrf_field() !!} - -
      -
      -
      - @endcan -
      -
      -
      - @endcan - @can('view-databases', $server) -
      -
      -
      -
      - @if(count($databases) > 0) - - - - - - - - - - - @foreach($databases as $database) - - - - - - - @endforeach - -
      DatabaseUsernamePasswordDB Server
      {{ $database->database }}{{ $database->username }}{{ Crypt::decrypt($database->password) }} @can('reset-db-password', $server)@endcan{{ $database->a_host }}:{{ $database->a_port }}
      - @else -
      - There are no databases configured for this server. - @if(Auth::user()->root_admin === 1) - Add a new database. - @endif -
      - @endif -
      -
      -
      - @endcan -
      -
      - -@endsection diff --git a/resources/views/server/tasks/index.blade.php b/resources/views/server/tasks/index.blade.php deleted file mode 100644 index 9c76dece..00000000 --- a/resources/views/server/tasks/index.blade.php +++ /dev/null @@ -1,156 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title') - Scheduled Tasks -@endsection - -@section('content') -
      -

      Manage Scheduled Tasks


      - - - - - - - - @can('delete-task', $server)@endcan - @can('toggle-task', $server)@endcan - - - - @foreach($tasks as $task) - active === 0)class="text-disabled"@endif> - {{-- --}} - - - - - @can('delete-task', $server) - - @endcan - @can('toggle-task', $server) - - @endcan - - - @endforeach - -
      ActionDataLast RunNext Run
      {{ $actions[$task->action] }}{{ $actions[$task->action] }}{{ $task->data }}{{ Carbon::parse($task->last_run)->toDayDateTimeString() }}

      ({{ Carbon::parse($task->last_run)->diffForHumans() }})

      - @if($task->active !== 0) - {{ Carbon::parse($task->next_run)->toDayDateTimeString() }}

      ({{ Carbon::parse($task->next_run)->diffForHumans() }})

      - @else - n/a - @endif -
      - @can('create-task', $server) - - @endcan -
      - -@endsection diff --git a/resources/views/server/tasks/new.blade.php b/resources/views/server/tasks/new.blade.php deleted file mode 100644 index 230a8399..00000000 --- a/resources/views/server/tasks/new.blade.php +++ /dev/null @@ -1,172 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title') - Scheduled Tasks -@endsection - -@section('content') -
      -

      Create Scheduled Task
      Current System Time: {{ Carbon::now()->toDayDateTimeString() }}


      -
      -
      You may use either the dropdown selection boxes or enter custom cron variables into the fields below.
      -
      -
      -
      -
      -
      - -
      - -
      -
      -
      - -
      - -
      -
      -
      -
      -
      -
      -
      -
      -
      - -
      - -
      -
      -
      - -
      - -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      - -
      - -
      -
      -
      - -
      - -
      -
      -
      -
      -
      -
      -
      -
      -
      - -
      - -
      -
      -
      - -
      - -
      -
      -
      -
      -
      -
      -
      -
      - -
      - -
      -
      -
      - -
      - -

      For example, if you selected Send Command enter the command here. If you selected Send Power Option put the power action here (e.g. restart).

      -
      -
      -
      -
      -
      - {!! csrf_field() !!} - -
      -
      -
      -
      - -@endsection diff --git a/resources/views/server/tasks/view.blade.php b/resources/views/server/tasks/view.blade.php deleted file mode 100644 index e69de29b..00000000 diff --git a/resources/views/server/users/index.blade.php b/resources/views/server/users/index.blade.php deleted file mode 100644 index 96a1d40f..00000000 --- a/resources/views/server/users/index.blade.php +++ /dev/null @@ -1,107 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title') - Viewing Subusers -@endsection - -@section('content') -
      -

      Manage Sub-Users


      - - - - - - @can('view-subuser', $server)@endcan - @can('delete-subuser', $server)@endcan - - - - @foreach($subusers as $user) - - - - @can('view-subuser', $server) - - @endcan - @can('delete-subuser', $server) - - @endcan - - @endforeach - -
      EmailCreated
      {{ $user->a_userEmail }}{{ $user->created_at }}
      - @can('create-subuser', $server) -
      -
      - -
      -
      - @endcan -
      - -@endsection diff --git a/resources/views/server/users/new.blade.php b/resources/views/server/users/new.blade.php deleted file mode 100644 index 1f1bca4e..00000000 --- a/resources/views/server/users/new.blade.php +++ /dev/null @@ -1,301 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title') - Create New Subuser -@endsection - -@section('content') -
      -

      Create New Subuser
      - @can('edit-subuser', $server) -
      - @endcan - -
      -
      -
      - -
      - -
      -
      -
      -
      -
      -
      -

      Power Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      File Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Subuser Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Server Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Database Management


      -
      -
      -
      -
      -
      -
      -

      SFTP Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Task Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      - @can('edit-subuser', $server) -
      -
      -
      - {!! csrf_field() !!} - -
      -
      -
      -
      - @endcan -

      - -@endsection diff --git a/resources/views/server/users/view.blade.php b/resources/views/server/users/view.blade.php deleted file mode 100644 index 9d76060b..00000000 --- a/resources/views/server/users/view.blade.php +++ /dev/null @@ -1,290 +0,0 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} - -{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} -{{-- of this software and associated documentation files (the "Software"), to deal --}} -{{-- in the Software without restriction, including without limitation the rights --}} -{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} -{{-- copies of the Software, and to permit persons to whom the Software is --}} -{{-- furnished to do so, subject to the following conditions: --}} - -{{-- The above copyright notice and this permission notice shall be included in all --}} -{{-- copies or substantial portions of the Software. --}} - -{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} -{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} -{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} -{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} -{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} -{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} -{{-- SOFTWARE. --}} -@extends('layouts.master') - -@section('title') - Manage Subuser: {{ $subuser->a_userEmail }} -@endsection - -@section('content') -
      -

      Manage Subuser {{ $subuser->a_userEmail }}


      - @can('edit-subuser', $server) -
      - @endcan -
      -
      -

      Power Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      File Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Subuser Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Server Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Database Management


      -
      -
      -
      -
      -
      -
      -

      SFTP Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Task Management


      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      - @can('edit-subuser', $server) -
      -
      -
      - {!! csrf_field() !!} - -
      -
      -
      -
      - @endcan -
      - -@endsection From 355697dbb5db990b984bcddb0f97fea9d21db812 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 21 Jan 2017 15:56:32 -0500 Subject: [PATCH 146/171] Apply fixes from StyleCI (#260) --- app/Http/Controllers/Server/TaskController.php | 2 ++ app/Http/Middleware/AdminAuthenticate.php | 1 + app/Models/User.php | 5 +++-- resources/lang/en/base.php | 4 ++-- resources/lang/en/server.php | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Server/TaskController.php b/app/Http/Controllers/Server/TaskController.php index a5cd0151..fc81a95f 100644 --- a/app/Http/Controllers/Server/TaskController.php +++ b/app/Http/Controllers/Server/TaskController.php @@ -73,6 +73,7 @@ class TaskController extends Controller 'server' => collect($server->makeVisible('daemonSecret'))->only(['uuid', 'uuidShort', 'daemonSecret', 'username']), 'node' => collect($node)->only('fqdn', 'scheme', 'daemonListen'), ]); + return view('server.tasks.new', [ 'server' => $server, 'node' => $node, @@ -89,6 +90,7 @@ class TaskController extends Controller $repo->create($server->id, $request->except([ '_token', ])); + return redirect()->route('server.tasks', $uuid); } catch (DisplayValidationException $ex) { return redirect()->route('server.tasks.new', $uuid)->withErrors(json_decode($ex->getMessage()))->withInput(); diff --git a/app/Http/Middleware/AdminAuthenticate.php b/app/Http/Middleware/AdminAuthenticate.php index 505d7c08..56125b32 100644 --- a/app/Http/Middleware/AdminAuthenticate.php +++ b/app/Http/Middleware/AdminAuthenticate.php @@ -71,6 +71,7 @@ class AdminAuthenticate // @TODO: eventually update admin themes Theme::set('default'); + return $next($request); } } diff --git a/app/Models/User.php b/app/Models/User.php index 384e0605..3d0998b3 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -150,9 +150,10 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac /** * Return true or false depending on wether the user is root admin or not. * - * @return boolean the user is root admin + * @return bool the user is root admin */ - public function isRootAdmin() { + public function isRootAdmin() + { return $this->root_admin === 1; } } diff --git a/resources/lang/en/base.php b/resources/lang/en/base.php index 392a23d1..4891ff61 100644 --- a/resources/lang/en/base.php +++ b/resources/lang/en/base.php @@ -32,11 +32,11 @@ return [ 'form_title' => 'Details', 'descriptive_memo' => [ 'title' => 'Descriptive Memo', - 'description' => 'Enter a brief description of what this API key will be used for.' + 'description' => 'Enter a brief description of what this API key will be used for.', ], 'allowed_ips' => [ 'title' => 'Allowed IPs', - 'description' => 'Enter a line delimitated list of IPs that are allowed to access the API using this key. CIDR notation is allowed. Leave blank to allow any IP.' + 'description' => 'Enter a line delimitated list of IPs that are allowed to access the API using this key. CIDR notation is allowed. Leave blank to allow any IP.', ], 'base' => [ 'title' => 'Base Information', diff --git a/resources/lang/en/server.php b/resources/lang/en/server.php index f629c52d..05d42a71 100644 --- a/resources/lang/en/server.php +++ b/resources/lang/en/server.php @@ -46,7 +46,7 @@ return [ 'update' => 'Update Subuser', 'edit' => [ 'header' => 'Edit Subuser', - 'header_sub' => 'Modify user\'s access to server.' + 'header_sub' => 'Modify user\'s access to server.', ], 'new' => [ 'header' => 'Add New User', @@ -255,7 +255,7 @@ return [ 'header_sub' => 'Control the IPs and ports available on this server.', 'available' => 'Available Allocations', 'help' => 'Allocation Help', - 'help_text' => 'The list to the left includes all available IPs and ports that are open for your server to use for incoming connections.' + 'help_text' => 'The list to the left includes all available IPs and ports that are open for your server to use for incoming connections.', ], ], ]; From 046e9152eb07ff64dbc96886294648f941028d66 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 21 Jan 2017 17:23:48 -0500 Subject: [PATCH 147/171] Update .phraseapp.yml --- .phraseapp.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.phraseapp.yml b/.phraseapp.yml index 2a6efe55..007c00eb 100644 --- a/.phraseapp.yml +++ b/.phraseapp.yml @@ -9,18 +9,18 @@ phraseapp: - file: ./resources/lang//auth.php params: tag: "auth" - # - file: ./resources/lang//base.php - # params: - # tag: "base" + - file: ./resources/lang//base.php + params: + tag: "base" - file: ./resources/lang//pagination.php params: tag: "pagination" - file: ./resources/lang//passwords.php params: tag: "passwords" - # - file: ./resources/lang//server.php - # params: - # tag: "server" + - file: ./resources/lang//server.php + params: + tag: "server" - file: ./resources/lang//strings.php params: tag: "strings" From 9025f1f5833d75b667bf08e011fd4b61c91b8686 Mon Sep 17 00:00:00 2001 From: Emmet Young Date: Mon, 23 Jan 2017 00:47:09 +1100 Subject: [PATCH 148/171] Repair user creation functionality Repair functionality of the make user console command (pterodactyl:user) Fix up the user repository, was using the old $password instead of the changed format $data['password'] Change User model to allow root_admin to be a fillable item. --- app/Console/Commands/MakeUser.php | 16 +++++++++++----- app/Models/User.php | 2 +- app/Repositories/UserRepository.php | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/Console/Commands/MakeUser.php b/app/Console/Commands/MakeUser.php index f1992836..2cd4bcf0 100644 --- a/app/Console/Commands/MakeUser.php +++ b/app/Console/Commands/MakeUser.php @@ -35,6 +35,9 @@ class MakeUser extends Command * @var string */ protected $signature = 'pterodactyl:user + {--firstname= : First name to use for this account.} + {--lastname= : Last name to use for this account.} + {--username= : Username to use for this account.} {--email= : Email address to use for this account.} {--password= : Password to assign to the user.} {--admin= : Boolean flag for if user should be an admin.}'; @@ -63,19 +66,22 @@ class MakeUser extends Command */ public function handle() { - $email = is_null($this->option('email')) ? $this->ask('Email') : $this->option('email'); - $password = is_null($this->option('password')) ? $this->secret('Password') : $this->option('password'); + $data['name_first'] = is_null($this->option('firstname')) ? $this->ask('First Name') : $this->option('firstname'); + $data['name_last'] = is_null($this->option('lastname')) ? $this->ask('Last Name') : $this->option('lastname'); + $data['username'] = is_null($this->option('username')) ? $this->ask('Username') : $this->option('username'); + $data['email'] = is_null($this->option('email')) ? $this->ask('Email') : $this->option('email'); + $data['password'] = is_null($this->option('password')) ? $this->secret('Password') : $this->option('password'); $password_confirmation = is_null($this->option('password')) ? $this->secret('Confirm Password') : $this->option('password'); - if ($password !== $password_confirmation) { + if ($data['password'] !== $password_confirmation) { return $this->error('The passwords provided did not match!'); } - $admin = is_null($this->option('admin')) ? $this->confirm('Is this user a root administrator?') : $this->option('admin'); + $data['root_admin'] = is_null($this->option('admin')) ? $this->confirm('Is this user a root administrator?') : $this->option('admin'); try { $user = new UserRepository; - $user->create($email, $password, $admin); + $user->create($data); return $this->info('User successfully created.'); } catch (\Exception $ex) { diff --git a/app/Models/User.php b/app/Models/User.php index 3d0998b3..88a9d954 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -67,7 +67,7 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac * * @var [type] */ - protected $fillable = ['username', 'email', 'name_first', 'name_last', 'password', 'language', 'use_totp', 'totp_secret', 'gravatar']; + protected $fillable = ['username', 'email', 'name_first', 'name_last', 'password', 'language', 'use_totp', 'totp_secret', 'gravatar', 'root_admin']; /** * Cast values to correct type. diff --git a/app/Repositories/UserRepository.php b/app/Repositories/UserRepository.php index db715fbb..7c3af08d 100644 --- a/app/Repositories/UserRepository.php +++ b/app/Repositories/UserRepository.php @@ -90,7 +90,7 @@ class UserRepository 'username' => $data['username'], 'name_first' => $data['name_first'], 'name_last' => $data['name_last'], - 'password' => Hash::make((empty($data['password'])) ? str_random(30) : $password), + 'password' => Hash::make((empty($data['password'])) ? str_random(30) : $data['password']), 'root_admin' => $data['root_admin'], 'language' => Settings::get('default_language', 'en'), ]); From 7654d3652a048d375f80357070ea4b9d99b04b57 Mon Sep 17 00:00:00 2001 From: Emmet Young Date: Mon, 23 Jan 2017 01:13:53 +1100 Subject: [PATCH 149/171] Only show admin control menu if the user is a root admin --- resources/themes/pterodactyl/layouts/master.blade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/themes/pterodactyl/layouts/master.blade.php b/resources/themes/pterodactyl/layouts/master.blade.php index 2a548e36..5abb74b9 100644 --- a/resources/themes/pterodactyl/layouts/master.blade.php +++ b/resources/themes/pterodactyl/layouts/master.blade.php @@ -62,7 +62,9 @@ {{-- ';return buildMenu}},{key:'rightClick',value:function rightClick(){var _this=this;$('[data-action="toggleMenu"]').on('mousedown',function(event){event.preventDefault();_this.showMenu(event)});$('#file_listing > tbody td').on('contextmenu',function(event){_this.showMenu(event)})}},{key:'showMenu',value:function showMenu(event){var _this2=this;var parent=$(event.target).closest('tr');var menu=$(this.makeMenu(parent));if(parent.data('type')==='disabled')return;event.preventDefault();$(menu).appendTo('body');$(menu).data('invokedOn',$(event.target)).show().css({position:'absolute',left:event.pageX-150,top:event.pageY});this.activeLine=parent;this.activeLine.addClass('active');var Actions=new ActionsClass(parent,menu);if(Pterodactyl.permissions.moveFiles){$(menu).find('li[data-action="move"]').unbind().on('click',function(e){e.preventDefault();Actions.move()});$(menu).find('li[data-action="rename"]').unbind().on('click',function(e){e.preventDefault();Actions.rename()})}if(Pterodactyl.permissions.copyFiles){$(menu).find('li[data-action="copy"]').unbind().on('click',function(e){e.preventDefault();Actions.copy()})}if(Pterodactyl.permissions.compressFiles){if(parent.data('type')==='folder'){$(menu).find('li[data-action="compress"]').removeClass('hidden')}$(menu).find('li[data-action="compress"]').unbind().on('click',function(e){e.preventDefault();Actions.compress()})}if(Pterodactyl.permissions.decompressFiles){if(_.without(['application/zip','application/gzip','application/x-gzip'],parent.data('mime')).length<3){$(menu).find('li[data-action="decompress"]').removeClass('hidden')}$(menu).find('li[data-action="decompress"]').unbind().on('click',function(e){e.preventDefault();Actions.decompress()})}if(Pterodactyl.permissions.createFiles){$(menu).find('li[data-action="folder"]').unbind().on('click',function(e){e.preventDefault();Actions.folder()})}if(Pterodactyl.permissions.downloadFiles){if(parent.data('type')==='file'){$(menu).find('li[data-action="download"]').removeClass('hidden')}$(menu).find('li[data-action="download"]').unbind().on('click',function(e){e.preventDefault();Actions.download()})}if(Pterodactyl.permissions.deleteFiles){$(menu).find('li[data-action="delete"]').unbind().on('click',function(e){e.preventDefault();Actions.delete()})}$(window).unbind().on('click',function(event){if($(event.target).is('.disable-menu-hide')){event.preventDefault();return}$(menu).unbind().remove();if(!_.isNull(_this2.activeLine))_this2.activeLine.removeClass('active')})}},{key:'directoryClick',value:function directoryClick(){$('a[data-action="directory-view"]').on('click',function(event){event.preventDefault();var path=$(this).parent().data('path')||'';var name=$(this).parent().data('name')||'';window.location.hash=encodeURIComponent(path+name);Files.list()})}}]);return ContextMenuClass}();window.ContextMenu=new ContextMenuClass; +'use strict';var _typeof=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};var _createClass=function(){function defineProperties(target,props){for(var i=0;i\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ActionsClass {\n constructor(element, menu) {\n this.element = element;\n this.menu = menu;\n }\n\n destroy() {\n this.element = undefined;\n }\n\n folder() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n let inputValue = `${currentPath}${currentName}/`;\n if ($(this.element).data('type') === 'file') {\n inputValue = currentPath;\n }\n swal({\n type: 'input',\n title: 'Create Folder',\n text: 'Please enter the path and folder name below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: inputValue\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/folder`,\n timeout: 10000,\n data: JSON.stringify({\n path: val,\n }),\n }).done(data => {\n swal.close();\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n move() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Move File',\n text: 'Please enter the new path for the file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/move`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal.close();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n\n }\n\n rename() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentLink = nameBlock.find('a');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const attachEditor = `\n \n \n `;\n\n nameBlock.html(attachEditor);\n const inputField = nameBlock.find('input');\n const inputLoader = nameBlock.find('.input-loader');\n\n inputField.focus();\n inputField.on('blur keydown', e => {\n // Save Field\n if (\n (e.type === 'keydown' && e.which === 27)\n || e.type === 'blur'\n || (e.type === 'keydown' && e.which === 13 && currentName === inputField.val())\n ) {\n if (!_.isEmpty(currentLink)) {\n nameBlock.html(currentLink);\n } else {\n nameBlock.html(currentName);\n }\n inputField.remove();\n ContextMenu.unbind().run();\n return;\n }\n\n if (e.type === 'keydown' && e.which !== 13) return;\n\n inputLoader.show();\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/rename`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${currentPath}${inputField.val()}`,\n }),\n }).done(data => {\n nameBlock.attr('data-name', inputField.val());\n if (!_.isEmpty(currentLink)) {\n let newLink = currentLink.attr('href');\n if (nameBlock.parent().data('type') !== 'folder') {\n newLink = newLink.substr(0, newLink.lastIndexOf('/')) + '/' + inputField.val();\n }\n currentLink.attr('href', newLink);\n nameBlock.html(\n currentLink.html(inputField.val())\n );\n } else {\n nameBlock.html(inputField.val());\n }\n inputField.remove();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n nameBlock.addClass('has-error').delay(2000).queue(() => {\n nameBlock.removeClass('has-error').dequeue();\n });\n inputField.popover({\n animation: true,\n placement: 'top',\n content: error,\n title: 'Save Error'\n }).popover('show');\n }).always(() => {\n inputLoader.remove();\n ContextMenu.unbind().run();\n });\n });\n }\n\n copy() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Copy File',\n text: 'Please enter the new path for the copied file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/copy`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n swal({\n type: 'success',\n title: '',\n text: 'File successfully copied.'\n });\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n download() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const fileName = decodeURIComponent(nameBlock.attr('data-name'));\n const filePath = decodeURIComponent(nameBlock.data('path'));\n\n window.location = `/server/${Pterodactyl.server.uuidShort}/files/download/${filePath}${fileName}`;\n }\n\n delete() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const delPath = decodeURIComponent(nameBlock.data('path'));\n const delName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n type: 'warning',\n title: '',\n text: 'Are you sure you want to delete ' + delName + '? There is no reversing this action.',\n html: true,\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true\n }, () => {\n $.ajax({\n type: 'DELETE',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/f/${delPath}${delName}`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n }\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal({\n type: 'success',\n title: 'File Deleted'\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: 'An error occured while attempting to delete this file. Please try again.',\n });\n });\n });\n }\n\n decompress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n title: ' Decompressing...',\n text: 'This might take a few seconds to complete.',\n html: true,\n allowOutsideClick: false,\n allowEscapeKey: false,\n showConfirmButton: false,\n });\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/decompress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`\n })\n }).done(data => {\n swal.close();\n Files.list(compPath);\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n\n compress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/compress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`,\n to: compPath.toString()\n })\n }).done(data => {\n Files.list(compPath, err => {\n if (err) return;\n const fileListing = $('#file_listing').find(`[data-name=\"${data.saved_as}\"]`).parent();\n fileListing.addClass('success pulsate').delay(3000).queue(() => {\n fileListing.removeClass('success pulsate').dequeue();\n });\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n}\n","\"use strict\";\n\n// Copyright (c) 2015 - 2016 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ContextMenuClass {\n constructor() {\n this.activeLine = null;\n }\n\n run() {\n this.directoryClick();\n this.rightClick();\n }\n\n makeMenu(parent) {\n $(document).find('#fileOptionMenu').remove();\n if (!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n\n let newFilePath = $('#headerTableRow').attr('data-currentDir');\n if (parent.data('type') === 'folder') {\n const nameBlock = parent.find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n newFilePath = `${currentPath}${currentName}`;\n }\n\n let buildMenu = '
        ';\n\n if (Pterodactyl.permissions.moveFiles) {\n buildMenu += '
      • Rename
      • \\\n
      • Move
      • ';\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n buildMenu += '
      • Copy
      • ';\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n buildMenu += '
      • Compress
      • ';\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n buildMenu += '
      • Decompress
      • ';\n }\n\n if (Pterodactyl.permissions.createFiles) {\n buildMenu += '
      • \\\n
      • New File
      • \\\n
      • New Folder
      • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles || Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
      • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n buildMenu += '
      • Download
      • ';\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
      • Delete
      • ';\n }\n\n buildMenu += '
      ';\n return buildMenu;\n }\n\n rightClick() {\n $('[data-action=\"toggleMenu\"]').on('mousedown', event => {\n event.preventDefault();\n this.showMenu(event);\n });\n $('#file_listing > tbody td').on('contextmenu', event => {\n this.showMenu(event);\n });\n }\n\n showMenu(event) {\n const parent = $(event.target).closest('tr');\n const menu = $(this.makeMenu(parent));\n\n if (parent.data('type') === 'disabled') return;\n event.preventDefault();\n\n $(menu).appendTo('body');\n $(menu).data('invokedOn', $(event.target)).show().css({\n position: 'absolute',\n left: event.pageX - 150,\n top: event.pageY,\n });\n\n this.activeLine = parent;\n this.activeLine.addClass('active');\n\n // Handle Events\n const Actions = new ActionsClass(parent, menu);\n if (Pterodactyl.permissions.moveFiles) {\n $(menu).find('li[data-action=\"move\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.move();\n });\n $(menu).find('li[data-action=\"rename\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.rename();\n });\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n $(menu).find('li[data-action=\"copy\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.copy();\n });\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n if (parent.data('type') === 'folder') {\n $(menu).find('li[data-action=\"compress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"compress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.compress();\n });\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n if (_.without(['application/zip', 'application/gzip', 'application/x-gzip'], parent.data('mime')).length < 3) {\n $(menu).find('li[data-action=\"decompress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"decompress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.decompress();\n });\n }\n\n if (Pterodactyl.permissions.createFiles) {\n $(menu).find('li[data-action=\"folder\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.folder();\n });\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n if (parent.data('type') === 'file') {\n $(menu).find('li[data-action=\"download\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"download\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.download();\n });\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n $(menu).find('li[data-action=\"delete\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.delete();\n });\n }\n\n $(window).unbind().on('click', event => {\n if($(event.target).is('.disable-menu-hide')) {\n event.preventDefault();\n return;\n }\n $(menu).unbind().remove();\n if(!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n });\n }\n\n directoryClick() {\n $('a[data-action=\"directory-view\"]').on('click', function (event) {\n event.preventDefault();\n\n const path = $(this).parent().data('path') || '';\n const name = $(this).parent().data('name') || '';\n\n window.location.hash = encodeURIComponent(path + name);\n Files.list();\n });\n }\n}\n\nwindow.ContextMenu = new ContextMenuClass;\n","\"use strict\";\n\n// Copyright (c) 2015 - 2016 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass FileManager {\n constructor() {\n this.list(this.decodeHash());\n }\n\n list(path, next) {\n if (_.isUndefined(path)) {\n path = this.decodeHash();\n }\n\n this.loader(true);\n $.ajax({\n type: 'POST',\n url: Pterodactyl.meta.directoryList,\n headers: {\n 'X-CSRF-Token': Pterodactyl.meta.csrftoken,\n },\n data: {\n directory: path,\n },\n }).done(data => {\n this.loader(false);\n $('#load_files').slideUp(10).html(data).slideDown(10, () => {\n ContextMenu.run();\n this.reloadFilesButton();\n if (_.isFunction(next)) {\n return next();\n }\n });\n $('#internal_alert').slideUp();\n\n if (typeof Siofu === 'object') {\n Siofu.listenOnInput(document.getElementById(\"files_touch_target\"));\n }\n }).fail(jqXHR => {\n this.loader(false);\n if (_.isFunction(next)) {\n return next(new Error('Failed to load file listing.'));\n }\n swal({\n type: 'error',\n title: 'File Error',\n text: 'An error occured while attempting to process this request. Please try again.',\n });\n console.error(jqXHR);\n });\n }\n\n loader(show) {\n if (show){\n $('.file-overlay').fadeIn(100);\n } else {\n $('.file-overlay').fadeOut(100);\n }\n }\n\n reloadFilesButton() {\n $('i[data-action=\"reload-files\"]').unbind().on('click', () => {\n $('i[data-action=\"reload-files\"]').addClass('fa-spin');\n this.list();\n });\n }\n\n decodeHash() {\n return decodeURIComponent(window.location.hash.substring(1));\n }\n\n}\n\nwindow.Files = new FileManager;\n"]} \ No newline at end of file From bf7b58470a47af92b56965aeb6eb9642a2ed8070 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 24 Jan 2017 17:57:08 -0500 Subject: [PATCH 160/171] Update copyright headers --- LICENSE.md | 2 +- README.md | 2 +- app/Console/Commands/AddLocation.php | 2 +- app/Console/Commands/AddNode.php | 2 +- app/Console/Commands/CleanServiceBackup.php | 2 +- app/Console/Commands/ClearServices.php | 2 +- app/Console/Commands/ClearTasks.php | 2 +- app/Console/Commands/MakeUser.php | 2 +- app/Console/Commands/RunTasks.php | 2 +- app/Console/Commands/ShowVersion.php | 2 +- app/Console/Commands/UpdateEmailSettings.php | 2 +- app/Console/Commands/UpdateEnvironment.php | 2 +- app/Events/ServerDeleted.php | 2 +- app/Exceptions/AccountNotFoundException.php | 2 +- app/Exceptions/DisplayException.php | 2 +- app/Exceptions/DisplayValidationException.php | 2 +- app/Facades/Version.php | 2 +- app/Http/Controllers/API/BaseController.php | 2 +- app/Http/Controllers/API/LocationController.php | 2 +- app/Http/Controllers/API/NodeController.php | 2 +- app/Http/Controllers/API/ServerController.php | 2 +- app/Http/Controllers/API/ServiceController.php | 2 +- app/Http/Controllers/API/User/InfoController.php | 2 +- app/Http/Controllers/API/User/ServerController.php | 2 +- app/Http/Controllers/API/UserController.php | 2 +- app/Http/Controllers/Admin/BaseController.php | 2 +- app/Http/Controllers/Admin/DatabaseController.php | 2 +- app/Http/Controllers/Admin/LocationsController.php | 2 +- app/Http/Controllers/Admin/NodesController.php | 2 +- app/Http/Controllers/Admin/PackController.php | 2 +- app/Http/Controllers/Admin/ServersController.php | 2 +- app/Http/Controllers/Admin/ServiceController.php | 2 +- app/Http/Controllers/Admin/UserController.php | 2 +- app/Http/Controllers/Auth/LoginController.php | 2 +- app/Http/Controllers/Base/APIController.php | 2 +- app/Http/Controllers/Base/AccountController.php | 2 +- app/Http/Controllers/Base/IndexController.php | 2 +- app/Http/Controllers/Base/LanguageController.php | 2 +- app/Http/Controllers/Base/SecurityController.php | 2 +- app/Http/Controllers/Daemon/ServiceController.php | 2 +- app/Http/Controllers/Remote/RemoteController.php | 2 +- app/Http/Controllers/Server/AjaxController.php | 2 +- app/Http/Controllers/Server/ServerController.php | 2 +- app/Http/Controllers/Server/SubuserController.php | 2 +- app/Http/Controllers/Server/TaskController.php | 2 +- app/Http/Middleware/APISecretToken.php | 2 +- app/Http/Middleware/AdminAuthenticate.php | 2 +- app/Http/Middleware/CheckServer.php | 2 +- app/Http/Middleware/LanguageMiddleware.php | 2 +- app/Http/Routes/APIRoutes.php | 2 +- app/Http/Routes/AdminRoutes.php | 2 +- app/Http/Routes/AuthRoutes.php | 2 +- app/Http/Routes/BaseRoutes.php | 2 +- app/Http/Routes/DaemonRoutes.php | 2 +- app/Http/Routes/LanguageRoutes.php | 2 +- app/Http/Routes/RemoteRoutes.php | 2 +- app/Http/Routes/ServerRoutes.php | 2 +- app/Jobs/DeleteServer.php | 2 +- app/Jobs/SendScheduledTask.php | 2 +- app/Jobs/SuspendServer.php | 2 +- app/Listeners/DeleteServerListener.php | 2 +- app/Models/APIKey.php | 2 +- app/Models/APILog.php | 2 +- app/Models/APIPermission.php | 2 +- app/Models/Allocation.php | 2 +- app/Models/Checksum.php | 2 +- app/Models/Database.php | 2 +- app/Models/DatabaseServer.php | 2 +- app/Models/Download.php | 2 +- app/Models/Location.php | 2 +- app/Models/Node.php | 2 +- app/Models/NodeConfigurationToken.php | 2 +- app/Models/Permission.php | 2 +- app/Models/Server.php | 2 +- app/Models/ServerVariables.php | 2 +- app/Models/Service.php | 2 +- app/Models/ServiceOptions.php | 2 +- app/Models/ServicePack.php | 2 +- app/Models/ServiceVariables.php | 2 +- app/Models/Session.php | 2 +- app/Models/Subuser.php | 2 +- app/Models/Task.php | 2 +- app/Models/TaskLog.php | 2 +- app/Models/User.php | 2 +- app/Notifications/AccountCreated.php | 2 +- app/Notifications/SendPasswordReset.php | 2 +- app/Policies/ServerPolicy.php | 2 +- app/Repositories/APIRepository.php | 2 +- app/Repositories/Daemon/CommandRepository.php | 2 +- app/Repositories/Daemon/FileRepository.php | 2 +- app/Repositories/Daemon/PowerRepository.php | 2 +- app/Repositories/DatabaseRepository.php | 2 +- app/Repositories/HelperRepository.php | 2 +- app/Repositories/LocationRepository.php | 2 +- app/Repositories/NodeRepository.php | 2 +- app/Repositories/ServerRepository.php | 2 +- app/Repositories/ServiceRepository/Option.php | 2 +- app/Repositories/ServiceRepository/Pack.php | 2 +- app/Repositories/ServiceRepository/Service.php | 2 +- app/Repositories/ServiceRepository/Variable.php | 2 +- app/Repositories/SubuserRepository.php | 2 +- app/Repositories/TaskRepository.php | 2 +- app/Repositories/UserRepository.php | 2 +- app/Services/APILogService.php | 2 +- app/Services/DeploymentService.php | 2 +- app/Services/NotificationService.php | 2 +- app/Services/UuidService.php | 2 +- app/Services/VersionService.php | 2 +- app/Transformers/AllocationTransformer.php | 2 +- app/Transformers/NodeTransformer.php | 2 +- app/Transformers/ServerTransformer.php | 2 +- app/Transformers/UserTransformer.php | 2 +- database/seeds/MinecraftServiceTableSeeder.php | 2 +- database/seeds/SourceServiceTableSeeder.php | 2 +- database/seeds/TerrariaServiceTableSeeder.php | 2 +- database/seeds/VoiceServiceTableSeeder.php | 2 +- public/js/admin.min.js | 2 +- public/js/filemanager.min.js.map | 2 +- public/js/files/actions.js | 2 +- public/js/files/contextmenu.js | 2 +- public/js/files/index.js | 2 +- public/js/plugins/minecraft/eula.js | 2 +- public/themes/default/css/pterodactyl.css | 2 +- public/themes/pterodactyl/js/frontend/2fa-modal.js | 2 +- public/themes/pterodactyl/js/frontend/console.js | 2 +- public/themes/pterodactyl/js/frontend/files/editor.js | 2 +- .../themes/pterodactyl/js/frontend/files/filemanager.min.js.map | 2 +- public/themes/pterodactyl/js/frontend/files/src/actions.js | 2 +- public/themes/pterodactyl/js/frontend/files/src/contextmenu.js | 2 +- public/themes/pterodactyl/js/frontend/files/src/index.js | 2 +- public/themes/pterodactyl/js/frontend/files/upload.js | 2 +- public/themes/pterodactyl/js/frontend/server.socket.js | 2 +- public/themes/pterodactyl/js/frontend/serverlist.js | 2 +- public/themes/pterodactyl/js/frontend/tasks.js | 2 +- resources/themes/pterodactyl/auth/login.blade.php | 2 +- resources/themes/pterodactyl/auth/passwords/email.blade.php | 2 +- resources/themes/pterodactyl/auth/passwords/reset.blade.php | 2 +- resources/themes/pterodactyl/base/account.blade.php | 2 +- resources/themes/pterodactyl/base/api/index.blade.php | 2 +- resources/themes/pterodactyl/base/api/new.blade.php | 2 +- resources/themes/pterodactyl/base/index.blade.php | 2 +- resources/themes/pterodactyl/base/security.blade.php | 2 +- resources/themes/pterodactyl/errors/403.blade.php | 2 +- resources/themes/pterodactyl/errors/404.blade.php | 2 +- resources/themes/pterodactyl/layouts/auth.blade.php | 2 +- resources/themes/pterodactyl/layouts/error.blade.php | 2 +- resources/themes/pterodactyl/layouts/master.blade.php | 2 +- resources/themes/pterodactyl/server/files/add.blade.php | 2 +- resources/themes/pterodactyl/server/files/edit.blade.php | 2 +- resources/themes/pterodactyl/server/files/index.blade.php | 2 +- resources/themes/pterodactyl/server/files/list.blade.php | 2 +- resources/themes/pterodactyl/server/index.blade.php | 2 +- .../themes/pterodactyl/server/settings/allocation.blade.php | 2 +- .../themes/pterodactyl/server/settings/databases.blade.php | 2 +- resources/themes/pterodactyl/server/settings/sftp.blade.php | 2 +- resources/themes/pterodactyl/server/settings/startup.blade.php | 2 +- resources/themes/pterodactyl/server/tasks/index.blade.php | 2 +- resources/themes/pterodactyl/server/tasks/new.blade.php | 2 +- resources/themes/pterodactyl/server/users/index.blade.php | 2 +- resources/themes/pterodactyl/server/users/new.blade.php | 2 +- resources/themes/pterodactyl/server/users/view.blade.php | 2 +- resources/views/admin/databases/index.blade.php | 2 +- resources/views/admin/databases/new.blade.php | 2 +- resources/views/admin/index.blade.php | 2 +- resources/views/admin/locations/index.blade.php | 2 +- resources/views/admin/nodes/index.blade.php | 2 +- resources/views/admin/nodes/new.blade.php | 2 +- resources/views/admin/nodes/remote/deploy.blade.php | 2 +- resources/views/admin/nodes/view.blade.php | 2 +- resources/views/admin/servers/index.blade.php | 2 +- resources/views/admin/servers/new.blade.php | 2 +- resources/views/admin/servers/view.blade.php | 2 +- resources/views/admin/services/config.blade.php | 2 +- resources/views/admin/services/index.blade.php | 2 +- resources/views/admin/services/new.blade.php | 2 +- resources/views/admin/services/options/new.blade.php | 2 +- resources/views/admin/services/options/variable.blade.php | 2 +- resources/views/admin/services/options/view.blade.php | 2 +- resources/views/admin/services/packs/byoption.blade.php | 2 +- resources/views/admin/services/packs/byservice.blade.php | 2 +- resources/views/admin/services/packs/edit.blade.php | 2 +- resources/views/admin/services/packs/index.blade.php | 2 +- resources/views/admin/services/packs/new.blade.php | 2 +- resources/views/admin/services/view.blade.php | 2 +- resources/views/admin/settings.blade.php | 2 +- resources/views/admin/users/index.blade.php | 2 +- resources/views/admin/users/new.blade.php | 2 +- resources/views/admin/users/view.blade.php | 2 +- resources/views/emails/added-subuser.blade.php | 2 +- resources/views/emails/new-account.blade.php | 2 +- resources/views/emails/new_password.blade.php | 2 +- resources/views/errors/403.blade.php | 2 +- resources/views/errors/404.blade.php | 2 +- resources/views/errors/installing.blade.php | 2 +- resources/views/errors/suspended.blade.php | 2 +- resources/views/layouts/admin.blade.php | 2 +- storage/app/services/.templates/index.js | 2 +- storage/app/services/minecraft/index.js | 2 +- storage/app/services/srcds/index.js | 2 +- storage/app/services/terraria/index.js | 2 +- storage/app/services/voice/index.js | 2 +- 201 files changed, 201 insertions(+), 201 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index b4b61b7c..92953602 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,7 +1,7 @@ # The MIT License (MIT) ``` -Copyright (c) 2015 - 2016 Dane Everitt +Copyright (c) 2015 - 2017 Dane Everitt Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index a26d4146..30f0062b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Support for using Pterodactyl can be found on our [wiki](https://github.com/Pter ## License ``` -Copyright (c) 2015 - 2016 Dane Everitt +Copyright (c) 2015 - 2017 Dane Everitt Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/app/Console/Commands/AddLocation.php b/app/Console/Commands/AddLocation.php index e9fa8bed..d9da9246 100644 --- a/app/Console/Commands/AddLocation.php +++ b/app/Console/Commands/AddLocation.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Console/Commands/AddNode.php b/app/Console/Commands/AddNode.php index d1f1c809..4b446842 100644 --- a/app/Console/Commands/AddNode.php +++ b/app/Console/Commands/AddNode.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Console/Commands/CleanServiceBackup.php b/app/Console/Commands/CleanServiceBackup.php index 93af785f..0a6a3e27 100644 --- a/app/Console/Commands/CleanServiceBackup.php +++ b/app/Console/Commands/CleanServiceBackup.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Console/Commands/ClearServices.php b/app/Console/Commands/ClearServices.php index 80342518..db62d268 100644 --- a/app/Console/Commands/ClearServices.php +++ b/app/Console/Commands/ClearServices.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Console/Commands/ClearTasks.php b/app/Console/Commands/ClearTasks.php index dde631f2..26f0da76 100644 --- a/app/Console/Commands/ClearTasks.php +++ b/app/Console/Commands/ClearTasks.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Console/Commands/MakeUser.php b/app/Console/Commands/MakeUser.php index 2cd4bcf0..05803dd3 100644 --- a/app/Console/Commands/MakeUser.php +++ b/app/Console/Commands/MakeUser.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Console/Commands/RunTasks.php b/app/Console/Commands/RunTasks.php index d9e61097..7807f8db 100644 --- a/app/Console/Commands/RunTasks.php +++ b/app/Console/Commands/RunTasks.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Console/Commands/ShowVersion.php b/app/Console/Commands/ShowVersion.php index 357cdc1f..199a905b 100644 --- a/app/Console/Commands/ShowVersion.php +++ b/app/Console/Commands/ShowVersion.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Console/Commands/UpdateEmailSettings.php b/app/Console/Commands/UpdateEmailSettings.php index 54655ebc..620982b9 100644 --- a/app/Console/Commands/UpdateEmailSettings.php +++ b/app/Console/Commands/UpdateEmailSettings.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Console/Commands/UpdateEnvironment.php b/app/Console/Commands/UpdateEnvironment.php index 0f1b01f1..085b081d 100644 --- a/app/Console/Commands/UpdateEnvironment.php +++ b/app/Console/Commands/UpdateEnvironment.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Events/ServerDeleted.php b/app/Events/ServerDeleted.php index 86770e9e..95f8e33e 100644 --- a/app/Events/ServerDeleted.php +++ b/app/Events/ServerDeleted.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Exceptions/AccountNotFoundException.php b/app/Exceptions/AccountNotFoundException.php index 160427b2..f8e36ed4 100644 --- a/app/Exceptions/AccountNotFoundException.php +++ b/app/Exceptions/AccountNotFoundException.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Exceptions/DisplayException.php b/app/Exceptions/DisplayException.php index 1c986907..c1b701f3 100644 --- a/app/Exceptions/DisplayException.php +++ b/app/Exceptions/DisplayException.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Exceptions/DisplayValidationException.php b/app/Exceptions/DisplayValidationException.php index a172bfce..3d8a4fda 100644 --- a/app/Exceptions/DisplayValidationException.php +++ b/app/Exceptions/DisplayValidationException.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Facades/Version.php b/app/Facades/Version.php index f4aa8b11..2ce00736 100644 --- a/app/Facades/Version.php +++ b/app/Facades/Version.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/API/BaseController.php b/app/Http/Controllers/API/BaseController.php index 6a3822ba..085803a1 100755 --- a/app/Http/Controllers/API/BaseController.php +++ b/app/Http/Controllers/API/BaseController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/API/LocationController.php b/app/Http/Controllers/API/LocationController.php index 8b772151..3bae975d 100755 --- a/app/Http/Controllers/API/LocationController.php +++ b/app/Http/Controllers/API/LocationController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/API/NodeController.php b/app/Http/Controllers/API/NodeController.php index ce71a08d..0eda949f 100755 --- a/app/Http/Controllers/API/NodeController.php +++ b/app/Http/Controllers/API/NodeController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/API/ServerController.php b/app/Http/Controllers/API/ServerController.php index ee56a3ba..b24cdac6 100755 --- a/app/Http/Controllers/API/ServerController.php +++ b/app/Http/Controllers/API/ServerController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/API/ServiceController.php b/app/Http/Controllers/API/ServiceController.php index 7f2bbe76..aa8b4ac2 100755 --- a/app/Http/Controllers/API/ServiceController.php +++ b/app/Http/Controllers/API/ServiceController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/API/User/InfoController.php b/app/Http/Controllers/API/User/InfoController.php index 326be99c..00923b86 100644 --- a/app/Http/Controllers/API/User/InfoController.php +++ b/app/Http/Controllers/API/User/InfoController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/API/User/ServerController.php b/app/Http/Controllers/API/User/ServerController.php index 8f0e0195..c63a482f 100644 --- a/app/Http/Controllers/API/User/ServerController.php +++ b/app/Http/Controllers/API/User/ServerController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/API/UserController.php b/app/Http/Controllers/API/UserController.php index c3a658a0..a330ef61 100755 --- a/app/Http/Controllers/API/UserController.php +++ b/app/Http/Controllers/API/UserController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Admin/BaseController.php b/app/Http/Controllers/Admin/BaseController.php index 9eb27301..0f54a8ee 100644 --- a/app/Http/Controllers/Admin/BaseController.php +++ b/app/Http/Controllers/Admin/BaseController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Admin/DatabaseController.php b/app/Http/Controllers/Admin/DatabaseController.php index 33b4ff26..4a7fc363 100644 --- a/app/Http/Controllers/Admin/DatabaseController.php +++ b/app/Http/Controllers/Admin/DatabaseController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Admin/LocationsController.php b/app/Http/Controllers/Admin/LocationsController.php index 46544ebb..889123b4 100644 --- a/app/Http/Controllers/Admin/LocationsController.php +++ b/app/Http/Controllers/Admin/LocationsController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Admin/NodesController.php b/app/Http/Controllers/Admin/NodesController.php index e7f53fa7..594365f7 100644 --- a/app/Http/Controllers/Admin/NodesController.php +++ b/app/Http/Controllers/Admin/NodesController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Admin/PackController.php b/app/Http/Controllers/Admin/PackController.php index fdf1b5a1..abda49c8 100644 --- a/app/Http/Controllers/Admin/PackController.php +++ b/app/Http/Controllers/Admin/PackController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Admin/ServersController.php b/app/Http/Controllers/Admin/ServersController.php index 2dce6958..9aece9c4 100644 --- a/app/Http/Controllers/Admin/ServersController.php +++ b/app/Http/Controllers/Admin/ServersController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Admin/ServiceController.php b/app/Http/Controllers/Admin/ServiceController.php index 4e1b3b1b..7a70c58d 100644 --- a/app/Http/Controllers/Admin/ServiceController.php +++ b/app/Http/Controllers/Admin/ServiceController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index dd73856c..9a2c6fd0 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -1,7 +1,7 @@ + * Copyright (c) 2015 - 2017 Dane Everitt * Some Modifications (c) 2015 Dylan Seidt . * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index d381fcdd..9890077f 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -1,7 +1,7 @@ + * Copyright (c) 2015 - 2017 Dane Everitt * Some Modifications (c) 2015 Dylan Seidt . * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/Http/Controllers/Base/APIController.php b/app/Http/Controllers/Base/APIController.php index 46d0e013..611638c9 100644 --- a/app/Http/Controllers/Base/APIController.php +++ b/app/Http/Controllers/Base/APIController.php @@ -1,7 +1,7 @@ + * Copyright (c) 2015 - 2017 Dane Everitt * Some Modifications (c) 2015 Dylan Seidt . * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/Http/Controllers/Base/AccountController.php b/app/Http/Controllers/Base/AccountController.php index f5f0e406..8db513bd 100644 --- a/app/Http/Controllers/Base/AccountController.php +++ b/app/Http/Controllers/Base/AccountController.php @@ -1,7 +1,7 @@ + * Copyright (c) 2015 - 2017 Dane Everitt * Some Modifications (c) 2015 Dylan Seidt . * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/Http/Controllers/Base/IndexController.php b/app/Http/Controllers/Base/IndexController.php index 8bdaddf6..160bc67e 100644 --- a/app/Http/Controllers/Base/IndexController.php +++ b/app/Http/Controllers/Base/IndexController.php @@ -1,7 +1,7 @@ + * Copyright (c) 2015 - 2017 Dane Everitt * Some Modifications (c) 2015 Dylan Seidt . * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/Http/Controllers/Base/LanguageController.php b/app/Http/Controllers/Base/LanguageController.php index 1051759e..e4967ee5 100644 --- a/app/Http/Controllers/Base/LanguageController.php +++ b/app/Http/Controllers/Base/LanguageController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Base/SecurityController.php b/app/Http/Controllers/Base/SecurityController.php index a3f71612..cf8bf2dc 100644 --- a/app/Http/Controllers/Base/SecurityController.php +++ b/app/Http/Controllers/Base/SecurityController.php @@ -1,7 +1,7 @@ + * Copyright (c) 2015 - 2017 Dane Everitt * Some Modifications (c) 2015 Dylan Seidt . * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/Http/Controllers/Daemon/ServiceController.php b/app/Http/Controllers/Daemon/ServiceController.php index 63c449f2..e362f0d0 100644 --- a/app/Http/Controllers/Daemon/ServiceController.php +++ b/app/Http/Controllers/Daemon/ServiceController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Remote/RemoteController.php b/app/Http/Controllers/Remote/RemoteController.php index 600e3d0d..b0aa0983 100644 --- a/app/Http/Controllers/Remote/RemoteController.php +++ b/app/Http/Controllers/Remote/RemoteController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Server/AjaxController.php b/app/Http/Controllers/Server/AjaxController.php index c1cf5163..da4d058a 100644 --- a/app/Http/Controllers/Server/AjaxController.php +++ b/app/Http/Controllers/Server/AjaxController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Server/ServerController.php b/app/Http/Controllers/Server/ServerController.php index 209e59bb..593049ca 100644 --- a/app/Http/Controllers/Server/ServerController.php +++ b/app/Http/Controllers/Server/ServerController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Server/SubuserController.php b/app/Http/Controllers/Server/SubuserController.php index b93d3d7f..a8761c71 100644 --- a/app/Http/Controllers/Server/SubuserController.php +++ b/app/Http/Controllers/Server/SubuserController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Controllers/Server/TaskController.php b/app/Http/Controllers/Server/TaskController.php index fc81a95f..8c49ad6b 100644 --- a/app/Http/Controllers/Server/TaskController.php +++ b/app/Http/Controllers/Server/TaskController.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Middleware/APISecretToken.php b/app/Http/Middleware/APISecretToken.php index 04e033a9..a1c203c9 100755 --- a/app/Http/Middleware/APISecretToken.php +++ b/app/Http/Middleware/APISecretToken.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Middleware/AdminAuthenticate.php b/app/Http/Middleware/AdminAuthenticate.php index 56125b32..c0d74f26 100644 --- a/app/Http/Middleware/AdminAuthenticate.php +++ b/app/Http/Middleware/AdminAuthenticate.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Middleware/CheckServer.php b/app/Http/Middleware/CheckServer.php index 99ff35af..cd83bd9d 100644 --- a/app/Http/Middleware/CheckServer.php +++ b/app/Http/Middleware/CheckServer.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Middleware/LanguageMiddleware.php b/app/Http/Middleware/LanguageMiddleware.php index 1a4d6ff9..58426063 100644 --- a/app/Http/Middleware/LanguageMiddleware.php +++ b/app/Http/Middleware/LanguageMiddleware.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Routes/APIRoutes.php b/app/Http/Routes/APIRoutes.php index b897ce1c..a4fb84c6 100755 --- a/app/Http/Routes/APIRoutes.php +++ b/app/Http/Routes/APIRoutes.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Routes/AdminRoutes.php b/app/Http/Routes/AdminRoutes.php index 73105223..e3a81cb6 100644 --- a/app/Http/Routes/AdminRoutes.php +++ b/app/Http/Routes/AdminRoutes.php @@ -1,7 +1,7 @@ + * Copyright (c) 2015 - 2017 Dane Everitt * Some Modifications (c) 2015 Dylan Seidt . * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/Http/Routes/AuthRoutes.php b/app/Http/Routes/AuthRoutes.php index 6859893d..491bebe4 100644 --- a/app/Http/Routes/AuthRoutes.php +++ b/app/Http/Routes/AuthRoutes.php @@ -1,7 +1,7 @@ + * Copyright (c) 2015 - 2017 Dane Everitt * Some Modifications (c) 2015 Dylan Seidt . * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/Http/Routes/BaseRoutes.php b/app/Http/Routes/BaseRoutes.php index 9c42cbd6..41bb93b5 100644 --- a/app/Http/Routes/BaseRoutes.php +++ b/app/Http/Routes/BaseRoutes.php @@ -1,7 +1,7 @@ + * Copyright (c) 2015 - 2017 Dane Everitt * Some Modifications (c) 2015 Dylan Seidt . * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/Http/Routes/DaemonRoutes.php b/app/Http/Routes/DaemonRoutes.php index ab8b733a..b993e375 100644 --- a/app/Http/Routes/DaemonRoutes.php +++ b/app/Http/Routes/DaemonRoutes.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Routes/LanguageRoutes.php b/app/Http/Routes/LanguageRoutes.php index 17fefd1d..58871102 100644 --- a/app/Http/Routes/LanguageRoutes.php +++ b/app/Http/Routes/LanguageRoutes.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Routes/RemoteRoutes.php b/app/Http/Routes/RemoteRoutes.php index a42a611e..ba8f47f9 100644 --- a/app/Http/Routes/RemoteRoutes.php +++ b/app/Http/Routes/RemoteRoutes.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Http/Routes/ServerRoutes.php b/app/Http/Routes/ServerRoutes.php index dd65110a..079bbf44 100644 --- a/app/Http/Routes/ServerRoutes.php +++ b/app/Http/Routes/ServerRoutes.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Jobs/DeleteServer.php b/app/Jobs/DeleteServer.php index ea168862..a42637ff 100644 --- a/app/Jobs/DeleteServer.php +++ b/app/Jobs/DeleteServer.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Jobs/SendScheduledTask.php b/app/Jobs/SendScheduledTask.php index fb155af1..dd7a56e2 100644 --- a/app/Jobs/SendScheduledTask.php +++ b/app/Jobs/SendScheduledTask.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Jobs/SuspendServer.php b/app/Jobs/SuspendServer.php index 752325b6..e4920f26 100644 --- a/app/Jobs/SuspendServer.php +++ b/app/Jobs/SuspendServer.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Listeners/DeleteServerListener.php b/app/Listeners/DeleteServerListener.php index c6f5b018..616f4c14 100644 --- a/app/Listeners/DeleteServerListener.php +++ b/app/Listeners/DeleteServerListener.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/APIKey.php b/app/Models/APIKey.php index 3ba610a3..4b94b678 100644 --- a/app/Models/APIKey.php +++ b/app/Models/APIKey.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/APILog.php b/app/Models/APILog.php index 0e2a1a16..5b481d8f 100644 --- a/app/Models/APILog.php +++ b/app/Models/APILog.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/APIPermission.php b/app/Models/APIPermission.php index 415c41c5..5bed095f 100644 --- a/app/Models/APIPermission.php +++ b/app/Models/APIPermission.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Allocation.php b/app/Models/Allocation.php index ce08da5d..10308ebd 100644 --- a/app/Models/Allocation.php +++ b/app/Models/Allocation.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Checksum.php b/app/Models/Checksum.php index 5e775a59..6db27562 100644 --- a/app/Models/Checksum.php +++ b/app/Models/Checksum.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Database.php b/app/Models/Database.php index ed8049b8..99e768c2 100644 --- a/app/Models/Database.php +++ b/app/Models/Database.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/DatabaseServer.php b/app/Models/DatabaseServer.php index 38b8611d..74fd8869 100644 --- a/app/Models/DatabaseServer.php +++ b/app/Models/DatabaseServer.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Download.php b/app/Models/Download.php index 9adb8596..d2c3dd88 100644 --- a/app/Models/Download.php +++ b/app/Models/Download.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Location.php b/app/Models/Location.php index 7b8a2d5c..5c8feb9f 100644 --- a/app/Models/Location.php +++ b/app/Models/Location.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Node.php b/app/Models/Node.php index 478a6907..5b82a242 100644 --- a/app/Models/Node.php +++ b/app/Models/Node.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/NodeConfigurationToken.php b/app/Models/NodeConfigurationToken.php index d7a309ad..dd029ec7 100644 --- a/app/Models/NodeConfigurationToken.php +++ b/app/Models/NodeConfigurationToken.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Permission.php b/app/Models/Permission.php index 05c83fc9..008473f3 100644 --- a/app/Models/Permission.php +++ b/app/Models/Permission.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Server.php b/app/Models/Server.php index a2f7d738..b90d0c51 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/ServerVariables.php b/app/Models/ServerVariables.php index 8c11c8af..c6c6970b 100644 --- a/app/Models/ServerVariables.php +++ b/app/Models/ServerVariables.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Service.php b/app/Models/Service.php index bd10ee88..8c0f2779 100644 --- a/app/Models/Service.php +++ b/app/Models/Service.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/ServiceOptions.php b/app/Models/ServiceOptions.php index ca2c0fbc..fe7e23f1 100644 --- a/app/Models/ServiceOptions.php +++ b/app/Models/ServiceOptions.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/ServicePack.php b/app/Models/ServicePack.php index 9b5256a3..cefcc0a3 100644 --- a/app/Models/ServicePack.php +++ b/app/Models/ServicePack.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/ServiceVariables.php b/app/Models/ServiceVariables.php index b46690f5..5082d714 100644 --- a/app/Models/ServiceVariables.php +++ b/app/Models/ServiceVariables.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Session.php b/app/Models/Session.php index 9beef05f..9af347bb 100644 --- a/app/Models/Session.php +++ b/app/Models/Session.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Subuser.php b/app/Models/Subuser.php index 798f54f7..8d4a5b13 100644 --- a/app/Models/Subuser.php +++ b/app/Models/Subuser.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/Task.php b/app/Models/Task.php index 63a326c4..7f5e1818 100644 --- a/app/Models/Task.php +++ b/app/Models/Task.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/TaskLog.php b/app/Models/TaskLog.php index a0793737..0ec947ae 100644 --- a/app/Models/TaskLog.php +++ b/app/Models/TaskLog.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Models/User.php b/app/Models/User.php index 88a9d954..8d1d7fb7 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Notifications/AccountCreated.php b/app/Notifications/AccountCreated.php index 8d0815b5..55cfe416 100644 --- a/app/Notifications/AccountCreated.php +++ b/app/Notifications/AccountCreated.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Notifications/SendPasswordReset.php b/app/Notifications/SendPasswordReset.php index 5b430168..31939945 100644 --- a/app/Notifications/SendPasswordReset.php +++ b/app/Notifications/SendPasswordReset.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Policies/ServerPolicy.php b/app/Policies/ServerPolicy.php index 6c1a864e..f297fe82 100644 --- a/app/Policies/ServerPolicy.php +++ b/app/Policies/ServerPolicy.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/APIRepository.php b/app/Repositories/APIRepository.php index bbe4aaca..7ce94f34 100644 --- a/app/Repositories/APIRepository.php +++ b/app/Repositories/APIRepository.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/Daemon/CommandRepository.php b/app/Repositories/Daemon/CommandRepository.php index 23c3755b..5631518d 100644 --- a/app/Repositories/Daemon/CommandRepository.php +++ b/app/Repositories/Daemon/CommandRepository.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/Daemon/FileRepository.php b/app/Repositories/Daemon/FileRepository.php index 3994eca2..d1319cf9 100644 --- a/app/Repositories/Daemon/FileRepository.php +++ b/app/Repositories/Daemon/FileRepository.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/Daemon/PowerRepository.php b/app/Repositories/Daemon/PowerRepository.php index eb1b6a02..705ea3e8 100644 --- a/app/Repositories/Daemon/PowerRepository.php +++ b/app/Repositories/Daemon/PowerRepository.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/DatabaseRepository.php b/app/Repositories/DatabaseRepository.php index 07508428..1abf8e15 100644 --- a/app/Repositories/DatabaseRepository.php +++ b/app/Repositories/DatabaseRepository.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/HelperRepository.php b/app/Repositories/HelperRepository.php index add441da..1e324817 100644 --- a/app/Repositories/HelperRepository.php +++ b/app/Repositories/HelperRepository.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/LocationRepository.php b/app/Repositories/LocationRepository.php index 94cc246b..79196ff3 100644 --- a/app/Repositories/LocationRepository.php +++ b/app/Repositories/LocationRepository.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/NodeRepository.php b/app/Repositories/NodeRepository.php index 021626e9..d5544619 100644 --- a/app/Repositories/NodeRepository.php +++ b/app/Repositories/NodeRepository.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/ServerRepository.php b/app/Repositories/ServerRepository.php index 84bb8c22..88618a47 100644 --- a/app/Repositories/ServerRepository.php +++ b/app/Repositories/ServerRepository.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/ServiceRepository/Option.php b/app/Repositories/ServiceRepository/Option.php index d6408d9e..8ddcdc00 100644 --- a/app/Repositories/ServiceRepository/Option.php +++ b/app/Repositories/ServiceRepository/Option.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/ServiceRepository/Pack.php b/app/Repositories/ServiceRepository/Pack.php index 61327261..ae68c1a6 100644 --- a/app/Repositories/ServiceRepository/Pack.php +++ b/app/Repositories/ServiceRepository/Pack.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/ServiceRepository/Service.php b/app/Repositories/ServiceRepository/Service.php index becc290e..eb41a9fe 100644 --- a/app/Repositories/ServiceRepository/Service.php +++ b/app/Repositories/ServiceRepository/Service.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/ServiceRepository/Variable.php b/app/Repositories/ServiceRepository/Variable.php index 4f95e5c3..fbd25844 100644 --- a/app/Repositories/ServiceRepository/Variable.php +++ b/app/Repositories/ServiceRepository/Variable.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/SubuserRepository.php b/app/Repositories/SubuserRepository.php index a25c7f12..afa27493 100644 --- a/app/Repositories/SubuserRepository.php +++ b/app/Repositories/SubuserRepository.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/TaskRepository.php b/app/Repositories/TaskRepository.php index b285f65b..c42a0048 100644 --- a/app/Repositories/TaskRepository.php +++ b/app/Repositories/TaskRepository.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Repositories/UserRepository.php b/app/Repositories/UserRepository.php index 933db40c..b46727e1 100644 --- a/app/Repositories/UserRepository.php +++ b/app/Repositories/UserRepository.php @@ -1,7 +1,7 @@ + * Copyright (c) 2015 - 2017 Dane Everitt * Some Modifications (c) 2015 Dylan Seidt . * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/Services/APILogService.php b/app/Services/APILogService.php index ee2bf3b0..f43693ac 100644 --- a/app/Services/APILogService.php +++ b/app/Services/APILogService.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Services/DeploymentService.php b/app/Services/DeploymentService.php index 207cacc9..5f2a9947 100644 --- a/app/Services/DeploymentService.php +++ b/app/Services/DeploymentService.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Services/NotificationService.php b/app/Services/NotificationService.php index 69094524..bb76db9b 100644 --- a/app/Services/NotificationService.php +++ b/app/Services/NotificationService.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Services/UuidService.php b/app/Services/UuidService.php index 09bfde0d..6f81f146 100644 --- a/app/Services/UuidService.php +++ b/app/Services/UuidService.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Services/VersionService.php b/app/Services/VersionService.php index 135a0458..d12c7776 100644 --- a/app/Services/VersionService.php +++ b/app/Services/VersionService.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Transformers/AllocationTransformer.php b/app/Transformers/AllocationTransformer.php index 3a8ac43f..8ca06a9c 100644 --- a/app/Transformers/AllocationTransformer.php +++ b/app/Transformers/AllocationTransformer.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Transformers/NodeTransformer.php b/app/Transformers/NodeTransformer.php index a5ac6144..01d707f3 100755 --- a/app/Transformers/NodeTransformer.php +++ b/app/Transformers/NodeTransformer.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Transformers/ServerTransformer.php b/app/Transformers/ServerTransformer.php index a6ef28a1..12707cd0 100755 --- a/app/Transformers/ServerTransformer.php +++ b/app/Transformers/ServerTransformer.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/app/Transformers/UserTransformer.php b/app/Transformers/UserTransformer.php index 14ef4bca..c36baaa6 100755 --- a/app/Transformers/UserTransformer.php +++ b/app/Transformers/UserTransformer.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/database/seeds/MinecraftServiceTableSeeder.php b/database/seeds/MinecraftServiceTableSeeder.php index e0df5b36..28f61343 100644 --- a/database/seeds/MinecraftServiceTableSeeder.php +++ b/database/seeds/MinecraftServiceTableSeeder.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/database/seeds/SourceServiceTableSeeder.php b/database/seeds/SourceServiceTableSeeder.php index fc2ff640..838814db 100644 --- a/database/seeds/SourceServiceTableSeeder.php +++ b/database/seeds/SourceServiceTableSeeder.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/database/seeds/TerrariaServiceTableSeeder.php b/database/seeds/TerrariaServiceTableSeeder.php index 42a0bedc..bd3089ea 100644 --- a/database/seeds/TerrariaServiceTableSeeder.php +++ b/database/seeds/TerrariaServiceTableSeeder.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/database/seeds/VoiceServiceTableSeeder.php b/database/seeds/VoiceServiceTableSeeder.php index 18876ef8..1fca3a47 100644 --- a/database/seeds/VoiceServiceTableSeeder.php +++ b/database/seeds/VoiceServiceTableSeeder.php @@ -1,7 +1,7 @@ . + * Copyright (c) 2015 - 2017 Dane Everitt . * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/public/js/admin.min.js b/public/js/admin.min.js index 54179cd2..b012c35d 100755 --- a/public/js/admin.min.js +++ b/public/js/admin.min.js @@ -1,6 +1,6 @@ /** * Pterodactyl - Panel - * Copyright (c) 2015 - 2016 Dane Everitt + * Copyright (c) 2015 - 2017 Dane Everitt * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/public/js/filemanager.min.js.map b/public/js/filemanager.min.js.map index 7f4e2981..9c35c1f6 100644 --- a/public/js/filemanager.min.js.map +++ b/public/js/filemanager.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["files/actions.js","files/contextmenu.js","files/index.js"],"names":[],"mappings":"AAAA,a,8oBAqBM,a,YACF,sBAAY,OAAZ,CAAqB,IAArB,CAA2B,oCACvB,KAAK,OAAL,CAAe,OAAf,CACA,KAAK,IAAL,CAAY,IACf,C,kEAES,CACN,KAAK,OAAL,CAAe,SAClB,C,uCAEQ,CACL,GAAM,WAAY,EAAE,KAAK,OAAP,EAAgB,IAAhB,CAAqB,4BAArB,CAAlB,CACA,GAAM,aAAc,mBAAmB,UAAU,IAAV,CAAe,WAAf,CAAnB,CAApB,CACA,GAAM,aAAc,mBAAmB,UAAU,IAAV,CAAe,MAAf,CAAnB,CAApB,CAEA,GAAI,eAAgB,WAAhB,CAA8B,WAA9B,IAAJ,CACA,GAAI,EAAE,KAAK,OAAP,EAAgB,IAAhB,CAAqB,MAArB,IAAiC,MAArC,CAA6C,CACzC,WAAa,WAChB,CACD,KAAK,CACD,KAAM,OADL,CAED,MAAO,eAFN,CAGD,KAAM,8CAHL,CAID,iBAAkB,IAJjB,CAKD,kBAAmB,IALlB,CAMD,eAAgB,KANf,CAOD,oBAAqB,IAPpB,CAQD,WAAY,UARX,CAAL,CASG,SAAC,GAAD,CAAS,CACR,EAAE,I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EAA5C,CAA+C,OAA/C,CAAwD,UAAM,CAC1D,EAAE,+BAAF,EAAmC,QAAnC,CAA4C,SAA5C,EACA,OAAK,IAAL,EACH,CAHD,CAIH,C,+CAEY,CACT,MAAO,oBAAmB,OAAO,QAAP,CAAgB,IAAhB,CAAqB,SAArB,CAA+B,CAA/B,CAAnB,CACV,C,0BAIL,OAAO,KAAP,CAAe,GAAI,YAAnB","file":"filemanager.min.js","sourcesContent":["\"use strict\";\n\n// Copyright (c) 2015 - 2016 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ActionsClass {\n constructor(element, menu) {\n this.element = element;\n this.menu = menu;\n }\n\n destroy() {\n this.element = undefined;\n }\n\n folder() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n let inputValue = `${currentPath}${currentName}/`;\n if ($(this.element).data('type') === 'file') {\n inputValue = currentPath;\n }\n swal({\n type: 'input',\n title: 'Create Folder',\n text: 'Please enter the path and folder name below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: inputValue\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/folder`,\n timeout: 10000,\n data: JSON.stringify({\n path: val,\n }),\n }).done(data => {\n swal.close();\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n move() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Move File',\n text: 'Please enter the new path for the file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/move`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal.close();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n\n }\n\n rename() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentLink = nameBlock.find('a');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const attachEditor = `\n \n \n `;\n\n nameBlock.html(attachEditor);\n const inputField = nameBlock.find('input');\n const inputLoader = nameBlock.find('.input-loader');\n\n inputField.focus();\n inputField.on('blur keydown', e => {\n // Save Field\n if (\n (e.type === 'keydown' && e.which === 27)\n || e.type === 'blur'\n || (e.type === 'keydown' && e.which === 13 && currentName === inputField.val())\n ) {\n if (!_.isEmpty(currentLink)) {\n nameBlock.html(currentLink);\n } else {\n nameBlock.html(currentName);\n }\n inputField.remove();\n ContextMenu.unbind().run();\n return;\n }\n\n if (e.type === 'keydown' && e.which !== 13) return;\n\n inputLoader.show();\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/rename`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${currentPath}${inputField.val()}`,\n }),\n }).done(data => {\n nameBlock.attr('data-name', inputField.val());\n if (!_.isEmpty(currentLink)) {\n let newLink = currentLink.attr('href');\n if (nameBlock.parent().data('type') !== 'folder') {\n newLink = newLink.substr(0, newLink.lastIndexOf('/')) + '/' + inputField.val();\n }\n currentLink.attr('href', newLink);\n nameBlock.html(\n currentLink.html(inputField.val())\n );\n } else {\n nameBlock.html(inputField.val());\n }\n inputField.remove();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n nameBlock.addClass('has-error').delay(2000).queue(() => {\n nameBlock.removeClass('has-error').dequeue();\n });\n inputField.popover({\n animation: true,\n placement: 'top',\n content: error,\n title: 'Save Error'\n }).popover('show');\n }).always(() => {\n inputLoader.remove();\n ContextMenu.unbind().run();\n });\n });\n }\n\n copy() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Copy File',\n text: 'Please enter the new path for the copied file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/copy`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n swal({\n type: 'success',\n title: '',\n text: 'File successfully copied.'\n });\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n download() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const fileName = decodeURIComponent(nameBlock.attr('data-name'));\n const filePath = decodeURIComponent(nameBlock.data('path'));\n\n window.location = `/server/${Pterodactyl.server.uuidShort}/files/download/${filePath}${fileName}`;\n }\n\n delete() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const delPath = decodeURIComponent(nameBlock.data('path'));\n const delName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n type: 'warning',\n title: '',\n text: 'Are you sure you want to delete ' + delName + '? There is no reversing this action.',\n html: true,\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true\n }, () => {\n $.ajax({\n type: 'DELETE',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/f/${delPath}${delName}`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n }\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal({\n type: 'success',\n title: 'File Deleted'\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: 'An error occured while attempting to delete this file. Please try again.',\n });\n });\n });\n }\n\n decompress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n title: ' Decompressing...',\n text: 'This might take a few seconds to complete.',\n html: true,\n allowOutsideClick: false,\n allowEscapeKey: false,\n showConfirmButton: false,\n });\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/decompress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`\n })\n }).done(data => {\n swal.close();\n Files.list(compPath);\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n\n compress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/compress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`,\n to: compPath.toString()\n })\n }).done(data => {\n Files.list(compPath, err => {\n if (err) return;\n const fileListing = $('#file_listing').find(`[data-name=\"${data.saved_as}\"]`).parent();\n fileListing.addClass('success pulsate').delay(3000).queue(() => {\n fileListing.removeClass('success pulsate').dequeue();\n });\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n}\n","\"use strict\";\n\n// Copyright (c) 2015 - 2016 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ContextMenuClass {\n constructor() {\n this.activeLine = null;\n }\n\n run() {\n this.directoryClick();\n this.rightClick();\n }\n\n makeMenu(parent) {\n $(document).find('#fileOptionMenu').remove();\n if (!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n\n let newFilePath = $('#headerTableRow').attr('data-currentDir');\n if (parent.data('type') === 'folder') {\n const nameBlock = parent.find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n newFilePath = `${currentPath}${currentName}`;\n }\n\n let buildMenu = '
        ';\n\n if (Pterodactyl.permissions.moveFiles) {\n buildMenu += '
      • Rename
      • \\\n
      • Move
      • ';\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n buildMenu += '
      • Copy
      • ';\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n buildMenu += '
      • Compress
      • ';\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n buildMenu += '
      • Decompress
      • ';\n }\n\n if (Pterodactyl.permissions.createFiles) {\n buildMenu += '
      • \\\n
      • New File
      • \\\n
      • New Folder
      • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles || Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
      • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n buildMenu += '
      • Download
      • ';\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
      • Delete
      • ';\n }\n\n buildMenu += '
      ';\n return buildMenu;\n }\n\n rightClick() {\n $('[data-action=\"toggleMenu\"]').on('mousedown', () => {\n event.preventDefault();\n this.showMenu(event);\n });\n $('#file_listing > tbody td').on('contextmenu', event => {\n this.showMenu(event);\n });\n }\n\n showMenu(event) {\n const parent = $(event.target).closest('tr');\n const menu = $(this.makeMenu(parent));\n\n if (parent.data('type') === 'disabled') return;\n event.preventDefault();\n\n $(menu).appendTo('body');\n $(menu).data('invokedOn', $(event.target)).show().css({\n position: 'absolute',\n left: event.pageX - 150,\n top: event.pageY,\n });\n\n this.activeLine = parent;\n this.activeLine.addClass('active');\n\n // Handle Events\n const Actions = new ActionsClass(parent, menu);\n if (Pterodactyl.permissions.moveFiles) {\n $(menu).find('li[data-action=\"move\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.move();\n });\n $(menu).find('li[data-action=\"rename\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.rename();\n });\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n $(menu).find('li[data-action=\"copy\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.copy();\n });\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n if (parent.data('type') === 'folder') {\n $(menu).find('li[data-action=\"compress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"compress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.compress();\n });\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n if (_.without(['application/zip', 'application/gzip', 'application/x-gzip'], parent.data('mime')).length < 3) {\n $(menu).find('li[data-action=\"decompress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"decompress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.decompress();\n });\n }\n\n if (Pterodactyl.permissions.createFiles) {\n $(menu).find('li[data-action=\"folder\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.folder();\n });\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n if (parent.data('type') === 'file') {\n $(menu).find('li[data-action=\"download\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"download\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.download();\n });\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n $(menu).find('li[data-action=\"delete\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.delete();\n });\n }\n\n $(window).on('click', () => {\n $(menu).remove();\n if(!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n });\n }\n\n directoryClick() {\n $('a[data-action=\"directory-view\"]').on('click', function (event) {\n event.preventDefault();\n\n const path = $(this).parent().data('path') || '';\n const name = $(this).parent().data('name') || '';\n\n window.location.hash = encodeURIComponent(path + name);\n Files.list();\n });\n }\n}\n\nwindow.ContextMenu = new ContextMenuClass;\n","\"use strict\";\n\n// Copyright (c) 2015 - 2016 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass FileManager {\n constructor() {\n this.list(this.decodeHash());\n }\n\n list(path, next) {\n if (_.isUndefined(path)) {\n path = this.decodeHash();\n }\n\n this.loader(true);\n $.ajax({\n type: 'POST',\n url: Pterodactyl.meta.directoryList,\n headers: {\n 'X-CSRF-Token': Pterodactyl.meta.csrftoken,\n },\n data: {\n directory: path,\n },\n }).done(data => {\n this.loader(false);\n $('#load_files').slideUp().html(data).slideDown(100, () => {\n ContextMenu.run();\n this.reloadFilesButton();\n if (_.isFunction(next)) {\n return next();\n }\n });\n $('#internal_alert').slideUp();\n }).fail(jqXHR => {\n this.loader(false);\n if (_.isFunction(next)) {\n return next(new Error('Failed to load file listing.'));\n }\n swal({\n type: 'error',\n title: 'File Error',\n text: 'An error occured while attempting to process this request. Please try again.',\n });\n console.log(jqXHR);\n });\n }\n\n loader(show) {\n if ($('#load_files').height() < 5) return;\n\n if (show === true){\n var height = $('#load_files').height();\n var width = $('.ajax_loading_box').width();\n var center_height = (height / 2) - 30;\n var center_width = (width / 2) - 30;\n\n $('#position_me').css({\n 'top': center_height,\n 'left': center_width,\n 'font-size': '60px'\n });\n\n $('.ajax_loading_box').css('height', (height + 5)).show();\n } else {\n $('.ajax_loading_box').hide();\n }\n }\n\n reloadFilesButton() {\n $('i[data-action=\"reload-files\"]').unbind().on('click', () => {\n $('i[data-action=\"reload-files\"]').addClass('fa-spin');\n this.list();\n });\n }\n\n decodeHash() {\n return decodeURIComponent(window.location.hash.substring(1));\n }\n\n}\n\nwindow.Files = new FileManager;\n"]} \ No newline at end of file +{"version":3,"sources":["files/actions.js","files/contextmenu.js","files/index.js"],"names":[],"mappings":"AAAA,a,8oBAqBM,a,YACF,sBAAY,OAAZ,CAAqB,IAArB,CAA2B,oCACvB,KAAK,OAAL,CAAe,OAAf,CACA,KAAK,IAAL,CAAY,IACf,C,kEAES,CACN,KAAK,OAAL,CAAe,SAClB,C,uCAEQ,CACL,GAAM,WAAY,EAAE,KAAK,OAAP,EAAgB,IAAhB,CAAqB,4BAArB,CAAlB,CACA,GAAM,aAAc,mBAAmB,UAAU,IAAV,CAAe,WAAf,CAAnB,CAApB,CACA,GAAM,aAAc,mBAAmB,UAAU,IAAV,CAAe,MAAf,CAAnB,CAApB,CAEA,GAAI,eAAgB,WAAhB,CAA8B,WAA9B,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AjC,CAEA,EAAE,cAAF,EAAkB,GAAlB,CAAsB,CAClB,MAAO,aADW,CAElB,OAAQ,YAFU,CAGlB,YAAa,MAHK,CAAtB,EAMA,EAAE,mBAAF,EAAuB,GAAvB,CAA2B,QAA3B,CAAsC,OAAS,CAA/C,EAAmD,IAAnD,EACH,CAbD,IAaO,CACH,EAAE,mBAAF,EAAuB,IAAvB,EACH,CACJ,C,6DAEmB,iBAChB,EAAE,+BAAF,EAAmC,MAAnC,GAA4C,EAA5C,CAA+C,OAA/C,CAAwD,UAAM,CAC1D,EAAE,+BAAF,EAAmC,QAAnC,CAA4C,SAA5C,EACA,OAAK,IAAL,EACH,CAHD,CAIH,C,+CAEY,CACT,MAAO,oBAAmB,OAAO,QAAP,CAAgB,IAAhB,CAAqB,SAArB,CAA+B,CAA/B,CAAnB,CACV,C,0BAIL,OAAO,KAAP,CAAe,GAAI,YAAnB","file":"filemanager.min.js","sourcesContent":["\"use strict\";\n\n// Copyright (c) 2015 - 2017 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ActionsClass {\n constructor(element, menu) {\n this.element = element;\n this.menu = menu;\n }\n\n destroy() {\n this.element = undefined;\n }\n\n folder() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n let inputValue = `${currentPath}${currentName}/`;\n if ($(this.element).data('type') === 'file') {\n inputValue = currentPath;\n }\n swal({\n type: 'input',\n title: 'Create Folder',\n text: 'Please enter the path and folder name below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: inputValue\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/folder`,\n timeout: 10000,\n data: JSON.stringify({\n path: val,\n }),\n }).done(data => {\n swal.close();\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n move() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Move File',\n text: 'Please enter the new path for the file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/move`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal.close();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n\n }\n\n rename() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentLink = nameBlock.find('a');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const attachEditor = `\n \n \n `;\n\n nameBlock.html(attachEditor);\n const inputField = nameBlock.find('input');\n const inputLoader = nameBlock.find('.input-loader');\n\n inputField.focus();\n inputField.on('blur keydown', e => {\n // Save Field\n if (\n (e.type === 'keydown' && e.which === 27)\n || e.type === 'blur'\n || (e.type === 'keydown' && e.which === 13 && currentName === inputField.val())\n ) {\n if (!_.isEmpty(currentLink)) {\n nameBlock.html(currentLink);\n } else {\n nameBlock.html(currentName);\n }\n inputField.remove();\n ContextMenu.unbind().run();\n return;\n }\n\n if (e.type === 'keydown' && e.which !== 13) return;\n\n inputLoader.show();\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/rename`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${currentPath}${inputField.val()}`,\n }),\n }).done(data => {\n nameBlock.attr('data-name', inputField.val());\n if (!_.isEmpty(currentLink)) {\n let newLink = currentLink.attr('href');\n if (nameBlock.parent().data('type') !== 'folder') {\n newLink = newLink.substr(0, newLink.lastIndexOf('/')) + '/' + inputField.val();\n }\n currentLink.attr('href', newLink);\n nameBlock.html(\n currentLink.html(inputField.val())\n );\n } else {\n nameBlock.html(inputField.val());\n }\n inputField.remove();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n nameBlock.addClass('has-error').delay(2000).queue(() => {\n nameBlock.removeClass('has-error').dequeue();\n });\n inputField.popover({\n animation: true,\n placement: 'top',\n content: error,\n title: 'Save Error'\n }).popover('show');\n }).always(() => {\n inputLoader.remove();\n ContextMenu.unbind().run();\n });\n });\n }\n\n copy() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Copy File',\n text: 'Please enter the new path for the copied file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/copy`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n swal({\n type: 'success',\n title: '',\n text: 'File successfully copied.'\n });\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n download() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const fileName = decodeURIComponent(nameBlock.attr('data-name'));\n const filePath = decodeURIComponent(nameBlock.data('path'));\n\n window.location = `/server/${Pterodactyl.server.uuidShort}/files/download/${filePath}${fileName}`;\n }\n\n delete() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const delPath = decodeURIComponent(nameBlock.data('path'));\n const delName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n type: 'warning',\n title: '',\n text: 'Are you sure you want to delete ' + delName + '? There is no reversing this action.',\n html: true,\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true\n }, () => {\n $.ajax({\n type: 'DELETE',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/f/${delPath}${delName}`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n }\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal({\n type: 'success',\n title: 'File Deleted'\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: 'An error occured while attempting to delete this file. Please try again.',\n });\n });\n });\n }\n\n decompress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n title: ' Decompressing...',\n text: 'This might take a few seconds to complete.',\n html: true,\n allowOutsideClick: false,\n allowEscapeKey: false,\n showConfirmButton: false,\n });\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/decompress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`\n })\n }).done(data => {\n swal.close();\n Files.list(compPath);\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n\n compress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/compress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`,\n to: compPath.toString()\n })\n }).done(data => {\n Files.list(compPath, err => {\n if (err) return;\n const fileListing = $('#file_listing').find(`[data-name=\"${data.saved_as}\"]`).parent();\n fileListing.addClass('success pulsate').delay(3000).queue(() => {\n fileListing.removeClass('success pulsate').dequeue();\n });\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n}\n","\"use strict\";\n\n// Copyright (c) 2015 - 2017 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ContextMenuClass {\n constructor() {\n this.activeLine = null;\n }\n\n run() {\n this.directoryClick();\n this.rightClick();\n }\n\n makeMenu(parent) {\n $(document).find('#fileOptionMenu').remove();\n if (!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n\n let newFilePath = $('#headerTableRow').attr('data-currentDir');\n if (parent.data('type') === 'folder') {\n const nameBlock = parent.find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n newFilePath = `${currentPath}${currentName}`;\n }\n\n let buildMenu = '
        ';\n\n if (Pterodactyl.permissions.moveFiles) {\n buildMenu += '
      • Rename
      • \\\n
      • Move
      • ';\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n buildMenu += '
      • Copy
      • ';\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n buildMenu += '
      • Compress
      • ';\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n buildMenu += '
      • Decompress
      • ';\n }\n\n if (Pterodactyl.permissions.createFiles) {\n buildMenu += '
      • \\\n
      • New File
      • \\\n
      • New Folder
      • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles || Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
      • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n buildMenu += '
      • Download
      • ';\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
      • Delete
      • ';\n }\n\n buildMenu += '
      ';\n return buildMenu;\n }\n\n rightClick() {\n $('[data-action=\"toggleMenu\"]').on('mousedown', () => {\n event.preventDefault();\n this.showMenu(event);\n });\n $('#file_listing > tbody td').on('contextmenu', event => {\n this.showMenu(event);\n });\n }\n\n showMenu(event) {\n const parent = $(event.target).closest('tr');\n const menu = $(this.makeMenu(parent));\n\n if (parent.data('type') === 'disabled') return;\n event.preventDefault();\n\n $(menu).appendTo('body');\n $(menu).data('invokedOn', $(event.target)).show().css({\n position: 'absolute',\n left: event.pageX - 150,\n top: event.pageY,\n });\n\n this.activeLine = parent;\n this.activeLine.addClass('active');\n\n // Handle Events\n const Actions = new ActionsClass(parent, menu);\n if (Pterodactyl.permissions.moveFiles) {\n $(menu).find('li[data-action=\"move\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.move();\n });\n $(menu).find('li[data-action=\"rename\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.rename();\n });\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n $(menu).find('li[data-action=\"copy\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.copy();\n });\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n if (parent.data('type') === 'folder') {\n $(menu).find('li[data-action=\"compress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"compress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.compress();\n });\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n if (_.without(['application/zip', 'application/gzip', 'application/x-gzip'], parent.data('mime')).length < 3) {\n $(menu).find('li[data-action=\"decompress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"decompress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.decompress();\n });\n }\n\n if (Pterodactyl.permissions.createFiles) {\n $(menu).find('li[data-action=\"folder\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.folder();\n });\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n if (parent.data('type') === 'file') {\n $(menu).find('li[data-action=\"download\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"download\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.download();\n });\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n $(menu).find('li[data-action=\"delete\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.delete();\n });\n }\n\n $(window).on('click', () => {\n $(menu).remove();\n if(!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n });\n }\n\n directoryClick() {\n $('a[data-action=\"directory-view\"]').on('click', function (event) {\n event.preventDefault();\n\n const path = $(this).parent().data('path') || '';\n const name = $(this).parent().data('name') || '';\n\n window.location.hash = encodeURIComponent(path + name);\n Files.list();\n });\n }\n}\n\nwindow.ContextMenu = new ContextMenuClass;\n","\"use strict\";\n\n// Copyright (c) 2015 - 2017 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass FileManager {\n constructor() {\n this.list(this.decodeHash());\n }\n\n list(path, next) {\n if (_.isUndefined(path)) {\n path = this.decodeHash();\n }\n\n this.loader(true);\n $.ajax({\n type: 'POST',\n url: Pterodactyl.meta.directoryList,\n headers: {\n 'X-CSRF-Token': Pterodactyl.meta.csrftoken,\n },\n data: {\n directory: path,\n },\n }).done(data => {\n this.loader(false);\n $('#load_files').slideUp().html(data).slideDown(100, () => {\n ContextMenu.run();\n this.reloadFilesButton();\n if (_.isFunction(next)) {\n return next();\n }\n });\n $('#internal_alert').slideUp();\n }).fail(jqXHR => {\n this.loader(false);\n if (_.isFunction(next)) {\n return next(new Error('Failed to load file listing.'));\n }\n swal({\n type: 'error',\n title: 'File Error',\n text: 'An error occured while attempting to process this request. Please try again.',\n });\n console.log(jqXHR);\n });\n }\n\n loader(show) {\n if ($('#load_files').height() < 5) return;\n\n if (show === true){\n var height = $('#load_files').height();\n var width = $('.ajax_loading_box').width();\n var center_height = (height / 2) - 30;\n var center_width = (width / 2) - 30;\n\n $('#position_me').css({\n 'top': center_height,\n 'left': center_width,\n 'font-size': '60px'\n });\n\n $('.ajax_loading_box').css('height', (height + 5)).show();\n } else {\n $('.ajax_loading_box').hide();\n }\n }\n\n reloadFilesButton() {\n $('i[data-action=\"reload-files\"]').unbind().on('click', () => {\n $('i[data-action=\"reload-files\"]').addClass('fa-spin');\n this.list();\n });\n }\n\n decodeHash() {\n return decodeURIComponent(window.location.hash.substring(1));\n }\n\n}\n\nwindow.Files = new FileManager;\n"]} \ No newline at end of file diff --git a/public/js/files/actions.js b/public/js/files/actions.js index 9ff97853..f286f4c1 100644 --- a/public/js/files/actions.js +++ b/public/js/files/actions.js @@ -1,6 +1,6 @@ "use strict"; -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/js/files/contextmenu.js b/public/js/files/contextmenu.js index f61b7bb2..7c91ac00 100644 --- a/public/js/files/contextmenu.js +++ b/public/js/files/contextmenu.js @@ -1,6 +1,6 @@ "use strict"; -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/js/files/index.js b/public/js/files/index.js index a8142123..f833ab2a 100644 --- a/public/js/files/index.js +++ b/public/js/files/index.js @@ -1,6 +1,6 @@ "use strict"; -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/js/plugins/minecraft/eula.js b/public/js/plugins/minecraft/eula.js index 7077288b..2d1e047e 100644 --- a/public/js/plugins/minecraft/eula.js +++ b/public/js/plugins/minecraft/eula.js @@ -1,4 +1,4 @@ -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/themes/default/css/pterodactyl.css b/public/themes/default/css/pterodactyl.css index f6e37f4e..902373ab 100755 --- a/public/themes/default/css/pterodactyl.css +++ b/public/themes/default/css/pterodactyl.css @@ -1,6 +1,6 @@ /** * Pterodactyl - Panel - * Copyright (c) 2015 - 2016 Dane Everitt + * Copyright (c) 2015 - 2017 Dane Everitt * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/public/themes/pterodactyl/js/frontend/2fa-modal.js b/public/themes/pterodactyl/js/frontend/2fa-modal.js index 492cb160..75fb621f 100644 --- a/public/themes/pterodactyl/js/frontend/2fa-modal.js +++ b/public/themes/pterodactyl/js/frontend/2fa-modal.js @@ -1,4 +1,4 @@ -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/themes/pterodactyl/js/frontend/console.js b/public/themes/pterodactyl/js/frontend/console.js index 92a22e6f..2d30586e 100644 --- a/public/themes/pterodactyl/js/frontend/console.js +++ b/public/themes/pterodactyl/js/frontend/console.js @@ -1,4 +1,4 @@ -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/themes/pterodactyl/js/frontend/files/editor.js b/public/themes/pterodactyl/js/frontend/files/editor.js index 208538fa..70206c6f 100644 --- a/public/themes/pterodactyl/js/frontend/files/editor.js +++ b/public/themes/pterodactyl/js/frontend/files/editor.js @@ -1,4 +1,4 @@ -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/themes/pterodactyl/js/frontend/files/filemanager.min.js.map b/public/themes/pterodactyl/js/frontend/files/filemanager.min.js.map index 6a0d7eaa..5ff51f1c 100644 --- a/public/themes/pterodactyl/js/frontend/files/filemanager.min.js.map +++ b/public/themes/pterodactyl/js/frontend/files/filemanager.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["src/actions.js","src/contextmenu.js","src/index.js"],"names":[],"mappings":"AAAA,a,8oBAqBM,a,YACF,sBAAY,OAAZ,CAAqB,IAArB,CAA2B,oCACvB,KAAK,OAAL,CAAe,OAAf,CACA,KAAK,IAAL,CAAY,IACf,C,kEAES,CACN,KAAK,OAAL,CAAe,SAClB,C,uCAEQ,CACL,GAAM,WAAY,EAAE,KAAK,OAAP,EAAgB,IAAhB,CAAqB,4BAArB,CAAl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CAAU,8BAAV,CAAL,CACV,CACD,KAAK,CACD,KAAM,OADL,CAED,MAAO,YAFN,CAGD,KAAM,8EAHL,CAAL,EAKA,QAAQ,KAAR,CAAc,KAAd,CACH,CAlCD,CAmCH,C,sCAEM,I,CAAM,CACT,GAAI,IAAJ,CAAS,CACL,EAAE,eAAF,EAAmB,MAAnB,CAA0B,GAA1B,CACH,CAFD,IAEO,CACH,EAAE,eAAF,EAAmB,OAAnB,CAA2B,GAA3B,CACH,CACJ,C,6DAEmB,iBAChB,EAAE,+BAAF,EAAmC,MAAnC,GAA4C,EAA5C,CAA+C,OAA/C,CAAwD,UAAM,CAC1D,EAAE,+BAAF,EAAmC,QAAnC,CAA4C,SAA5C,EACA,OAAK,IAAL,EACH,CAHD,CAIH,C,+CAEY,CACT,MAAO,oBAAmB,OAAO,QAAP,CAAgB,IAAhB,CAAqB,SAArB,CAA+B,CAA/B,CAAnB,CACV,C,0BAIL,OAAO,KAAP,CAAe,GAAI,YAAnB","file":"filemanager.min.js","sourcesContent":["\"use strict\";\n\n// Copyright (c) 2015 - 2016 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ActionsClass {\n constructor(element, menu) {\n this.element = element;\n this.menu = menu;\n }\n\n destroy() {\n this.element = undefined;\n }\n\n folder() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n let inputValue = `${currentPath}${currentName}/`;\n if ($(this.element).data('type') === 'file') {\n inputValue = currentPath;\n }\n swal({\n type: 'input',\n title: 'Create Folder',\n text: 'Please enter the path and folder name below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: inputValue\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/folder`,\n timeout: 10000,\n data: JSON.stringify({\n path: val,\n }),\n }).done(data => {\n swal.close();\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n move() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Move File',\n text: 'Please enter the new path for the file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/move`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal.close();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n\n }\n\n rename() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentLink = nameBlock.find('a');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const attachEditor = `\n \n \n `;\n\n nameBlock.html(attachEditor);\n const inputField = nameBlock.find('input');\n const inputLoader = nameBlock.find('.input-loader');\n\n inputField.focus();\n inputField.on('blur keydown', e => {\n // Save Field\n if (\n (e.type === 'keydown' && e.which === 27)\n || e.type === 'blur'\n || (e.type === 'keydown' && e.which === 13 && currentName === inputField.val())\n ) {\n if (!_.isEmpty(currentLink)) {\n nameBlock.html(currentLink);\n } else {\n nameBlock.html(currentName);\n }\n inputField.remove();\n ContextMenu.unbind().run();\n return;\n }\n\n if (e.type === 'keydown' && e.which !== 13) return;\n\n inputLoader.show();\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/rename`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${currentPath}${inputField.val()}`,\n }),\n }).done(data => {\n nameBlock.attr('data-name', inputField.val());\n if (!_.isEmpty(currentLink)) {\n let newLink = currentLink.attr('href');\n if (nameBlock.parent().data('type') !== 'folder') {\n newLink = newLink.substr(0, newLink.lastIndexOf('/')) + '/' + inputField.val();\n }\n currentLink.attr('href', newLink);\n nameBlock.html(\n currentLink.html(inputField.val())\n );\n } else {\n nameBlock.html(inputField.val());\n }\n inputField.remove();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n nameBlock.addClass('has-error').delay(2000).queue(() => {\n nameBlock.removeClass('has-error').dequeue();\n });\n inputField.popover({\n animation: true,\n placement: 'top',\n content: error,\n title: 'Save Error'\n }).popover('show');\n }).always(() => {\n inputLoader.remove();\n ContextMenu.unbind().run();\n });\n });\n }\n\n copy() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Copy File',\n text: 'Please enter the new path for the copied file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/copy`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n swal({\n type: 'success',\n title: '',\n text: 'File successfully copied.'\n });\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n download() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const fileName = decodeURIComponent(nameBlock.attr('data-name'));\n const filePath = decodeURIComponent(nameBlock.data('path'));\n\n window.location = `/server/${Pterodactyl.server.uuidShort}/files/download/${filePath}${fileName}`;\n }\n\n delete() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const delPath = decodeURIComponent(nameBlock.data('path'));\n const delName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n type: 'warning',\n title: '',\n text: 'Are you sure you want to delete ' + delName + '? There is no reversing this action.',\n html: true,\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true\n }, () => {\n $.ajax({\n type: 'DELETE',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/f/${delPath}${delName}`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n }\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal({\n type: 'success',\n title: 'File Deleted'\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: 'An error occured while attempting to delete this file. Please try again.',\n });\n });\n });\n }\n\n decompress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n title: ' Decompressing...',\n text: 'This might take a few seconds to complete.',\n html: true,\n allowOutsideClick: false,\n allowEscapeKey: false,\n showConfirmButton: false,\n });\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/decompress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`\n })\n }).done(data => {\n swal.close();\n Files.list(compPath);\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n\n compress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/compress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`,\n to: compPath.toString()\n })\n }).done(data => {\n Files.list(compPath, err => {\n if (err) return;\n const fileListing = $('#file_listing').find(`[data-name=\"${data.saved_as}\"]`).parent();\n fileListing.addClass('success pulsate').delay(3000).queue(() => {\n fileListing.removeClass('success pulsate').dequeue();\n });\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n}\n","\"use strict\";\n\n// Copyright (c) 2015 - 2016 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ContextMenuClass {\n constructor() {\n this.activeLine = null;\n }\n\n run() {\n this.directoryClick();\n this.rightClick();\n }\n\n makeMenu(parent) {\n $(document).find('#fileOptionMenu').remove();\n if (!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n\n let newFilePath = $('#headerTableRow').attr('data-currentDir');\n if (parent.data('type') === 'folder') {\n const nameBlock = parent.find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n newFilePath = `${currentPath}${currentName}`;\n }\n\n let buildMenu = '
        ';\n\n if (Pterodactyl.permissions.moveFiles) {\n buildMenu += '
      • Rename
      • \\\n
      • Move
      • ';\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n buildMenu += '
      • Copy
      • ';\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n buildMenu += '
      • Compress
      • ';\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n buildMenu += '
      • Decompress
      • ';\n }\n\n if (Pterodactyl.permissions.createFiles) {\n buildMenu += '
      • \\\n
      • New File
      • \\\n
      • New Folder
      • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles || Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
      • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n buildMenu += '
      • Download
      • ';\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
      • Delete
      • ';\n }\n\n buildMenu += '
      ';\n return buildMenu;\n }\n\n rightClick() {\n $('[data-action=\"toggleMenu\"]').on('mousedown', event => {\n event.preventDefault();\n this.showMenu(event);\n });\n $('#file_listing > tbody td').on('contextmenu', event => {\n this.showMenu(event);\n });\n }\n\n showMenu(event) {\n const parent = $(event.target).closest('tr');\n const menu = $(this.makeMenu(parent));\n\n if (parent.data('type') === 'disabled') return;\n event.preventDefault();\n\n $(menu).appendTo('body');\n $(menu).data('invokedOn', $(event.target)).show().css({\n position: 'absolute',\n left: event.pageX - 150,\n top: event.pageY,\n });\n\n this.activeLine = parent;\n this.activeLine.addClass('active');\n\n // Handle Events\n const Actions = new ActionsClass(parent, menu);\n if (Pterodactyl.permissions.moveFiles) {\n $(menu).find('li[data-action=\"move\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.move();\n });\n $(menu).find('li[data-action=\"rename\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.rename();\n });\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n $(menu).find('li[data-action=\"copy\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.copy();\n });\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n if (parent.data('type') === 'folder') {\n $(menu).find('li[data-action=\"compress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"compress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.compress();\n });\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n if (_.without(['application/zip', 'application/gzip', 'application/x-gzip'], parent.data('mime')).length < 3) {\n $(menu).find('li[data-action=\"decompress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"decompress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.decompress();\n });\n }\n\n if (Pterodactyl.permissions.createFiles) {\n $(menu).find('li[data-action=\"folder\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.folder();\n });\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n if (parent.data('type') === 'file') {\n $(menu).find('li[data-action=\"download\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"download\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.download();\n });\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n $(menu).find('li[data-action=\"delete\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.delete();\n });\n }\n\n $(window).unbind().on('click', event => {\n if($(event.target).is('.disable-menu-hide')) {\n event.preventDefault();\n return;\n }\n $(menu).unbind().remove();\n if(!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n });\n }\n\n directoryClick() {\n $('a[data-action=\"directory-view\"]').on('click', function (event) {\n event.preventDefault();\n\n const path = $(this).parent().data('path') || '';\n const name = $(this).parent().data('name') || '';\n\n window.location.hash = encodeURIComponent(path + name);\n Files.list();\n });\n }\n}\n\nwindow.ContextMenu = new ContextMenuClass;\n","\"use strict\";\n\n// Copyright (c) 2015 - 2016 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass FileManager {\n constructor() {\n this.list(this.decodeHash());\n }\n\n list(path, next) {\n if (_.isUndefined(path)) {\n path = this.decodeHash();\n }\n\n this.loader(true);\n $.ajax({\n type: 'POST',\n url: Pterodactyl.meta.directoryList,\n headers: {\n 'X-CSRF-Token': Pterodactyl.meta.csrftoken,\n },\n data: {\n directory: path,\n },\n }).done(data => {\n this.loader(false);\n $('#load_files').slideUp(10).html(data).slideDown(10, () => {\n ContextMenu.run();\n this.reloadFilesButton();\n if (_.isFunction(next)) {\n return next();\n }\n });\n $('#internal_alert').slideUp();\n\n if (typeof Siofu === 'object') {\n Siofu.listenOnInput(document.getElementById(\"files_touch_target\"));\n }\n }).fail(jqXHR => {\n this.loader(false);\n if (_.isFunction(next)) {\n return next(new Error('Failed to load file listing.'));\n }\n swal({\n type: 'error',\n title: 'File Error',\n text: 'An error occured while attempting to process this request. Please try again.',\n });\n console.error(jqXHR);\n });\n }\n\n loader(show) {\n if (show){\n $('.file-overlay').fadeIn(100);\n } else {\n $('.file-overlay').fadeOut(100);\n }\n }\n\n reloadFilesButton() {\n $('i[data-action=\"reload-files\"]').unbind().on('click', () => {\n $('i[data-action=\"reload-files\"]').addClass('fa-spin');\n this.list();\n });\n }\n\n decodeHash() {\n return decodeURIComponent(window.location.hash.substring(1));\n }\n\n}\n\nwindow.Files = new FileManager;\n"]} \ No newline at end of file +{"version":3,"sources":["src/actions.js","src/contextmenu.js","src/index.js"],"names":[],"mappings":"AAAA,a,8oBAqBM,a,YACF,sBAAY,OAAZ,CAAqB,IAArB,CAA2B,oCACvB,KAAK,OAAL,CAAe,OAAf,CACA,K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AuBG,IAvBH,CAuBQ,eAAS,CACb,MAAK,MAAL,CAAY,KAAZ,EACA,GAAI,EAAE,UAAF,CAAa,IAAb,CAAJ,CAAwB,CACpB,MAAO,MAAK,GAAI,MAAJ,CAAU,8BAAV,CAAL,CACV,CACD,KAAK,CACD,KAAM,OADL,CAED,MAAO,YAFN,CAGD,KAAM,8EAHL,CAAL,EAKA,QAAQ,KAAR,CAAc,KAAd,CACH,CAlCD,CAmCH,C,sCAEM,I,CAAM,CACT,GAAI,IAAJ,CAAS,CACL,EAAE,eAAF,EAAmB,MAAnB,CAA0B,GAA1B,CACH,CAFD,IAEO,CACH,EAAE,eAAF,EAAmB,OAAnB,CAA2B,GAA3B,CACH,CACJ,C,6DAEmB,iBAChB,EAAE,+BAAF,EAAmC,MAAnC,GAA4C,EAA5C,CAA+C,OAA/C,CAAwD,UAAM,CAC1D,EAAE,+BAAF,EAAmC,QAAnC,CAA4C,SAA5C,EACA,OAAK,IAAL,EACH,CAHD,CAIH,C,+CAEY,CACT,MAAO,oBAAmB,OAAO,QAAP,CAAgB,IAAhB,CAAqB,SAArB,CAA+B,CAA/B,CAAnB,CACV,C,0BAIL,OAAO,KAAP,CAAe,GAAI,YAAnB","file":"filemanager.min.js","sourcesContent":["\"use strict\";\n\n// Copyright (c) 2015 - 2017 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ActionsClass {\n constructor(element, menu) {\n this.element = element;\n this.menu = menu;\n }\n\n destroy() {\n this.element = undefined;\n }\n\n folder() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n let inputValue = `${currentPath}${currentName}/`;\n if ($(this.element).data('type') === 'file') {\n inputValue = currentPath;\n }\n swal({\n type: 'input',\n title: 'Create Folder',\n text: 'Please enter the path and folder name below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: inputValue\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/folder`,\n timeout: 10000,\n data: JSON.stringify({\n path: val,\n }),\n }).done(data => {\n swal.close();\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n move() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Move File',\n text: 'Please enter the new path for the file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/move`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal.close();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n\n }\n\n rename() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentLink = nameBlock.find('a');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const attachEditor = `\n \n \n `;\n\n nameBlock.html(attachEditor);\n const inputField = nameBlock.find('input');\n const inputLoader = nameBlock.find('.input-loader');\n\n inputField.focus();\n inputField.on('blur keydown', e => {\n // Save Field\n if (\n (e.type === 'keydown' && e.which === 27)\n || e.type === 'blur'\n || (e.type === 'keydown' && e.which === 13 && currentName === inputField.val())\n ) {\n if (!_.isEmpty(currentLink)) {\n nameBlock.html(currentLink);\n } else {\n nameBlock.html(currentName);\n }\n inputField.remove();\n ContextMenu.unbind().run();\n return;\n }\n\n if (e.type === 'keydown' && e.which !== 13) return;\n\n inputLoader.show();\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/rename`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${currentPath}${inputField.val()}`,\n }),\n }).done(data => {\n nameBlock.attr('data-name', inputField.val());\n if (!_.isEmpty(currentLink)) {\n let newLink = currentLink.attr('href');\n if (nameBlock.parent().data('type') !== 'folder') {\n newLink = newLink.substr(0, newLink.lastIndexOf('/')) + '/' + inputField.val();\n }\n currentLink.attr('href', newLink);\n nameBlock.html(\n currentLink.html(inputField.val())\n );\n } else {\n nameBlock.html(inputField.val());\n }\n inputField.remove();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n nameBlock.addClass('has-error').delay(2000).queue(() => {\n nameBlock.removeClass('has-error').dequeue();\n });\n inputField.popover({\n animation: true,\n placement: 'top',\n content: error,\n title: 'Save Error'\n }).popover('show');\n }).always(() => {\n inputLoader.remove();\n ContextMenu.unbind().run();\n });\n });\n }\n\n copy() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Copy File',\n text: 'Please enter the new path for the copied file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/copy`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n swal({\n type: 'success',\n title: '',\n text: 'File successfully copied.'\n });\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n download() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const fileName = decodeURIComponent(nameBlock.attr('data-name'));\n const filePath = decodeURIComponent(nameBlock.data('path'));\n\n window.location = `/server/${Pterodactyl.server.uuidShort}/files/download/${filePath}${fileName}`;\n }\n\n delete() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const delPath = decodeURIComponent(nameBlock.data('path'));\n const delName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n type: 'warning',\n title: '',\n text: 'Are you sure you want to delete ' + delName + '? There is no reversing this action.',\n html: true,\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true\n }, () => {\n $.ajax({\n type: 'DELETE',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/f/${delPath}${delName}`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n }\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal({\n type: 'success',\n title: 'File Deleted'\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: 'An error occured while attempting to delete this file. Please try again.',\n });\n });\n });\n }\n\n decompress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n title: ' Decompressing...',\n text: 'This might take a few seconds to complete.',\n html: true,\n allowOutsideClick: false,\n allowEscapeKey: false,\n showConfirmButton: false,\n });\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/decompress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`\n })\n }).done(data => {\n swal.close();\n Files.list(compPath);\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n\n compress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/server/file/compress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`,\n to: compPath.toString()\n })\n }).done(data => {\n Files.list(compPath, err => {\n if (err) return;\n const fileListing = $('#file_listing').find(`[data-name=\"${data.saved_as}\"]`).parent();\n fileListing.addClass('success pulsate').delay(3000).queue(() => {\n fileListing.removeClass('success pulsate').dequeue();\n });\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n}\n","\"use strict\";\n\n// Copyright (c) 2015 - 2017 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ContextMenuClass {\n constructor() {\n this.activeLine = null;\n }\n\n run() {\n this.directoryClick();\n this.rightClick();\n }\n\n makeMenu(parent) {\n $(document).find('#fileOptionMenu').remove();\n if (!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n\n let newFilePath = $('#headerTableRow').attr('data-currentDir');\n if (parent.data('type') === 'folder') {\n const nameBlock = parent.find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n newFilePath = `${currentPath}${currentName}`;\n }\n\n let buildMenu = '
        ';\n\n if (Pterodactyl.permissions.moveFiles) {\n buildMenu += '
      • Rename
      • \\\n
      • Move
      • ';\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n buildMenu += '
      • Copy
      • ';\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n buildMenu += '
      • Compress
      • ';\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n buildMenu += '
      • Decompress
      • ';\n }\n\n if (Pterodactyl.permissions.createFiles) {\n buildMenu += '
      • \\\n
      • New File
      • \\\n
      • New Folder
      • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles || Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
      • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n buildMenu += '
      • Download
      • ';\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
      • Delete
      • ';\n }\n\n buildMenu += '
      ';\n return buildMenu;\n }\n\n rightClick() {\n $('[data-action=\"toggleMenu\"]').on('mousedown', event => {\n event.preventDefault();\n this.showMenu(event);\n });\n $('#file_listing > tbody td').on('contextmenu', event => {\n this.showMenu(event);\n });\n }\n\n showMenu(event) {\n const parent = $(event.target).closest('tr');\n const menu = $(this.makeMenu(parent));\n\n if (parent.data('type') === 'disabled') return;\n event.preventDefault();\n\n $(menu).appendTo('body');\n $(menu).data('invokedOn', $(event.target)).show().css({\n position: 'absolute',\n left: event.pageX - 150,\n top: event.pageY,\n });\n\n this.activeLine = parent;\n this.activeLine.addClass('active');\n\n // Handle Events\n const Actions = new ActionsClass(parent, menu);\n if (Pterodactyl.permissions.moveFiles) {\n $(menu).find('li[data-action=\"move\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.move();\n });\n $(menu).find('li[data-action=\"rename\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.rename();\n });\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n $(menu).find('li[data-action=\"copy\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.copy();\n });\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n if (parent.data('type') === 'folder') {\n $(menu).find('li[data-action=\"compress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"compress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.compress();\n });\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n if (_.without(['application/zip', 'application/gzip', 'application/x-gzip'], parent.data('mime')).length < 3) {\n $(menu).find('li[data-action=\"decompress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"decompress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.decompress();\n });\n }\n\n if (Pterodactyl.permissions.createFiles) {\n $(menu).find('li[data-action=\"folder\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.folder();\n });\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n if (parent.data('type') === 'file') {\n $(menu).find('li[data-action=\"download\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"download\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.download();\n });\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n $(menu).find('li[data-action=\"delete\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.delete();\n });\n }\n\n $(window).unbind().on('click', event => {\n if($(event.target).is('.disable-menu-hide')) {\n event.preventDefault();\n return;\n }\n $(menu).unbind().remove();\n if(!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n });\n }\n\n directoryClick() {\n $('a[data-action=\"directory-view\"]').on('click', function (event) {\n event.preventDefault();\n\n const path = $(this).parent().data('path') || '';\n const name = $(this).parent().data('name') || '';\n\n window.location.hash = encodeURIComponent(path + name);\n Files.list();\n });\n }\n}\n\nwindow.ContextMenu = new ContextMenuClass;\n","\"use strict\";\n\n// Copyright (c) 2015 - 2017 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass FileManager {\n constructor() {\n this.list(this.decodeHash());\n }\n\n list(path, next) {\n if (_.isUndefined(path)) {\n path = this.decodeHash();\n }\n\n this.loader(true);\n $.ajax({\n type: 'POST',\n url: Pterodactyl.meta.directoryList,\n headers: {\n 'X-CSRF-Token': Pterodactyl.meta.csrftoken,\n },\n data: {\n directory: path,\n },\n }).done(data => {\n this.loader(false);\n $('#load_files').slideUp(10).html(data).slideDown(10, () => {\n ContextMenu.run();\n this.reloadFilesButton();\n if (_.isFunction(next)) {\n return next();\n }\n });\n $('#internal_alert').slideUp();\n\n if (typeof Siofu === 'object') {\n Siofu.listenOnInput(document.getElementById(\"files_touch_target\"));\n }\n }).fail(jqXHR => {\n this.loader(false);\n if (_.isFunction(next)) {\n return next(new Error('Failed to load file listing.'));\n }\n swal({\n type: 'error',\n title: 'File Error',\n text: 'An error occured while attempting to process this request. Please try again.',\n });\n console.error(jqXHR);\n });\n }\n\n loader(show) {\n if (show){\n $('.file-overlay').fadeIn(100);\n } else {\n $('.file-overlay').fadeOut(100);\n }\n }\n\n reloadFilesButton() {\n $('i[data-action=\"reload-files\"]').unbind().on('click', () => {\n $('i[data-action=\"reload-files\"]').addClass('fa-spin');\n this.list();\n });\n }\n\n decodeHash() {\n return decodeURIComponent(window.location.hash.substring(1));\n }\n\n}\n\nwindow.Files = new FileManager;\n"]} \ No newline at end of file diff --git a/public/themes/pterodactyl/js/frontend/files/src/actions.js b/public/themes/pterodactyl/js/frontend/files/src/actions.js index 9ff97853..f286f4c1 100644 --- a/public/themes/pterodactyl/js/frontend/files/src/actions.js +++ b/public/themes/pterodactyl/js/frontend/files/src/actions.js @@ -1,6 +1,6 @@ "use strict"; -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/themes/pterodactyl/js/frontend/files/src/contextmenu.js b/public/themes/pterodactyl/js/frontend/files/src/contextmenu.js index dd6c37f5..2e51b095 100644 --- a/public/themes/pterodactyl/js/frontend/files/src/contextmenu.js +++ b/public/themes/pterodactyl/js/frontend/files/src/contextmenu.js @@ -1,6 +1,6 @@ "use strict"; -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/themes/pterodactyl/js/frontend/files/src/index.js b/public/themes/pterodactyl/js/frontend/files/src/index.js index b7edbce8..ac5d3fa1 100644 --- a/public/themes/pterodactyl/js/frontend/files/src/index.js +++ b/public/themes/pterodactyl/js/frontend/files/src/index.js @@ -1,6 +1,6 @@ "use strict"; -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/themes/pterodactyl/js/frontend/files/upload.js b/public/themes/pterodactyl/js/frontend/files/upload.js index 452ceaf5..7e247702 100644 --- a/public/themes/pterodactyl/js/frontend/files/upload.js +++ b/public/themes/pterodactyl/js/frontend/files/upload.js @@ -1,4 +1,4 @@ -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/themes/pterodactyl/js/frontend/server.socket.js b/public/themes/pterodactyl/js/frontend/server.socket.js index 64b1c78a..49b22ddf 100644 --- a/public/themes/pterodactyl/js/frontend/server.socket.js +++ b/public/themes/pterodactyl/js/frontend/server.socket.js @@ -1,4 +1,4 @@ -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/themes/pterodactyl/js/frontend/serverlist.js b/public/themes/pterodactyl/js/frontend/serverlist.js index 12929c2a..605c33d2 100644 --- a/public/themes/pterodactyl/js/frontend/serverlist.js +++ b/public/themes/pterodactyl/js/frontend/serverlist.js @@ -1,4 +1,4 @@ -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/public/themes/pterodactyl/js/frontend/tasks.js b/public/themes/pterodactyl/js/frontend/tasks.js index c990559e..38563a92 100644 --- a/public/themes/pterodactyl/js/frontend/tasks.js +++ b/public/themes/pterodactyl/js/frontend/tasks.js @@ -1,4 +1,4 @@ -// Copyright (c) 2015 - 2016 Dane Everitt +// Copyright (c) 2015 - 2017 Dane Everitt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/resources/themes/pterodactyl/auth/login.blade.php b/resources/themes/pterodactyl/auth/login.blade.php index 6582356a..82ff3d56 100644 --- a/resources/themes/pterodactyl/auth/login.blade.php +++ b/resources/themes/pterodactyl/auth/login.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/auth/passwords/email.blade.php b/resources/themes/pterodactyl/auth/passwords/email.blade.php index a8e8202b..317c6d84 100644 --- a/resources/themes/pterodactyl/auth/passwords/email.blade.php +++ b/resources/themes/pterodactyl/auth/passwords/email.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/auth/passwords/reset.blade.php b/resources/themes/pterodactyl/auth/passwords/reset.blade.php index cc1998e1..cb00994e 100644 --- a/resources/themes/pterodactyl/auth/passwords/reset.blade.php +++ b/resources/themes/pterodactyl/auth/passwords/reset.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/base/account.blade.php b/resources/themes/pterodactyl/base/account.blade.php index beec2740..75615dfa 100644 --- a/resources/themes/pterodactyl/base/account.blade.php +++ b/resources/themes/pterodactyl/base/account.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/base/api/index.blade.php b/resources/themes/pterodactyl/base/api/index.blade.php index be921614..6509d891 100644 --- a/resources/themes/pterodactyl/base/api/index.blade.php +++ b/resources/themes/pterodactyl/base/api/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/base/api/new.blade.php b/resources/themes/pterodactyl/base/api/new.blade.php index 8030d671..d2778b3c 100644 --- a/resources/themes/pterodactyl/base/api/new.blade.php +++ b/resources/themes/pterodactyl/base/api/new.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/base/index.blade.php b/resources/themes/pterodactyl/base/index.blade.php index 25e2e4f4..c6066c25 100644 --- a/resources/themes/pterodactyl/base/index.blade.php +++ b/resources/themes/pterodactyl/base/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/base/security.blade.php b/resources/themes/pterodactyl/base/security.blade.php index cab949ea..666a790b 100644 --- a/resources/themes/pterodactyl/base/security.blade.php +++ b/resources/themes/pterodactyl/base/security.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/errors/403.blade.php b/resources/themes/pterodactyl/errors/403.blade.php index f46e1475..225852a1 100644 --- a/resources/themes/pterodactyl/errors/403.blade.php +++ b/resources/themes/pterodactyl/errors/403.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/errors/404.blade.php b/resources/themes/pterodactyl/errors/404.blade.php index 9979502e..39ace266 100644 --- a/resources/themes/pterodactyl/errors/404.blade.php +++ b/resources/themes/pterodactyl/errors/404.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/layouts/auth.blade.php b/resources/themes/pterodactyl/layouts/auth.blade.php index 6e4280d6..58758f4f 100644 --- a/resources/themes/pterodactyl/layouts/auth.blade.php +++ b/resources/themes/pterodactyl/layouts/auth.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/layouts/error.blade.php b/resources/themes/pterodactyl/layouts/error.blade.php index 58e67f22..fd78fd81 100644 --- a/resources/themes/pterodactyl/layouts/error.blade.php +++ b/resources/themes/pterodactyl/layouts/error.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/layouts/master.blade.php b/resources/themes/pterodactyl/layouts/master.blade.php index cf8d13bc..19b03380 100644 --- a/resources/themes/pterodactyl/layouts/master.blade.php +++ b/resources/themes/pterodactyl/layouts/master.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/files/add.blade.php b/resources/themes/pterodactyl/server/files/add.blade.php index 0e7742c5..d605b8dd 100644 --- a/resources/themes/pterodactyl/server/files/add.blade.php +++ b/resources/themes/pterodactyl/server/files/add.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/files/edit.blade.php b/resources/themes/pterodactyl/server/files/edit.blade.php index d060fee5..fece93d1 100644 --- a/resources/themes/pterodactyl/server/files/edit.blade.php +++ b/resources/themes/pterodactyl/server/files/edit.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/files/index.blade.php b/resources/themes/pterodactyl/server/files/index.blade.php index f9d46e06..932176a9 100644 --- a/resources/themes/pterodactyl/server/files/index.blade.php +++ b/resources/themes/pterodactyl/server/files/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/files/list.blade.php b/resources/themes/pterodactyl/server/files/list.blade.php index 9f2eb66c..ab9d5170 100644 --- a/resources/themes/pterodactyl/server/files/list.blade.php +++ b/resources/themes/pterodactyl/server/files/list.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/index.blade.php b/resources/themes/pterodactyl/server/index.blade.php index 87dfe79f..67e6c956 100644 --- a/resources/themes/pterodactyl/server/index.blade.php +++ b/resources/themes/pterodactyl/server/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/settings/allocation.blade.php b/resources/themes/pterodactyl/server/settings/allocation.blade.php index 54627914..f2782a88 100644 --- a/resources/themes/pterodactyl/server/settings/allocation.blade.php +++ b/resources/themes/pterodactyl/server/settings/allocation.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/settings/databases.blade.php b/resources/themes/pterodactyl/server/settings/databases.blade.php index 31e09980..b69b0f36 100644 --- a/resources/themes/pterodactyl/server/settings/databases.blade.php +++ b/resources/themes/pterodactyl/server/settings/databases.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/settings/sftp.blade.php b/resources/themes/pterodactyl/server/settings/sftp.blade.php index 1c146c33..747b9341 100644 --- a/resources/themes/pterodactyl/server/settings/sftp.blade.php +++ b/resources/themes/pterodactyl/server/settings/sftp.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/settings/startup.blade.php b/resources/themes/pterodactyl/server/settings/startup.blade.php index 4d48e247..745d0d3f 100644 --- a/resources/themes/pterodactyl/server/settings/startup.blade.php +++ b/resources/themes/pterodactyl/server/settings/startup.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/tasks/index.blade.php b/resources/themes/pterodactyl/server/tasks/index.blade.php index dc6e2b23..cd0f529e 100644 --- a/resources/themes/pterodactyl/server/tasks/index.blade.php +++ b/resources/themes/pterodactyl/server/tasks/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/tasks/new.blade.php b/resources/themes/pterodactyl/server/tasks/new.blade.php index 03db43b1..045d2fe8 100644 --- a/resources/themes/pterodactyl/server/tasks/new.blade.php +++ b/resources/themes/pterodactyl/server/tasks/new.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/users/index.blade.php b/resources/themes/pterodactyl/server/users/index.blade.php index b047487e..f4484975 100644 --- a/resources/themes/pterodactyl/server/users/index.blade.php +++ b/resources/themes/pterodactyl/server/users/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/users/new.blade.php b/resources/themes/pterodactyl/server/users/new.blade.php index 5bec326b..5cbe5617 100644 --- a/resources/themes/pterodactyl/server/users/new.blade.php +++ b/resources/themes/pterodactyl/server/users/new.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/themes/pterodactyl/server/users/view.blade.php b/resources/themes/pterodactyl/server/users/view.blade.php index eda1e92c..b697edc3 100644 --- a/resources/themes/pterodactyl/server/users/view.blade.php +++ b/resources/themes/pterodactyl/server/users/view.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/databases/index.blade.php b/resources/views/admin/databases/index.blade.php index a4aa30e7..f45e7019 100644 --- a/resources/views/admin/databases/index.blade.php +++ b/resources/views/admin/databases/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/databases/new.blade.php b/resources/views/admin/databases/new.blade.php index fa6d71a1..24ff2700 100644 --- a/resources/views/admin/databases/new.blade.php +++ b/resources/views/admin/databases/new.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/index.blade.php b/resources/views/admin/index.blade.php index 6c2481a9..b0758f27 100644 --- a/resources/views/admin/index.blade.php +++ b/resources/views/admin/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/locations/index.blade.php b/resources/views/admin/locations/index.blade.php index b1cb27c5..9aaf49fa 100644 --- a/resources/views/admin/locations/index.blade.php +++ b/resources/views/admin/locations/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/nodes/index.blade.php b/resources/views/admin/nodes/index.blade.php index 26a9fe98..29546d4e 100644 --- a/resources/views/admin/nodes/index.blade.php +++ b/resources/views/admin/nodes/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/nodes/new.blade.php b/resources/views/admin/nodes/new.blade.php index 08c8e7bf..07227daa 100644 --- a/resources/views/admin/nodes/new.blade.php +++ b/resources/views/admin/nodes/new.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/nodes/remote/deploy.blade.php b/resources/views/admin/nodes/remote/deploy.blade.php index 19b29c90..b7283fcf 100644 --- a/resources/views/admin/nodes/remote/deploy.blade.php +++ b/resources/views/admin/nodes/remote/deploy.blade.php @@ -1,7 +1,7 @@ #!/bin/bash #### # Pterodactyl - Panel - # Copyright (c) 2015 - 2016 Dane Everitt + # Copyright (c) 2015 - 2017 Dane Everitt # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/resources/views/admin/nodes/view.blade.php b/resources/views/admin/nodes/view.blade.php index ef5c1b57..a0ed696e 100644 --- a/resources/views/admin/nodes/view.blade.php +++ b/resources/views/admin/nodes/view.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/servers/index.blade.php b/resources/views/admin/servers/index.blade.php index 67a91303..612d2905 100644 --- a/resources/views/admin/servers/index.blade.php +++ b/resources/views/admin/servers/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/servers/new.blade.php b/resources/views/admin/servers/new.blade.php index 5eda226f..2c3d655a 100644 --- a/resources/views/admin/servers/new.blade.php +++ b/resources/views/admin/servers/new.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/servers/view.blade.php b/resources/views/admin/servers/view.blade.php index a3cc399e..abad871d 100644 --- a/resources/views/admin/servers/view.blade.php +++ b/resources/views/admin/servers/view.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/config.blade.php b/resources/views/admin/services/config.blade.php index fbfa01d3..2aa81442 100644 --- a/resources/views/admin/services/config.blade.php +++ b/resources/views/admin/services/config.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/index.blade.php b/resources/views/admin/services/index.blade.php index 4106964e..453f1582 100644 --- a/resources/views/admin/services/index.blade.php +++ b/resources/views/admin/services/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/new.blade.php b/resources/views/admin/services/new.blade.php index ce7f0f4f..1bb829e0 100644 --- a/resources/views/admin/services/new.blade.php +++ b/resources/views/admin/services/new.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/options/new.blade.php b/resources/views/admin/services/options/new.blade.php index 7749682d..5585fad0 100644 --- a/resources/views/admin/services/options/new.blade.php +++ b/resources/views/admin/services/options/new.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/options/variable.blade.php b/resources/views/admin/services/options/variable.blade.php index 9cfceea6..2c8ff895 100644 --- a/resources/views/admin/services/options/variable.blade.php +++ b/resources/views/admin/services/options/variable.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/options/view.blade.php b/resources/views/admin/services/options/view.blade.php index d5de1a91..bffb2057 100644 --- a/resources/views/admin/services/options/view.blade.php +++ b/resources/views/admin/services/options/view.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/packs/byoption.blade.php b/resources/views/admin/services/packs/byoption.blade.php index 62695856..23dbf295 100644 --- a/resources/views/admin/services/packs/byoption.blade.php +++ b/resources/views/admin/services/packs/byoption.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/packs/byservice.blade.php b/resources/views/admin/services/packs/byservice.blade.php index f73572c3..8475de28 100644 --- a/resources/views/admin/services/packs/byservice.blade.php +++ b/resources/views/admin/services/packs/byservice.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/packs/edit.blade.php b/resources/views/admin/services/packs/edit.blade.php index b71256fd..b7ba5fcd 100644 --- a/resources/views/admin/services/packs/edit.blade.php +++ b/resources/views/admin/services/packs/edit.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/packs/index.blade.php b/resources/views/admin/services/packs/index.blade.php index d346dc3a..6456ca31 100644 --- a/resources/views/admin/services/packs/index.blade.php +++ b/resources/views/admin/services/packs/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/packs/new.blade.php b/resources/views/admin/services/packs/new.blade.php index af658cce..c31f1c77 100644 --- a/resources/views/admin/services/packs/new.blade.php +++ b/resources/views/admin/services/packs/new.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/services/view.blade.php b/resources/views/admin/services/view.blade.php index 4de4d6e9..887478ac 100644 --- a/resources/views/admin/services/view.blade.php +++ b/resources/views/admin/services/view.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/settings.blade.php b/resources/views/admin/settings.blade.php index ac5964f9..09e66d6f 100644 --- a/resources/views/admin/settings.blade.php +++ b/resources/views/admin/settings.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/admin/users/index.blade.php b/resources/views/admin/users/index.blade.php index 5b9f59ce..7e85c8fe 100644 --- a/resources/views/admin/users/index.blade.php +++ b/resources/views/admin/users/index.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Some Modifications (c) 2015 Dylan Seidt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} diff --git a/resources/views/admin/users/new.blade.php b/resources/views/admin/users/new.blade.php index 8e0297b5..8e0bf5f7 100644 --- a/resources/views/admin/users/new.blade.php +++ b/resources/views/admin/users/new.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Some Modifications (c) 2015 Dylan Seidt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} diff --git a/resources/views/admin/users/view.blade.php b/resources/views/admin/users/view.blade.php index 7b817e3a..0a5d8230 100644 --- a/resources/views/admin/users/view.blade.php +++ b/resources/views/admin/users/view.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Some Modifications (c) 2015 Dylan Seidt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} diff --git a/resources/views/emails/added-subuser.blade.php b/resources/views/emails/added-subuser.blade.php index a468eb29..c6d0d47d 100644 --- a/resources/views/emails/added-subuser.blade.php +++ b/resources/views/emails/added-subuser.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/emails/new-account.blade.php b/resources/views/emails/new-account.blade.php index 093d626b..1240cbc2 100644 --- a/resources/views/emails/new-account.blade.php +++ b/resources/views/emails/new-account.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/emails/new_password.blade.php b/resources/views/emails/new_password.blade.php index 69b671ba..882cf2af 100644 --- a/resources/views/emails/new_password.blade.php +++ b/resources/views/emails/new_password.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/errors/403.blade.php b/resources/views/errors/403.blade.php index aef80166..bc83eb24 100644 --- a/resources/views/errors/403.blade.php +++ b/resources/views/errors/403.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php index 6988e78a..bdaec2cd 100644 --- a/resources/views/errors/404.blade.php +++ b/resources/views/errors/404.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/errors/installing.blade.php b/resources/views/errors/installing.blade.php index c68ec61f..8a8d5c29 100644 --- a/resources/views/errors/installing.blade.php +++ b/resources/views/errors/installing.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/errors/suspended.blade.php b/resources/views/errors/suspended.blade.php index 442f85ec..f96f13d6 100644 --- a/resources/views/errors/suspended.blade.php +++ b/resources/views/errors/suspended.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/resources/views/layouts/admin.blade.php b/resources/views/layouts/admin.blade.php index 2b309c2a..f21e1a0c 100644 --- a/resources/views/layouts/admin.blade.php +++ b/resources/views/layouts/admin.blade.php @@ -1,4 +1,4 @@ -{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} {{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} {{-- of this software and associated documentation files (the "Software"), to deal --}} diff --git a/storage/app/services/.templates/index.js b/storage/app/services/.templates/index.js index aa60eec1..f6b6695d 100644 --- a/storage/app/services/.templates/index.js +++ b/storage/app/services/.templates/index.js @@ -2,7 +2,7 @@ /** * Pterodactyl - Daemon - * Copyright (c) 2015 - 2016 Dane Everitt + * Copyright (c) 2015 - 2017 Dane Everitt * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/storage/app/services/minecraft/index.js b/storage/app/services/minecraft/index.js index 2d7f812c..b53364be 100644 --- a/storage/app/services/minecraft/index.js +++ b/storage/app/services/minecraft/index.js @@ -2,7 +2,7 @@ /** * Pterodactyl - Daemon - * Copyright (c) 2015 - 2016 Dane Everitt + * Copyright (c) 2015 - 2017 Dane Everitt * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/storage/app/services/srcds/index.js b/storage/app/services/srcds/index.js index aa60eec1..f6b6695d 100644 --- a/storage/app/services/srcds/index.js +++ b/storage/app/services/srcds/index.js @@ -2,7 +2,7 @@ /** * Pterodactyl - Daemon - * Copyright (c) 2015 - 2016 Dane Everitt + * Copyright (c) 2015 - 2017 Dane Everitt * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/storage/app/services/terraria/index.js b/storage/app/services/terraria/index.js index aa60eec1..f6b6695d 100644 --- a/storage/app/services/terraria/index.js +++ b/storage/app/services/terraria/index.js @@ -2,7 +2,7 @@ /** * Pterodactyl - Daemon - * Copyright (c) 2015 - 2016 Dane Everitt + * Copyright (c) 2015 - 2017 Dane Everitt * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/storage/app/services/voice/index.js b/storage/app/services/voice/index.js index aa60eec1..f6b6695d 100644 --- a/storage/app/services/voice/index.js +++ b/storage/app/services/voice/index.js @@ -2,7 +2,7 @@ /** * Pterodactyl - Daemon - * Copyright (c) 2015 - 2016 Dane Everitt + * Copyright (c) 2015 - 2017 Dane Everitt * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal From a137e6ed72f04cefa8bd70b34478bf937f177d06 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 24 Jan 2017 19:15:03 -0500 Subject: [PATCH 161/171] Add base implementation of extendable events classes Modified server deletion to use internal event handlers from the Eloquent models themselves. Also added a few preliminary event handlers in the `Pterodactyl\Events\ namespace that users can hook into in EventServiceProvider to perform their own actions as they please (such as push notifications and such). --- .../{ServerDeleted.php => Server/Created.php} | 9 +- .../Server/Creating.php} | 37 +++----- app/Events/Server/Deleted.php | 45 ++++++++++ app/Events/Server/Deleting.php | 45 ++++++++++ app/Events/User/Created.php | 45 ++++++++++ app/Events/User/Creating.php | 45 ++++++++++ app/Events/User/Deleted.php | 45 ++++++++++ app/Events/User/Deleting.php | 45 ++++++++++ app/Models/Node.php | 3 + app/Models/Server.php | 3 +- app/Notifications/ServerCreated.php | 22 +++++ app/Observers/ServerObserver.php | 89 +++++++++++++++++++ app/Observers/UserObserver.php | 75 ++++++++++++++++ app/Providers/AppServiceProvider.php | 29 +++++- app/Providers/EventServiceProvider.php | 6 +- app/Repositories/ServerRepository.php | 5 +- 16 files changed, 506 insertions(+), 42 deletions(-) rename app/Events/{ServerDeleted.php => Server/Created.php} (89%) rename app/{Listeners/DeleteServerListener.php => Events/Server/Creating.php} (60%) create mode 100644 app/Events/Server/Deleted.php create mode 100644 app/Events/Server/Deleting.php create mode 100644 app/Events/User/Created.php create mode 100644 app/Events/User/Creating.php create mode 100644 app/Events/User/Deleted.php create mode 100644 app/Events/User/Deleting.php create mode 100644 app/Observers/ServerObserver.php create mode 100644 app/Observers/UserObserver.php diff --git a/app/Events/ServerDeleted.php b/app/Events/Server/Created.php similarity index 89% rename from app/Events/ServerDeleted.php rename to app/Events/Server/Created.php index 95f8e33e..d5a30887 100644 --- a/app/Events/ServerDeleted.php +++ b/app/Events/Server/Created.php @@ -22,11 +22,12 @@ * SOFTWARE. */ -namespace Pterodactyl\Events; +namespace Pterodactyl\Events\Server; +use Pterodactyl\Models\Server; use Illuminate\Queue\SerializesModels; -class ServerDeleted +class Created { use SerializesModels; @@ -37,8 +38,8 @@ class ServerDeleted * * @return void */ - public function __construct($id) + public function __construct(Server $server) { - $this->server = $id; + $this->server = $server; } } diff --git a/app/Listeners/DeleteServerListener.php b/app/Events/Server/Creating.php similarity index 60% rename from app/Listeners/DeleteServerListener.php rename to app/Events/Server/Creating.php index 616f4c14..cbba63eb 100644 --- a/app/Listeners/DeleteServerListener.php +++ b/app/Events/Server/Creating.php @@ -22,41 +22,24 @@ * SOFTWARE. */ -namespace Pterodactyl\Listeners; +namespace Pterodactyl\Events\Server; -use Carbon; -use Pterodactyl\Jobs\DeleteServer; -use Pterodactyl\Jobs\SuspendServer; -use Pterodactyl\Events\ServerDeleted; -use Illuminate\Foundation\Bus\DispatchesJobs; +use Pterodactyl\Models\Server; +use Illuminate\Queue\SerializesModels; -class DeleteServerListener +class Creating { - use DispatchesJobs; + use SerializesModels; + + public $server; /** - * Create the event listener. + * Create a new event instance. * * @return void */ - public function __construct() + public function __construct(Server $server) { - // - } - - /** - * Handle the event. - * - * @param DeleteServerEvent $event - * @return void - */ - public function handle(ServerDeleted $event) - { - $this->dispatch((new SuspendServer($event->server))->onQueue(env('QUEUE_HIGH', 'high'))); - $this->dispatch( - (new DeleteServer($event->server)) - ->delay(Carbon::now()->addMinutes(env('APP_DELETE_MINUTES', 10))) - ->onQueue(env('QUEUE_STANDARD', 'standard')) - ); + $this->server = $server; } } diff --git a/app/Events/Server/Deleted.php b/app/Events/Server/Deleted.php new file mode 100644 index 00000000..b36dca12 --- /dev/null +++ b/app/Events/Server/Deleted.php @@ -0,0 +1,45 @@ +. + * + * 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. + */ + +namespace Pterodactyl\Events\Server; + +use Pterodactyl\Models\Server; +use Illuminate\Queue\SerializesModels; + +class Deleted +{ + use SerializesModels; + + public $server; + + /** + * Create a new event instance. + * + * @return void + */ + public function __construct(Server $server) + { + $this->server = $server; + } +} diff --git a/app/Events/Server/Deleting.php b/app/Events/Server/Deleting.php new file mode 100644 index 00000000..bb18e1ee --- /dev/null +++ b/app/Events/Server/Deleting.php @@ -0,0 +1,45 @@ +. + * + * 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. + */ + +namespace Pterodactyl\Events\Server; + +use Pterodactyl\Models\Server; +use Illuminate\Queue\SerializesModels; + +class Deleting +{ + use SerializesModels; + + public $server; + + /** + * Create a new event instance. + * + * @return void + */ + public function __construct(Server $server) + { + $this->server = $server; + } +} diff --git a/app/Events/User/Created.php b/app/Events/User/Created.php new file mode 100644 index 00000000..a00bdd45 --- /dev/null +++ b/app/Events/User/Created.php @@ -0,0 +1,45 @@ +. + * + * 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. + */ + +namespace Pterodactyl\Events\User; + +use Pterodactyl\Models\User; +use Illuminate\Queue\SerializesModels; + +class Created +{ + use SerializesModels; + + public $user; + + /** + * Create a new event instance. + * + * @return void + */ + public function __construct(User $user) + { + $this->user = $user; + } +} diff --git a/app/Events/User/Creating.php b/app/Events/User/Creating.php new file mode 100644 index 00000000..39a50f0c --- /dev/null +++ b/app/Events/User/Creating.php @@ -0,0 +1,45 @@ +. + * + * 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. + */ + +namespace Pterodactyl\Events\User; + +use Pterodactyl\Models\User; +use Illuminate\Queue\SerializesModels; + +class Creating +{ + use SerializesModels; + + public $user; + + /** + * Create a new event instance. + * + * @return void + */ + public function __construct(User $user) + { + $this->user = $user; + } +} diff --git a/app/Events/User/Deleted.php b/app/Events/User/Deleted.php new file mode 100644 index 00000000..348c859c --- /dev/null +++ b/app/Events/User/Deleted.php @@ -0,0 +1,45 @@ +. + * + * 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. + */ + +namespace Pterodactyl\Events\User; + +use Pterodactyl\Models\User; +use Illuminate\Queue\SerializesModels; + +class Deleted +{ + use SerializesModels; + + public $user; + + /** + * Create a new event instance. + * + * @return void + */ + public function __construct(User $user) + { + $this->user = $user; + } +} diff --git a/app/Events/User/Deleting.php b/app/Events/User/Deleting.php new file mode 100644 index 00000000..5bbd9136 --- /dev/null +++ b/app/Events/User/Deleting.php @@ -0,0 +1,45 @@ +. + * + * 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. + */ + +namespace Pterodactyl\Events\User; + +use Pterodactyl\Models\User; +use Illuminate\Queue\SerializesModels; + +class Deleting +{ + use SerializesModels; + + public $user; + + /** + * Create a new event instance. + * + * @return void + */ + public function __construct(User $user) + { + $this->user = $user; + } +} diff --git a/app/Models/Node.php b/app/Models/Node.php index 5b82a242..a5cbce46 100644 --- a/app/Models/Node.php +++ b/app/Models/Node.php @@ -26,9 +26,12 @@ namespace Pterodactyl\Models; use GuzzleHttp\Client; use Illuminate\Database\Eloquent\Model; +use Illuminate\Notifications\Notifiable; class Node extends Model { + use Notifiable; + /** * The table associated with the model. * diff --git a/app/Models/Server.php b/app/Models/Server.php index b90d0c51..3a11603c 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -26,11 +26,12 @@ namespace Pterodactyl\Models; use Auth; use Illuminate\Database\Eloquent\Model; +use Illuminate\Notifications\Notifiable; use Illuminate\Database\Eloquent\SoftDeletes; class Server extends Model { - use SoftDeletes; + use Notifiable, SoftDeletes; /** * The table associated with the model. diff --git a/app/Notifications/ServerCreated.php b/app/Notifications/ServerCreated.php index a581a8fb..a8e8b59f 100644 --- a/app/Notifications/ServerCreated.php +++ b/app/Notifications/ServerCreated.php @@ -1,4 +1,26 @@ . + * + * 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. + */ namespace Pterodactyl\Notifications; diff --git a/app/Observers/ServerObserver.php b/app/Observers/ServerObserver.php new file mode 100644 index 00000000..82c403a8 --- /dev/null +++ b/app/Observers/ServerObserver.php @@ -0,0 +1,89 @@ +. + * + * 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. + */ + +namespace Pterodactyl\Observers; + +use Carbon; +use Pterodactyl\Events; +use Pterodactyl\Models\Server; +use Pterodactyl\Jobs\DeleteServer; +use Pterodactyl\Jobs\SuspendServer; +use Illuminate\Foundation\Bus\DispatchesJobs; + +class ServerObserver +{ + use DispatchesJobs; + + /** + * Listen to the Server deleted event. + * + * @param Server $server [description] + * @return [type] [description] + */ + public function creating(Server $server) + { + event(new Events\Server\Creating($server)); + } + + /** + * Listen to the Server deleted event. + * + * @param Server $server [description] + * @return [type] [description] + */ + public function created(Server $server) + { + event(new Events\Server\Created($server)); + } + + /** + * Listen to the Server deleted event. + * + * @param Server $server [description] + * @return [type] [description] + */ + public function deleting(Server $server) + { + event(new Events\Server\Deleting($server)); + + $this->dispatch((new SuspendServer($server->id))->onQueue(env('QUEUE_HIGH', 'high'))); + } + + /** + * Listen to the Server deleted event. + * + * @param Server $server [description] + * @return [type] [description] + */ + public function deleted(Server $server) + { + event(new Events\Server\Deleted($server)); + + $this->dispatch( + (new DeleteServer($server->id)) + ->delay(Carbon::now()->addMinutes(env('APP_DELETE_MINUTES', 10))) + ->onQueue(env('QUEUE_STANDARD', 'standard')) + ); + } +} diff --git a/app/Observers/UserObserver.php b/app/Observers/UserObserver.php new file mode 100644 index 00000000..e0624e26 --- /dev/null +++ b/app/Observers/UserObserver.php @@ -0,0 +1,75 @@ +. + * + * 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. + */ + +namespace Pterodactyl\Observers; + +use Pterodactyl\Events; +use Pterodactyl\Models\User; + +class UserObserver +{ + /** + * Listen to the User creating event. + * + * @param User $user The eloquent User model. + * @return void + */ + public function creating(User $user) + { + event(new Events\User\Creating($user)); + } + + /** + * Listen to the User created event. + * + * @param User $user The eloquent User model. + * @return void + */ + public function created(User $user) + { + event(new Events\User\Created($user)); + } + + /** + * Listen to the User deleting event. + * + * @param User $user The eloquent User model. + * @return void + */ + public function deleting(User $user) + { + event(new Events\User\Deleting($user)); + } + + /** + * Listen to the User deleted event. + * + * @param User $user The eloquent User model. + * @return void + */ + public function deleted(User $user) + { + event(new Events\User\Deleted($user)); + } +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index d0d1dd9e..d71ea056 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -1,8 +1,34 @@ . + * + * 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. + */ namespace Pterodactyl\Providers; +use Pterodactyl\Models\User; +use Pterodactyl\Models\Server; use Illuminate\Support\ServiceProvider; +use Pterodactyl\Observers\UserObserver; +use Pterodactyl\Observers\ServerObserver; class AppServiceProvider extends ServiceProvider { @@ -13,7 +39,8 @@ class AppServiceProvider extends ServiceProvider */ public function boot() { - // + User::observe(UserObserver::class); + Server::observe(ServerObserver::class); } /** diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 7ec0d48a..0e31100c 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -12,11 +12,7 @@ class EventServiceProvider extends ServiceProvider * * @var array */ - protected $listen = [ - 'Pterodactyl\Events\ServerDeleted' => [ - 'Pterodactyl\Listeners\DeleteServerListener', - ], - ]; + protected $listen = []; /** * Register any other events for your application. diff --git a/app/Repositories/ServerRepository.php b/app/Repositories/ServerRepository.php index 88618a47..9f762bc4 100644 --- a/app/Repositories/ServerRepository.php +++ b/app/Repositories/ServerRepository.php @@ -29,7 +29,6 @@ use Log; use Crypt; use Validator; use Pterodactyl\Models; -use Pterodactyl\Events\ServerDeleted; use Pterodactyl\Services\UuidService; use Pterodactyl\Services\DeploymentService; use Pterodactyl\Exceptions\DisplayException; @@ -797,9 +796,7 @@ class ServerRepository } $server->delete(); - DB::commit(); - - event(new ServerDeleted($server->id)); + return DB::commit(); } catch (\Exception $ex) { DB::rollBack(); throw $ex; From 58de6125c2cf9ed108b913e44c071e38099289a4 Mon Sep 17 00:00:00 2001 From: Emmet Young Date: Wed, 25 Jan 2017 22:01:57 +1100 Subject: [PATCH 162/171] Location should be validated on creation of a server, --- app/Repositories/ServerRepository.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Repositories/ServerRepository.php b/app/Repositories/ServerRepository.php index 9f762bc4..9e16de31 100644 --- a/app/Repositories/ServerRepository.php +++ b/app/Repositories/ServerRepository.php @@ -92,6 +92,7 @@ class ServerRepository 'disk' => 'required|numeric|min:0', 'service' => 'required|numeric|min:1|exists:services,id', 'option' => 'required|numeric|min:1|exists:service_options,id', + 'location' => 'required|numeric|min:1|exists:locations,id', 'pack' => 'sometimes|nullable|numeric|min:0', 'startup' => 'string', 'custom_image_name' => 'required_if:use_custom_image,on', From 96e50506a17a40b53a0af50441f24a4c784c75f7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 25 Jan 2017 16:37:01 -0500 Subject: [PATCH 163/171] Move notification email of server created into the event listener --- app/Notifications/ServerCreated.php | 14 +++++++------- app/Observers/ServerObserver.php | 13 +++++++++++++ app/Repositories/ServerRepository.php | 11 ----------- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/app/Notifications/ServerCreated.php b/app/Notifications/ServerCreated.php index a8e8b59f..a867e26c 100644 --- a/app/Notifications/ServerCreated.php +++ b/app/Notifications/ServerCreated.php @@ -66,12 +66,12 @@ class ServerCreated extends Notification implements ShouldQueue public function toMail($notifiable) { return (new MailMessage) - ->line('A new server as been assigned to your account.') - ->line('Server Name: ' . $this->server->name) - ->line('Memory: ' . $this->server->memory . ' MB') - ->line('Node: ' . $this->server->node) - ->line('Type: ' . $this->server->service . ' - ' . $this->server->option) - ->action('Peel Off the Protective Wrap', route('server.index', $this->server->uuidShort)) - ->line('Please let us know if you have any additional questions or concerns!'); + ->line('A new server as been assigned to your account.') + ->line('Server Name: ' . $this->server->name) + ->line('Memory: ' . $this->server->memory . ' MB') + ->line('Node: ' . $this->server->node) + ->line('Type: ' . $this->server->service . ' - ' . $this->server->option) + ->action('Peel Off the Protective Wrap', route('server.index', $this->server->uuidShort)) + ->line('Please let us know if you have any additional questions or concerns!'); } } diff --git a/app/Observers/ServerObserver.php b/app/Observers/ServerObserver.php index 82c403a8..ed6246ed 100644 --- a/app/Observers/ServerObserver.php +++ b/app/Observers/ServerObserver.php @@ -26,9 +26,11 @@ namespace Pterodactyl\Observers; use Carbon; use Pterodactyl\Events; +use Pterodactyl\Models\User; use Pterodactyl\Models\Server; use Pterodactyl\Jobs\DeleteServer; use Pterodactyl\Jobs\SuspendServer; +use Pterodactyl\Notifications\ServerCreated; use Illuminate\Foundation\Bus\DispatchesJobs; class ServerObserver @@ -55,6 +57,17 @@ class ServerObserver public function created(Server $server) { event(new Events\Server\Created($server)); + + // Queue Notification Email + $user = User::findOrFail($server->owner); + $user->notify((new ServerCreated([ + 'name' => $server->name, + 'memory' => $server->memory, + 'node' => $node->name, + 'service' => $service->name, + 'option' => $option->name, + 'uuidShort' => $server->uuidShort, + ]))); } /** diff --git a/app/Repositories/ServerRepository.php b/app/Repositories/ServerRepository.php index 9e16de31..324e1f47 100644 --- a/app/Repositories/ServerRepository.php +++ b/app/Repositories/ServerRepository.php @@ -32,7 +32,6 @@ use Pterodactyl\Models; use Pterodactyl\Services\UuidService; use Pterodactyl\Services\DeploymentService; use Pterodactyl\Exceptions\DisplayException; -use Pterodactyl\Notifications\ServerCreated; use Pterodactyl\Exceptions\DisplayValidationException; class ServerRepository @@ -300,16 +299,6 @@ class ServerRepository ]); } - // Queue Notification Email - $user->notify((new ServerCreated([ - 'name' => $server->name, - 'memory' => $server->memory, - 'node' => $node->name, - 'service' => $service->name, - 'option' => $option->name, - 'uuidShort' => $server->uuidShort, - ]))); - $client = Models\Node::guzzleRequest($node->id); $client->request('POST', '/servers', [ 'headers' => [ From 95730da41920a797c74e265eb23696108c2ae606 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 25 Jan 2017 16:57:15 -0500 Subject: [PATCH 164/171] Fix pack edit display --- resources/views/admin/services/packs/edit.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/admin/services/packs/edit.blade.php b/resources/views/admin/services/packs/edit.blade.php index b7ba5fcd..0c05d4f9 100644 --- a/resources/views/admin/services/packs/edit.blade.php +++ b/resources/views/admin/services/packs/edit.blade.php @@ -65,7 +65,7 @@ @foreach($services as $service => $options) @foreach($options as $option) - + @endforeach @endforeach From 95d0c646f9f64624f37290b44fc68e32b209407b Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 25 Jan 2017 18:20:41 -0500 Subject: [PATCH 165/171] Require packs to be a tarball --- app/Repositories/ServiceRepository/Pack.php | 15 +++++---------- .../views/admin/services/packs/edit.blade.php | 2 +- .../views/admin/services/packs/new.blade.php | 4 ++-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/app/Repositories/ServiceRepository/Pack.php b/app/Repositories/ServiceRepository/Pack.php index ae68c1a6..c5dee34a 100644 --- a/app/Repositories/ServiceRepository/Pack.php +++ b/app/Repositories/ServiceRepository/Pack.php @@ -66,11 +66,8 @@ class Pack throw new DisplayException('The file provided does not appear to be valid.'); } - if (! in_array($data['file_upload']->getMimeType(), [ - 'application/zip', - 'application/gzip', - ])) { - throw new DisplayException('The file provided does not meet the required filetypes of application/zip or application/gzip.'); + if ($data['file_upload']->getMimeType() !== 'application/gzip') { + throw new DisplayException('The file provided does not meet the required filetype of application/gzip.'); } } @@ -95,8 +92,7 @@ class Pack Storage::makeDirectory('packs/' . $pack->uuid); if (isset($data['file_upload'])) { - $filename = ($data['file_upload']->getMimeType() === 'application/zip') ? 'archive.zip' : 'archive.tar.gz'; - $data['file_upload']->storeAs('packs/' . $pack->uuid, $filename); + $data['file_upload']->storeAs('packs/' . $pack->uuid, 'archive.tar.gz'); } DB::commit(); @@ -132,10 +128,9 @@ class Pack throw new DisplayException('The uploaded archive was unable to be opened.'); } - $isZip = $zip->locateName('archive.zip'); $isTar = $zip->locateName('archive.tar.gz'); - if ($zip->locateName('import.json') === false || ($isZip === false && $isTar === false)) { + if (! $zip->locateName('import.json') || ! $isTar) { throw new DisplayException('This contents of the provided archive were in an invalid format.'); } @@ -156,7 +151,7 @@ class Pack ]); $pack = Models\ServicePack::findOrFail($id); - if (! $zip->extractTo(storage_path('app/packs/' . $pack->uuid), ($isZip === false) ? 'archive.tar.gz' : 'archive.zip')) { + if (! $zip->extractTo(storage_path('app/packs/' . $pack->uuid), 'archive.tar.gz')) { $pack->delete(); throw new DisplayException('Unable to extract the archive file to the correct location.'); } diff --git a/resources/views/admin/services/packs/edit.blade.php b/resources/views/admin/services/packs/edit.blade.php index 0c05d4f9..0cdd8070 100644 --- a/resources/views/admin/services/packs/edit.blade.php +++ b/resources/views/admin/services/packs/edit.blade.php @@ -175,7 +175,7 @@ @endforeach -

      If you wish to modify or upload a new file it should be uploaded to {{ storage_path('app/packs/' . $pack->uuid) }} as either archive.zip or archive.tar.gz.

      +

      If you wish to modify or upload a new file it should be uploaded to {{ storage_path('app/packs/' . $pack->uuid) }} as archive.tar.gz.

      diff --git a/resources/views/admin/services/packs/new.blade.php b/resources/views/admin/services/packs/new.blade.php index c31f1c77..7a5be8f4 100644 --- a/resources/views/admin/services/packs/new.blade.php +++ b/resources/views/admin/services/packs/new.blade.php @@ -150,8 +150,8 @@
      - -

      This package file must either be a .zip or .tar.gz archive of files to use for either building or running this pack.

      If your file is larger than 20MB we recommend uploading it using SFTP. Once you have added this pack to the system, a path will be provided where you should upload the file. + +

      This package file must be a .tar.gz archive of files to use for either building or running this pack.

      If your file is larger than 20MB we recommend uploading it using SFTP. Once you have added this pack to the system, a path will be provided where you should upload the file. This server is currently configured with the following limits: upload_max_filesize={{ ini_get('upload_max_filesize') }} and post_max_size={{ ini_get('post_max_size') }}. If your file is larger than either of those values this request will fail.

      From e6d3e750241d6da988588083784993c872051ef7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 25 Jan 2017 18:25:31 -0500 Subject: [PATCH 166/171] Add new daemon routes for pack handling --- .../Controllers/Daemon/PackController.php | 96 +++++++++++++++++++ app/Http/Routes/DaemonRoutes.php | 9 ++ 2 files changed, 105 insertions(+) create mode 100644 app/Http/Controllers/Daemon/PackController.php diff --git a/app/Http/Controllers/Daemon/PackController.php b/app/Http/Controllers/Daemon/PackController.php new file mode 100644 index 00000000..245b8862 --- /dev/null +++ b/app/Http/Controllers/Daemon/PackController.php @@ -0,0 +1,96 @@ +. + * + * 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. + */ + +namespace Pterodactyl\Http\Controllers\Daemon; + +use Storage; +use Pterodactyl\Models; +use Illuminate\Http\Request; +use Pterodactyl\Http\Controllers\Controller; + +class PackController extends Controller +{ + /** + * Controller Constructor. + */ + public function __construct() + { + // + } + + /** + * Pulls an install pack archive from the system + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function pull(Request $request, $uuid) + { + $pack = Models\ServicePack::where('uuid', $uuid)->first(); + + if (!$pack) { + return response()->json([ 'error' => 'No such pack.' ], 404); + } + + if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) { + return response()->json([ 'error' => 'There is no archive available for this pack.' ], 503); + } + + return response()->download(storage_path('app/packs/' . $pack->uuid . '/archive.tar.gz')); + } + + /** + * Returns the hash information for a pack. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function hash(Request $request, $uuid) + { + $pack = Models\ServicePack::where('uuid', $uuid)->first(); + + if (!$pack) { + return response()->json([ 'error' => 'No such pack.' ], 404); + } + + if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) { + return response()->json([ 'error' => 'There is no archive available for this pack.' ], 503); + } + + return response()->json([ + 'archive.tar.gz' => sha1_file(storage_path('app/packs/' . $pack->uuid . '/archive.tar.gz')), + ]); + } + + /** + * Pulls an update pack archive from the system + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function pullUpdate(Request $request) + { + + } +} diff --git a/app/Http/Routes/DaemonRoutes.php b/app/Http/Routes/DaemonRoutes.php index b993e375..3792dc8f 100644 --- a/app/Http/Routes/DaemonRoutes.php +++ b/app/Http/Routes/DaemonRoutes.php @@ -40,6 +40,15 @@ class DaemonRoutes 'as' => 'remote.install', 'uses' => 'Daemon\ServiceController@pull', ]); + + $router->get('packs/pull/{uuid}', [ + 'as' => 'daemon.pack.pull', + 'uses' => 'Daemon\PackController@pull', + ]); + $router->get('packs/pull/{uuid}/hash', [ + 'as' => 'daemon.pack.hash', + 'uses' => 'Daemon\PackController@hash', + ]); }); } } From 4a6d62fded67466742adbf903ab72a03d5400aef Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 27 Jan 2017 16:21:15 -0500 Subject: [PATCH 167/171] Fix fatal error when trying to send server creation notification --- app/Observers/ServerObserver.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/Observers/ServerObserver.php b/app/Observers/ServerObserver.php index ed6246ed..6506f03f 100644 --- a/app/Observers/ServerObserver.php +++ b/app/Observers/ServerObserver.php @@ -26,7 +26,7 @@ namespace Pterodactyl\Observers; use Carbon; use Pterodactyl\Events; -use Pterodactyl\Models\User; +use Pterodactyl\Models; use Pterodactyl\Models\Server; use Pterodactyl\Jobs\DeleteServer; use Pterodactyl\Jobs\SuspendServer; @@ -59,13 +59,20 @@ class ServerObserver event(new Events\Server\Created($server)); // Queue Notification Email - $user = User::findOrFail($server->owner); + $user = Models\User::findOrFail($server->owner); + $node = Models\Node::select('name')->where('id', $server->node)->first(); + $service = Models\Service::select('services.name', 'service_options.name as optionName') + ->join('service_options', 'service_options.parent_service', '=', 'services.id') + ->where('services.id', $server->service) + ->where('service_options.id', $server->option) + ->first(); + $user->notify((new ServerCreated([ 'name' => $server->name, 'memory' => $server->memory, 'node' => $node->name, 'service' => $service->name, - 'option' => $option->name, + 'option' => $service->optionName, 'uuidShort' => $server->uuidShort, ]))); } From 9087feec4f478f83b5af28c5c24f2fe64292a1c6 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 27 Jan 2017 16:21:25 -0500 Subject: [PATCH 168/171] Remove build settings from packs. --- app/Http/Controllers/Admin/PackController.php | 8 --- app/Repositories/ServiceRepository/Pack.php | 36 ----------- .../2016_11_11_220649_add_pack_support.php | 6 -- .../views/admin/services/packs/edit.blade.php | 60 +------------------ .../views/admin/services/packs/new.blade.php | 58 ------------------ 5 files changed, 1 insertion(+), 167 deletions(-) diff --git a/app/Http/Controllers/Admin/PackController.php b/app/Http/Controllers/Admin/PackController.php index abda49c8..628cd54b 100644 --- a/app/Http/Controllers/Admin/PackController.php +++ b/app/Http/Controllers/Admin/PackController.php @@ -183,14 +183,6 @@ class PackController extends Controller 'description' => $pack->dscription, 'selectable' => (bool) $pack->selectable, 'visible' => (bool) $pack->visible, - 'build' => [ - 'memory' => $pack->build_memory, - 'swap' => $pack->build_swap, - 'cpu' => $pack->build_cpu, - 'io' => $pack->build_io, - 'container' => $pack->build_container, - 'script' => $pack->build_script, - ], ]; $filename = tempnam(sys_get_temp_dir(), 'pterodactyl_'); diff --git a/app/Repositories/ServiceRepository/Pack.php b/app/Repositories/ServiceRepository/Pack.php index c5dee34a..3cf8588e 100644 --- a/app/Repositories/ServiceRepository/Pack.php +++ b/app/Repositories/ServiceRepository/Pack.php @@ -49,12 +49,6 @@ class Pack 'option' => 'required|exists:service_options,id', 'selectable' => 'sometimes|boolean', 'visible' => 'sometimes|boolean', - 'build_memory' => 'required|integer|min:0', - 'build_swap' => 'required|integer|min:0', - 'build_cpu' => 'required|integer|min:0', - 'build_io' => 'required|integer|min:10|max:1000', - 'build_container' => 'required|string', - 'build_script' => 'sometimes|nullable|string', ]); if ($validator->fails()) { @@ -77,12 +71,6 @@ class Pack $pack = Models\ServicePack::create([ 'option' => $data['option'], 'uuid' => $uuid->generate('servers', 'uuid'), - 'build_memory' => $data['build_memory'], - 'build_swap' => $data['build_swap'], - 'build_cpu' => $data['build_swap'], - 'build_io' => $data['build_io'], - 'build_script' => (empty($data['build_script'])) ? null : $data['build_script'], - 'build_container' => $data['build_container'], 'name' => $data['name'], 'version' => $data['version'], 'description' => (empty($data['description'])) ? null : $data['description'], @@ -142,12 +130,6 @@ class Pack 'option' => $data['option'], 'selectable' => $json->selectable, 'visible' => $json->visible, - 'build_memory' => $json->build->memory, - 'build_swap' => $json->build->swap, - 'build_cpu' => $json->build->cpu, - 'build_io' => $json->build->io, - 'build_container' => $json->build->container, - 'build_script' => $json->build->script, ]); $pack = Models\ServicePack::findOrFail($id); @@ -169,12 +151,6 @@ class Pack 'option' => $data['option'], 'selectable' => $json->selectable, 'visible' => $json->visible, - 'build_memory' => $json->build->memory, - 'build_swap' => $json->build->swap, - 'build_cpu' => $json->build->cpu, - 'build_io' => $json->build->io, - 'build_container' => $json->build->container, - 'build_script' => $json->build->script, ]); } } @@ -188,12 +164,6 @@ class Pack 'option' => 'required|exists:service_options,id', 'selectable' => 'sometimes|boolean', 'visible' => 'sometimes|boolean', - 'build_memory' => 'required|integer|min:0', - 'build_swap' => 'required|integer|min:0', - 'build_cpu' => 'required|integer|min:0', - 'build_io' => 'required|integer|min:10|max:1000', - 'build_container' => 'required|string', - 'build_script' => 'sometimes|string', ]); if ($validator->fails()) { @@ -203,12 +173,6 @@ class Pack DB::transaction(function () use ($id, $data) { Models\ServicePack::findOrFail($id)->update([ 'option' => $data['option'], - 'build_memory' => $data['build_memory'], - 'build_swap' => $data['build_swap'], - 'build_cpu' => $data['build_swap'], - 'build_io' => $data['build_io'], - 'build_script' => (empty($data['build_script'])) ? null : $data['build_script'], - 'build_container' => $data['build_container'], 'name' => $data['name'], 'version' => $data['version'], 'description' => (empty($data['description'])) ? null : $data['description'], diff --git a/database/migrations/2016_11_11_220649_add_pack_support.php b/database/migrations/2016_11_11_220649_add_pack_support.php index 87a66b40..7cb3eb10 100644 --- a/database/migrations/2016_11_11_220649_add_pack_support.php +++ b/database/migrations/2016_11_11_220649_add_pack_support.php @@ -17,12 +17,6 @@ class AddPackSupport extends Migration $table->increments('id'); $table->unsignedInteger('option'); $table->char('uuid', 36)->unique(); - $table->unsignedInteger('build_memory')->nullable(); - $table->unsignedInteger('build_swap')->nullable(); - $table->unsignedInteger('build_cpu')->nullable(); - $table->unsignedInteger('build_io')->nullable(); - $table->text('build_script')->nullable(); - $table->string('build_container')->default('alpine:latest'); $table->string('name'); $table->string('version'); $table->text('description')->nullable(); diff --git a/resources/views/admin/services/packs/edit.blade.php b/resources/views/admin/services/packs/edit.blade.php index 0cdd8070..dcb67d5d 100644 --- a/resources/views/admin/services/packs/edit.blade.php +++ b/resources/views/admin/services/packs/edit.blade.php @@ -88,64 +88,6 @@

      -
      -
      -
      Build Parameters
      -
      -
      -
      - -
      - - MB -
      -
      -
      - -
      - - MB -
      -
      -
      - -
      - - % -
      -
      -
      - -
      - - I/O -
      -
      -
      -
      -

      If you would like to set limits on the build container you may do so above. Setting memory, swap, or cpu to 0 will allow unlimited resource utilization. IO must be in a range between 10 to 1000 and is a relative weighting to other container IO usage.

      -
      -
      -
      -
      -
      - -
      - -

      Provide the docker container image that will be used to build this service pack. This container is only used if a build script is provided below.

      -
      -
      -
      - -
      {{ $pack->build_script }}
      - -

      This script will be run inside the container if provided. You should use this script to download any additional dependencies or compile packages as necessary on the node. Your uploaded archive (if provided), will be available in /input as archive.tar.gz or as archive.zip depending on what format you uploaded as. Your completed pack should be saved as package.tar.gz in the /output directory (e.g. /output/package.tar.gz).

      -
      -
      -
      -
      -
      -
      Package Archive
      @@ -153,7 +95,7 @@
      @if(count($files) > 1) -
      Warning! Service packs should only contain a single pack archive in either .zip or .tar.gz format. We've detected more than one file for this pack.
      +
      Warning! Service packs should only contain a single pack archive in .tar.gz format. We've detected more than one file for this pack.
      @endif diff --git a/resources/views/admin/services/packs/new.blade.php b/resources/views/admin/services/packs/new.blade.php index 7a5be8f4..82601bc6 100644 --- a/resources/views/admin/services/packs/new.blade.php +++ b/resources/views/admin/services/packs/new.blade.php @@ -85,64 +85,6 @@
      -
      -
      -
      Build Parameters
      -
      -
      -
      - -
      - - MB -
      -
      -
      - -
      - - MB -
      -
      -
      - -
      - - % -
      -
      -
      - -
      - - I/O -
      -
      -
      -
      -

      If you would like to set limits on the build container you may do so above. Setting memory, swap, or cpu to 0 will allow unlimited resource utilization. IO must be in a range between 10 to 1000 and is a relative weighting to other container IO usage.

      -
      -
      -
      -
      -
      - -
      - -

      Provide the docker container image that will be used to build this service pack. This container is only used if a build script is provided below.

      -
      -
      -
      - -
      - -

      This script will be run inside the container if provided. You should use this script to download any additional dependencies or compile packages as necessary on the node. Your uploaded archive (if provided), will be available in /input as archive.tar.gz or as archive.zip depending on what format you uploaded as. Your completed pack should be saved as package.tar.gz in the /output directory (e.g. /output/package.tar.gz).

      -
      -
      -
      -
      -
      -
      File Upload
      From 4b0197f2be9ce9d2c3e7fa46c77aca0211694081 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 27 Jan 2017 16:34:46 -0500 Subject: [PATCH 169/171] Implement basic security policy on daemon remote routes --- app/Http/Kernel.php | 1 + app/Http/Middleware/DaemonAuthenticate.php | 71 ++++++++++++++++++++++ app/Http/Middleware/VerifyCsrfToken.php | 1 + app/Http/Routes/DaemonRoutes.php | 2 +- app/Http/Routes/RemoteRoutes.php | 5 -- 5 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 app/Http/Middleware/DaemonAuthenticate.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 9e8d9f81..3ab1a1b9 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -51,6 +51,7 @@ class Kernel extends HttpKernel 'guest' => \Pterodactyl\Http\Middleware\RedirectIfAuthenticated::class, 'server' => \Pterodactyl\Http\Middleware\CheckServer::class, 'admin' => \Pterodactyl\Http\Middleware\AdminAuthenticate::class, + 'daemon' => \Pterodactyl\Http\Middleware\DaemonAuthenticate::class, 'csrf' => \Pterodactyl\Http\Middleware\VerifyCsrfToken::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, diff --git a/app/Http/Middleware/DaemonAuthenticate.php b/app/Http/Middleware/DaemonAuthenticate.php new file mode 100644 index 00000000..73cb029d --- /dev/null +++ b/app/Http/Middleware/DaemonAuthenticate.php @@ -0,0 +1,71 @@ +. + * + * 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. + */ + +namespace Pterodactyl\Http\Middleware; + +use Closure; +use Pterodactyl\Models\Node; +use Illuminate\Contracts\Auth\Guard; + +class DaemonAuthenticate +{ + /** + * The Guard implementation. + * + * @var Guard + */ + protected $auth; + + /** + * Create a new filter instance. + * + * @param Guard $auth + * @return void + */ + public function __construct(Guard $auth) + { + $this->auth = $auth; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + if (! $request->header('X-Access-Node')) { + return abort(403); + } + + $node = Node::where('daemonSecret', $request->header('X-Access-Node'))->first(); + if (! $node) { + return abort(404); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index fe23f9e9..08d96035 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -13,6 +13,7 @@ class VerifyCsrfToken extends BaseVerifier */ protected $except = [ 'remote/*', + 'daemon/*', 'api/*', ]; } diff --git a/app/Http/Routes/DaemonRoutes.php b/app/Http/Routes/DaemonRoutes.php index 3792dc8f..7367fae5 100644 --- a/app/Http/Routes/DaemonRoutes.php +++ b/app/Http/Routes/DaemonRoutes.php @@ -30,7 +30,7 @@ class DaemonRoutes { public function map(Router $router) { - $router->group(['prefix' => 'daemon'], function () use ($router) { + $router->group(['prefix' => 'daemon', 'middleware' => 'daemon'], function () use ($router) { $router->get('services', [ 'as' => 'daemon.services', 'uses' => 'Daemon\ServiceController@list', diff --git a/app/Http/Routes/RemoteRoutes.php b/app/Http/Routes/RemoteRoutes.php index ba8f47f9..9ece1fb2 100644 --- a/app/Http/Routes/RemoteRoutes.php +++ b/app/Http/Routes/RemoteRoutes.php @@ -42,11 +42,6 @@ class RemoteRoutes 'uses' => 'Remote\RemoteController@postInstall', ]); - $router->post('event', [ - 'as' => 'remote.event', - 'uses' => 'Remote\RemoteController@event', - ]); - $router->get('configuration/{token}', [ 'as' => 'remote.configuration', 'uses' => 'Remote\RemoteController@getConfiguration', From 1679d866a5c0f1012f416f97046f6f3386944acf Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 27 Jan 2017 16:47:50 -0500 Subject: [PATCH 170/171] Improved gzip detection --- app/Repositories/ServiceRepository/Pack.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Repositories/ServiceRepository/Pack.php b/app/Repositories/ServiceRepository/Pack.php index 3cf8588e..03858ed6 100644 --- a/app/Repositories/ServiceRepository/Pack.php +++ b/app/Repositories/ServiceRepository/Pack.php @@ -60,8 +60,8 @@ class Pack throw new DisplayException('The file provided does not appear to be valid.'); } - if ($data['file_upload']->getMimeType() !== 'application/gzip') { - throw new DisplayException('The file provided does not meet the required filetype of application/gzip.'); + if (! in_array($data['file_upload']->getMimeType(), ['application/gzip', 'application/x-gzip'])) { + throw new DisplayException('The file provided (' . $data['file_upload']->getMimeType() . ') does not meet the required filetype of application/gzip.'); } } From e5ed1c7f6af9510f0be36dbab5494091a513b68c Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 31 Jan 2017 20:04:34 -0500 Subject: [PATCH 171/171] =?UTF-8?q?One=20day=20eslint=20will=20have=20a=20?= =?UTF-8?q?PHP=20counterpart=20that=20works=20in=20Atom...=20=F0=9F=A4=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Daemon/PackController.php | 17 ++++++++--------- app/Repositories/ServerRepository.php | 1 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/Daemon/PackController.php b/app/Http/Controllers/Daemon/PackController.php index 245b8862..e96aa6ee 100644 --- a/app/Http/Controllers/Daemon/PackController.php +++ b/app/Http/Controllers/Daemon/PackController.php @@ -40,7 +40,7 @@ class PackController extends Controller } /** - * Pulls an install pack archive from the system + * Pulls an install pack archive from the system. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response @@ -49,12 +49,12 @@ class PackController extends Controller { $pack = Models\ServicePack::where('uuid', $uuid)->first(); - if (!$pack) { - return response()->json([ 'error' => 'No such pack.' ], 404); + if (! $pack) { + return response()->json(['error' => 'No such pack.'], 404); } if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) { - return response()->json([ 'error' => 'There is no archive available for this pack.' ], 503); + return response()->json(['error' => 'There is no archive available for this pack.'], 503); } return response()->download(storage_path('app/packs/' . $pack->uuid . '/archive.tar.gz')); @@ -70,12 +70,12 @@ class PackController extends Controller { $pack = Models\ServicePack::where('uuid', $uuid)->first(); - if (!$pack) { - return response()->json([ 'error' => 'No such pack.' ], 404); + if (! $pack) { + return response()->json(['error' => 'No such pack.'], 404); } if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) { - return response()->json([ 'error' => 'There is no archive available for this pack.' ], 503); + return response()->json(['error' => 'There is no archive available for this pack.'], 503); } return response()->json([ @@ -84,13 +84,12 @@ class PackController extends Controller } /** - * Pulls an update pack archive from the system + * Pulls an update pack archive from the system. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function pullUpdate(Request $request) { - } } diff --git a/app/Repositories/ServerRepository.php b/app/Repositories/ServerRepository.php index 324e1f47..beb5d94a 100644 --- a/app/Repositories/ServerRepository.php +++ b/app/Repositories/ServerRepository.php @@ -786,6 +786,7 @@ class ServerRepository } $server->delete(); + return DB::commit(); } catch (\Exception $ex) { DB::rollBack();