Sort scan triggers in profile details modal by canonical order

What does this MR do and why?

The scan profile details modal, shown from the enable-scanners wizard and the scan profile configuration table, displays a profile's Scan triggers in an order that could change depending on toggle history, instead of staying fixed.

This resolves the full trigger list through the existing canonical resolveTriggers(scanType) order instead of resolving each stored trigger one at a time, so the displayed order is fixed (for example Merge request, Branch, Secret push protection for Secret Detection) no matter which trigger was most recently toggled. Mirrors the same fix applied to Manage profiles in !259573 (merged).

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Have a GitLab Ultimate licence and enable the flag for a group: echo "Feature.enable(:custom_scan_profiles_ui)" | gdk rails c
  2. Open a group's Security configuration page.
  3. Open the enable-scanners wizard or scan profile configuration table for a profile with more than one trigger.
  4. Open the details modal for that profile.
  5. Edit the profile, disable one of its triggers, save, then re-enable it and save again.
  6. Reopen the details modal and confirm the trigger order stays fixed.

References

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

Merge request reports

Loading
Loading