Commit 85e4e70d authored by Matija Čupić's avatar Matija Čupić

Fix Cluster index view @scope logic

parent 062f011d
...@@ -2,13 +2,7 @@ ...@@ -2,13 +2,7 @@
- page_title "Clusters" - page_title "Clusters"
.clusters-container .clusters-container
- if @clusters.empty? && (@scope.nil? || @scope == 'all') - if !@clusters.empty?
= render "empty_state"
- elsif @clusters.empty? && (!@scope.nil? || @scope != 'all')
= render "tabs"
.prepend-top-20.text-center
= s_("ClusterIntegration|There are no clusters to show")
- else
= render "tabs" = render "tabs"
.ci-table.js-clusters-list .ci-table.js-clusters-list
.gl-responsive-table-row.table-row-header{ role: "row" } .gl-responsive-table-row.table-row-header{ role: "row" }
...@@ -22,3 +16,9 @@ ...@@ -22,3 +16,9 @@
- @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
= render "empty_state"
- else
= render "tabs"
.prepend-top-20.text-center
= s_("ClusterIntegration|There are no clusters to show")
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