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
626f775c
Commit
626f775c
authored
Dec 20, 2021
by
Doug Stull
Committed by
Rémy Coutable
Dec 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change billing in side nav experiment to use namespace
parent
c827d97b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
14 additions
and
11 deletions
+14
-11
ee/app/controllers/groups/billings_controller.rb
ee/app/controllers/groups/billings_controller.rb
+3
-3
ee/lib/ee/sidebars/groups/menus/settings_menu.rb
ee/lib/ee/sidebars/groups/menus/settings_menu.rb
+1
-1
ee/lib/ee/sidebars/groups/panel.rb
ee/lib/ee/sidebars/groups/panel.rb
+1
-1
ee/lib/ee/sidebars/projects/panel.rb
ee/lib/ee/sidebars/projects/panel.rb
+1
-1
ee/lib/sidebars/groups/menus/administration_menu.rb
ee/lib/sidebars/groups/menus/administration_menu.rb
+1
-1
ee/spec/controllers/groups/billings_controller_spec.rb
ee/spec/controllers/groups/billings_controller_spec.rb
+1
-1
ee/spec/lib/ee/sidebars/projects/panel_spec.rb
ee/spec/lib/ee/sidebars/projects/panel_spec.rb
+2
-1
spec/lib/sidebars/projects/panel_spec.rb
spec/lib/sidebars/projects/panel_spec.rb
+2
-1
spec/views/shared/nav/_sidebar.html.haml_spec.rb
spec/views/shared/nav/_sidebar.html.haml_spec.rb
+2
-1
No files found.
ee/app/controllers/groups/billings_controller.rb
View file @
626f775c
...
...
@@ -22,7 +22,7 @@ class Groups::BillingsController < Groups::ApplicationController
.
execute
if
@plans_data
track_from_side_nav
track_from_side_nav
(
relevant_group
)
else
render
'shared/billings/customers_dot_unavailable'
end
...
...
@@ -51,9 +51,9 @@ class Groups::BillingsController < Groups::ApplicationController
gitlab_subscription
.
save
end
def
track_from_side_nav
def
track_from_side_nav
(
relevant_group
)
return
unless
helpers
.
accessed_billing_from_side_nav?
experiment
(
:billing_in_side_nav
,
user
:
current_user
).
track
(
:view
,
label:
'view_billing'
)
experiment
(
:billing_in_side_nav
,
actor:
current_user
,
namespace:
relevant_group
,
sticky_to
:
current_user
).
track
(
:view
,
label:
'view_billing'
)
end
end
ee/lib/ee/sidebars/groups/menus/settings_menu.rb
View file @
626f775c
...
...
@@ -118,7 +118,7 @@ module EE
local_active_routes
=
{
path:
'billings#index'
}
experiment
(
:billing_in_side_nav
,
user
:
context
.
current_user
)
do
|
e
|
experiment
(
:billing_in_side_nav
,
actor:
context
.
current_user
,
namespace:
context
.
group
.
root_ancestor
,
sticky_to
:
context
.
current_user
)
do
|
e
|
e
.
control
{}
e
.
candidate
do
local_active_routes
=
{
...
...
ee/lib/ee/sidebars/groups/panel.rb
View file @
626f775c
...
...
@@ -23,7 +23,7 @@ module EE
private
def
add_billing_sidebar_menu
experiment
(
:billing_in_side_nav
,
user
:
context
.
current_user
)
do
|
e
|
experiment
(
:billing_in_side_nav
,
actor:
context
.
current_user
,
namespace:
context
.
group
.
root_ancestor
,
sticky_to
:
context
.
current_user
)
do
|
e
|
e
.
control
{}
e
.
candidate
do
insert_menu_after
(
::
Sidebars
::
Groups
::
Menus
::
AdministrationMenu
,
::
Sidebars
::
Groups
::
Menus
::
BillingMenu
.
new
(
context
))
...
...
ee/lib/ee/sidebars/projects/panel.rb
View file @
626f775c
...
...
@@ -23,7 +23,7 @@ module EE
private
def
add_billing_sidebar_menu
experiment
(
:billing_in_side_nav
,
user
:
context
.
current_user
)
do
|
e
|
experiment
(
:billing_in_side_nav
,
actor:
context
.
current_user
,
namespace:
context
.
project
.
namespace
.
root_ancestor
,
sticky_to
:
context
.
current_user
)
do
|
e
|
e
.
control
{}
e
.
candidate
do
insert_menu_after
(
::
Sidebars
::
Projects
::
Menus
::
SettingsMenu
,
::
Sidebars
::
Projects
::
Menus
::
BillingMenu
.
new
(
context
))
...
...
ee/lib/sidebars/groups/menus/administration_menu.rb
View file @
626f775c
...
...
@@ -73,7 +73,7 @@ module Sidebars
local_active_routes
=
{
path:
'billings#index'
}
experiment
(
:billing_in_side_nav
,
user
:
context
.
current_user
)
do
|
e
|
experiment
(
:billing_in_side_nav
,
actor:
context
.
current_user
,
namespace:
context
.
group
.
root_ancestor
,
sticky_to
:
context
.
current_user
)
do
|
e
|
e
.
control
{}
e
.
candidate
do
local_active_routes
=
{
...
...
ee/spec/controllers/groups/billings_controller_spec.rb
View file @
626f775c
...
...
@@ -73,7 +73,7 @@ RSpec.describe Groups::BillingsController, :saas do
it
'assigns the candidate experience and tracks the event'
do
expect
(
experiment
(
:billing_in_side_nav
)).
to
track
(
:view
,
label:
'view_billing'
)
.
for
(
:candidate
)
.
with_context
(
user:
user
)
.
with_context
(
actor:
user
,
namespace:
group
)
.
on_next_instance
get
:index
,
params:
{
group_id:
group
,
from: :side_nav
}
...
...
ee/spec/lib/ee/sidebars/projects/panel_spec.rb
View file @
626f775c
...
...
@@ -3,7 +3,8 @@
require
'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Panel
do
let
(
:project
)
{
build
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
nil
,
container:
project
)
}
subject
(
:panel
)
{
described_class
.
new
(
context
)
}
...
...
spec/lib/sidebars/projects/panel_spec.rb
View file @
626f775c
...
...
@@ -3,7 +3,8 @@
require
'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Panel
do
let
(
:project
)
{
build
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
nil
,
container:
project
)
}
subject
{
described_class
.
new
(
context
)
}
...
...
spec/views/shared/nav/_sidebar.html.haml_spec.rb
View file @
626f775c
...
...
@@ -3,7 +3,8 @@
require
'spec_helper'
RSpec
.
describe
'shared/nav/_sidebar.html.haml'
do
let
(
:project
)
{
build
(
:project
,
id:
non_existing_record_id
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
nil
,
container:
project
)
}
let
(
:sidebar
)
{
Sidebars
::
Projects
::
Panel
.
new
(
context
)
}
...
...
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