Fix empty security dashboard props
What does this MR do?
It looks like a small bug was introduced in this MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13180
Some props weren't correctly referenced when initializing the project's security dashboard, causing the empty state component to be incomplete when the project's doesn't have any pipeline history.
The bug is visible on the screenshot below, there should be an illustration and a link pointing to the documentation but these elements aren't rendered because of the missing props:
This MR fixes this by properly renaming the props:
How to test this
An easy way to test this locally would be to modify ee/app/helpers/ee/projects_helper.rb
to simulate an empty pipeline history:
diff --git a/ee/app/helpers/ee/projects_helper.rb b/ee/app/helpers/ee/projects_helper.rb
index 87c9665c0df..4fe94d2a1bd 100644
--- a/ee/app/helpers/ee/projects_helper.rb
+++ b/ee/app/helpers/ee/projects_helper.rb
@@ -153,6 +153,7 @@ module EE
end
def project_security_dashboard_config(project, pipeline)
+ pipeline = nil
if pipeline.nil?
{
empty_state_illustration_path: image_path('illustrations/security-dashboard_empty.svg'),
Then, access any project's security dashboard that would normally show a report and you should see the empty state.