Commit df8e09a6 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Module StepStar : ajout du filtrage par contenu textuel du log

parent 228130a7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@ use Laminas\Http\Response;
use Laminas\Paginator\Paginator as LaminasPaginator;
use Laminas\View\Model\ViewModel;

/**
 * @property \StepStar\Service\Log\Recherche\LogSearchService $searchService
 */
class LogRechercheController extends AbstractController implements SearchControllerInterface
{
    use SearchControllerTrait;
+8 −2
Original line number Diff line number Diff line
@@ -46,16 +46,22 @@ class LogSearchService extends SearchService
                ->setData([
                    Log::OPERATION__GENERATION_XML => Log::OPERATION__GENERATION_XML,
                    Log::OPERATION__ENVOI => Log::OPERATION__ENVOI,
                    Log::OPERATION__SYNTHESE => Log::OPERATION__SYNTHESE,
                ])
        );
        $this->addFilter(
            (new SelectSearchFilter("Succès ?", 'success'))
                ->setWhereField('log.success')
                ->setData([
                    1 => 'Oui',
                    0 => 'Non',
                    '1' => 'Oui',
                    '0' => 'Non',
                ])
        );
        $this->addFilter(
            (new TextSearchFilter("Log", 'log'))
                ->setUseLikeOperator()
                ->setWhereField('log.log')
        );
        $this->addFilter(
            (new TextSearchFilter("Tag", 'tag'))
                ->setUseLikeOperator()
+2 −2
Original line number Diff line number Diff line
@@ -127,11 +127,11 @@ $this->headTitle("Logs");
                        </td>

                        <td class="<?php echo $log->isSuccess() ? '' : 'text-danger' ?>">
                            <?php echo $log->getTruncatedLog(80) ?>
                            <?php echo $log->getTruncatedLog(100) ?>
                        </td>

                        <td>
                            <?php echo $log->getTag() ?>
                            <span class="badge bg-secondary"><?php echo $log->getTag() ?></span>
                        </td>

                        <td class="action">