Skip to content

Commit

Permalink
Merge branch 'main' into 1920-acknowledge-healty
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvg93 authored Dec 18, 2024
2 parents faa6519 + 5b7ba57 commit 581da8e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
9 changes: 7 additions & 2 deletions app/Filament/Resources/ResultResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ public static function form(Form $form): Form
->content(fn (Result $result): ?string => $result->comments),
Forms\Components\Checkbox::make('scheduled'),
Forms\Components\Checkbox::make('healthy'),

])
->columns(1)
->columnSpan([
Expand Down Expand Up @@ -318,6 +317,7 @@ public static function table(Table $table): Table
->boolean()
->toggleable()
->toggledHiddenByDefault()
->sortable()
->alignment(Alignment::Center),
Tables\Columns\TextColumn::make('created_at')
->dateTime(config('app.datetime_format'))
Expand Down Expand Up @@ -365,7 +365,12 @@ public static function table(Table $table): Table
Tables\Filters\TernaryFilter::make('healthy')
->nullable()
->trueLabel('Only healthy speedtests')
->falseLabel('Only unhealthy speedtests'),
->falseLabel('Only unhealthy speedtests')
->queries(
true: fn (Builder $query) => $query->where('healthy', true),
false: fn (Builder $query) => $query->where('healthy', false),
blank: fn (Builder $query) => $query,
),
])
->actions([
Tables\Actions\ActionGroup::make([
Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/Ookla/SelectSpeedtestServerJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function handle(): void
}

// If the server id is already set, we don't need to do anything.
if (Arr::exists($this->result->data, 'server.id')) {
if (Arr::get($this->result->data, 'server.id')) {
return;
}

Expand Down
6 changes: 6 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@

'force_https' => env('FORCE_HTTPS', false),

'admin_name' => env('ADMIN_NAME', 'Admin'),

'admin_email' => env('ADMIN_EMAIL', '[email protected]'),

'admin_password' => env('ADMIN_PASSWORD', 'password'),

];
4 changes: 2 additions & 2 deletions config/speedtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

return [

'build_date' => Carbon::parse('2024-12-13'),
'build_date' => Carbon::parse('2024-12-16'),

'build_version' => 'v1.0.0',
'build_version' => 'v1.0.1',

/**
* General settings.
Expand Down
6 changes: 3 additions & 3 deletions database/migrations/2014_10_12_000000_create_users_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public function up(): void
});

User::create([
'name' => 'Admin',
'email' => '[email protected]',
'name' => config('app.admin_name'),
'email' => config('app.admin_email'),
'email_verified_at' => now(),
'password' => Hash::make('password'),
'password' => Hash::make(config('app.admin_password')),
'role' => UserRole::Admin,
]);
}
Expand Down

0 comments on commit 581da8e

Please sign in to comment.