From ae337d921644b41a0b5f17fa0a5568e78fff582d Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 30 Jun 2017 21:42:12 -0500 Subject: [PATCH 01/28] Bump version for release --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index 3c3fb772d..c049872c5 100644 --- a/config/app.php +++ b/config/app.php @@ -4,7 +4,7 @@ return [ 'env' => env('APP_ENV', 'production'), - 'version' => env('APP_VERSION', 'canary'), + 'version' => env('APP_VERSION', '0.6.4'), /* |-------------------------------------------------------------------------- From 58c16e706d3eb98ce28963b6e12243b0e8fc6ddb Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 17 Feb 2018 17:02:21 -0600 Subject: [PATCH 02/28] Bump for stable release :100: --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index 03742244b..1376becd6 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => 'canary', + 'version' => '0.7.0', /* |-------------------------------------------------------------------------- From 5d1d8a73988e5624915dad42e97931bbd5a7e126 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 18 Feb 2018 15:18:21 -0600 Subject: [PATCH 03/28] Bump for release --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index c1c94fa61..b1f233eb6 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => 'canary', + 'version' => '0.7.1', /* |-------------------------------------------------------------------------- From 2460d99eb64ded1758f8a2f05fa3e8d4471bc4d7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 24 Feb 2018 16:28:05 -0600 Subject: [PATCH 04/28] bump for release --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index c1c94fa61..bb4b66015 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => 'canary', + 'version' => '0.7.2', /* |-------------------------------------------------------------------------- From 301ff759957770ff56bc9d515a8203634a7e0ea1 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 25 Feb 2018 16:23:16 -0600 Subject: [PATCH 05/28] bump for release --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index c1c94fa61..50ab9f19c 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => 'canary', + 'version' => '0.7.3', /* |-------------------------------------------------------------------------- From 95c1fe4fb726219a2c49e956e0023e6a995886eb Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 2 Mar 2018 21:28:30 -0600 Subject: [PATCH 06/28] bump for release :+1: --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index c1c94fa61..f95d7162d 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => 'canary', + 'version' => '0.7.4', /* |-------------------------------------------------------------------------- From 58e0dac4f9a584b00bba89527e52fc6b53a4973b Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 2 Mar 2018 23:14:24 -0600 Subject: [PATCH 07/28] Bump for hotfix --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index c1c94fa61..74c1b0266 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => 'canary', + 'version' => '0.7.4.1', /* |-------------------------------------------------------------------------- From 4e3dd288250dc774d985050c86ea10bc9eb30c5e Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 3 Mar 2018 22:24:52 -0600 Subject: [PATCH 08/28] bump for release --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index c1c94fa61..fe5ed34ca 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => 'canary', + 'version' => '0.7.5', /* |-------------------------------------------------------------------------- From e57fbd3fb4ca6865a9ed34cac7a3773d21200a8b Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 10 Mar 2018 15:20:27 -0600 Subject: [PATCH 09/28] Bump for release --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index c1c94fa61..12034dd00 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => 'canary', + 'version' => '0.7.6', /* |-------------------------------------------------------------------------- From 86c8ecdcdf1520729ab48e37e310faf38bef18d6 Mon Sep 17 00:00:00 2001 From: stanjg Date: Fri, 4 May 2018 15:02:51 +0200 Subject: [PATCH 10/28] Added the actual logic --- app/Http/Kernel.php | 2 ++ app/Http/Middleware/MaintenanceMiddleware.php | 27 ++++++++++++++++ app/Models/Node.php | 5 ++- app/Providers/RouteServiceProvider.php | 2 +- ..._05_04_123826_add_maintenance_to_nodes.php | 32 +++++++++++++++++++ resources/lang/en/base.php | 5 +++ .../pterodactyl/errors/maintenance.blade.php | 30 +++++++++++++++++ 7 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 app/Http/Middleware/MaintenanceMiddleware.php create mode 100644 database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php create mode 100644 resources/themes/pterodactyl/errors/maintenance.blade.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index b6d44530e..db01e70c3 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -2,6 +2,7 @@ namespace Pterodactyl\Http; +use Pterodactyl\Http\Middleware\MaintenanceMiddleware; use Pterodactyl\Models\ApiKey; use Illuminate\Auth\Middleware\Authorize; use Illuminate\Auth\Middleware\Authenticate; @@ -108,6 +109,7 @@ class Kernel extends HttpKernel 'can' => Authorize::class, 'bindings' => SubstituteBindings::class, 'recaptcha' => VerifyReCaptcha::class, + 'maintenance' => MaintenanceMiddleware::class, // Server specific middleware (used for authenticating access to resources) // diff --git a/app/Http/Middleware/MaintenanceMiddleware.php b/app/Http/Middleware/MaintenanceMiddleware.php new file mode 100644 index 000000000..493582809 --- /dev/null +++ b/app/Http/Middleware/MaintenanceMiddleware.php @@ -0,0 +1,27 @@ +attributes->get('server'); + $node = $server->node; + + if ($node->maintenance) { + return response(view('errors.maintenance')); + } + + return $next($request); + } +} diff --git a/app/Models/Node.php b/app/Models/Node.php index 26d9eb443..ea0258e8f 100644 --- a/app/Models/Node.php +++ b/app/Models/Node.php @@ -48,6 +48,7 @@ class Node extends Model implements CleansAttributes, ValidableContract 'daemonSFTP' => 'integer', 'behind_proxy' => 'boolean', 'public' => 'boolean', + 'maintenance' => 'boolean', ]; /** @@ -62,7 +63,7 @@ class Node extends Model implements CleansAttributes, ValidableContract 'disk_overallocate', 'upload_size', 'daemonSecret', 'daemonBase', 'daemonSFTP', 'daemonListen', - 'description', + 'description', 'maintenance', ]; /** @@ -111,6 +112,7 @@ class Node extends Model implements CleansAttributes, ValidableContract 'daemonBase' => 'regex:/^([\/][\d\w.\-\/]+)$/', 'daemonSFTP' => 'numeric|between:1024,65535', 'daemonListen' => 'numeric|between:1024,65535', + 'maintenance' => 'boolean', ]; /** @@ -126,6 +128,7 @@ class Node extends Model implements CleansAttributes, ValidableContract 'daemonBase' => '/srv/daemon-data', 'daemonSFTP' => 2022, 'daemonListen' => 8080, + 'maintenance' => false, ]; /** diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 3de307d9a..3604b3d79 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -33,7 +33,7 @@ class RouteServiceProvider extends ServiceProvider ->namespace($this->namespace . '\Auth') ->group(base_path('routes/auth.php')); - Route::middleware(['web', 'csrf', 'auth', 'server', 'subuser.auth'])->prefix('/server/{server}') + Route::middleware(['web', 'csrf', 'auth', 'server', 'subuser.auth', 'maintenance'])->prefix('/server/{server}') ->namespace($this->namespace . '\Server') ->group(base_path('routes/server.php')); diff --git a/database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php b/database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php new file mode 100644 index 000000000..6c55912aa --- /dev/null +++ b/database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php @@ -0,0 +1,32 @@ +boolean('maintenance')->after('behind_proxy')->default(false); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('nodes', function (Blueprint $table) { + $table->dropColumn('maintenance'); + }); + } +} diff --git a/resources/lang/en/base.php b/resources/lang/en/base.php index ee3fb1f37..1603f4a17 100644 --- a/resources/lang/en/base.php +++ b/resources/lang/en/base.php @@ -21,6 +21,11 @@ return [ 'header' => 'Server Suspended', 'desc' => 'This server has been suspended and cannot be accessed.', ], + 'maintenance' => [ + 'header' => 'Node Under Maintenance', + 'title' => 'Maintenance', + 'desc' => 'This node is under maintenance, therefore your server can temporarily not be accessed.' + ], ], 'index' => [ 'header' => 'Your Servers', diff --git a/resources/themes/pterodactyl/errors/maintenance.blade.php b/resources/themes/pterodactyl/errors/maintenance.blade.php new file mode 100644 index 000000000..97bb810e5 --- /dev/null +++ b/resources/themes/pterodactyl/errors/maintenance.blade.php @@ -0,0 +1,30 @@ +{{-- Pterodactyl - Panel --}} +{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} + +{{-- This software is licensed under the terms of the MIT license. --}} +{{-- https://opensource.org/licenses/MIT --}} +@extends('layouts.error') + +@section('title') + @lang('base.errors.maintenance.header') +@endsection + +@section('content-header') +@endsection + +@section('content') +
+
+
+
+

@lang('base.errors.maintenance.title')

+

@lang('base.errors.maintenance.desc')

+
+ +
+
+
+@endsection From baea1d61912d16ae76bc0841142d820cb706e6a9 Mon Sep 17 00:00:00 2001 From: stanjg Date: Fri, 4 May 2018 15:13:34 +0200 Subject: [PATCH 11/28] Added the option to toggle, and made it display on the details page --- .../pterodactyl/admin/nodes/view/index.blade.php | 11 +++++++++++ .../admin/nodes/view/settings.blade.php | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/resources/themes/pterodactyl/admin/nodes/view/index.blade.php b/resources/themes/pterodactyl/admin/nodes/view/index.blade.php index 76a2ca627..2880fba51 100644 --- a/resources/themes/pterodactyl/admin/nodes/view/index.blade.php +++ b/resources/themes/pterodactyl/admin/nodes/view/index.blade.php @@ -96,6 +96,17 @@
+ @if($node->maintenance) +
+
+ +
+ This node is under + Maintenance +
+
+
+ @endif
diff --git a/resources/themes/pterodactyl/admin/nodes/view/settings.blade.php b/resources/themes/pterodactyl/admin/nodes/view/settings.blade.php index 919ad958b..ba9a952b7 100644 --- a/resources/themes/pterodactyl/admin/nodes/view/settings.blade.php +++ b/resources/themes/pterodactyl/admin/nodes/view/settings.blade.php @@ -108,6 +108,20 @@

If you are running the daemon behind a proxy such as Cloudflare, select this to have the daemon skip looking for certificates on boot.

+
+ +
+
+ maintenance) == false) ? 'checked' : '' }}> + +
+
+ maintenance) == true) ? 'checked' : '' }}> + +
+
+

If the node is marked as 'Under Maintenance' users won't be able to access servers that are on this node.

+
From f39720f15db760e05a49c691d8b545d196e6592b Mon Sep 17 00:00:00 2001 From: stanjg Date: Fri, 4 May 2018 15:16:14 +0200 Subject: [PATCH 12/28] Made it display 'maintenance' on the index page --- resources/themes/pterodactyl/base/index.blade.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/resources/themes/pterodactyl/base/index.blade.php b/resources/themes/pterodactyl/base/index.blade.php index 95cce6128..09596298c 100644 --- a/resources/themes/pterodactyl/base/index.blade.php +++ b/resources/themes/pterodactyl/base/index.blade.php @@ -64,9 +64,15 @@ @lang('strings.subuser') @endif - - - + @if($server->node->maintenance) + + Maintenance + + @else + + + + @endif @if (! empty($server->description)) From 93a7d11c28d8423741b6d01d57e6dfaf5de97e0e Mon Sep 17 00:00:00 2001 From: stanjg Date: Fri, 4 May 2018 18:45:37 +0200 Subject: [PATCH 13/28] Made a base --- .../Admin/StatisticsController.php | 59 ++++++++++ public/themes/pterodactyl/css/pterodactyl.css | 4 + .../themes/pterodactyl/js/admin/statistics.js | 101 +++++++++++++++++ .../pterodactyl/admin/statistics.blade.php | 103 ++++++++++++++++++ .../pterodactyl/layouts/admin.blade.php | 5 + routes/admin.php | 1 + 6 files changed, 273 insertions(+) create mode 100644 app/Http/Controllers/Admin/StatisticsController.php create mode 100644 public/themes/pterodactyl/js/admin/statistics.js create mode 100644 resources/themes/pterodactyl/admin/statistics.blade.php diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php new file mode 100644 index 000000000..499b52cd4 --- /dev/null +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -0,0 +1,59 @@ +sum('memory'); + $totalNodeRam = DB::table('nodes')->sum('memory'); + $totalServerDisk = DB::table('servers')->sum('disk'); + $totalNodeDisk = DB::table('nodes')->sum('disk'); + $totalAllocations = Allocation::count(); + + $suspendedServersCount = Server::where('suspended', true)->count(); + + Javascript::put([ + 'servers' => Server::all(), + 'serverCount' => $serversCount, + 'suspendedServers' => $suspendedServersCount, + 'totalServerRam' => $totalServerRam, + 'totalNodeRam' => $totalNodeRam, + 'totalServerDisk' => $totalServerDisk, + 'totalNodeDisk' => $totalNodeDisk, + ]); + + return view('admin.statistics', [ + 'serversCount' => $serversCount, + 'nodesCount' => $nodesCount, + 'usersCount' => $usersCount, + 'eggsCount' => $eggsCount, + 'totalServerRam' => $totalServerRam, + 'databasesCount' => $databasesCount, + 'totalNodeRam' => $totalNodeRam, + 'totalNodeDisk' => $totalNodeDisk, + 'totalServerDisk' => $totalServerDisk, + 'totalAllocations' => $totalAllocations, + ]); + } + +} diff --git a/public/themes/pterodactyl/css/pterodactyl.css b/public/themes/pterodactyl/css/pterodactyl.css index 9e7e6a822..41f163f3b 100644 --- a/public/themes/pterodactyl/css/pterodactyl.css +++ b/public/themes/pterodactyl/css/pterodactyl.css @@ -473,3 +473,7 @@ label.control-label > span.field-optional:before { height: 42px; width: auto; } + +.number-info-box-content { + padding: 15px 10px 0; +} diff --git a/public/themes/pterodactyl/js/admin/statistics.js b/public/themes/pterodactyl/js/admin/statistics.js new file mode 100644 index 000000000..b5bdbe4a1 --- /dev/null +++ b/public/themes/pterodactyl/js/admin/statistics.js @@ -0,0 +1,101 @@ +var freeDisk = Pterodactyl.totalNodeDisk - Pterodactyl.totalServerDisk; +let diskChart = new Chart($('#disk_chart'), { + type: 'pie', + data: { + labels: ['Free Disk', 'Used Disk'], + datasets: [ + { + label: 'Disk in MBs', + backgroundColor: ['#51B060', '#ff0000'], + data: [freeDisk, Pterodactyl.totalServerDisk] + } + ] + } +}); + +var freeRam = Pterodactyl.totalNodeRam - Pterodactyl.totalServerRam; +let ramChart = new Chart($('#ram_chart'), { + type: 'pie', + data: { + labels: ['Free RAM', 'Used RAM'], + datasets: [ + { + label: 'RAM in MBs', + backgroundColor: ['#51B060', '#ff0000'], + data: [freeRam, Pterodactyl.totalServerRam] + } + ] + } +}); + +var activeServers = Pterodactyl.serverCount - Pterodactyl.suspendedServers; +let serversChart = new Chart($('#servers_chart'), { + type: 'pie', + data: { + labels: ['Active', 'Suspended'], + datasets: [ + { + label: 'Servers', + backgroundColor: ['#51B060', '#E08E0B'], + data: [activeServers, Pterodactyl.suspendedServers] + } + ] + } +}); + +let statusChart = new Chart($('#status_chart'), { + type: 'pie', + data: { + labels: ['Online', 'Offline', 'Installing', 'Error'], + datasets: [ + { + label: '', + backgroundColor: ['#51B060', '#b7b7b7', '#E08E0B', '#ff0000'], + data: [0,0,0,0] + } + ] + } +}); + +var servers = Pterodactyl.servers; +servers.forEach(function (server) { + $.ajax({ + type: 'GET', + url: Router.route('index.status', { server: server.uuidShort}), + timeout: 5000, + headers: { + 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content'), + } + }).done(function (data) { + + if (typeof data.status === 'undefined') { + // Error + statusChart.data.datasets[0].data[3]++; + return; + } + + switch (data.status) { + case 0: + case 3: + case 30: + // Offline + statusChart.data.datasets[0].data[1]++; + break; + case 1: + case 2: + // Online + console.log('online'); + statusChart.data.datasets[0].data[0]++; + break; + case 20: + // Installing + statusChart.data.datasets[0].data[2]++; + break; + } + statusChart.update(); + }).fail(function (jqXHR) { + // Error + statusChart.data.datasets[0].data[3]++; + statusChart.update(); + }); +}); \ No newline at end of file diff --git a/resources/themes/pterodactyl/admin/statistics.blade.php b/resources/themes/pterodactyl/admin/statistics.blade.php new file mode 100644 index 000000000..0579093af --- /dev/null +++ b/resources/themes/pterodactyl/admin/statistics.blade.php @@ -0,0 +1,103 @@ +@extends('layouts.admin') +@include('partials/admin.settings.nav', ['activeTab' => 'basic']) + +@section('title') + Statistics Overview +@endsection + +@section('content-header') +

Statistics OverviewMonitor your panel usage.

+ +@endsection + +@section('content') +
+
+
+
+ Servers +
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+ Servers + {{ $serversCount }} +
+
+
+ +
+ Total used RAM + {{ $totalServerRam }}MB +
+
+
+ +
+ Total used disk space + {{ $totalServerDisk }}MB +
+
+
+
+
+
+
+
+ Nodes +
+ +
+ +
+
+ +
+
+
+
+
+
+ +
+ Total RAM + {{ $totalNodeRam }}MB +
+
+
+ +
+ Total Disk Space + {{ $totalNodeDisk }}MB +
+
+
+ +
+ Total Allocations + {{ $totalAllocations }} +
+
+
+
+@endsection + +@section('footer-scripts') + @parent + {!! Theme::js('vendor/chartjs/chart.min.js') !!} + {!! Theme::js('js/admin/statistics.js') !!} +@endsection \ No newline at end of file diff --git a/resources/themes/pterodactyl/layouts/admin.blade.php b/resources/themes/pterodactyl/layouts/admin.blade.php index d67eb6b41..aaf8f4cac 100644 --- a/resources/themes/pterodactyl/layouts/admin.blade.php +++ b/resources/themes/pterodactyl/layouts/admin.blade.php @@ -80,6 +80,11 @@ Overview +
  • + + Statistics + +
  • Settings diff --git a/routes/admin.php b/routes/admin.php index 7dfa94f09..70ba7e3d1 100644 --- a/routes/admin.php +++ b/routes/admin.php @@ -1,6 +1,7 @@ name('admin.index'); +Route::get('/statistics', 'StatisticsController@index')->name('admin.statistics'); /* |-------------------------------------------------------------------------- From 28a97fea54351d8d00f64220483688202b9efd07 Mon Sep 17 00:00:00 2001 From: stanjg Date: Fri, 4 May 2018 22:48:43 +0200 Subject: [PATCH 14/28] Polished it up --- .../Admin/StatisticsController.php | 22 ++++++++++- .../themes/pterodactyl/js/admin/statistics.js | 30 ++++++++++++--- .../pterodactyl/admin/statistics.blade.php | 38 +++++++++++++++++++ 3 files changed, 84 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index 499b52cd4..119adb086 100644 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -12,13 +12,22 @@ use Pterodactyl\Models\Server; use Pterodactyl\Models\User; use JavaScript; use Illuminate\Support\Facades\DB; +use Pterodactyl\Services\DaemonKeys\DaemonKeyProviderService; class StatisticsController extends Controller { + private $keyProviderService; + + function __construct(DaemonKeyProviderService $keyProviderService) + { + $this->keyProviderService = $keyProviderService; + } + public function index(Request $request) { $servers = Server::all(); + $nodes = Node::all(); $serversCount = count($servers); $nodesCount = Node::count(); $usersCount = User::count(); @@ -29,17 +38,26 @@ class StatisticsController extends Controller $totalServerDisk = DB::table('servers')->sum('disk'); $totalNodeDisk = DB::table('nodes')->sum('disk'); $totalAllocations = Allocation::count(); + $totalUsersCount = User::count(); + $totalDBCount = Database::count(); $suspendedServersCount = Server::where('suspended', true)->count(); + $tokens = []; + foreach ($nodes as $node) { + $tokens[$node->id] = $this->keyProviderService->handle($node->servers->get(0), $request->user()); + } + Javascript::put([ - 'servers' => Server::all(), + 'servers' => $servers, 'serverCount' => $serversCount, 'suspendedServers' => $suspendedServersCount, 'totalServerRam' => $totalServerRam, 'totalNodeRam' => $totalNodeRam, 'totalServerDisk' => $totalServerDisk, 'totalNodeDisk' => $totalNodeDisk, + 'nodes' => $nodes, + 'tokens' => $tokens, ]); return view('admin.statistics', [ @@ -53,6 +71,8 @@ class StatisticsController extends Controller 'totalNodeDisk' => $totalNodeDisk, 'totalServerDisk' => $totalServerDisk, 'totalAllocations' => $totalAllocations, + 'totalUsersCount' => $totalUsersCount, + 'totalDBCount' => $totalDBCount, ]); } diff --git a/public/themes/pterodactyl/js/admin/statistics.js b/public/themes/pterodactyl/js/admin/statistics.js index b5bdbe4a1..f2c1c13dd 100644 --- a/public/themes/pterodactyl/js/admin/statistics.js +++ b/public/themes/pterodactyl/js/admin/statistics.js @@ -58,13 +58,25 @@ let statusChart = new Chart($('#status_chart'), { }); var servers = Pterodactyl.servers; -servers.forEach(function (server) { +var nodes = Pterodactyl.nodes; + +for (let i = 0; i < servers.length; i++) { + setTimeout(getStatus, 200 * i); +} + +var index = 0; +function getStatus() { + var server = servers[index]; + var uuid = server.uuid; + var node = getNodeByID(server.node_id); + $.ajax({ type: 'GET', - url: Router.route('index.status', { server: server.uuidShort}), + url: node.scheme + '://' + node.fqdn + ':'+node.daemonListen+'/v1/server', timeout: 5000, headers: { - 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content'), + 'X-Access-Server': uuid, + 'X-Access-Token': Pterodactyl.tokens[node.id], } }).done(function (data) { @@ -84,7 +96,6 @@ servers.forEach(function (server) { case 1: case 2: // Online - console.log('online'); statusChart.data.datasets[0].data[0]++; break; case 20: @@ -98,4 +109,13 @@ servers.forEach(function (server) { statusChart.data.datasets[0].data[3]++; statusChart.update(); }); -}); \ No newline at end of file + + index++; +} + +function getNodeByID(id) { + for (var i = 0; i < nodes.length; i++) { + if (nodes[i].id === id) + return nodes[i]; + } +} \ No newline at end of file diff --git a/resources/themes/pterodactyl/admin/statistics.blade.php b/resources/themes/pterodactyl/admin/statistics.blade.php index 0579093af..e8e7cc255 100644 --- a/resources/themes/pterodactyl/admin/statistics.blade.php +++ b/resources/themes/pterodactyl/admin/statistics.blade.php @@ -94,6 +94,44 @@ +
    +
    +
    + +
    + Total Eggs + {{ $eggsCount }} +
    +
    +
    +
    +
    + +
    + Total Users + {{ $totalUsersCount }} +
    +
    +
    +
    +
    + +
    + Total Nodes + {{ $nodesCount }} +
    +
    +
    +
    +
    + +
    + Total Databases + {{ $totalDBCount }} +
    +
    +
    +
    @endsection @section('footer-scripts') From ee50da0a7c2538fa7ed337424833b431d54280b3 Mon Sep 17 00:00:00 2001 From: stanjg Date: Fri, 4 May 2018 23:35:45 +0200 Subject: [PATCH 15/28] Fixed a typo --- resources/themes/pterodactyl/admin/statistics.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/themes/pterodactyl/admin/statistics.blade.php b/resources/themes/pterodactyl/admin/statistics.blade.php index e8e7cc255..dff5019e4 100644 --- a/resources/themes/pterodactyl/admin/statistics.blade.php +++ b/resources/themes/pterodactyl/admin/statistics.blade.php @@ -60,14 +60,14 @@
    Nodes
    - +
    - +
    From 06a67bb4bb2a786132f4731a14168446eb403356 Mon Sep 17 00:00:00 2001 From: stanjg Date: Sat, 5 May 2018 10:39:20 +0200 Subject: [PATCH 16/28] Cleaned up some duplicate code --- app/Http/Controllers/Admin/StatisticsController.php | 4 ---- resources/themes/pterodactyl/admin/statistics.blade.php | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index 119adb086..a3777e4e7 100644 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -38,8 +38,6 @@ class StatisticsController extends Controller $totalServerDisk = DB::table('servers')->sum('disk'); $totalNodeDisk = DB::table('nodes')->sum('disk'); $totalAllocations = Allocation::count(); - $totalUsersCount = User::count(); - $totalDBCount = Database::count(); $suspendedServersCount = Server::where('suspended', true)->count(); @@ -71,8 +69,6 @@ class StatisticsController extends Controller 'totalNodeDisk' => $totalNodeDisk, 'totalServerDisk' => $totalServerDisk, 'totalAllocations' => $totalAllocations, - 'totalUsersCount' => $totalUsersCount, - 'totalDBCount' => $totalDBCount, ]); } diff --git a/resources/themes/pterodactyl/admin/statistics.blade.php b/resources/themes/pterodactyl/admin/statistics.blade.php index dff5019e4..46e112336 100644 --- a/resources/themes/pterodactyl/admin/statistics.blade.php +++ b/resources/themes/pterodactyl/admin/statistics.blade.php @@ -109,7 +109,7 @@
    Total Users - {{ $totalUsersCount }} + {{ $usersCount }}
    @@ -127,7 +127,7 @@
    Total Databases - {{ $totalDBCount }} + {{ $databasesCount }}
    From 095d85bb60cb283596ff7879bcc567924157da53 Mon Sep 17 00:00:00 2001 From: stanjg Date: Sun, 6 May 2018 17:59:11 +0200 Subject: [PATCH 17/28] Added the server as argument, and improved the bug fix --- app/Http/Controllers/Admin/StatisticsController.php | 12 ++++++++---- public/themes/pterodactyl/js/admin/statistics.js | 11 ++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index a3777e4e7..aedca3d6b 100644 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -3,6 +3,8 @@ namespace Pterodactyl\Http\Controllers\Admin; use Illuminate\Http\Request; +use Illuminate\Support\Facades\DB; +use JavaScript; use Pterodactyl\Http\Controllers\Controller; use Pterodactyl\Models\Allocation; use Pterodactyl\Models\Database; @@ -10,8 +12,6 @@ use Pterodactyl\Models\Egg; use Pterodactyl\Models\Node; use Pterodactyl\Models\Server; use Pterodactyl\Models\User; -use JavaScript; -use Illuminate\Support\Facades\DB; use Pterodactyl\Services\DaemonKeys\DaemonKeyProviderService; class StatisticsController extends Controller @@ -29,7 +29,7 @@ class StatisticsController extends Controller $servers = Server::all(); $nodes = Node::all(); $serversCount = count($servers); - $nodesCount = Node::count(); + $nodesCount = count($nodes); $usersCount = User::count(); $eggsCount = Egg::count(); $databasesCount = Database::count(); @@ -43,7 +43,11 @@ class StatisticsController extends Controller $tokens = []; foreach ($nodes as $node) { - $tokens[$node->id] = $this->keyProviderService->handle($node->servers->get(0), $request->user()); + $server = Server::where('node_id', $node->id)->first(); + if ($server == null) + continue; + + $tokens[$node->id] = $this->keyProviderService->handle($server, $request->user()); } Javascript::put([ diff --git a/public/themes/pterodactyl/js/admin/statistics.js b/public/themes/pterodactyl/js/admin/statistics.js index f2c1c13dd..12f4277bd 100644 --- a/public/themes/pterodactyl/js/admin/statistics.js +++ b/public/themes/pterodactyl/js/admin/statistics.js @@ -61,12 +61,10 @@ var servers = Pterodactyl.servers; var nodes = Pterodactyl.nodes; for (let i = 0; i < servers.length; i++) { - setTimeout(getStatus, 200 * i); + setTimeout(getStatus, 200 * i, servers[i]); } -var index = 0; -function getStatus() { - var server = servers[index]; +function getStatus(server) { var uuid = server.uuid; var node = getNodeByID(server.node_id); @@ -109,13 +107,12 @@ function getStatus() { statusChart.data.datasets[0].data[3]++; statusChart.update(); }); - - index++; } function getNodeByID(id) { for (var i = 0; i < nodes.length; i++) { - if (nodes[i].id === id) + if (nodes[i].id === id) { return nodes[i]; + } } } \ No newline at end of file From 5a9d76a7e10c06c7a2ac434260025c5f172eba6f Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 May 2018 10:35:20 -0700 Subject: [PATCH 18/28] Revert "Merge branch 'master' into pr/1129" This reverts commit 35d108c41082eb7aa2328d0beb4366cf14cd450f, reversing changes made to f39720f15db760e05a49c691d8b545d196e6592b. --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index 70e4fe577..a7c196b3c 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => '0.7.6', + 'version' => 'canary', /* |-------------------------------------------------------------------------- From e648e50d90cf2c1893b44a5066b2774dbc0af84f Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 May 2018 11:00:28 -0700 Subject: [PATCH 19/28] Write some example tests for @stanjg --- app/Http/Middleware/MaintenanceMiddleware.php | 25 +++++-- resources/lang/en/base.php | 4 +- .../pterodactyl/errors/maintenance.blade.php | 2 +- .../Middleware/MaintenanceMiddlewareTest.php | 70 +++++++++++++++++++ 4 files changed, 94 insertions(+), 7 deletions(-) create mode 100644 tests/Unit/Http/Middleware/MaintenanceMiddlewareTest.php diff --git a/app/Http/Middleware/MaintenanceMiddleware.php b/app/Http/Middleware/MaintenanceMiddleware.php index 493582809..39f260594 100644 --- a/app/Http/Middleware/MaintenanceMiddleware.php +++ b/app/Http/Middleware/MaintenanceMiddleware.php @@ -3,23 +3,40 @@ namespace Pterodactyl\Http\Middleware; use Closure; +use Illuminate\Contracts\Routing\ResponseFactory; class MaintenanceMiddleware { + /** + * @var \Illuminate\Contracts\Routing\ResponseFactory + */ + private $response; + + /** + * MaintenanceMiddleware constructor. + * + * @param \Illuminate\Contracts\Routing\ResponseFactory $response + */ + public function __construct(ResponseFactory $response) + { + $this->response = $response; + } + /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param \Illuminate\Http\Request $request + * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { + /** @var \Pterodactyl\Models\Server $server */ $server = $request->attributes->get('server'); - $node = $server->node; + $node = $server->getRelation('node'); if ($node->maintenance) { - return response(view('errors.maintenance')); + return $this->response->view('errors.maintenance'); } return $next($request); diff --git a/resources/lang/en/base.php b/resources/lang/en/base.php index 579aa1080..01ac79b1e 100644 --- a/resources/lang/en/base.php +++ b/resources/lang/en/base.php @@ -23,8 +23,8 @@ return [ ], 'maintenance' => [ 'header' => 'Node Under Maintenance', - 'title' => 'Maintenance', - 'desc' => 'This node is under maintenance, therefore your server can temporarily not be accessed.' + 'title' => 'Temporarily Unavailable', + 'desc' => 'This node is under maintenance, therefore your server can temporarily not be accessed.', ], ], 'index' => [ diff --git a/resources/themes/pterodactyl/errors/maintenance.blade.php b/resources/themes/pterodactyl/errors/maintenance.blade.php index 97bb810e5..8cc8eea27 100644 --- a/resources/themes/pterodactyl/errors/maintenance.blade.php +++ b/resources/themes/pterodactyl/errors/maintenance.blade.php @@ -17,7 +17,7 @@
    -

    @lang('base.errors.maintenance.title')

    +

    @lang('base.errors.maintenance.title')

    @lang('base.errors.maintenance.desc')

    @@ -118,7 +118,7 @@
    Total Nodes - {{ $nodesCount }} + {{ count($nodes) }}
    diff --git a/tests/Unit/Http/Controllers/Admin/StatisticsControllerTest.php b/tests/Unit/Http/Controllers/Admin/StatisticsControllerTest.php new file mode 100644 index 000000000..f3a20f8ac --- /dev/null +++ b/tests/Unit/Http/Controllers/Admin/StatisticsControllerTest.php @@ -0,0 +1,113 @@ +allocationRepository = m::mock(AllocationRepositoryInterface::class); + $this->databaseRepository = m::mock(DatabaseRepositoryInterface::class); + $this->eggRepository = m::mock(EggRepositoryInterface::class); + $this->nodeRepository = m::mock(NodeRepositoryInterface::class); + $this->serverRepository = m::mock(ServerRepositoryInterface::class); + $this->userRepository = m::mock(UserRepositoryInterface::class); + } + + public function testIndexController() + { + $controller = $this->getController(); + + $this->serverRepository->shouldReceive('all')->withNoArgs(); + $this->nodeRepository->shouldReceive('all')->withNoArgs()->andReturn(collect([factory(Node::class)->make(), factory(Node::class)->make()])); + $this->userRepository->shouldReceive('count')->withNoArgs(); + $this->eggRepository->shouldReceive('count')->withNoArgs(); + $this->databaseRepository->shouldReceive('count')->withNoArgs(); + $this->allocationRepository->shouldReceive('count')->withNoArgs(); + $this->serverRepository->shouldReceive('getSuspendedServersCount')->withNoArgs(); + + $this->nodeRepository->shouldReceive('getUsageStatsRaw')->twice()->andReturn([ + 'memory' => [ + 'value' => 1024, + 'max' => 512, + ], + 'disk' => [ + 'value' => 1024, + 'max' => 512, + ] + ]); + + $controller->shouldReceive('injectJavascript')->once(); + + $response = $controller->index(); + + $this->assertIsViewResponse($response); + $this->assertViewNameEquals('admin.statistics', $response); + } + + private function getController() + { + return $this->buildMockedController(StatisticsController::class, [$this->allocationRepository, + $this->databaseRepository, + $this->eggRepository, + $this->nodeRepository, + $this->serverRepository, + $this->userRepository] + ); + } + +} \ No newline at end of file From 013dde75ae237422cddc8abbe9183b8274b6e44a Mon Sep 17 00:00:00 2001 From: stanjg Date: Thu, 31 May 2018 16:34:35 +0200 Subject: [PATCH 23/28] Renamed the field and made some improvements --- app/Http/Middleware/MaintenanceMiddleware.php | 2 +- app/Models/Node.php | 8 ++++---- .../2018_05_04_123826_add_maintenance_to_nodes.php | 4 ++-- resources/lang/en/strings.php | 1 + .../themes/pterodactyl/admin/nodes/index.blade.php | 2 +- .../pterodactyl/admin/nodes/view/index.blade.php | 2 +- .../pterodactyl/admin/nodes/view/settings.blade.php | 10 +++++----- resources/themes/pterodactyl/base/index.blade.php | 4 ++-- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/Http/Middleware/MaintenanceMiddleware.php b/app/Http/Middleware/MaintenanceMiddleware.php index 39f260594..c67a3f051 100644 --- a/app/Http/Middleware/MaintenanceMiddleware.php +++ b/app/Http/Middleware/MaintenanceMiddleware.php @@ -35,7 +35,7 @@ class MaintenanceMiddleware $server = $request->attributes->get('server'); $node = $server->getRelation('node'); - if ($node->maintenance) { + if ($node->maintenance_mode) { return $this->response->view('errors.maintenance'); } diff --git a/app/Models/Node.php b/app/Models/Node.php index ea0258e8f..2643d062a 100644 --- a/app/Models/Node.php +++ b/app/Models/Node.php @@ -48,7 +48,7 @@ class Node extends Model implements CleansAttributes, ValidableContract 'daemonSFTP' => 'integer', 'behind_proxy' => 'boolean', 'public' => 'boolean', - 'maintenance' => 'boolean', + 'maintenance_mode' => 'boolean', ]; /** @@ -63,7 +63,7 @@ class Node extends Model implements CleansAttributes, ValidableContract 'disk_overallocate', 'upload_size', 'daemonSecret', 'daemonBase', 'daemonSFTP', 'daemonListen', - 'description', 'maintenance', + 'description', 'maintenance_mode', ]; /** @@ -112,7 +112,7 @@ class Node extends Model implements CleansAttributes, ValidableContract 'daemonBase' => 'regex:/^([\/][\d\w.\-\/]+)$/', 'daemonSFTP' => 'numeric|between:1024,65535', 'daemonListen' => 'numeric|between:1024,65535', - 'maintenance' => 'boolean', + 'maintenance_mode' => 'boolean', ]; /** @@ -128,7 +128,7 @@ class Node extends Model implements CleansAttributes, ValidableContract 'daemonBase' => '/srv/daemon-data', 'daemonSFTP' => 2022, 'daemonListen' => 8080, - 'maintenance' => false, + 'maintenance_mode' => false, ]; /** diff --git a/database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php b/database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php index 6c55912aa..799f1df23 100644 --- a/database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php +++ b/database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php @@ -14,7 +14,7 @@ class AddMaintenanceToNodes extends Migration public function up() { Schema::table('nodes', function (Blueprint $table) { - $table->boolean('maintenance')->after('behind_proxy')->default(false); + $table->boolean('maintenance_mode')->after('behind_proxy')->default(false); }); } @@ -26,7 +26,7 @@ class AddMaintenanceToNodes extends Migration public function down() { Schema::table('nodes', function (Blueprint $table) { - $table->dropColumn('maintenance'); + $table->dropColumn('maintenance_mode'); }); } } diff --git a/resources/lang/en/strings.php b/resources/lang/en/strings.php index 5b9173866..c0bf3f417 100644 --- a/resources/lang/en/strings.php +++ b/resources/lang/en/strings.php @@ -74,6 +74,7 @@ return [ 'tasks' => 'Tasks', 'seconds' => 'Seconds', 'minutes' => 'Minutes', + 'under_maintenance' => 'Under Maintenance', 'days' => [ 'sun' => 'Sunday', 'mon' => 'Monday', diff --git a/resources/themes/pterodactyl/admin/nodes/index.blade.php b/resources/themes/pterodactyl/admin/nodes/index.blade.php index abaf25e54..b4ea579a1 100644 --- a/resources/themes/pterodactyl/admin/nodes/index.blade.php +++ b/resources/themes/pterodactyl/admin/nodes/index.blade.php @@ -56,7 +56,7 @@ @foreach ($nodes as $node) -
    {{ $node->name }} + {!! $node->maintenance_mode ? ' ' : '' !!}{{ $node->name }} {{ $node->location->short }} {{ $node->memory }} MB {{ $node->disk }} MB diff --git a/resources/themes/pterodactyl/admin/nodes/view/index.blade.php b/resources/themes/pterodactyl/admin/nodes/view/index.blade.php index 5ee0a88f2..71eb346d2 100644 --- a/resources/themes/pterodactyl/admin/nodes/view/index.blade.php +++ b/resources/themes/pterodactyl/admin/nodes/view/index.blade.php @@ -96,7 +96,7 @@
    - @if($node->maintenance) + @if($node->maintenance_mode)
    diff --git a/resources/themes/pterodactyl/admin/nodes/view/settings.blade.php b/resources/themes/pterodactyl/admin/nodes/view/settings.blade.php index 0e042fab4..5afd65ed4 100644 --- a/resources/themes/pterodactyl/admin/nodes/view/settings.blade.php +++ b/resources/themes/pterodactyl/admin/nodes/view/settings.blade.php @@ -109,15 +109,15 @@

    If you are running the daemon behind a proxy such as Cloudflare, select this to have the daemon skip looking for certificates on boot.

    - +
    - maintenance) == false) ? 'checked' : '' }}> - + maintenance_mode) == false) ? 'checked' : '' }}> +
    - maintenance) == true) ? 'checked' : '' }}> - + maintenance_mode) == true) ? 'checked' : '' }}> +

    If the node is marked as 'Under Maintenance' users won't be able to access servers that are on this node.

    diff --git a/resources/themes/pterodactyl/base/index.blade.php b/resources/themes/pterodactyl/base/index.blade.php index 09596298c..28f4c4d57 100644 --- a/resources/themes/pterodactyl/base/index.blade.php +++ b/resources/themes/pterodactyl/base/index.blade.php @@ -64,9 +64,9 @@ @lang('strings.subuser') @endif - @if($server->node->maintenance) + @if($server->node->maintenance_mode) - Maintenance + @lang('strings.under_maintenance') @else From ccf3e3511f6344239dcc49ed7dbcb667c7f0461a Mon Sep 17 00:00:00 2001 From: stanjg Date: Thu, 31 May 2018 16:40:18 +0200 Subject: [PATCH 24/28] Renamed middleware, and fixed the test --- app/Http/Kernel.php | 2 +- app/Providers/RouteServiceProvider.php | 2 +- tests/Unit/Http/Middleware/MaintenanceMiddlewareTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 4221672e9..d21c8d3c8 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -109,7 +109,7 @@ class Kernel extends HttpKernel 'can' => Authorize::class, 'bindings' => SubstituteBindings::class, 'recaptcha' => VerifyReCaptcha::class, - 'maintenance' => MaintenanceMiddleware::class, + 'node.maintenance' => MaintenanceMiddleware::class, // Server specific middleware (used for authenticating access to resources) // diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 3604b3d79..f0e978116 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -33,7 +33,7 @@ class RouteServiceProvider extends ServiceProvider ->namespace($this->namespace . '\Auth') ->group(base_path('routes/auth.php')); - Route::middleware(['web', 'csrf', 'auth', 'server', 'subuser.auth', 'maintenance'])->prefix('/server/{server}') + Route::middleware(['web', 'csrf', 'auth', 'server', 'subuser.auth', 'node.maintenance'])->prefix('/server/{server}') ->namespace($this->namespace . '\Server') ->group(base_path('routes/server.php')); diff --git a/tests/Unit/Http/Middleware/MaintenanceMiddlewareTest.php b/tests/Unit/Http/Middleware/MaintenanceMiddlewareTest.php index 6b7380f3b..fedeaa0c6 100644 --- a/tests/Unit/Http/Middleware/MaintenanceMiddlewareTest.php +++ b/tests/Unit/Http/Middleware/MaintenanceMiddlewareTest.php @@ -46,7 +46,7 @@ class MaintenanceMiddlewareTest extends MiddlewareTestCase public function testHandleInMaintenanceMode() { $server = factory(Server::class)->make(); - $node = factory(Node::class)->make(['maintenance' => 1]); + $node = factory(Node::class)->make(['maintenance_mode' => 1]); $server->setRelation('node', $node); $this->setRequestAttribute('server', $server); From 6e6ce652b24d23a0050e500e326a1141a78e761e Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Thu, 31 May 2018 21:35:24 -0600 Subject: [PATCH 25/28] Fix logo-mini image (#1183) --- resources/themes/pterodactyl/layouts/master.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/pterodactyl/layouts/master.blade.php b/resources/themes/pterodactyl/layouts/master.blade.php index c46db68b8..644cb5bca 100644 --- a/resources/themes/pterodactyl/layouts/master.blade.php +++ b/resources/themes/pterodactyl/layouts/master.blade.php @@ -44,7 +44,7 @@