diff options
author | Simon Knox <simon@gitlab.com> | 2018-11-08 10:02:44 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-11-08 10:02:44 +0300 |
commit | 11a606fe275251a7a64aee4ca526c36ae12c5735 (patch) | |
tree | cbdfb334aed24a958e81d22d185df969efcd5170 /app | |
parent | df8f663689aba29424406ebf2a9e786fb6dcdd14 (diff) |
backport changes from gitlab-ee!7903
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/projects_helper.rb | 9 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_project.html.haml | 7 |
2 files changed, 14 insertions, 2 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index d9713f9c9b0..0a7f930110a 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -540,4 +540,13 @@ module ProjectsHelper network ] end + + def sidebar_operations_paths + %w[ + environments + clusters + user + gcp + ] + end end diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 174033f3d49..ab15889a465 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -195,7 +195,7 @@ = _('Charts') - if project_nav_tab? :operations - = nav_link(controller: [:environments, :clusters, :user, :gcp]) do + = nav_link(controller: sidebar_operations_paths) do = link_to metrics_project_environments_path(@project), class: 'shortcuts-operations' do .nav-icon-container = sprite_icon('cloud-gear') @@ -203,7 +203,7 @@ = _('Operations') %ul.sidebar-sub-level-items - = nav_link(controller: [:environments, :clusters, :user, :gcp], html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: sidebar_operations_paths, html_options: { class: "fly-out-top-item" } ) do = link_to metrics_project_environments_path(@project) do %strong.fly-out-top-item-name = _('Operations') @@ -215,6 +215,8 @@ %span = _('Metrics') + = render_if_exists "layouts/nav/sidebar/tracing_link" + = nav_link(controller: :environments, action: [:index, :folder, :show, :new, :edit, :create, :update, :stop, :terminal]) do = link_to project_environments_path(@project), title: _('Environments'), class: 'shortcuts-environments qa-operations-environments-link' do %span @@ -326,6 +328,7 @@ = link_to project_settings_ci_cd_path(@project), title: _('CI / CD') do %span = _('CI / CD') + = render_if_exists 'projects/sidebar/settings_operations' - if @project.pages_available? = nav_link(controller: :pages) do = link_to project_pages_path(@project), title: _('Pages') do |