diff --git a/public/themes/pterodactyl/js/admin/node/view-servers.js b/public/themes/pterodactyl/js/admin/node/view-servers.js index 9041379cc..96950cd19 100644 --- a/public/themes/pterodactyl/js/admin/node/view-servers.js +++ b/public/themes/pterodactyl/js/admin/node/view-servers.js @@ -101,11 +101,13 @@ currentCpu = parseFloat(((info.proc.cpu.total / cpuMax) * 100).toFixed(2).toString()); } element.find('[data-action="memory"]').html(parseInt(info.proc.memory.total / (1024 * 1024))); + element.find('[data-action="disk"]').html(parseInt(info.proc.disk.used)); element.find('[data-action="cpu"]').html(currentCpu); } else { element.find('[data-action="memory"]').html('--'); + element.find('[data-action="disk"]').html('--'); element.find('[data-action="cpu"]').html('--'); } }); }); -})(); +})(); \ No newline at end of file diff --git a/public/themes/pterodactyl/js/frontend/serverlist.js b/public/themes/pterodactyl/js/frontend/serverlist.js index 1c6865a9b..6e4d5c4e4 100644 --- a/public/themes/pterodactyl/js/frontend/serverlist.js +++ b/public/themes/pterodactyl/js/frontend/serverlist.js @@ -74,9 +74,11 @@ } element.find('[data-action="memory"]').html(parseInt(data.proc.memory.total / (1024 * 1024))); element.find('[data-action="cpu"]').html(currentCpu); + element.find('[data-action="disk"]').html(parseInt(data.proc.disk.used)); } else { element.find('[data-action="memory"]').html('--'); element.find('[data-action="cpu"]').html('--'); + element.find('[data-action="disk"]').html('--'); } } }).fail(function (jqXHR) { diff --git a/resources/lang/en/strings.php b/resources/lang/en/strings.php index c0bf3f417..2407dcd36 100644 --- a/resources/lang/en/strings.php +++ b/resources/lang/en/strings.php @@ -14,6 +14,7 @@ return [ 'connection' => 'Connection', 'memory' => 'Memory', 'cpu' => 'CPU', + 'disk' => 'Disk', 'status' => 'Status', 'search' => 'Search', 'suspended' => 'Suspended', diff --git a/resources/themes/pterodactyl/admin/nodes/view/servers.blade.php b/resources/themes/pterodactyl/admin/nodes/view/servers.blade.php index 5aed0ccb5..17d6d531b 100644 --- a/resources/themes/pterodactyl/admin/nodes/view/servers.blade.php +++ b/resources/themes/pterodactyl/admin/nodes/view/servers.blade.php @@ -57,10 +57,10 @@ {{ $server->name }} {{ $server->user->username }} {{ $server->nest->name }} ({{ $server->egg->name }}) - NaN / {{ $server->memory === 0 ? '∞' : $server->memory }} MB - {{ $server->disk }} MB - NaN % - NaN + -- / {{ $server->memory === 0 ? '∞' : $server->memory }} MB + -- / {{ $server->disk === 0 ? '∞' : $server->disk }} MB + -- % + -- @endforeach @@ -78,4 +78,4 @@ @section('footer-scripts') @parent {!! Theme::js('js/admin/node/view-servers.js') !!} -@endsection +@endsection \ No newline at end of file diff --git a/resources/themes/pterodactyl/base/index.blade.php b/resources/themes/pterodactyl/base/index.blade.php index c83557eec..8b44b48df 100644 --- a/resources/themes/pterodactyl/base/index.blade.php +++ b/resources/themes/pterodactyl/base/index.blade.php @@ -44,6 +44,7 @@ @lang('strings.connection') @lang('strings.memory') @lang('strings.cpu') + @lang('strings.disk') @lang('strings.relation') @lang('strings.status') @@ -55,6 +56,7 @@ {{ $server->getRelation('allocation')->alias }}:{{ $server->getRelation('allocation')->port }} -- / {{ $server->memory === 0 ? '∞' : $server->memory }} MB -- % + -- / {{ $server->disk === 0 ? '∞' : $server->disk }} MB @if($server->user->id === Auth::user()->id) @lang('strings.owner')