schema([ Forms\Components\TextInput::make('family')->required()->label(__('label.agent_allow.family')), Forms\Components\TextInput::make('start_name')->required()->label(__('label.agent_allow.start_name')), Forms\Components\TextInput::make('peer_id_start')->required()->label(__('label.agent_allow.peer_id_start')), Forms\Components\TextInput::make('peer_id_pattern')->required()->label(__('label.agent_allow.peer_id_pattern')), Forms\Components\Radio::make('peer_id_matchtype')->options(self::$matchTypes)->required()->label(__('label.agent_allow.peer_id_matchtype')), Forms\Components\TextInput::make('peer_id_match_num')->integer()->required()->label(__('label.agent_allow.peer_id_match_num')), Forms\Components\TextInput::make('agent_start')->required()->label(__('label.agent_allow.agent_start')), Forms\Components\TextInput::make('agent_pattern')->required()->label(__('label.agent_allow.agent_pattern')), Forms\Components\Radio::make('agent_matchtype')->options(self::$matchTypes)->required()->label(__('label.agent_allow.agent_matchtype')), Forms\Components\TextInput::make('agent_match_num')->required()->label(__('label.agent_allow.agent_match_num')), Forms\Components\Radio::make('exception')->options(self::$yesOrNo)->required()->label(__('label.agent_allow.exception')), Forms\Components\Radio::make('allowhttps')->options(self::$yesOrNo)->required()->label(__('label.agent_allow.allowhttps')), Forms\Components\Textarea::make('comment')->label(__('label.comment')), ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('id')->sortable(), Tables\Columns\TextColumn::make('family')->searchable()->label(__('label.agent_allow.family')), Tables\Columns\TextColumn::make('start_name')->searchable()->label(__('label.agent_allow.start_name')), Tables\Columns\TextColumn::make('peer_id_start')->label(__('label.agent_allow.peer_id_start')), Tables\Columns\TextColumn::make('agent_start')->label(__('label.agent_allow.agent_start')), ]) ->defaultSort('id', 'desc') ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\DeleteBulkAction::make(), ]); } public static function getRelations(): array { return [ RelationManagers\DeniesRelationManager::class, ]; } public static function getPages(): array { return [ 'index' => Pages\ListAgentAllows::route('/'), 'create' => Pages\CreateAgentAllow::route('/create'), 'edit' => Pages\EditAgentAllow::route('/{record}/edit'), ]; } }