forked from Alex/Pterodactyl-Panel
Cleaned up some duplicate code
This commit is contained in:
parent
ee50da0a7c
commit
06a67bb4bb
@ -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,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@
|
||||
<span class="info-box-icon"><i class="fa fa-users"></i></span>
|
||||
<div class="info-box-content number-info-box-content">
|
||||
<span class="info-box-text">Total Users</span>
|
||||
<span class="info-box-number">{{ $totalUsersCount }}</span>
|
||||
<span class="info-box-number">{{ $usersCount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -127,7 +127,7 @@
|
||||
<span class="info-box-icon"><i class="fa fa-database"></i></span>
|
||||
<div class="info-box-content number-info-box-content">
|
||||
<span class="info-box-text">Total Databases</span>
|
||||
<span class="info-box-number">{{ $totalDBCount }}</span>
|
||||
<span class="info-box-number">{{ $databasesCount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user