Skip to content

Commit d40e4f7

Browse files
authored
[feature] Add environment values for Thresholds during initial setup (alexjustesen#1933)
1 parent b2c8b28 commit d40e4f7

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

config/speedtest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,15 @@
4040
*/
4141
'skip_ips' => env('SPEEDTEST_SKIP_IPS', ''),
4242

43+
/**
44+
* Threshold settings.
45+
*/
46+
47+
'threshold_enabled' => env('THRESHOLD_ENABLED', false),
48+
49+
'threshold_download' => env('THRESHOLD_DOWNLOAD', 0),
50+
51+
'threshold_upload' => env('THRESHOLD_UPLOAD', 0),
52+
53+
'threshold_ping' => env('THRESHOLD_PING', 0) ,
4354
];

database/settings/2022_10_24_153411_create_thresholds_settings.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ class CreateThresholdsSettings extends SettingsMigration
66
{
77
public function up(): void
88
{
9-
$this->migrator->add('threshold.absolute_enabled', false);
10-
$this->migrator->add('threshold.absolute_download', 0);
11-
$this->migrator->add('threshold.absolute_upload', 0);
12-
$this->migrator->add('threshold.absolute_ping', 0);
9+
$this->migrator->add('threshold.absolute_enabled', config('speedtest.threshold_enabled'));
10+
$this->migrator->add('threshold.absolute_download', config('speedtest.threshold_download'));
11+
$this->migrator->add('threshold.absolute_upload', config('speedtest.threshold_upload'));
12+
$this->migrator->add('threshold.absolute_ping', config('speedtest.threshold_ping'));
1313
}
1414
}

0 commit comments

Comments
 (0)