diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-11-30 23:14:25 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2017-12-11 15:24:35 +0100 |
commit | eae1b8282bca1adac6289087edd7601e442edc8a (patch) | |
tree | cc2341482940afee361e5a8349cc85810f49e7e7 | |
parent | 4882c793019f4c46ca20e0c187dc97e10cf5a3ce (diff) | |
download | gitlab-ce-eae1b8282bca1adac6289087edd7601e442edc8a.tar.gz |
Remove tab navigation from clusters/index
-rw-r--r-- | app/views/projects/clusters/_tabs.html.haml | 16 | ||||
-rw-r--r-- | app/views/projects/clusters/index.html.haml | 16 | ||||
-rw-r--r-- | spec/features/projects/clusters_spec.rb | 11 |
3 files changed, 8 insertions, 35 deletions
diff --git a/app/views/projects/clusters/_tabs.html.haml b/app/views/projects/clusters/_tabs.html.haml deleted file mode 100644 index c8120e806fa..00000000000 --- a/app/views/projects/clusters/_tabs.html.haml +++ /dev/null @@ -1,16 +0,0 @@ -.top-area.scrolling-tabs-container.inner-page-scroll-tabs - .fade-left= icon("angle-left") - .fade-right= icon("angle-right") - %ul.nav-links.scrolling-tabs - %li{ class: ('active' if @scope == 'active') }> - = link_to project_clusters_path(@project, scope: :active), class: "js-active-tab" do - = s_("ClusterIntegration|Active") - %span.badge= @active_count - %li{ class: ('active' if @scope == 'inactive') }> - = link_to project_clusters_path(@project, scope: :inactive), class: "js-inactive-tab" do - = s_("ClusterIntegration|Inactive") - %span.badge= @inactive_count - %li{ class: ('active' if @scope.nil? || @scope == 'all') }> - = link_to project_clusters_path(@project), class: "js-all-tab" do - = s_("ClusterIntegration|All") - %span.badge= @all_count diff --git a/app/views/projects/clusters/index.html.haml b/app/views/projects/clusters/index.html.haml index 104e39b0e06..4399905a7a1 100644 --- a/app/views/projects/clusters/index.html.haml +++ b/app/views/projects/clusters/index.html.haml @@ -2,8 +2,14 @@ - page_title "Clusters" .clusters-container - - if !@clusters.empty? - = render "tabs" + - if @clusters.empty? + = render "empty_state" + - else + .top-area.adjust + .nav-text + = s_("ClusterIntegration|Control your environments separately by adding multiple clusters to your project") + .pull-right.nav-bar-right + = link_to s_("ClusterIntegration|Add cluster"), new_project_cluster_path(@project), class: "btn btn-success disabled has-tooltip js-add-cluster", title: s_("ClusterIntegration|Multiple clusters are available in GitLab Entreprise Edition Premium and Ultimate") .ci-table.js-clusters-list .gl-responsive-table-row.table-row-header{ role: "row" } .table-section.section-30{ role: "rowheader" } @@ -16,9 +22,3 @@ - @clusters.each do |cluster| = render "cluster", cluster: cluster.present(current_user: current_user) = 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") diff --git a/spec/features/projects/clusters_spec.rb b/spec/features/projects/clusters_spec.rb index 008bdf2044b..93929bf6814 100644 --- a/spec/features/projects/clusters_spec.rb +++ b/spec/features/projects/clusters_spec.rb @@ -35,17 +35,6 @@ feature 'Clusters', :js do expect(page).to have_selector('.gl-responsive-table-row', count: 2) end - it 'user sees navigation tabs' do - expect(page.find('.js-active-tab').text).to include('Active') - expect(page.find('.js-active-tab .badge').text).to include('1') - - expect(page.find('.js-inactive-tab').text).to include('Inactive') - expect(page.find('.js-inactive-tab .badge').text).to include('0') - - expect(page.find('.js-all-tab').text).to include('All') - expect(page.find('.js-all-tab .badge').text).to include('1') - end - context 'inline update of cluster' do it 'user can update cluster' do expect(page).to have_selector('.js-toggle-cluster-list') |