From 7a81c61ad8006fee6189863338782825e69f7257 Mon Sep 17 00:00:00 2001 From: stanjg Date: Sat, 26 May 2018 21:02:47 +0200 Subject: [PATCH] Wording changes and fix of major fail last commit --- app/Http/Controllers/Admin/StatisticsController.php | 5 ++--- app/Traits/Controllers/JavascriptStatisticsInjection.php | 2 +- public/themes/pterodactyl/js/admin/statistics.js | 4 ++-- resources/themes/pterodactyl/admin/statistics.blade.php | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index 984b6de22..07124e4b6 100644 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -4,7 +4,6 @@ namespace Pterodactyl\Http\Controllers\Admin; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; -use JavaScript; use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface; use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface; use Pterodactyl\Contracts\Repository\EggRepositoryInterface; @@ -13,11 +12,11 @@ use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; use Pterodactyl\Contracts\Repository\UserRepositoryInterface; use Pterodactyl\Http\Controllers\Controller; use Pterodactyl\Services\DaemonKeys\DaemonKeyProviderService; -use Pterodactyl\Traits\Controllers\JavascriptInjection; +use Pterodactyl\Traits\Controllers\JavascriptStatisticsInjection; class StatisticsController extends Controller { - use JavascriptInjection; + use JavascriptStatisticsInjection; private $allocationRepository; diff --git a/app/Traits/Controllers/JavascriptStatisticsInjection.php b/app/Traits/Controllers/JavascriptStatisticsInjection.php index 779764233..3b4e52d0f 100644 --- a/app/Traits/Controllers/JavascriptStatisticsInjection.php +++ b/app/Traits/Controllers/JavascriptStatisticsInjection.php @@ -10,7 +10,7 @@ namespace Pterodactyl\Traits\Controllers; use JavaScript; -class JavascriptStatisticsInjection +trait JavascriptStatisticsInjection { /** diff --git a/public/themes/pterodactyl/js/admin/statistics.js b/public/themes/pterodactyl/js/admin/statistics.js index 12f4277bd..59034a8da 100644 --- a/public/themes/pterodactyl/js/admin/statistics.js +++ b/public/themes/pterodactyl/js/admin/statistics.js @@ -5,7 +5,7 @@ let diskChart = new Chart($('#disk_chart'), { labels: ['Free Disk', 'Used Disk'], datasets: [ { - label: 'Disk in MBs', + label: 'Disk (in MB)', backgroundColor: ['#51B060', '#ff0000'], data: [freeDisk, Pterodactyl.totalServerDisk] } @@ -20,7 +20,7 @@ let ramChart = new Chart($('#ram_chart'), { labels: ['Free RAM', 'Used RAM'], datasets: [ { - label: 'RAM in MBs', + label: 'Memory (in MB)', backgroundColor: ['#51B060', '#ff0000'], data: [freeRam, Pterodactyl.totalServerRam] } diff --git a/resources/themes/pterodactyl/admin/statistics.blade.php b/resources/themes/pterodactyl/admin/statistics.blade.php index 46e112336..036ad937f 100644 --- a/resources/themes/pterodactyl/admin/statistics.blade.php +++ b/resources/themes/pterodactyl/admin/statistics.blade.php @@ -41,14 +41,14 @@
- Total used RAM + Total used Memory (in MB) {{ $totalServerRam }}MB
- Total used disk space + Total used Disk (in MB) {{ $totalServerDisk }}MB