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
1befa032
Commit
1befa032
authored
Jan 27, 2022
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Content for hand raise leads
Changelog: changed EE: true
parent
a8bc5a80
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
23 additions
and
14 deletions
+23
-14
ee/app/assets/javascripts/api/subscriptions_api.js
ee/app/assets/javascripts/api/subscriptions_api.js
+1
-0
ee/app/assets/javascripts/hand_raise_leads/hand_raise_lead/components/hand_raise_lead_button.vue
...ads/hand_raise_lead/components/hand_raise_lead_button.vue
+1
-0
ee/app/assets/javascripts/hand_raise_leads/hand_raise_lead/init_hand_raise_lead_button.js
...aise_leads/hand_raise_lead/init_hand_raise_lead_button.js
+2
-1
ee/app/assets/javascripts/vue_shared/discover/card_security_discover_bundle.js
...ipts/vue_shared/discover/card_security_discover_bundle.js
+2
-0
ee/app/controllers/trials_controller.rb
ee/app/controllers/trials_controller.rb
+1
-2
ee/app/helpers/billing_plans_helper.rb
ee/app/helpers/billing_plans_helper.rb
+3
-2
ee/app/helpers/groups/security_features_helper.rb
ee/app/helpers/groups/security_features_helper.rb
+1
-1
ee/app/helpers/projects/security/discover_helper.rb
ee/app/helpers/projects/security/discover_helper.rb
+1
-1
ee/app/views/shared/billings/_billing_plan_actions.html.haml
ee/app/views/shared/billings/_billing_plan_actions.html.haml
+1
-1
ee/spec/controllers/trials_controller_spec.rb
ee/spec/controllers/trials_controller_spec.rb
+2
-2
ee/spec/frontend/api/subscriptions_api_spec.js
ee/spec/frontend/api/subscriptions_api_spec.js
+2
-0
ee/spec/frontend/hand_raise_leads/components/hand_raise_lead_button_spec.js
...and_raise_leads/components/hand_raise_lead_button_spec.js
+2
-0
ee/spec/helpers/billing_plans_helper_spec.rb
ee/spec/helpers/billing_plans_helper_spec.rb
+2
-2
ee/spec/helpers/groups/security_features_helper_spec.rb
ee/spec/helpers/groups/security_features_helper_spec.rb
+1
-1
ee/spec/helpers/projects/security/discover_helper_spec.rb
ee/spec/helpers/projects/security/discover_helper_spec.rb
+1
-1
No files found.
ee/app/assets/javascripts/api/subscriptions_api.js
View file @
1befa032
...
...
@@ -55,6 +55,7 @@ export const sendHandRaiseLead = async (params) => {
country
:
params
.
country
,
state
:
params
.
state
,
comment
:
params
.
comment
,
glm_content
:
params
.
glmContent
,
};
return
axios
.
post
(
url
,
formParams
);
...
...
ee/app/assets/javascripts/hand_raise_leads/hand_raise_lead/components/hand_raise_lead_button.vue
View file @
1befa032
...
...
@@ -166,6 +166,7 @@ export default {
country
:
this
.
country
,
state
:
this
.
mustEnterState
?
this
.
state
:
null
,
comment
:
this
.
comment
,
glmContent
:
this
.
user
.
glmContent
,
};
},
},
...
...
ee/app/assets/javascripts/hand_raise_leads/hand_raise_lead/init_hand_raise_lead_button.js
View file @
1befa032
...
...
@@ -3,7 +3,7 @@ import HandRaiseLeadButton from 'ee/hand_raise_leads/hand_raise_lead/components/
import
apolloProvider
from
'
ee/subscriptions/buy_addons_shared/graphql
'
;
export
const
initHandRaiseLeadButton
=
(
el
)
=>
{
const
{
namespaceId
,
userName
,
firstName
,
lastName
,
companyName
}
=
el
.
dataset
;
const
{
namespaceId
,
userName
,
firstName
,
lastName
,
companyName
,
glmContent
}
=
el
.
dataset
;
return
new
Vue
({
el
,
...
...
@@ -15,6 +15,7 @@ export const initHandRaiseLeadButton = (el) => {
firstName
,
lastName
,
companyName
,
glmContent
,
},
},
render
(
createElement
)
{
...
...
ee/app/assets/javascripts/vue_shared/discover/card_security_discover_bundle.js
View file @
1befa032
...
...
@@ -16,6 +16,7 @@ export default () => {
firstName
,
lastName
,
companyName
,
glmContent
,
}
=
securityTab
.
dataset
;
const
props
=
{
...
...
@@ -44,6 +45,7 @@ export default () => {
firstName
,
lastName
,
companyName
,
glmContent
,
},
},
render
(
createElement
)
{
...
...
ee/app/controllers/trials_controller.rb
View file @
1befa032
...
...
@@ -116,7 +116,7 @@ class TrialsController < ApplicationController
def
hand_raise_lead_params
params
.
permit
(
:first_name
,
:last_name
,
:company_name
,
:company_size
,
:phone_number
,
:country
,
:state
,
:namespace_id
,
:comment
)
:state
,
:namespace_id
,
:comment
,
:glm_content
)
.
merge
(
hand_raise_lead_extra_params
)
end
...
...
@@ -126,7 +126,6 @@ class TrialsController < ApplicationController
uid:
current_user
.
id
,
provider:
'gitlab'
,
setup_for_company:
current_user
.
setup_for_company
,
glm_content:
'group-billing'
,
glm_source:
'gitlab.com'
}
end
...
...
ee/app/helpers/billing_plans_helper.rb
View file @
1befa032
...
...
@@ -140,13 +140,14 @@ module BillingPlansHelper
end
end
def
hand_raise_props
(
namespace
)
def
hand_raise_props
(
namespace
,
glm_content:
)
{
namespace_id:
namespace
.
id
,
user_name:
current_user
.
username
,
first_name:
current_user
.
first_name
,
last_name:
current_user
.
last_name
,
company_name:
current_user
.
organization
company_name:
current_user
.
organization
,
glm_content:
glm_content
}
end
...
...
ee/app/helpers/groups/security_features_helper.rb
View file @
1befa032
...
...
@@ -50,6 +50,6 @@ module Groups::SecurityFeaturesHelper
}
}
data
.
merge
(
hand_raise_props
(
group
.
root_ancestor
))
data
.
merge
(
hand_raise_props
(
group
.
root_ancestor
,
glm_content:
content
))
end
end
ee/app/helpers/projects/security/discover_helper.rb
View file @
1befa032
...
...
@@ -23,6 +23,6 @@ module Projects::Security::DiscoverHelper
}
}
data
.
merge
(
hand_raise_props
(
project
.
root_ancestor
))
data
.
merge
(
hand_raise_props
(
project
.
root_ancestor
,
glm_content:
content
))
end
end
ee/app/views/shared/billings/_billing_plan_actions.html.haml
View file @
1befa032
-
if
show_contact_sales_button?
(
purchase_link
.
action
,
plan_offer_type
)
.js-hand-raise-lead-button
{
data:
hand_raise_props
(
namespace
)
}
.js-hand-raise-lead-button
{
data:
hand_raise_props
(
namespace
,
glm_content:
'billing-group'
)
}
-
if
show_upgrade_button
=
link_to
upgrade_button_text
(
plan_offer_type
),
plan_purchase_or_upgrade_url
(
namespace
,
plan
),
...
...
ee/spec/controllers/trials_controller_spec.rb
View file @
1befa032
...
...
@@ -261,7 +261,6 @@ RSpec.describe TrialsController, :saas do
uid:
user
.
id
,
provider:
'gitlab'
,
setup_for_company:
user
.
setup_for_company
,
glm_content:
'group-billing'
,
glm_source:
'gitlab.com'
}
end
...
...
@@ -276,7 +275,8 @@ RSpec.describe TrialsController, :saas do
phone_number:
'+1-192-10-10'
,
country:
'US'
,
state:
'CA'
,
comment:
'I want to talk to sales.'
comment:
'I want to talk to sales.'
,
glm_content:
'group-billing'
}
end
...
...
ee/spec/frontend/api/subscriptions_api_spec.js
View file @
1befa032
...
...
@@ -27,6 +27,7 @@ describe('SubscriptionsApi', () => {
country
:
'
US
'
,
state
:
'
CA
'
,
comment
:
'
A comment
'
,
glmContent
:
'
some-content
'
,
};
const
formParams
=
{
namespace_id
:
1000
,
...
...
@@ -38,6 +39,7 @@ describe('SubscriptionsApi', () => {
country
:
'
US
'
,
state
:
'
CA
'
,
comment
:
'
A comment
'
,
glm_content
:
'
some-content
'
,
};
it
(
'
sends hand raise lead parameters
'
,
async
()
=>
{
...
...
ee/spec/frontend/hand_raise_leads/components/hand_raise_lead_button_spec.js
View file @
1befa032
...
...
@@ -45,6 +45,7 @@ describe('HandRaiseLeadButton', () => {
firstName
:
'
Joe
'
,
lastName
:
'
Doe
'
,
companyName
:
'
ACME
'
,
glmContent
:
'
some-content
'
,
},
},
});
...
...
@@ -191,6 +192,7 @@ describe('HandRaiseLeadButton', () => {
expect
(
SubscriptionsApi
.
sendHandRaiseLead
).
toHaveBeenCalledWith
({
namespaceId
:
1
,
comment
:
'
comment
'
,
glmContent
:
'
some-content
'
,
...
formData
,
});
});
...
...
ee/spec/helpers/billing_plans_helper_spec.rb
View file @
1befa032
...
...
@@ -373,8 +373,8 @@ RSpec.describe BillingPlansHelper, :saas do
end
it
'builds correct hash'
do
props
=
helper
.
hand_raise_props
(
namespace
)
expect
(
props
).
to
eq
(
namespace_id:
namespace
.
id
,
user_name:
'Joe'
,
first_name:
'Joe'
,
last_name:
'Doe'
,
company_name:
'ACME'
)
props
=
helper
.
hand_raise_props
(
namespace
,
glm_content:
'some-content'
)
expect
(
props
).
to
eq
(
namespace_id:
namespace
.
id
,
user_name:
'Joe'
,
first_name:
'Joe'
,
last_name:
'Doe'
,
company_name:
'ACME'
,
glm_content:
'some-content'
)
end
end
...
...
ee/spec/helpers/groups/security_features_helper_spec.rb
View file @
1befa032
...
...
@@ -104,7 +104,7 @@ RSpec.describe Groups::SecurityFeaturesHelper do
main:
new_trial_registration_path
(
glm_source:
'gitlab.com'
,
glm_content:
content
),
secondary:
group_billings_path
(
group
.
root_ancestor
,
source:
content
)
}
}.
merge
(
helper
.
hand_raise_props
(
group
.
root_ancestor
))
}.
merge
(
helper
.
hand_raise_props
(
group
.
root_ancestor
,
glm_content:
content
))
end
subject
(
:group_security_discover_data
)
do
...
...
ee/spec/helpers/projects/security/discover_helper_spec.rb
View file @
1befa032
...
...
@@ -19,7 +19,7 @@ RSpec.describe Projects::Security::DiscoverHelper do
main:
new_trial_registration_path
(
glm_source:
'gitlab.com'
,
glm_content:
content
),
secondary:
profile_billings_path
(
project
.
group
,
source:
content
)
}
}.
merge
(
helper
.
hand_raise_props
(
project
.
root_ancestor
))
}.
merge
(
helper
.
hand_raise_props
(
project
.
root_ancestor
,
glm_content:
content
))
end
subject
(
:project_security_discover_data
)
do
...
...
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