Skip to content

Commit 9eb5b68

Browse files
authored
InfluxDB verify ssl (alexjustesen#443)
1 parent 20aae0e commit 9eb5b68

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

app/Filament/Pages/Settings/InfluxDbPage.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use App\Settings\GeneralSettings;
66
use App\Settings\InfluxDbSettings;
77
use Closure;
8+
use Filament\Forms\Components\Checkbox;
89
use Filament\Forms\Components\Grid;
910
use Filament\Forms\Components\Section;
1011
use Filament\Forms\Components\TextInput;
@@ -61,6 +62,9 @@ protected function getFormSchema(): array
6162
->maxLength(255)
6263
->required(fn (Closure $get) => $get('v2_enabled') == true)
6364
->columnSpan(['md' => 2]),
65+
Checkbox::make('v2_verify_ssl')
66+
->label('Verify SSL')
67+
->columnSpan(['md' => 2]),
6468
TextInput::make('v2_org')
6569
->label('Org')
6670
->maxLength(255)

app/Jobs/SendDataToInfluxDbV2.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public function handle()
4545
'org' => optional($this->settings)->v2_org,
4646
'bucket' => optional($this->settings)->v2_bucket,
4747
'token' => optional($this->settings)->v2_token,
48+
'verifySSL' => $this->settings->v2_verify_ssl,
4849
];
4950

5051
$client = new Client([

app/Settings/InfluxDbSettings.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class InfluxDbSettings extends Settings
1616

1717
public ?string $v2_token;
1818

19+
public bool $v2_verify_ssl;
20+
1921
public static function group(): string
2022
{
2123
return 'influxdb';
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
use Spatie\LaravelSettings\Migrations\SettingsMigration;
4+
5+
return new class extends SettingsMigration
6+
{
7+
public function up(): void
8+
{
9+
$this->migrator->add('influxdb.v2_verify_ssl', true);
10+
}
11+
};

0 commit comments

Comments
 (0)