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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
976e22e6
Commit
976e22e6
authored
Nov 30, 2017
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use strings for @scope in ClustersController#index
parent
85e4e70d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/controllers/projects/clusters_controller.rb
app/controllers/projects/clusters_controller.rb
+1
-1
app/views/projects/clusters/index.html.haml
app/views/projects/clusters/index.html.haml
+1
-1
No files found.
app/controllers/projects/clusters_controller.rb
View file @
976e22e6
...
@@ -7,7 +7,7 @@ class Projects::ClustersController < Projects::ApplicationController
...
@@ -7,7 +7,7 @@ class Projects::ClustersController < Projects::ApplicationController
before_action
:authorize_admin_cluster!
,
only:
[
:destroy
]
before_action
:authorize_admin_cluster!
,
only:
[
:destroy
]
def
index
def
index
@scope
=
params
[
:scope
]
||
:all
@scope
=
params
[
:scope
]
||
'all'
clusters
=
ClustersFinder
.
new
(
project
,
current_user
,
@scope
).
execute
clusters
=
ClustersFinder
.
new
(
project
,
current_user
,
@scope
).
execute
@clusters
=
clusters
.
page
(
params
[
:page
]).
per
(
20
)
@clusters
=
clusters
.
page
(
params
[
:page
]).
per
(
20
)
@active_count
=
project
.
clusters
.
enabled
.
count
@active_count
=
project
.
clusters
.
enabled
.
count
...
...
app/views/projects/clusters/index.html.haml
View file @
976e22e6
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
-
@clusters
.
each
do
|
cluster
|
-
@clusters
.
each
do
|
cluster
|
=
render
"cluster"
,
cluster:
cluster
=
render
"cluster"
,
cluster:
cluster
=
paginate
@clusters
,
theme:
"gitlab"
=
paginate
@clusters
,
theme:
"gitlab"
-
elsif
@scope
==
:all
-
elsif
@scope
==
'all'
=
render
"empty_state"
=
render
"empty_state"
-
else
-
else
=
render
"tabs"
=
render
"tabs"
...
...
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