Commit 094cac3a authored by Martin Wortschack's avatar Martin Wortschack

Merge branch 'ag-rename-convdev-routing' into 'master'

[Routes, Controller] Rename ConvDev Index to DevOps Score

See merge request gitlab-org/gitlab!20797
parents 6beaeb9c 6a13187d
# frozen_string_literal: true # frozen_string_literal: true
class InstanceStatistics::ConversationalDevelopmentIndexController < InstanceStatistics::ApplicationController class InstanceStatistics::DevOpsScoreController < InstanceStatistics::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def index def index
@metric = DevOpsScore::Metric.order(:created_at).last&.present @metric = DevOpsScore::Metric.order(:created_at).last&.present
......
.prepend-top-default .prepend-top-default
.user-callout{ data: { uid: 'convdev_intro_callout_dismissed' } } .user-callout{ data: { uid: 'dev_ops_score_intro_callout_dismissed' } }
.bordered-box.landing.content-block .bordered-box.landing.content-block
%button.btn.btn-default.close.js-close-callout{ type: 'button', %button.btn.btn-default.close.js-close-callout{ type: 'button',
'aria-label' => _('Dismiss ConvDev introduction') } 'aria-label' => _('Dismiss ConvDev introduction') }
......
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
%h4= _('Data is still calculating...') %h4= _('Data is still calculating...')
%p %p
= _('In order to gather accurate feature usage data, it can take 1 to 2 weeks to see your index.') = _('In order to gather accurate feature usage data, it can take 1 to 2 weeks to see your index.')
= link_to _('Learn more'), help_page_path('user/instance_statistics/convdev'), target: '_blank' = link_to _('Learn more'), help_page_path('user/instance_statistics/dev_ops_score'), target: '_blank'
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- usage_ping_enabled = Gitlab::CurrentSettings.usage_ping_enabled - usage_ping_enabled = Gitlab::CurrentSettings.usage_ping_enabled
.container .container
- if usage_ping_enabled && show_callout?('convdev_intro_callout_dismissed') - if usage_ping_enabled && show_callout?('dev_ops_score_intro_callout_dismissed')
= render 'callout' = render 'callout'
.prepend-top-default .prepend-top-default
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
= _('index') = _('index')
%br %br
= _('score') = _('score')
= link_to icon('question-circle', 'aria-hidden' => 'true'), help_page_path('user/instance_statistics/convdev') = link_to icon('question-circle', 'aria-hidden' => 'true'), help_page_path('user/instance_statistics/dev_ops_score')
.devops-cards.board-card-container .devops-cards.board-card-container
- @metric.cards.each do |card| - @metric.cards.each do |card|
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
%li.dropdown %li.dropdown
= render_if_exists 'dashboard/nav_link_list' = render_if_exists 'dashboard/nav_link_list'
- if can?(current_user, :read_instance_statistics) - if can?(current_user, :read_instance_statistics)
= nav_link(controller: [:conversational_development_index, :cohorts]) do = nav_link(controller: [:dev_ops_score, :cohorts]) do
= link_to instance_statistics_root_path do = link_to instance_statistics_root_path do
= _('Instance Statistics') = _('Instance Statistics')
- if current_user.admin? - if current_user.admin?
......
...@@ -6,15 +6,15 @@ ...@@ -6,15 +6,15 @@
= sprite_icon('chart', size: 24) = sprite_icon('chart', size: 24)
.sidebar-context-title= _('Instance Statistics') .sidebar-context-title= _('Instance Statistics')
%ul.sidebar-top-level-items %ul.sidebar-top-level-items
= nav_link(controller: :conversational_development_index) do = nav_link(controller: :dev_ops_score) do
= link_to instance_statistics_conversational_development_index_index_path do = link_to instance_statistics_dev_ops_score_index_path do
.nav-icon-container .nav-icon-container
= sprite_icon('comment') = sprite_icon('comment')
%span.nav-item-name %span.nav-item-name
= _('ConvDev Index') = _('ConvDev Index')
%ul.sidebar-sub-level-items.is-fly-out-only %ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :conversational_development_index, html_options: { class: "fly-out-top-item" } ) do = nav_link(controller: :dev_ops_score, html_options: { class: "fly-out-top-item" } ) do
= link_to instance_statistics_conversational_development_index_index_path do = link_to instance_statistics_dev_ops_score_index_path do
%strong.fly-out-top-item-name %strong.fly-out-top-item-name
= _('ConvDev Index') = _('ConvDev Index')
......
# frozen_string_literal: true # frozen_string_literal: true
namespace :instance_statistics do namespace :instance_statistics do
root to: redirect('-/instance_statistics/conversational_development_index') root to: redirect('-/instance_statistics/dev_ops_score')
resources :cohorts, only: :index resources :cohorts, only: :index
resources :conversational_development_index, only: :index resources :dev_ops_score, only: :index
end end
...@@ -7,10 +7,10 @@ module RuboCop ...@@ -7,10 +7,10 @@ module RuboCop
# #
# @example # @example
# # bad # # bad
# root to: redirect('/-/instance/statistics/conversational_development_index') # root to: redirect('/-/instance/statistics/dev_ops_score')
# #
# # good # # good
# root to: redirect('-/instance/statistics/conversational_development_index') # root to: redirect('-/instance/statistics/dev_ops_score')
# #
class AvoidRouteRedirectLeadingSlash < RuboCop::Cop::Cop class AvoidRouteRedirectLeadingSlash < RuboCop::Cop::Cop
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
require 'spec_helper' require 'spec_helper'
describe InstanceStatistics::ConversationalDevelopmentIndexController do describe InstanceStatistics::DevOpsScoreController do
it_behaves_like 'instance statistics availability' it_behaves_like 'instance statistics availability'
end end
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
require 'spec_helper' require 'spec_helper'
describe 'Conversational Development Index' do describe 'Dev Ops Score' do
before do before do
sign_in(create(:admin)) sign_in(create(:admin))
end end
it 'has dismissable intro callout', :js do it 'has dismissable intro callout', :js do
visit instance_statistics_conversational_development_index_index_path visit instance_statistics_dev_ops_score_index_path
expect(page).to have_content 'Introducing Your Conversational Development Index' expect(page).to have_content 'Introducing Your Conversational Development Index'
...@@ -23,13 +23,13 @@ describe 'Conversational Development Index' do ...@@ -23,13 +23,13 @@ describe 'Conversational Development Index' do
end end
it 'shows empty state' do it 'shows empty state' do
visit instance_statistics_conversational_development_index_index_path visit instance_statistics_dev_ops_score_index_path
expect(page).to have_content('Usage ping is not enabled') expect(page).to have_content('Usage ping is not enabled')
end end
it 'hides the intro callout' do it 'hides the intro callout' do
visit instance_statistics_conversational_development_index_index_path visit instance_statistics_dev_ops_score_index_path
expect(page).not_to have_content 'Introducing Your Conversational Development Index' expect(page).not_to have_content 'Introducing Your Conversational Development Index'
end end
...@@ -39,7 +39,7 @@ describe 'Conversational Development Index' do ...@@ -39,7 +39,7 @@ describe 'Conversational Development Index' do
it 'shows empty state' do it 'shows empty state' do
stub_application_setting(usage_ping_enabled: true) stub_application_setting(usage_ping_enabled: true)
visit instance_statistics_conversational_development_index_index_path visit instance_statistics_dev_ops_score_index_path
expect(page).to have_content('Data is still calculating') expect(page).to have_content('Data is still calculating')
end end
...@@ -50,7 +50,7 @@ describe 'Conversational Development Index' do ...@@ -50,7 +50,7 @@ describe 'Conversational Development Index' do
stub_application_setting(usage_ping_enabled: true) stub_application_setting(usage_ping_enabled: true)
create(:dev_ops_score_metric) create(:dev_ops_score_metric)
visit instance_statistics_conversational_development_index_index_path visit instance_statistics_dev_ops_score_index_path
expect(page).to have_content( expect(page).to have_content(
'Issues created per active user 1.2 You 9.3 Lead 13.3%' 'Issues created per active user 1.2 You 9.3 Lead 13.3%'
......
...@@ -5,7 +5,7 @@ require 'spec_helper' ...@@ -5,7 +5,7 @@ require 'spec_helper'
describe 'Instance Statistics', 'routing' do describe 'Instance Statistics', 'routing' do
include RSpec::Rails::RequestExampleGroup include RSpec::Rails::RequestExampleGroup
it "routes '/-/instance_statistics' to conversational development index" do it "routes '/-/instance_statistics' to dev ops score" do
expect(get('/-/instance_statistics')).to redirect_to('/-/instance_statistics/conversational_development_index') expect(get('/-/instance_statistics')).to redirect_to('/-/instance_statistics/dev_ops_score')
end end
end end
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