diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index 57494cae6..beebe391c 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -144,6 +144,7 @@ 'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class, 'Livewire\LivewireComponentsFinder' => \Livewire\LivewireComponentsFinder::class, 'Livewire\LivewireManager' => \Livewire\LivewireManager::class, + 'NotificationChannels\Telegram\Telegram' => \NotificationChannels\Telegram\Telegram::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, 'Spatie\FlareClient\Flare' => \Spatie\FlareClient\Flare::class, 'Spatie\Ignition\Config\IgnitionConfig' => \Spatie\Ignition\Config\IgnitionConfig::class, @@ -351,6 +352,7 @@ 'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class, 'Livewire\LivewireComponentsFinder' => \Livewire\LivewireComponentsFinder::class, 'Livewire\LivewireManager' => \Livewire\LivewireManager::class, + 'NotificationChannels\Telegram\Telegram' => \NotificationChannels\Telegram\Telegram::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, 'Spatie\FlareClient\Flare' => \Spatie\FlareClient\Flare::class, 'Spatie\Ignition\Config\IgnitionConfig' => \Spatie\Ignition\Config\IgnitionConfig::class, @@ -558,6 +560,7 @@ 'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class, 'Livewire\LivewireComponentsFinder' => \Livewire\LivewireComponentsFinder::class, 'Livewire\LivewireManager' => \Livewire\LivewireManager::class, + 'NotificationChannels\Telegram\Telegram' => \NotificationChannels\Telegram\Telegram::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, 'Spatie\FlareClient\Flare' => \Spatie\FlareClient\Flare::class, 'Spatie\Ignition\Config\IgnitionConfig' => \Spatie\Ignition\Config\IgnitionConfig::class, @@ -765,6 +768,7 @@ 'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class, 'Livewire\LivewireComponentsFinder' => \Livewire\LivewireComponentsFinder::class, 'Livewire\LivewireManager' => \Livewire\LivewireManager::class, + 'NotificationChannels\Telegram\Telegram' => \NotificationChannels\Telegram\Telegram::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, 'Spatie\FlareClient\Flare' => \Spatie\FlareClient\Flare::class, 'Spatie\Ignition\Config\IgnitionConfig' => \Spatie\Ignition\Config\IgnitionConfig::class, @@ -972,6 +976,7 @@ 'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class, 'Livewire\LivewireComponentsFinder' => \Livewire\LivewireComponentsFinder::class, 'Livewire\LivewireManager' => \Livewire\LivewireManager::class, + 'NotificationChannels\Telegram\Telegram' => \NotificationChannels\Telegram\Telegram::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, 'Spatie\FlareClient\Flare' => \Spatie\FlareClient\Flare::class, 'Spatie\Ignition\Config\IgnitionConfig' => \Spatie\Ignition\Config\IgnitionConfig::class, @@ -1179,6 +1184,7 @@ 'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class, 'Livewire\LivewireComponentsFinder' => \Livewire\LivewireComponentsFinder::class, 'Livewire\LivewireManager' => \Livewire\LivewireManager::class, + 'NotificationChannels\Telegram\Telegram' => \NotificationChannels\Telegram\Telegram::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, 'Spatie\FlareClient\Flare' => \Spatie\FlareClient\Flare::class, 'Spatie\Ignition\Config\IgnitionConfig' => \Spatie\Ignition\Config\IgnitionConfig::class, @@ -1386,6 +1392,7 @@ 'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class, 'Livewire\LivewireComponentsFinder' => \Livewire\LivewireComponentsFinder::class, 'Livewire\LivewireManager' => \Livewire\LivewireManager::class, + 'NotificationChannels\Telegram\Telegram' => \NotificationChannels\Telegram\Telegram::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, 'Spatie\FlareClient\Flare' => \Spatie\FlareClient\Flare::class, 'Spatie\Ignition\Config\IgnitionConfig' => \Spatie\Ignition\Config\IgnitionConfig::class, @@ -1593,6 +1600,7 @@ 'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class, 'Livewire\LivewireComponentsFinder' => \Livewire\LivewireComponentsFinder::class, 'Livewire\LivewireManager' => \Livewire\LivewireManager::class, + 'NotificationChannels\Telegram\Telegram' => \NotificationChannels\Telegram\Telegram::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, 'Spatie\FlareClient\Flare' => \Spatie\FlareClient\Flare::class, 'Spatie\Ignition\Config\IgnitionConfig' => \Spatie\Ignition\Config\IgnitionConfig::class, @@ -1800,6 +1808,7 @@ 'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class, 'Livewire\LivewireComponentsFinder' => \Livewire\LivewireComponentsFinder::class, 'Livewire\LivewireManager' => \Livewire\LivewireManager::class, + 'NotificationChannels\Telegram\Telegram' => \NotificationChannels\Telegram\Telegram::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, 'Spatie\FlareClient\Flare' => \Spatie\FlareClient\Flare::class, 'Spatie\Ignition\Config\IgnitionConfig' => \Spatie\Ignition\Config\IgnitionConfig::class, @@ -2007,6 +2016,7 @@ 'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class, 'Livewire\LivewireComponentsFinder' => \Livewire\LivewireComponentsFinder::class, 'Livewire\LivewireManager' => \Livewire\LivewireManager::class, + 'NotificationChannels\Telegram\Telegram' => \NotificationChannels\Telegram\Telegram::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, 'Spatie\FlareClient\Flare' => \Spatie\FlareClient\Flare::class, 'Spatie\Ignition\Config\IgnitionConfig' => \Spatie\Ignition\Config\IgnitionConfig::class, @@ -2214,6 +2224,7 @@ 'Illuminate\Testing\ParallelTesting' => \Illuminate\Testing\ParallelTesting::class, 'Livewire\LivewireComponentsFinder' => \Livewire\LivewireComponentsFinder::class, 'Livewire\LivewireManager' => \Livewire\LivewireManager::class, + 'NotificationChannels\Telegram\Telegram' => \NotificationChannels\Telegram\Telegram::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, 'Spatie\FlareClient\Flare' => \Spatie\FlareClient\Flare::class, 'Spatie\Ignition\Config\IgnitionConfig' => \Spatie\Ignition\Config\IgnitionConfig::class, diff --git a/app/Filament/Pages/Dashboard.php b/app/Filament/Pages/Dashboard.php index 59ba63ee5..03d38937c 100644 --- a/app/Filament/Pages/Dashboard.php +++ b/app/Filament/Pages/Dashboard.php @@ -52,10 +52,6 @@ protected function getActions(): array public function getHeaderWidgets(): array { - if (! $this->resultsCount) { - return []; - } - return [ StatsOverview::class, ]; @@ -85,8 +81,6 @@ public function queueSpeedtest(GeneralSettings $settings) } $speedtest = [ - 'enabled' => ! blank($settings->speedtest_schedule), - 'schedule' => optional($settings)->speedtest_schedule, 'ookla_server_id' => $ookla_server_id, ]; diff --git a/app/Filament/Resources/ResultResource.php b/app/Filament/Resources/ResultResource.php index 5ab167d58..5108a08d8 100644 --- a/app/Filament/Resources/ResultResource.php +++ b/app/Filament/Resources/ResultResource.php @@ -5,13 +5,17 @@ use App\Filament\Resources\ResultResource\Pages; use App\Models\Result; use App\Settings\GeneralSettings; +use Carbon\Carbon; +use Filament\Forms; +use Filament\Forms\Components\TextInput; +use Filament\Resources\Form; use Filament\Resources\Resource; use Filament\Resources\Table; use Filament\Tables; use Filament\Tables\Actions\Action; use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\TextColumn; -use Filament\Tables\Columns\ViewColumn; +use Illuminate\Database\Eloquent\Builder; class ResultResource extends Resource { @@ -21,6 +25,71 @@ class ResultResource extends Resource protected static ?string $navigationLabel = 'Results'; + public static function form(Form $form): Form + { + $settings = new GeneralSettings(); + + return $form + ->schema([ + Forms\Components\Grid::make([ + 'default' => 2, + 'md' => 3, + ])->schema([ + Forms\Components\Grid::make([ + 'default' => 2, + 'md' => 3, + ]) + ->schema([ + Forms\Components\TextInput::make('id') + ->label('ID'), + Forms\Components\TextInput::make('created_at') + ->label('Created') + ->afterStateHydrated(function (TextInput $component, $state) use ($settings) { + $component->state(Carbon::parse($state)->format($settings->time_format ?? 'M j, Y G:i:s')); + }) + ->columnSpan(2), + Forms\Components\TextInput::make('server_id') + ->label('Server ID'), + Forms\Components\TextInput::make('server_name') + ->label('Server name') + ->columnSpan(2), + Forms\Components\TextInput::make('server_host') + ->label('Server host') + ->columnSpan([ + 'default' => 2, + 'md' => 3, + ]), + Forms\Components\TextInput::make('download') + ->label('Download (Mbps)') + ->afterStateHydrated(function (TextInput $component, $state) { + $component->state(! blank($state) ? formatBits(formatBytestoBits($state), 3, false) : ''); + }), + Forms\Components\TextInput::make('upload') + ->label('Upload (Mbps)') + ->afterStateHydrated(function (TextInput $component, $state) { + $component->state(! blank($state) ? formatBits(formatBytestoBits($state), 3, false) : ''); + }), + Forms\Components\TextInput::make('ping') + ->label('Ping (Ms)'), + ]) + ->columnSpan(2), + Forms\Components\Card::make() + ->schema([ + Forms\Components\Checkbox::make('successful'), + Forms\Components\Checkbox::make('scheduled'), + ]) + ->columns(1) + ->columnSpan([ + 'default' => 2, + 'md' => 1, + ]), + ]), + Forms\Components\Textarea::make('data') + ->rows(10) + ->columnSpan(2), + ]); + } + public static function table(Table $table): Table { $settings = new GeneralSettings(); @@ -29,59 +98,78 @@ public static function table(Table $table): Table ->columns([ TextColumn::make('id') ->label('ID'), + TextColumn::make('server') + ->getStateUsing(fn (Result $record): string|null => ! blank($record->server_id) ? $record->server_id.' ('.$record->server_name.')' : null) + ->toggleable(), + IconColumn::make('successful') + ->boolean() + ->toggleable(), IconColumn::make('scheduled') ->boolean() - ->toggleable() - ->toggledHiddenByDefault(), - ViewColumn::make('download') - ->view('tables.columns.bits-column'), - ViewColumn::make('upload') - ->view('tables.columns.bits-column'), + ->toggleable(), + TextColumn::make('download') + ->label('Download (Mbps)') + ->getStateUsing(fn (Result $record): string|null => ! blank($record->download) ? formatBits(formatBytestoBits($record->download), 3, false) : null), + TextColumn::make('upload') + ->label('Upload (Mbps)') + ->getStateUsing(fn (Result $record): string|null => ! blank($record->upload) ? formatBits(formatBytestoBits($record->upload), 3, false) : null), TextColumn::make('ping') + ->label('Ping (Ms)') ->toggleable(), TextColumn::make('download_jitter') - ->getStateUsing(function (Result $record): string|null { - return json_decode($record->data, true)['download']['latency']['jitter'] ?? null; - }) + ->getStateUsing(fn (Result $record): string|null => json_decode($record->data, true)['download']['latency']['jitter'] ?? null) ->toggleable() ->toggledHiddenByDefault(), TextColumn::make('upload_jitter') - ->getStateUsing(function (Result $record): string|null { - return json_decode($record->data, true)['upload']['latency']['jitter'] ?? null; - }) + ->getStateUsing(fn (Result $record): string|null => json_decode($record->data, true)['upload']['latency']['jitter'] ?? null) ->toggleable() ->toggledHiddenByDefault(), TextColumn::make('ping_jitter') - ->getStateUsing(function (Result $record): string|null { - return json_decode($record->data, true)['ping']['jitter'] ?? null; - }) + ->getStateUsing(fn (Result $record): string|null => json_decode($record->data, true)['ping']['jitter'] ?? null) ->toggleable() ->toggledHiddenByDefault(), - ViewColumn::make('server_id') - ->label('Server ID') - ->view('tables.columns.server-column') - ->toggleable(), TextColumn::make('created_at') + ->label('Created') ->dateTime($settings->time_format ?? 'M j, Y G:i:s') - ->timezone($settings->timezone ?? 'UTC'), + ->timezone($settings->timezone ?? 'UTC') + ->sortable(), ]) ->filters([ - // + Tables\Filters\TernaryFilter::make('scheduled') + ->placeholder('-') + ->trueLabel('Only scheduled speedtests') + ->falseLabel('Only manual speedtests') + ->queries( + true: fn (Builder $query) => $query->where('scheduled', true), + false: fn (Builder $query) => $query->where('scheduled', false), + blank: fn (Builder $query) => $query, + ), + Tables\Filters\TernaryFilter::make('successful') + ->placeholder('-') + ->trueLabel('Only successful speedtests') + ->falseLabel('Only failed speedtests') + ->queries( + true: fn (Builder $query) => $query->where('successful', true), + false: fn (Builder $query) => $query->where('successful', false), + blank: fn (Builder $query) => $query, + ), ]) ->actions([ Tables\Actions\ActionGroup::make([ Action::make('view result') ->label('View on Speedtest.net') ->icon('heroicon-o-link') - ->url(fn (Result $record): string => $record->url) + ->url(fn (Result $record): string|null => optional($record)->url) + ->hidden(fn (Result $record): bool => ! $record->is_successful) ->openUrlInNewTab(), - // Tables\Actions\ViewAction::make(), + Tables\Actions\ViewAction::make(), Tables\Actions\DeleteAction::make(), ]), ]) ->bulkActions([ Tables\Actions\DeleteBulkAction::make(), - ]); + ]) + ->defaultSort('created_at', 'desc'); } public static function getRelations(): array diff --git a/app/Filament/Resources/ResultResource/Pages/ListResults.php b/app/Filament/Resources/ResultResource/Pages/ListResults.php index 578c649b0..6e7dc9cc8 100644 --- a/app/Filament/Resources/ResultResource/Pages/ListResults.php +++ b/app/Filament/Resources/ResultResource/Pages/ListResults.php @@ -4,17 +4,11 @@ use App\Filament\Resources\ResultResource; use Filament\Resources\Pages\ListRecords; -use Illuminate\Database\Eloquent\Builder; class ListResults extends ListRecords { protected static string $resource = ResultResource::class; - protected function getTableQuery(): Builder - { - return parent::getTableQuery()->orderBy('id', 'desc'); - } - protected function getTablePollingInterval(): ?string { return '5s'; diff --git a/app/Filament/Widgets/RecentJitterChart.php b/app/Filament/Widgets/RecentJitterChart.php index 752c650cc..1700c831e 100644 --- a/app/Filament/Widgets/RecentJitterChart.php +++ b/app/Filament/Widgets/RecentJitterChart.php @@ -49,7 +49,7 @@ protected function getData(): array 'datasets' => [ [ 'label' => 'Download', - 'data' => $results->map(fn ($item) => $item->getJitterData()['download']), + 'data' => $results->map(fn ($item) => $item->getJitterData()['download'] ?? 0), 'borderColor' => '#0ea5e9', 'backgroundColor' => '#0ea5e9', 'fill' => false, @@ -58,7 +58,7 @@ protected function getData(): array ], [ 'label' => 'Upload', - 'data' => $results->map(fn ($item) => $item->getJitterData()['upload']), + 'data' => $results->map(fn ($item) => $item->getJitterData()['upload'] ?? 0), 'borderColor' => '#8b5cf6', 'backgroundColor' => '#8b5cf6', 'fill' => false, @@ -67,7 +67,7 @@ protected function getData(): array ], [ 'label' => 'Ping', - 'data' => $results->map(fn ($item) => $item->getJitterData()['ping']), + 'data' => $results->map(fn ($item) => $item->getJitterData()['ping'] ?? 0), 'borderColor' => '#10b981', 'backgroundColor' => '#10b981', 'fill' => false, diff --git a/app/Filament/Widgets/RecentPingChart.php b/app/Filament/Widgets/RecentPingChart.php index 6a71971c3..affbea370 100644 --- a/app/Filament/Widgets/RecentPingChart.php +++ b/app/Filament/Widgets/RecentPingChart.php @@ -49,7 +49,7 @@ protected function getData(): array 'datasets' => [ [ 'label' => 'Ping', - 'data' => $results->map(fn ($item) => $item->ping), + 'data' => $results->map(fn ($item) => $item->ping ?? 0), 'borderColor' => '#10b981', 'backgroundColor' => '#10b981', 'fill' => false, diff --git a/app/Filament/Widgets/RecentSpeedChart.php b/app/Filament/Widgets/RecentSpeedChart.php index eb904d57f..5bd2490ee 100644 --- a/app/Filament/Widgets/RecentSpeedChart.php +++ b/app/Filament/Widgets/RecentSpeedChart.php @@ -49,7 +49,7 @@ protected function getData(): array 'datasets' => [ [ 'label' => 'Download', - 'data' => $results->map(fn ($item) => roundBytesToMegabits($item->download)), + 'data' => $results->map(fn ($item) => ! blank($item->download) ? roundBytesToMegabits($item->download) : 0), 'borderColor' => '#0ea5e9', 'backgroundColor' => '#0ea5e9', 'fill' => false, @@ -58,7 +58,7 @@ protected function getData(): array ], [ 'label' => 'Upload', - 'data' => $results->map(fn ($item) => roundBytesToMegabits($item->upload)), + 'data' => $results->map(fn ($item) => ! blank($item->upload) ? roundBytesToMegabits($item->upload) : 0), 'borderColor' => '#8b5cf6', 'backgroundColor' => '#8b5cf6', 'fill' => false, diff --git a/app/Filament/Widgets/StatsOverview.php b/app/Filament/Widgets/StatsOverview.php index 1f1eaf7e0..b3189a95e 100644 --- a/app/Filament/Widgets/StatsOverview.php +++ b/app/Filament/Widgets/StatsOverview.php @@ -15,13 +15,20 @@ protected function getCards(): array $settings = new GeneralSettings(); - if (! $result) { - return []; + if (! $result || ! $result->successful) { + return [ + Card::make('Latest download', '-') + ->icon('heroicon-o-download'), + Card::make('Latest upload', '-') + ->icon('heroicon-o-upload'), + Card::make('Latest ping', '-') + ->icon('heroicon-o-clock'), + ]; } $previous = $result->previous(); - if (! $previous) { + if (! $previous || ! $previous->successful) { return [ Card::make('Latest download', fn (): string => ! blank($result) ? formatBits(formatBytesToBits($result->download)).'ps' : 'n/a') ->icon('heroicon-o-download'), diff --git a/app/Jobs/ExecSpeedtest.php b/app/Jobs/ExecSpeedtest.php index f11e8adf8..a85680238 100644 --- a/app/Jobs/ExecSpeedtest.php +++ b/app/Jobs/ExecSpeedtest.php @@ -35,24 +35,28 @@ public function __construct( */ public function handle() { - $args = [ - 'speedtest', - '--accept-license', - '--accept-gdpr', - '--format=json', - ]; + $process = new Process( + array_filter([ + 'speedtest', + '--accept-license', + '--accept-gdpr', + '--format=json', + optional($this->speedtest)['ookla_server_id'] ? '--server-id='.$this->speedtest['ookla_server_id'] : false, + ]) + ); - if (! blank($this->speedtest)) { - if (! blank($this->speedtest['ookla_server_id'])) { - $args = array_merge($args, ['--server-id='.$this->speedtest['ookla_server_id']]); - } - } + try { + $process->mustRun(); + } catch (ProcessFailedException $exception) { + $messages = explode(PHP_EOL, $exception->getMessage()); - $process = new Process($args); - $process->run(); + $message = collect(array_filter($messages, 'json_validate'))->last(); - if (! $process->isSuccessful()) { - throw new ProcessFailedException($process); + Result::create([ + 'scheduled' => $this->scheduled, + 'successful' => false, + 'data' => $message, + ]); return 0; } diff --git a/app/Models/Result.php b/app/Models/Result.php index 1e01078f1..fd5341873 100644 --- a/app/Models/Result.php +++ b/app/Models/Result.php @@ -31,6 +31,7 @@ class Result extends Model 'server_name', 'url', 'scheduled', + 'successful', 'data', ]; @@ -41,6 +42,7 @@ class Result extends Model */ protected $casts = [ 'scheduled' => 'boolean', + 'successful' => 'boolean', 'data' => 'array', 'created_at' => 'datetime', ]; @@ -103,7 +105,7 @@ public function getJitterData(): array } /** - * Return the previous test result . + * Return the previous test result. * * @return self|null */ diff --git a/app/Tables/Columns/BytesColumn.php b/app/Tables/Columns/BytesColumn.php deleted file mode 100644 index 3072b4ff7..000000000 --- a/app/Tables/Columns/BytesColumn.php +++ /dev/null @@ -1,10 +0,0 @@ - $threshold; } } + +/** + * Determine if the string provided is valid json. + * + * This function will be overwritten in php 8.3 https://wiki.php.net/rfc/json_validate + * + * @deprecated + * + * @param string $data + * @return bool + */ +if (! function_exists('json_validate')) { + function json_validate($data) + { + if (! empty($data)) { + return is_string($data) && + is_array(json_decode($data, true)) ? true : false; + } + + return false; + } +} diff --git a/composer.lock b/composer.lock index 014e69c97..03072d5f2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "70d6d15dfcf2270a421d9b861479fc3c", + "content-hash": "c645a2045faf1a41928be8ee841a8c86", "packages": [ { "name": "akaunting/laravel-money", @@ -202,30 +202,30 @@ }, { "name": "blade-ui-kit/blade-icons", - "version": "1.4.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/blade-ui-kit/blade-icons.git", - "reference": "977559507feebba431019abf1b319d71dfdacd95" + "reference": "8e936041fcb016ad0344169d057d5a2f1a178091" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/977559507feebba431019abf1b319d71dfdacd95", - "reference": "977559507feebba431019abf1b319d71dfdacd95", + "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/8e936041fcb016ad0344169d057d5a2f1a178091", + "reference": "8e936041fcb016ad0344169d057d5a2f1a178091", "shasum": "" }, "require": { - "illuminate/contracts": "^8.0|^9.0", - "illuminate/filesystem": "^8.0|^9.0", - "illuminate/support": "^8.0|^9.0", - "illuminate/view": "^8.0|^9.0", + "illuminate/contracts": "^8.0|^9.0|^10.0", + "illuminate/filesystem": "^8.0|^9.0|^10.0", + "illuminate/support": "^8.0|^9.0|^10.0", + "illuminate/view": "^8.0|^9.0|^10.0", "php": "^7.4|^8.0", "symfony/console": "^5.3|^6.0", "symfony/finder": "^5.3|^6.0" }, "require-dev": { "mockery/mockery": "^1.3", - "orchestra/testbench": "^6.0|^7.0", + "orchestra/testbench": "^6.0|^7.0|^8.0", "phpunit/phpunit": "^9.0" }, "bin": [ @@ -279,7 +279,7 @@ "type": "github" } ], - "time": "2022-09-30T11:26:24+00:00" + "time": "2023-01-11T08:34:15+00:00" }, { "name": "brick/math", @@ -612,16 +612,16 @@ }, { "name": "doctrine/dbal", - "version": "3.5.2", + "version": "3.5.3", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "63e513cebbbaf96a6795e5c5ee34d205831bfc85" + "reference": "88fa7e5189fd5ec6682477044264dc0ed4e3aa1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/63e513cebbbaf96a6795e5c5ee34d205831bfc85", - "reference": "63e513cebbbaf96a6795e5c5ee34d205831bfc85", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/88fa7e5189fd5ec6682477044264dc0ed4e3aa1e", + "reference": "88fa7e5189fd5ec6682477044264dc0ed4e3aa1e", "shasum": "" }, "require": { @@ -636,7 +636,7 @@ "require-dev": { "doctrine/coding-standard": "11.0.0", "jetbrains/phpstorm-stubs": "2022.3", - "phpstan/phpstan": "1.9.2", + "phpstan/phpstan": "1.9.4", "phpstan/phpstan-strict-rules": "^1.4", "phpunit/phpunit": "9.5.27", "psalm/plugin-phpunit": "0.18.4", @@ -703,7 +703,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.5.2" + "source": "https://github.com/doctrine/dbal/tree/3.5.3" }, "funding": [ { @@ -719,7 +719,7 @@ "type": "tidelift" } ], - "time": "2022-12-19T08:17:34+00:00" + "time": "2023-01-12T10:21:44+00:00" }, { "name": "doctrine/deprecations", @@ -1154,16 +1154,16 @@ }, { "name": "filament/filament", - "version": "v2.16.60", + "version": "v2.16.61", "source": { "type": "git", "url": "https://github.com/filamentphp/admin.git", - "reference": "438770837a4cd3dc894041a615ae2b14003105ee" + "reference": "dd6fd246f68fb6d2d14322a98d2354c7daa241bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/admin/zipball/438770837a4cd3dc894041a615ae2b14003105ee", - "reference": "438770837a4cd3dc894041a615ae2b14003105ee", + "url": "https://api.github.com/repos/filamentphp/admin/zipball/dd6fd246f68fb6d2d14322a98d2354c7daa241bf", + "reference": "dd6fd246f68fb6d2d14322a98d2354c7daa241bf", "shasum": "" }, "require": { @@ -1213,20 +1213,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-01-05T14:32:19+00:00" + "time": "2023-01-12T10:11:57+00:00" }, { "name": "filament/forms", - "version": "v2.16.60", + "version": "v2.16.61", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "cda07e7df26d076f7814c8c1812ccf893bcbbe99" + "reference": "f638d38b743a1089f66fc98e470cd9dfc4720097" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/cda07e7df26d076f7814c8c1812ccf893bcbbe99", - "reference": "cda07e7df26d076f7814c8c1812ccf893bcbbe99", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/f638d38b743a1089f66fc98e470cd9dfc4720097", + "reference": "f638d38b743a1089f66fc98e470cd9dfc4720097", "shasum": "" }, "require": { @@ -1271,20 +1271,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-01-05T14:32:14+00:00" + "time": "2023-01-12T10:11:56+00:00" }, { "name": "filament/notifications", - "version": "v2.16.60", + "version": "v2.16.61", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", - "reference": "91fc0d87202da378b422200ed9eb4cb0e7933453" + "reference": "fe6247865c83809fe5bf1a87d0492445f6cef03e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/notifications/zipball/91fc0d87202da378b422200ed9eb4cb0e7933453", - "reference": "91fc0d87202da378b422200ed9eb4cb0e7933453", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/fe6247865c83809fe5bf1a87d0492445f6cef03e", + "reference": "fe6247865c83809fe5bf1a87d0492445f6cef03e", "shasum": "" }, "require": { @@ -1324,11 +1324,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2022-12-07T12:06:28+00:00" + "time": "2023-01-12T10:12:17+00:00" }, { "name": "filament/spatie-laravel-settings-plugin", - "version": "v2.16.60", + "version": "v2.16.61", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-settings-plugin.git", @@ -1375,7 +1375,7 @@ }, { "name": "filament/support", - "version": "v2.16.60", + "version": "v2.16.61", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", @@ -1425,16 +1425,16 @@ }, { "name": "filament/tables", - "version": "v2.16.60", + "version": "v2.16.61", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "83b0ff91531c67a925e39cf362b12f83b5714a1d" + "reference": "4d5c1978a361ddc961e404246cbe71068a39f2d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/83b0ff91531c67a925e39cf362b12f83b5714a1d", - "reference": "83b0ff91531c67a925e39cf362b12f83b5714a1d", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/4d5c1978a361ddc961e404246cbe71068a39f2d2", + "reference": "4d5c1978a361ddc961e404246cbe71068a39f2d2", "shasum": "" }, "require": { @@ -1477,7 +1477,7 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-01-05T14:32:13+00:00" + "time": "2023-01-12T10:12:08+00:00" }, { "name": "fruitcake/php-cors", @@ -4199,114 +4199,24 @@ }, "time": "2019-03-08T08:55:37+00:00" }, - { - "name": "ramsey/collection", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/ramsey/collection.git", - "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", - "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "captainhook/plugin-composer": "^5.3", - "ergebnis/composer-normalize": "^2.28.3", - "fakerphp/faker": "^1.21", - "hamcrest/hamcrest-php": "^2.0", - "jangregor/phpstan-prophecy": "^1.0", - "mockery/mockery": "^1.5", - "php-parallel-lint/php-console-highlighter": "^1.0", - "php-parallel-lint/php-parallel-lint": "^1.3", - "phpcsstandards/phpcsutils": "^1.0.0-rc1", - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5", - "psalm/plugin-mockery": "^1.1", - "psalm/plugin-phpunit": "^0.18.4", - "ramsey/coding-standard": "^2.0.3", - "ramsey/conventional-commits": "^1.3", - "vimeo/psalm": "^5.4" - }, - "type": "library", - "extra": { - "captainhook": { - "force-install": true - }, - "ramsey/conventional-commits": { - "configFile": "conventional-commits.json" - } - }, - "autoload": { - "psr-4": { - "Ramsey\\Collection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - } - ], - "description": "A PHP library for representing and manipulating collections.", - "keywords": [ - "array", - "collection", - "hash", - "map", - "queue", - "set" - ], - "support": { - "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/2.0.0" - }, - "funding": [ - { - "url": "https://github.com/ramsey", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", - "type": "tidelift" - } - ], - "time": "2022-12-31T21:50:55+00:00" - }, { "name": "ramsey/uuid", - "version": "4.7.1", + "version": "4.7.2", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "a1acf96007170234a8399586a6e2ab8feba109d1" + "reference": "008f6cea262fbb26139757e153b451fcd0ac179d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/a1acf96007170234a8399586a6e2ab8feba109d1", - "reference": "a1acf96007170234a8399586a6e2ab8feba109d1", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/008f6cea262fbb26139757e153b451fcd0ac179d", + "reference": "008f6cea262fbb26139757e153b451fcd0ac179d", "shasum": "" }, "require": { "brick/math": "^0.8.8 || ^0.9 || ^0.10", "ext-json": "*", - "php": "^8.0", - "ramsey/collection": "^1.2 || ^2.0" + "php": "^8.1" }, "replace": { "rhumsaa/uuid": "self.version" @@ -4318,7 +4228,6 @@ "doctrine/annotations": "^1.8", "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", - "paragonie/random-lib": "^2", "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", "php-parallel-lint/php-parallel-lint": "^1.1", @@ -4327,17 +4236,17 @@ "phpstan/phpstan": "^1.8", "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^8.5 || ^9", + "phpunit/phpunit": "^9.5", + "psalm/plugin-phpunit": "^0.16.1", "ramsey/composer-repl": "^1.4", "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.9" + "vimeo/psalm": "^4.22" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", - "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, "type": "library", @@ -4366,7 +4275,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.1" + "source": "https://github.com/ramsey/uuid/tree/4.7.2" }, "funding": [ { @@ -4378,7 +4287,7 @@ "type": "tidelift" } ], - "time": "2022-12-31T22:20:34+00:00" + "time": "2023-01-12T01:45:14+00:00" }, { "name": "ryangjchandler/blade-capture-directive", diff --git a/database/migrations/2023_01_12_135235_update_results_table.php b/database/migrations/2023_01_12_135235_update_results_table.php new file mode 100644 index 000000000..6a24b9d67 --- /dev/null +++ b/database/migrations/2023_01_12_135235_update_results_table.php @@ -0,0 +1,35 @@ +float('ping', 8, 3)->nullable()->change(); + $table->unsignedBigInteger('download')->nullable()->change(); + $table->unsignedBigInteger('upload')->nullable()->change(); + $table->json('data')->nullable()->change(); + + $table->boolean('successful')->default(true)->after('scheduled'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}; diff --git a/resources/views/tables/columns/bits-column.blade.php b/resources/views/tables/columns/bits-column.blade.php deleted file mode 100644 index 26c3d4e11..000000000 --- a/resources/views/tables/columns/bits-column.blade.php +++ /dev/null @@ -1,3 +0,0 @@ -