From: Alexander Moisseev Date: Wed, 1 Jul 2026 15:16:46 +0000 (+0300) Subject: [Rework] WebUI: global search for history/scan X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07a611f145cd1ad2ca46f479d943d2061ea1f381;p=thirdparty%2Frspamd.git [Rework] WebUI: global search for history/scan Add a per-table boolean search box (history/scan) with a query language ported from FooTable's built-in filtering: whitespace = AND, OR, - (exclude), "exact phrase". The predicate ANDs with the per-column header filters. Also add headerFilter:"input" to the text columns (matching the errors-table convention) and align all header-filter inputs on a shared bottom baseline (title-holder flex-grow) regardless of how many lines a wrapped title occupies. --- diff --git a/interface/css/rspamd.css b/interface/css/rspamd.css index 5d90678397..137279f4e5 100644 --- a/interface/css/rspamd.css +++ b/interface/css/rspamd.css @@ -247,8 +247,23 @@ textarea { border-right: none; } .tabulator .tabulator-header .tabulator-col .tabulator-col-content { + /* Lay out as a column that fills the header cell, so the header-filter can + be pushed to a shared bottom baseline. Column titles wrap to differing + numbers of lines, which otherwise leaves the filters misaligned. */ + display: flex; + flex-direction: column; + flex-grow: 1; padding: 8px; } +/* Grow the title holder to fill the content cell so it pushes the + header-filter (its following sibling) down to a shared bottom baseline. + Column titles wrap to differing numbers of lines, which otherwise leaves + the filters misaligned. Growing the holder is used instead of an auto + margin on the filter: the cell's height comes from flex-grow, and auto + margins don't distribute reliably against a flex-determined size. */ +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { + flex-grow: 1; +} /* Keep the first glyph's left bearing clear of the title's overflow:hidden (e.g. the "W" in "Worker type" was clipped on the left). */ .tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { @@ -259,6 +274,12 @@ textarea { .tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-content .tabulator-col-title { padding-right: 15px; } +/* Drop the filter to the bottom of the (flex-column) content so every + column's filter shares one baseline, regardless of title wrap height. */ +.tabulator .tabulator-header-filter { + margin-top: auto; +} + /* Header filter input — render as a Bootstrap form-control. appearance:none drops the UA search-input chrome that ignored the dark background (input looked too light in dark mode). diff --git a/interface/index.html b/interface/index.html index 7d64166f11..34f7b7e4af 100644 --- a/interface/index.html +++ b/interface/index.html @@ -590,6 +590,7 @@ Scan results history
+