diff --git a/web/ajax/modals/filterdebug.php b/web/ajax/modals/filterdebug.php index 725539a99..f3a961874 100644 --- a/web/ajax/modals/filterdebug.php +++ b/web/ajax/modals/filterdebug.php @@ -9,13 +9,13 @@ '; } else { $filter = new ZM\Filter($_REQUEST['fid']); - if ( ! $filter->Id() ) { + if (!$filter->Id()) { echo '
Filter not found for id '.$_REQUEST['fid'].'
'; } } @@ -25,7 +25,16 @@ // We have to manually insert the csrf key into the form when using a modal generated via ajax call echo getCSRFinputHTML(); ?> -

sql() ?>

+

+FROM Monitors AS M INNER JOIN Events AS E ON (M.Id = E.MonitorId)
WHERE
'; + $sql .= $filter->sql(); + $sql .= $filter->sort_field() ? ' ORDER BY '.$filter->sort_field(). ' ' .($filter->sort_asc() ? 'ASC' : 'DESC') : ''; + $sql .= $filter->limit() ? ' LIMIT '.$filter->limit() : ''; + $sql .= $filter->skip_locked() ? ' SKIP LOCKED' : ''; + + echo $sql; +?>