This commit is contained in:
Kekskurse 2021-01-12 17:58:01 +01:00
parent cecfd21409
commit cae7c158e9

View file

@ -16,7 +16,7 @@ class DashboardController extends BaseController
public function dashboardView() { public function dashboardView() {
$currentSize = DB::select("SELECT SUM(size) AS `size` FROM images LEFT JOIN galleries ON images.gallery = galleries.id WHERE galleries.tenant = 1;")[0]->size; $currentSize = DB::select("SELECT SUM(size) AS `size` FROM images LEFT JOIN galleries ON images.gallery = galleries.id WHERE galleries.tenant = 1;")[0]->size;
$currentTraffic = DB::select("SELECT SUM(size) AS size FROM `go-mysql-admin`.access WHERE tenant = 1 AND created_at >= NOW() - INTERVAL 1 DAY;")[0]->size; $currentTraffic = DB::select("SELECT SUM(size) AS size FROM access WHERE tenant = 1 AND created_at >= NOW() - INTERVAL 1 DAY;")[0]->size;
$monthlyTraffic = DB::select("SELECT SUM(traffic) AS `traffic` FROM traffic WHERE `year` = 2021 AND `month` = 1 and tenant = 1;")[0]->traffic; $monthlyTraffic = DB::select("SELECT SUM(traffic) AS `traffic` FROM traffic WHERE `year` = 2021 AND `month` = 1 and tenant = 1;")[0]->traffic;
$lastDaysTreffic = Traffic::getLastDays(7); $lastDaysTreffic = Traffic::getLastDays(7);
$lastDaysSize = Storage::getLastDays(7); $lastDaysSize = Storage::getLastDays(7);