Draft: fix(security): use inventory run mode status labels

What does this MR do and why?

This MR updates the Security Asset Inventories status labels displayed in the Automated Triage and Remediation configuration tabs to match the terminology used in the Security Asset Inventory.

Previously, enabled capabilities were displayed as Active, regardless of their configured run mode. With this change:

  • Capabilities with AUTO run mode display Automatic.
  • Capabilities with MANUAL run mode display On demand.
  • Existing statuses such as Off, Off for group, and Unavailable remain unchanged.

The implementation uses the inventory capability's runMode field to determine the enabled status label, ensuring consistency between the configuration tabs and Security Asset Inventory.

References

Screenshots or screen recordings

Not applicable. This change updates existing status text without introducing visual layout or component changes.

Before

Enabled capabilities displayed Active, regardless of run mode.

After

AUTO capabilities display Automatic; MANUAL capabilities display On demand.

How to set up and validate locally

  1. Check out the branch fix-639881-use-inventory-run-mode-labels.
  2. Run the focused frontend tests:

yarn jest ee/spec/frontend/security_configuration/components/scan_profiles/utils_spec.js ee/spec/frontend/security_configuration/components/scan_profiles/auto_remediation_capabilities_spec.js

  1. Run the local validation script:

gitlab-check

Validation results:

  • Frontend ESLint: Passed.
  • Prettier: Passed.
  • Jest: 2 test suites passed, 158 tests passed.
  • git diff --check: Passed.

MR acceptance checklist

  • Changes address the requested issue.
  • Enabled capabilities display the appropriate inventory run-mode terminology.
  • Existing disabled and unavailable status labels are preserved.
  • Tests cover both AUTO and MANUAL run modes.
  • Component expectations are updated.
  • Focused frontend tests pass.
  • Frontend ESLint and Prettier pass.
  • No unrelated changes are included.
  • CI pipeline validation.

Merge request reports

Loading
Loading