Statistiko in header
This commit is contained in:
1 parent
e303d0fa5c
commit
537dad3327
5 files changed
+7
-7
No files matched your search
@@ -16,12 +16,10 @@ use Illuminate\Console\Command;
|
|||||||
class Grap extends Command
|
class Grap extends Command
|
||||||
{
|
{
|
||||||
public static $options = [];
|
public static $options = [];
|
||||||
|
|
||||||
public static string $storage;
|
public static string $storage;
|
||||||
|
|
||||||
public static string $zipfile;
|
public static string $zipfile;
|
||||||
|
|
||||||
public static string $folder;
|
public static string $folder;
|
||||||
|
public static string $excel;
|
||||||
|
|
||||||
public static string $useragent = '4';
|
public static string $useragent = '4';
|
||||||
|
|
||||||
@@ -77,7 +75,7 @@ class Grap extends Command
|
|||||||
case 3:
|
case 3:
|
||||||
SetStorage::set(3);
|
SetStorage::set(3);
|
||||||
|
|
||||||
Grapper::load(3);
|
// Grapper::load(3);
|
||||||
|
|
||||||
MakeExcel::create();
|
MakeExcel::create();
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ class Grapper
|
|||||||
$grapped->url = $url;
|
$grapped->url = $url;
|
||||||
$grapped->starttime = $starttime->toDateTimeString();
|
$grapped->starttime = $starttime->toDateTimeString();
|
||||||
|
|
||||||
$folder = Grap::$storage . '/' . $day . '/' . $day . '-' . $event['tournament']['category']['slug'] . '-' . $event['tournament']['slug'] . '/' . $event['slug'];
|
$folder = strtolower(Grap::$storage . '/' . $day . '/' . $day . '-' . $event['tournament']['category']['slug'] . '-' . $event['tournament']['slug'] . '/' . $event['slug']);
|
||||||
|
|
||||||
File::makeDirectory($folder, 0775, true, true);
|
File::makeDirectory($folder, 0775, true, true);
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class SetStorage
|
|||||||
case 1:
|
case 1:
|
||||||
Grap::$storage = $sofascore_data . $storage_name;
|
Grap::$storage = $sofascore_data . $storage_name;
|
||||||
Grap::$folder = Carbon::now()->subDays($day)->format('Y-m-d');
|
Grap::$folder = Carbon::now()->subDays($day)->format('Y-m-d');
|
||||||
|
Grap::$excel = Grap::$storage . '/' . Grap::$folder;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Grap::$storage = $sofascore_data . $storage_name . '/' . $task->day_from;
|
Grap::$storage = $sofascore_data . $storage_name . '/' . $task->day_from;
|
||||||
@@ -36,6 +37,7 @@ class SetStorage
|
|||||||
case 3:
|
case 3:
|
||||||
Grap::$storage = $sofascore_data . 'range/' . $storage_name;
|
Grap::$storage = $sofascore_data . 'range/' . $storage_name;
|
||||||
Grap::$folder = $storage_name . '-' . $task->day_from . '-' . $task->day_to;
|
Grap::$folder = $storage_name . '-' . $task->day_from . '-' . $task->day_to;
|
||||||
|
Grap::$excel = $sofascore_data . 'range/' . $storage_name;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
Grap::$storage = $sofascore_data . $storage_name;
|
Grap::$storage = $sofascore_data . $storage_name;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class MakeExcel
|
|||||||
Notice::note("Make Excel");
|
Notice::note("Make Excel");
|
||||||
}
|
}
|
||||||
|
|
||||||
$files = ReadDir::get_tree(Grap::$storage . '/' . Grap::$folder);
|
$files = ReadDir::get_tree(Grap::$excel);
|
||||||
|
|
||||||
$files = array_chunk(FileType::filter($files), self::$max);
|
$files = array_chunk(FileType::filter($files), self::$max);
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class Statistic extends BaseDashboard
|
|||||||
|
|
||||||
protected ?string $pollingInterval = null;
|
protected ?string $pollingInterval = null;
|
||||||
|
|
||||||
protected static ?string $title = 'Statistic';
|
protected static ?string $title = 'Statistiko';
|
||||||
|
|
||||||
protected int|string|array $columnSpan = [
|
protected int|string|array $columnSpan = [
|
||||||
'md' => 2,
|
'md' => 2,
|
||||||
|
|||||||
Reference in new issue
Block a user