Add snooze information to policy drawer summary
What does this MR do and why?
Add snooze information to policy drawer summary
- add snooze information
- add tests
EE: true
References
Screenshots or screen recordings
How to set up and validate locally
- Upload a GitLab Ultimate license
- Navigate to a project/group => Secure => Policies => New policy => Pipeline execution policy => Create a new policy
- Add the following patch
diff --git a/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/pipeline_execution/details_drawer.vue b/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/pipeline_execution/details_drawer.vue
index ca2ca957662b..b0206802fc63 100644
--- a/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/pipeline_execution/details_drawer.vue
+++ b/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/pipeline_execution/details_drawer.vue
@@ -54,8 +54,26 @@ export default {
return this.policy?.policyScope;
},
parsedYaml() {
+ const mockPipelineExecutionSchedulePolicy = `name: "Scheduled PEP"
+enabled: true
+content:
+ include:
+ - project: path/to/project
+ file: policy-ci.yml
+schedules:
+- type: daily
+ start_time: "00:00"
+ time_window:
+ distribution: random
+ value: 3600
+ timezone: "America/New_York"
+ snooze:
+ reason: "there are too many pipelines"
+ until: "2025-06-26T16:27:00+00:00"
+`;
return fromYaml({
- manifest: this.policy.yaml,
+ manifest: mockPipelineExecutionSchedulePolicy,
+ // manifest: this.policy.yaml,
type: POLICY_TYPE_COMPONENT_OPTIONS.pipelineExecution.urlParameter,
});
},
- Navigate to a project/group => Secure => Policies => Select the pipeline execution policy
- Verify the summary drawer has the snooze information
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.
Related to #535078 (closed)
Edited by Alexander Turinske
