Commit 50a11a33 authored by Jose's avatar Jose

Fix metrics shortcut

parent 91463e52
...@@ -20,6 +20,7 @@ export default class ShortcutsNavigation extends Shortcuts { ...@@ -20,6 +20,7 @@ export default class ShortcutsNavigation extends Shortcuts {
Mousetrap.bind('g s', () => findAndFollowLink('.shortcuts-snippets')); Mousetrap.bind('g s', () => findAndFollowLink('.shortcuts-snippets'));
Mousetrap.bind('g k', () => findAndFollowLink('.shortcuts-kubernetes')); Mousetrap.bind('g k', () => findAndFollowLink('.shortcuts-kubernetes'));
Mousetrap.bind('g e', () => findAndFollowLink('.shortcuts-environments')); Mousetrap.bind('g e', () => findAndFollowLink('.shortcuts-environments'));
Mousetrap.bind('g l', () => findAndFollowLink('.shortcuts-metrics'));
Mousetrap.bind('i', () => findAndFollowLink('.shortcuts-new-issue')); Mousetrap.bind('i', () => findAndFollowLink('.shortcuts-new-issue'));
this.enabledHelp.push('.hidden-shortcut.project'); this.enabledHelp.push('.hidden-shortcut.project');
......
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
- if project_nav_tab? :environments - if project_nav_tab? :environments
= nav_link(controller: :environments, action: [:metrics, :empty]) do = nav_link(controller: :environments, action: [:metrics, :empty]) do
= link_to operations_metrics_path(@project, @available_environment), title: 'Metrics', class: 'shortcuts-environments' do = link_to operations_metrics_path(@project, @available_environment), title: 'Metrics', class: 'shortcuts-metrics' do
%span %span
= _('Metrics') = _('Metrics')
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.row .row
.col-sm-12 .col-sm-12
.svg-content .svg-content
= image_tag 'illustrations/operations-metrics_empty.svg' = image_tag 'illustrations/operations_metrics_empty.svg'
.row.empty-environments .row.empty-environments
.col-sm-12.text-center .col-sm-12.text-center
%h4 %h4
......
...@@ -112,7 +112,7 @@ describe 'User uses shortcuts', :js do ...@@ -112,7 +112,7 @@ describe 'User uses shortcuts', :js do
context 'when navigating to the Operations pages' do context 'when navigating to the Operations pages' do
it 'redirects to the Metrics page' do it 'redirects to the Metrics page' do
find('body').native.send_key('g') find('body').native.send_key('g')
find('body').native.send_key('m') find('body').native.send_key('l')
expect(page).to have_active_navigation('Operations') expect(page).to have_active_navigation('Operations')
expect(page).to have_active_sub_navigation('Metrics') expect(page).to have_active_sub_navigation('Metrics')
......
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