Skip to content

Commit

Permalink
Results time zones, datetime formats and readme improvements (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjustesen authored Oct 24, 2022
1 parent 71f0efb commit 2d9ea93
Show file tree
Hide file tree
Showing 20 changed files with 50 additions and 844 deletions.
Binary file added .github/screenshots/dashboard_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/screenshots/login_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/screenshots/results_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
## Speedtest Tracker

Welcome to Speedtest Tracker! Speedtest Tracker runs a speedtest check against Ookla's Speedtest service on a schedule.
Speedtest Tracker is a self-hosted internet performance tracking application that runs speedtest checks against Ookla's Speedtest service.

This project replaces https://github.com/henrywhitaker3/Speedtest-Tracker as it looks like this project has been abandoned https://github.com/henrywhitaker3/Speedtest-Tracker/issues/1013.
### Why might I use this?
The main use case for Speedtest Tracker is to build a history of your internet's performance so that you can be informed when you're not receiving your ISP's advertised rates.

### Docs
The docs can be found here https://docs.speedtest-tracker.dev to help you get started.
### What about that other Speedtest Tracker?
As far as I can tell https://github.com/henrywhitaker3/Speedtest-Tracker was abandoned. This version is meant to be an actively maintained replacement with an improved UI and feature set.

### Roadmap
To suggest features please use the roadmap. You can also follow development progress there as well: https://speedtest-tracker-roadmap.alexjustesen.dev/
### Documentation and Features
The docs can be found here https://docs.speedtest-tracker.dev to help you get started and also contains a full list of features.

### Screenshots
#### Dashboard
![Dashboard](.github/screenshots/dashboard_screenshot.png)

#### Results page
![Results page](.github/screenshots/results_screenshot.png)

#### General Settings page
![General Settings page](.github/screenshots/general_settings_screenshot.png)
8 changes: 6 additions & 2 deletions app/Filament/Pages/Settings/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ protected function getFormSchema(): array
Select::make('timezone')
->options(Timezone::all()->pluck('code', 'code'))
->searchable()
->required()
->columnSpan(1),
->required(),
TextInput::make('time_format')
->helperText('Use [DateTime Format](https://www.php.net/manual/en/datetime.format.php) options to change the format of the datetime in views.')
->placeholder('M j, Y G:i:s')
->maxLength(25)
->required(),
])
->columns([
'default' => 1,
Expand Down
14 changes: 13 additions & 1 deletion app/Filament/Resources/ResultResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

use App\Filament\Resources\ResultResource\Pages;
use App\Models\Result;
use App\Settings\GeneralSettings;
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;

Expand All @@ -20,10 +23,14 @@ class ResultResource extends Resource

public static function table(Table $table): Table
{
$settings = new GeneralSettings();

return $table
->columns([
TextColumn::make('id')
->label('ID'),
IconColumn::make('scheduled')
->boolean(),
ViewColumn::make('download')
->view('tables.columns.bits-column'),
ViewColumn::make('upload')
Expand All @@ -33,13 +40,18 @@ public static function table(Table $table): Table
->label('Server ID')
->view('tables.columns.server-column'),
TextColumn::make('created_at')
->dateTime(),
->dateTime($settings->time_format ?? 'M j, Y G:i:s')
->timezone($settings->timezone ?? 'UTC'),
])
->filters([
//
])
->actions([
// Tables\Actions\ViewAction::make(),
Action::make('view result')
->label('View on Speedtest.net')
->url(fn (Result $record): string => $record->url)
->openUrlInNewTab(),
Tables\Actions\DeleteAction::make(),
])
->bulkActions([
Expand Down
2 changes: 2 additions & 0 deletions app/Settings/GeneralSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class GeneralSettings extends Settings

public string $site_name;

public string $time_format;

public string $timezone;

public static function group(): string
Expand Down
2 changes: 1 addition & 1 deletion config/filament.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
|
*/

'favicon' => null,
'favicon' => public_path('img/speedtest-tracker-icon.png'),

/*
|--------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

use Spatie\LaravelSettings\Migrations\SettingsMigration;

class AddTimeFormatToGeneralSettings extends SettingsMigration
{
public function up(): void
{
$this->migrator->add('general.time_format', 'M j, Y G:i:s');
}
}
Binary file modified public/favicon.ico
Binary file not shown.
Binary file added public/img/speedtest-tracker-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions public/vendor/horizon/app-dark.css

This file was deleted.

8 changes: 0 additions & 8 deletions public/vendor/horizon/app.css

This file was deleted.

2 changes: 0 additions & 2 deletions public/vendor/horizon/app.js

This file was deleted.

Binary file removed public/vendor/horizon/img/favicon.png
Binary file not shown.
4 changes: 0 additions & 4 deletions public/vendor/horizon/img/horizon.svg

This file was deleted.

Loading

0 comments on commit 2d9ea93

Please sign in to comment.