Skip to content

Commit

Permalink
[feature] Add environment values for Thresholds during initial setup (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvg93 authored Dec 29, 2024
1 parent b2c8b28 commit d40e4f7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions config/speedtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,15 @@
*/
'skip_ips' => env('SPEEDTEST_SKIP_IPS', ''),

/**
* Threshold settings.
*/

'threshold_enabled' => env('THRESHOLD_ENABLED', false),

'threshold_download' => env('THRESHOLD_DOWNLOAD', 0),

'threshold_upload' => env('THRESHOLD_UPLOAD', 0),

'threshold_ping' => env('THRESHOLD_PING', 0) ,
];
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ class CreateThresholdsSettings extends SettingsMigration
{
public function up(): void
{
$this->migrator->add('threshold.absolute_enabled', false);
$this->migrator->add('threshold.absolute_download', 0);
$this->migrator->add('threshold.absolute_upload', 0);
$this->migrator->add('threshold.absolute_ping', 0);
$this->migrator->add('threshold.absolute_enabled', config('speedtest.threshold_enabled'));
$this->migrator->add('threshold.absolute_download', config('speedtest.threshold_download'));
$this->migrator->add('threshold.absolute_upload', config('speedtest.threshold_upload'));
$this->migrator->add('threshold.absolute_ping', config('speedtest.threshold_ping'));
}
}

0 comments on commit d40e4f7

Please sign in to comment.