Add handling big content for a drawer
What does this MR do and why?
Add handling big content for a drawer
Big summaries are restricted to 10 lines. When more, it is rendered with toggle option
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Description | UI |
---|---|
content.mov |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Go to Group/project
-
Secure => Policies
-
Create approval policy with license_scan
-
Apply patch
Subject: [PATCH] Add handling big content for a drawer Big summaries are restricted to 10 lines. When more, it is rendered with toggle option Changelog: changed EE: true --- Index: ee/app/assets/javascripts/security_orchestration/components/policy_drawer/scan_result/utils.js IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/scan_result/utils.js b/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/scan_result/utils.js --- a/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/scan_result/utils.js (revision e222e2e7395e9b4d638ff0b78fe50d3eb25a6887) +++ b/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/scan_result/utils.js (date 1725661962813) @@ -292,9 +292,11 @@ 'SecurityOrchestration|When license scanner finds any license except %{licenses}%{detection} in an open merge request %{targeting}%{branches}%{branchExceptionsString}', ); + const mockLicenses = Array.from(Array(250).keys()).map((id) => `License type ${id}`); + return { summary: sprintf(summaryText, { - licenses: humanizeLicenses(rule.license_types), + licenses: mockLicenses, //humanizeLicenses(rule.license_types), detection: humanizeLicenseDetection(rule.license_states), branches: humanizedValue, targeting: targetingValue,
- Go to policy list
- Open drawer with license_scan
Related to #415576 (closed)
Edited by Artur Fedorov