Loading
Add search to security scan profile list
What does this MR do and why?
Adds a client-side search box above the profile list in the group Security Configuration → Manage profiles drawer. Typing in the box filters the visible profiles by matching the query against the profile's name or description (case-insensitive, whitespace-trimmed). When no profile matches the query, an inline message reads No profiles match your search. between the search box and the Create new profile button.
The filter runs on the profiles already loaded by groupAvailableSecurityScanProfilesQuery, so there are no extra network calls.
References
- issue: [Frontend] Scan profile drawer: view, create, e... (#624191 - closed)
- parent work item: Advanced Configuration Profiles for Security Sc... (gitlab-org#20193)
- Design:
security-inventory-profiles
Screenshots or screen recordings
| Before | After |
|---|---|
|
Search is not exist |
|
How to set up and validate locally
- Enable the feature flag on a Rails console:
Feature.enable(:custom_secret_detection_profiles_ui). - Seed the group with a handful of Custom Secret Detection profiles so the list has enough rows to filter.
- Open the group's Security Configuration page and click Manage profiles on the Secret Detection row. A Search profiles... input now sits above the list.
- Type part of a profile name (any case). The list narrows to matching profiles in real time.
- Clear the input; the full list returns.
- Type text that matches part of a description instead. The list filters by description hits too.
- Type a query that matches nothing (for example,
zzz). The list disappears and the messageNo profiles match your search.appears, vertically centred between the search box and the Create new profile button. - Type a query with leading/trailing spaces (
Secret). Whitespace is trimmed before matching. - Selection persistence: select a profile, then type a query that hides it. Clear the query. The profile reappears and is still selected.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Chen Charnolevsky
