Commit b0c1c2d8 authored by Mayra Cabrera's avatar Mayra Cabrera

Use limited count approach for counting Protected Environments

Closes #7175
parent 11c73086
...@@ -26,7 +26,6 @@ module EE ...@@ -26,7 +26,6 @@ module EE
def define_protected_env_variables def define_protected_env_variables
@protected_environments = @project.protected_environments.order(:name) @protected_environments = @project.protected_environments.order(:name)
@protected_environments_count = @protected_environments.count
@protected_environment = @project.protected_environments.new @protected_environment = @project.protected_environments.new
end end
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
%col{ width: '10%' } %col{ width: '10%' }
%thead %thead
%tr %tr
%th= s_('ProtectedEnvironment|Protected Environment (%{protected_environments_count})') % { protected_environments_count: @protected_environments_count } %th= s_('ProtectedEnvironment|Protected Environment (%{protected_environments_count})') % { protected_environments_count: limited_counter_with_delimiter(@protected_environments) }
%th= s_('ProtectedEnvironment|Allowed to deploy') %th= s_('ProtectedEnvironment|Allowed to deploy')
- if can_admin_project - if can_admin_project
%th %th
......
---
title: Use limited count approach on Protected Environments view
merge_request: 6987
author:
type: performance
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