Commit f351f055 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '243776-reorder-nav-item' into 'master'

Update sidebar operations order

See merge request gitlab-org/gitlab!42493
parents 2691bf0a 51231781
...@@ -229,37 +229,32 @@ ...@@ -229,37 +229,32 @@
%span %span
= _('Metrics') = _('Metrics')
- if project_nav_tab?(:alert_management) - if project_nav_tab?(:environments) && can?(current_user, :read_pod_logs, @project)
= nav_link(controller: :alert_management) do = nav_link(controller: :logs, action: [:index]) do
= link_to project_alert_management_index_path(@project), title: _('Alerts') do = link_to project_logs_path(@project), title: _('Logs') do
%span
= _('Alerts')
- if project_nav_tab?(:incidents)
= nav_link(controller: :incidents) do
= link_to project_incidents_path(@project), title: _('Incidents'), data: { qa_selector: 'operations_incidents_link' } do
%span %span
= _('Incidents') = _('Logs')
- if project_nav_tab? :environments - if project_nav_tab? :environments
= render_if_exists "layouts/nav/sidebar/tracing_link" = 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
= _('Environments')
- if project_nav_tab?(:error_tracking) - if project_nav_tab?(:error_tracking)
= nav_link(controller: :error_tracking) do = nav_link(controller: :error_tracking) do
= link_to project_error_tracking_index_path(@project), title: _('Error Tracking') do = link_to project_error_tracking_index_path(@project), title: _('Error Tracking') do
%span %span
= _('Error Tracking') = _('Error Tracking')
- if project_nav_tab?(:product_analytics) - if project_nav_tab?(:alert_management)
= nav_link(controller: :product_analytics) do = nav_link(controller: :alert_management) do
= link_to project_product_analytics_path(@project), title: _('Product Analytics') do = link_to project_alert_management_index_path(@project), title: _('Alerts') do
%span %span
= _('Product Analytics') = _('Alerts')
- if project_nav_tab?(:incidents)
= nav_link(controller: :incidents) do
= link_to project_incidents_path(@project), title: _('Incidents'), data: { qa_selector: 'operations_incidents_link' } do
%span
= _('Incidents')
- if project_nav_tab? :serverless - if project_nav_tab? :serverless
= nav_link(controller: :functions) do = nav_link(controller: :functions) do
...@@ -267,12 +262,6 @@ ...@@ -267,12 +262,6 @@
%span %span
= _('Serverless') = _('Serverless')
- if project_nav_tab?(:environments) && can?(current_user, :read_pod_logs, @project)
= nav_link(controller: :logs, action: [:index]) do
= link_to project_logs_path(@project), title: _('Logs') do
%span
= _('Logs')
- if project_nav_tab? :clusters - if project_nav_tab? :clusters
- show_cluster_hint = show_gke_cluster_integration_callout?(@project) - show_cluster_hint = show_gke_cluster_integration_callout?(@project)
= nav_link(controller: [:clusters, :user, :gcp]) do = nav_link(controller: [:clusters, :user, :gcp]) do
...@@ -302,8 +291,20 @@ ...@@ -302,8 +291,20 @@
%span= _("Got it!") %span= _("Got it!")
= sprite_icon('thumb-up') = sprite_icon('thumb-up')
- if project_nav_tab? :environments
= 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
= _('Environments')
= render_if_exists 'layouts/nav/sidebar/project_feature_flags_link' = render_if_exists 'layouts/nav/sidebar/project_feature_flags_link'
- if project_nav_tab?(:product_analytics)
= nav_link(controller: :product_analytics) do
= link_to project_product_analytics_path(@project), title: _('Product Analytics') do
%span
= _('Product Analytics')
= render_if_exists 'layouts/nav/sidebar/project_packages_link' = render_if_exists 'layouts/nav/sidebar/project_packages_link'
= render 'layouts/nav/sidebar/analytics_links', links: project_analytics_navbar_links(@project, current_user) = render 'layouts/nav/sidebar/analytics_links', links: project_analytics_navbar_links(@project, current_user)
......
---
title: Update sidebar operations order
merge_request: 42493
author:
type: changed
...@@ -15,7 +15,7 @@ RSpec.describe 'Project navbar' do ...@@ -15,7 +15,7 @@ RSpec.describe 'Project navbar' do
insert_package_nav(_('Operations')) insert_package_nav(_('Operations'))
insert_after_sub_nav_item( insert_after_sub_nav_item(
_('Kubernetes'), _('Environments'),
within: _('Operations'), within: _('Operations'),
new_sub_nav_item_name: _('Feature Flags') new_sub_nav_item_name: _('Feature Flags')
) )
......
...@@ -21,7 +21,7 @@ RSpec.describe 'Project navbar' do ...@@ -21,7 +21,7 @@ RSpec.describe 'Project navbar' do
if Gitlab.ee? if Gitlab.ee?
insert_after_sub_nav_item( insert_after_sub_nav_item(
_('Kubernetes'), _('Environments'),
within: _('Operations'), within: _('Operations'),
new_sub_nav_item_name: _('Feature Flags') new_sub_nav_item_name: _('Feature Flags')
) )
......
...@@ -64,14 +64,14 @@ RSpec.shared_context 'project navbar structure' do ...@@ -64,14 +64,14 @@ RSpec.shared_context 'project navbar structure' do
nav_item: _('Operations'), nav_item: _('Operations'),
nav_sub_items: [ nav_sub_items: [
_('Metrics'), _('Metrics'),
_('Logs'),
_('Error Tracking'),
_('Alerts'), _('Alerts'),
_('Incidents'), _('Incidents'),
_('Environments'),
_('Error Tracking'),
_('Product Analytics'),
_('Serverless'), _('Serverless'),
_('Logs'), _('Kubernetes'),
_('Kubernetes') _('Environments'),
_('Product Analytics')
] ]
}, },
analytics_nav_item, analytics_nav_item,
......
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