Commit 1fd811a5 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'rp-use-override-in-environments-helper' into 'master'

Use override utility in EE::EnvironmentsHelper

See merge request gitlab-org/gitlab!29978
parents d43df1b7 8d40d296
......@@ -2,7 +2,6 @@
module EnvironmentsHelper
include ActionView::Helpers::AssetUrlHelper
prepend_if_ee('::EE::EnvironmentsHelper') # rubocop: disable Cop/InjectEnterpriseEditionModule
def environments_list_data
{
......@@ -65,3 +64,5 @@ module EnvironmentsHelper
can?(current_user, :destroy_environment, environment)
end
end
EnvironmentsHelper.prepend_if_ee('::EE::EnvironmentsHelper')
......@@ -2,6 +2,9 @@
module EE
module EnvironmentsHelper
extend ::Gitlab::Utils::Override
override :environments_list_data
def environments_list_data
ee_environments_list_data = {
"canary_deployment_feature_id" => UserCalloutsHelper::CANARY_DEPLOYMENT,
......@@ -14,6 +17,7 @@ module EE
super.merge(ee_environments_list_data)
end
override :environments_folder_list_view_data
def environments_folder_list_view_data
ee_environments_folder_list_view_data = {
"canary_deployment_feature_id" => UserCalloutsHelper::CANARY_DEPLOYMENT,
......@@ -26,6 +30,7 @@ module EE
super.merge(ee_environments_folder_list_view_data)
end
override :metrics_data
def metrics_data(project, environment)
ee_metrics_data = {}
ee_metrics_data["logs_path"] = project_logs_path(project, environment_name: environment.name) if can?(current_user, :read_pod_logs, project)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment