Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b0c1c2d8
Commit
b0c1c2d8
authored
Aug 14, 2018
by
Mayra Cabrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use limited count approach for counting Protected Environments
Closes #7175
parent
11c73086
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
ee/app/controllers/ee/projects/settings/ci_cd_controller.rb
ee/app/controllers/ee/projects/settings/ci_cd_controller.rb
+0
-1
ee/app/views/projects/protected_environments/_environments_list.html.haml
...jects/protected_environments/_environments_list.html.haml
+1
-1
ee/changelogs/unreleased/7175-protected-environments-use-limited-count-approach-ee.yml
...-protected-environments-use-limited-count-approach-ee.yml
+5
-0
No files found.
ee/app/controllers/ee/projects/settings/ci_cd_controller.rb
View file @
b0c1c2d8
...
@@ -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
...
...
ee/app/views/projects/protected_environments/_environments_list.html.haml
View file @
b0c1c2d8
...
@@ -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
...
...
ee/changelogs/unreleased/7175-protected-environments-use-limited-count-approach-ee.yml
0 → 100644
View file @
b0c1c2d8
---
title
:
Use limited count approach on Protected Environments view
merge_request
:
6987
author
:
type
:
performance
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment