update laravel + filament & improve agent deny

This commit is contained in:
xiaomlove
2023-03-06 14:53:18 +08:00
parent e59cb7911c
commit a0e7ba12ae
13 changed files with 787 additions and 615 deletions
@@ -9,4 +9,9 @@ use Filament\Resources\Pages\CreateRecord;
class CreateAgentAllow extends CreateRecord
{
protected static string $resource = AgentAllowResource::class;
public function afterCreate()
{
clear_agent_allow_deny_cache();
}
}
@@ -16,4 +16,9 @@ class EditAgentAllow extends EditRecord
Actions\DeleteAction::make(),
];
}
public function afterSave()
{
clear_agent_allow_deny_cache();
}
}
@@ -20,10 +20,10 @@ class DeniesRelationManager extends RelationManager
{
return $form
->schema([
Forms\Components\TextInput::make('name')->required()->maxLength(255),
Forms\Components\TextInput::make('peer_id')->required()->maxLength(255),
Forms\Components\TextInput::make('agent')->required()->maxLength(255),
Forms\Components\Textarea::make('comment'),
Forms\Components\TextInput::make('name')->required()->maxLength(255)->label(__('label.name')),
Forms\Components\TextInput::make('peer_id')->required()->maxLength(255)->label(__('label.agent_deny.peer_id')),
Forms\Components\TextInput::make('agent')->required()->maxLength(255)->label(__('label.agent_deny.agent')),
Forms\Components\Textarea::make('comment')->label(__('label.comment')),
]);
}
@@ -31,9 +31,9 @@ class DeniesRelationManager extends RelationManager
{
return $table
->columns([
Tables\Columns\TextColumn::make('name'),
Tables\Columns\TextColumn::make('peer_id'),
Tables\Columns\TextColumn::make('agent'),
Tables\Columns\TextColumn::make('name')->label(__('label.name')),
Tables\Columns\TextColumn::make('peer_id')->label(__('label.agent_deny.peer_id')),
Tables\Columns\TextColumn::make('agent')->label(__('label.agent_deny.agent')),
])
->filters([
//