Cleaned up some duplicate code

This commit is contained in:
stanjg 2018-05-05 10:39:20 +02:00
parent ee50da0a7c
commit 06a67bb4bb
No known key found for this signature in database
GPG Key ID: 27D9DF9D28935303
2 changed files with 2 additions and 6 deletions

View File

@ -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,
]);
}

View File

@ -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>