From 377fe92f5b6ca135e717151ea73db8c3bc60b483 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 19 Mar 2017 11:04:03 -0400 Subject: [PATCH] Don't try to render 200 lines per second in the console... :bomb: Corrects a math mistake on my end, and makes the console speed configurable again. Now sends 50 messages per second. Console will notify when being throttled, and refreshing the page will clear the queue if necessary. --- CHANGELOG.md | 4 ++++ app/Http/Controllers/Server/ServerController.php | 4 ++++ config/pterodactyl.php | 12 ++++++++++++ public/themes/pterodactyl/js/frontend/console.js | 4 ++-- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4606a4ad8..8179f1b7d 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.6.0-pre.7 (Courageous Carniadactylus) +### Fixed +* `[pre.6]` — Addresses misconfigured console queue that was still sending data way to quickly thus causing the console to explode on some devices when large amounts of data were sent. + ## v0.6.0-pre.6 (Courageous Carniadactylus) ### Fixed * `[pre.5]` — Console based server rebuild tool now actually rebuilds the servers with the correct information. diff --git a/app/Http/Controllers/Server/ServerController.php b/app/Http/Controllers/Server/ServerController.php index 62cd3d304..91b0f1133 100644 --- a/app/Http/Controllers/Server/ServerController.php +++ b/app/Http/Controllers/Server/ServerController.php @@ -62,6 +62,10 @@ class ServerController extends Controller 'saveFile' => route('server.files.save', $server->uuidShort), 'csrfToken' => csrf_token(), ], + 'config' => [ + 'console_count' => config('pterodactyl.console.count'), + 'console_freq' => config('pterodactyl.console.freq'), + ], ]); return view('server.index', [ diff --git a/config/pterodactyl.php b/config/pterodactyl.php index 83e7270ae..20b74fc48 100644 --- a/config/pterodactyl.php +++ b/config/pterodactyl.php @@ -55,6 +55,18 @@ return [ 'high' => env('QUEUE_HIGH', 'high'), ], + /* + |-------------------------------------------------------------------------- + | Console Configuration + |-------------------------------------------------------------------------- + | + | Configure the speed at which data is rendered to the console. + */ + 'console' => [ + 'count' => env('CONSOLE_PUSH_COUNT', 10), + 'frequency' => env('CONSOLE_PUSH_FREQ', 200), + ], + /* |-------------------------------------------------------------------------- | Task Timers diff --git a/public/themes/pterodactyl/js/frontend/console.js b/public/themes/pterodactyl/js/frontend/console.js index f36311623..33ffef60e 100644 --- a/public/themes/pterodactyl/js/frontend/console.js +++ b/public/themes/pterodactyl/js/frontend/console.js @@ -19,8 +19,8 @@ // SOFTWARE. var Console = (function () { - var CONSOLE_PUSH_COUNT = 50; - var CONSOLE_PUSH_FREQ = 200; + var CONSOLE_PUSH_COUNT = Pterodactyl.config.console_count; + var CONSOLE_PUSH_FREQ = Pterodactyl.config.console_freq; var terminalQueue; var terminal;