Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6a13187d
Commit
6a13187d
authored
Nov 26, 2019
by
Aakriti Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace `convdev` in routes to `dev_ops_score`
Repalce occurences in some views as well
parent
b943c07d
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
23 additions
and
23 deletions
+23
-23
app/assets/javascripts/pages/instance_statistics/dev_ops_score/index.js
...ascripts/pages/instance_statistics/dev_ops_score/index.js
+0
-0
app/controllers/instance_statistics/dev_ops_score_controller.rb
...ntrollers/instance_statistics/dev_ops_score_controller.rb
+1
-1
app/views/instance_statistics/dev_ops_score/_callout.html.haml
...iews/instance_statistics/dev_ops_score/_callout.html.haml
+1
-1
app/views/instance_statistics/dev_ops_score/_card.html.haml
app/views/instance_statistics/dev_ops_score/_card.html.haml
+0
-0
app/views/instance_statistics/dev_ops_score/_disabled.html.haml
...ews/instance_statistics/dev_ops_score/_disabled.html.haml
+0
-0
app/views/instance_statistics/dev_ops_score/_no_data.html.haml
...iews/instance_statistics/dev_ops_score/_no_data.html.haml
+1
-1
app/views/instance_statistics/dev_ops_score/index.html.haml
app/views/instance_statistics/dev_ops_score/index.html.haml
+2
-2
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+1
-1
app/views/layouts/nav/sidebar/_instance_statistics.html.haml
app/views/layouts/nav/sidebar/_instance_statistics.html.haml
+4
-4
config/routes/instance_statistics.rb
config/routes/instance_statistics.rb
+2
-2
rubocop/cop/avoid_route_redirect_leading_slash.rb
rubocop/cop/avoid_route_redirect_leading_slash.rb
+2
-2
spec/controllers/instance_statistics/dev_ops_score_controller_spec.rb
...lers/instance_statistics/dev_ops_score_controller_spec.rb
+1
-1
spec/features/instance_statistics/dev_ops_score_spec.rb
spec/features/instance_statistics/dev_ops_score_spec.rb
+6
-6
spec/routing/instance_statistics_routing_spec.rb
spec/routing/instance_statistics_routing_spec.rb
+2
-2
No files found.
app/assets/javascripts/pages/instance_statistics/
conversational_development_index
/index.js
→
app/assets/javascripts/pages/instance_statistics/
dev_ops_score
/index.js
View file @
6a13187d
File moved
app/controllers/instance_statistics/
conversational_development_index
_controller.rb
→
app/controllers/instance_statistics/
dev_ops_score
_controller.rb
View file @
6a13187d
# frozen_string_literal: true
class
InstanceStatistics::
ConversationalDevelopmentIndex
Controller
<
InstanceStatistics
::
ApplicationController
class
InstanceStatistics::
DevOpsScore
Controller
<
InstanceStatistics
::
ApplicationController
# rubocop: disable CodeReuse/ActiveRecord
def
index
@metric
=
DevOpsScore
::
Metric
.
order
(
:created_at
).
last
&
.
present
...
...
app/views/instance_statistics/
conversational_development_index
/_callout.html.haml
→
app/views/instance_statistics/
dev_ops_score
/_callout.html.haml
View file @
6a13187d
.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
%button
.btn.btn-default.close.js-close-callout
{
type:
'button'
,
'aria-label'
=>
_
(
'Dismiss ConvDev introduction'
)
}
...
...
app/views/instance_statistics/
conversational_development_index
/_card.html.haml
→
app/views/instance_statistics/
dev_ops_score
/_card.html.haml
View file @
6a13187d
File moved
app/views/instance_statistics/
conversational_development_index
/_disabled.html.haml
→
app/views/instance_statistics/
dev_ops_score
/_disabled.html.haml
View file @
6a13187d
File moved
app/views/instance_statistics/
conversational_development_index
/_no_data.html.haml
→
app/views/instance_statistics/
dev_ops_score
/_no_data.html.haml
View file @
6a13187d
...
...
@@ -4,4 +4,4 @@
%h4
=
_
(
'Data is still calculating...'
)
%p
=
_
(
'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'
app/views/instance_statistics/
conversational_development_index
/index.html.haml
→
app/views/instance_statistics/
dev_ops_score
/index.html.haml
View file @
6a13187d
...
...
@@ -2,7 +2,7 @@
-
usage_ping_enabled
=
Gitlab
::
CurrentSettings
.
usage_ping_enabled
.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'
.prepend-top-default
...
...
@@ -19,7 +19,7 @@
=
_
(
'index'
)
%br
=
_
(
'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
-
@metric
.
cards
.
each
do
|
card
|
...
...
app/views/layouts/nav/_dashboard.html.haml
View file @
6a13187d
...
...
@@ -48,7 +48,7 @@
%li
.dropdown
=
render_if_exists
'dashboard/nav_link_list'
-
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
=
_
(
'Instance Statistics'
)
-
if
current_user
.
admin?
...
...
app/views/layouts/nav/sidebar/_instance_statistics.html.haml
View file @
6a13187d
...
...
@@ -6,15 +6,15 @@
=
sprite_icon
(
'chart'
,
size:
24
)
.sidebar-context-title
=
_
(
'Instance Statistics'
)
%ul
.sidebar-top-level-items
=
nav_link
(
controller: :
conversational_development_index
)
do
=
link_to
instance_statistics_
conversational_development_index
_index_path
do
=
nav_link
(
controller: :
dev_ops_score
)
do
=
link_to
instance_statistics_
dev_ops_score
_index_path
do
.nav-icon-container
=
sprite_icon
(
'comment'
)
%span
.nav-item-name
=
_
(
'ConvDev Index'
)
%ul
.sidebar-sub-level-items.is-fly-out-only
=
nav_link
(
controller: :
conversational_development_index
,
html_options:
{
class:
"fly-out-top-item"
}
)
do
=
link_to
instance_statistics_
conversational_development_index
_index_path
do
=
nav_link
(
controller: :
dev_ops_score
,
html_options:
{
class:
"fly-out-top-item"
}
)
do
=
link_to
instance_statistics_
dev_ops_score
_index_path
do
%strong
.fly-out-top-item-name
=
_
(
'ConvDev Index'
)
...
...
config/routes/instance_statistics.rb
View file @
6a13187d
# frozen_string_literal: true
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
:
conversational_development_index
,
only: :index
resources
:
dev_ops_score
,
only: :index
end
rubocop/cop/avoid_route_redirect_leading_slash.rb
View file @
6a13187d
...
...
@@ -7,10 +7,10 @@ module RuboCop
#
# @example
# # bad
# root to: redirect('/-/instance/statistics/
conversational_development_index
')
# root to: redirect('/-/instance/statistics/
dev_ops_score
')
#
# # good
# root to: redirect('-/instance/statistics/
conversational_development_index
')
# root to: redirect('-/instance/statistics/
dev_ops_score
')
#
class
AvoidRouteRedirectLeadingSlash
<
RuboCop
::
Cop
::
Cop
...
...
spec/controllers/instance_statistics/
conversational_development_index
_controller_spec.rb
→
spec/controllers/instance_statistics/
dev_ops_score
_controller_spec.rb
View file @
6a13187d
...
...
@@ -2,6 +2,6 @@
require
'spec_helper'
describe
InstanceStatistics
::
ConversationalDevelopmentIndex
Controller
do
describe
InstanceStatistics
::
DevOpsScore
Controller
do
it_behaves_like
'instance statistics availability'
end
spec/features/instance_statistics/
conversational_development_index
_spec.rb
→
spec/features/instance_statistics/
dev_ops_score
_spec.rb
View file @
6a13187d
...
...
@@ -2,13 +2,13 @@
require
'spec_helper'
describe
'
Conversational Development Index
'
do
describe
'
Dev Ops Score
'
do
before
do
sign_in
(
create
(
:admin
))
end
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'
...
...
@@ -23,13 +23,13 @@ describe 'Conversational Development Index' do
end
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'
)
end
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'
end
...
...
@@ -39,7 +39,7 @@ describe 'Conversational Development Index' do
it
'shows empty state'
do
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'
)
end
...
...
@@ -50,7 +50,7 @@ describe 'Conversational Development Index' do
stub_application_setting
(
usage_ping_enabled:
true
)
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
(
'Issues created per active user 1.2 You 9.3 Lead 13.3%'
...
...
spec/routing/instance_statistics_routing_spec.rb
View file @
6a13187d
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
describe
'Instance Statistics'
,
'routing'
do
include
RSpec
::
Rails
::
RequestExampleGroup
it
"routes '/-/instance_statistics' to
conversational development index
"
do
expect
(
get
(
'/-/instance_statistics'
)).
to
redirect_to
(
'/-/instance_statistics/
conversational_development_index
'
)
it
"routes '/-/instance_statistics' to
dev ops score
"
do
expect
(
get
(
'/-/instance_statistics'
)).
to
redirect_to
(
'/-/instance_statistics/
dev_ops_score
'
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment