
* display_name_help: replace location with node * cpu_helper: 100% is one thread, not core * remove unnecessary "create_action" translation * nobody saw anything
49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Admin\Resources\WebhookResource\Pages;
|
|
|
|
use App\Filament\Admin\Resources\WebhookResource;
|
|
use App\Models\WebhookConfiguration;
|
|
use Filament\Actions;
|
|
use Filament\Resources\Pages\ListRecords;
|
|
use Filament\Tables\Actions\CreateAction;
|
|
use Filament\Tables\Columns\TextColumn;
|
|
use Filament\Tables\Table;
|
|
use Filament\Tables\Actions\EditAction;
|
|
use Filament\Tables\Actions\DeleteAction;
|
|
|
|
class ListWebhookConfigurations extends ListRecords
|
|
{
|
|
protected static string $resource = WebhookResource::class;
|
|
|
|
public function table(Table $table): Table
|
|
{
|
|
return $table
|
|
->columns([
|
|
TextColumn::make('description')
|
|
->label(trans('admin/webhook.table.description')),
|
|
TextColumn::make('endpoint')
|
|
->label(trans('admin/webhook.table.endpoint')),
|
|
])
|
|
->actions([
|
|
DeleteAction::make(),
|
|
EditAction::make(),
|
|
])
|
|
->emptyStateIcon('tabler-webhook')
|
|
->emptyStateDescription('')
|
|
->emptyStateHeading(trans('admin/webhook.no_webhooks'))
|
|
->emptyStateActions([
|
|
CreateAction::make('create')
|
|
->button(),
|
|
]);
|
|
}
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [
|
|
Actions\CreateAction::make()
|
|
->hidden(fn () => WebhookConfiguration::count() <= 0),
|
|
];
|
|
}
|
|
}
|