This commit is contained in:
Kekskurse 2021-01-12 19:05:03 +01:00
parent 907bbc7967
commit a6990d16e4
4 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View file

@ -11,3 +11,4 @@ Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
storage/cache

View file

@ -44,7 +44,7 @@ class CalculateSpace extends Command
$day = date("Y-m-d");
$day = "2021-01-11";
$galleries = Gallery::query()->get();
for ($i = 0; $i <= 24; $i++) {
for ($i = 0; $i < 24; $i++) {
foreach ($galleries as $gallery) {
//Get file size for that hour for that gallery
$start = $day." ".$i.":00:00";

View file

@ -47,7 +47,7 @@ class Traffic extends Authenticatable
];
public static function getLastDays(int $days = 7) {
$sql = "SELECT year, month, SUM(traffic) AS `traffic` FROM traffic WHERE tenant = 1 GROUP BY year, month, day ORDER BY year, month, day DESC LIMIT ".$days.";";
$sql = "SELECT year, month, day, SUM(traffic) AS `traffic` FROM traffic WHERE tenant = 1 GROUP BY year, month, day ORDER BY year, month, day DESC LIMIT ".$days.";";
$res = DB::select($sql);
$now = new \DateTime( $days." days ago", new \DateTimeZone('UTC'));

View file

@ -54,7 +54,7 @@ Setup env
```
server {
listen 80;
server_name kuvia.cloud www.kuvia.cloud;
server_name kuvia.cloud www.kuvia.cloud www1.kuvia.cloud www1.kuvia.cloud www2.kuvia.cloud www3.kuvia.cloud www4.kuvia.cloud www5.kuvia.cloud www6.kuvia.cloud www7.kuvia.cloud www8.kuvia.cloud www9.kuvia.cloud;
root /var/www/kuvia/public;
index index.html index.htm index.php;