[修改]修改了Exporter变量名称及页面配置
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use App\Settings\ExposerSettings;
|
||||
use App\Settings\ExporterSettings;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Pages\SettingsPage;
|
||||
@@ -15,11 +15,11 @@ use Filament\Forms\Components\Toggle;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\Fieldset;
|
||||
|
||||
class ManageExposer extends SettingsPage
|
||||
class ManageExporter extends SettingsPage
|
||||
{
|
||||
protected static ?string $navigationIcon = 'heroicon-o-cog-6-tooth';
|
||||
|
||||
protected static string $settings = ExposerSettings::class;
|
||||
protected static string $settings = ExporterSettings::class;
|
||||
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
@@ -27,11 +27,11 @@ class ManageExposer extends SettingsPage
|
||||
->schema([
|
||||
Fieldset::make()
|
||||
->schema([
|
||||
Textarea::make('exposer_bind')
|
||||
->label('OPC UA Endpoint')
|
||||
TextInput::make('exposer_bind')
|
||||
->label('bind')
|
||||
->required(),
|
||||
TextInput::make('exposer_auth')
|
||||
->label('OPC UA Endpoint')
|
||||
TextInput::make('exposer_thread')
|
||||
->label('thread')
|
||||
->required(),
|
||||
]),
|
||||
|
||||
18
management-panel/app/Settings/ExporterSettings.php
Normal file
18
management-panel/app/Settings/ExporterSettings.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Settings;
|
||||
|
||||
use Spatie\LaravelSettings\Settings;
|
||||
|
||||
class ExporterSettings extends Settings
|
||||
{
|
||||
public string $exporter_bind;
|
||||
public int $exporter_thread;
|
||||
|
||||
public string $exporter_auth;
|
||||
|
||||
public static function group(): string
|
||||
{
|
||||
return 'exporter';
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Settings;
|
||||
|
||||
use Spatie\LaravelSettings\Settings;
|
||||
|
||||
class ExposerSettings extends Settings
|
||||
{
|
||||
public string $exposer_bind;
|
||||
public int $exposer_thread;
|
||||
|
||||
public string $exposer_auth;
|
||||
|
||||
public static function group(): string
|
||||
{
|
||||
return 'exposer';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
use Spatie\LaravelSettings\Migrations\SettingsMigration;
|
||||
|
||||
return new class extends SettingsMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$this->migrator->add('exporter.exporter_bind', '0.0.0.0:8191');
|
||||
$this->migrator->add('exporter.exporter_thread', 2);
|
||||
$this->migrator->add('exporter.exporter_auth', 'None');
|
||||
}
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Spatie\LaravelSettings\Migrations\SettingsMigration;
|
||||
|
||||
return new class extends SettingsMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$this->migrator->add('exposer.exposer_bind', '0.0.0.0:8191');
|
||||
$this->migrator->add('exposer.exposer_thread', 2);
|
||||
$this->migrator->add('exposer.exposer_auth', 'None');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user