mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
Website: Update endpoint-ops landing page view action (#24052)
Changes: - Updated the endpoint ops view action to use the user's primaryBuyingSituation for personalization if it is set, and to default to the IT view if not (Note: this behavior is overridden with a purpose query string. e.g., ?purpose=security.
This commit is contained in:
parent
948a790410
commit
e8a0092d9f
1 changed files with 5 additions and 6 deletions
11
website/api/controllers/view-endpoint-ops.js
vendored
11
website/api/controllers/view-endpoint-ops.js
vendored
|
|
@ -22,16 +22,15 @@ module.exports = {
|
|||
}
|
||||
// Get testimonials for the <scrolalble-tweets> component.
|
||||
let testimonialsForScrollableTweets = _.clone(sails.config.builtStaticContent.testimonials);
|
||||
// Default the pagePersonalization to the user's primaryBuyingSituation.
|
||||
let pagePersonalization = this.req.session.primaryBuyingSituation;
|
||||
// Default the pagePersonalization to the user's primaryBuyingSituation if it is set, otherwise, default to the eo-it view..
|
||||
let pagePersonalization = this.req.session.primaryBuyingSituation ? this.req.session.primaryBuyingSituation : 'eo-it';
|
||||
// If a purpose query parameter is set, update the pagePersonalization value.
|
||||
// Note: This is the only page we're using this method instead of using the primaryBuyingSiutation value set in the users session.
|
||||
// This lets us link to the security and IT versions of the endpoint ops page from the unpersonalized homepage without changing the users primaryBuyingSituation.
|
||||
if(this.req.param('purpose') === 'security'){
|
||||
pagePersonalization = 'eo-security';
|
||||
} else {
|
||||
// Default to IT personalization if no primaryBuyingSituation or purpose query parameter is set.
|
||||
if(this.req.param('purpose') === 'it'){
|
||||
pagePersonalization = 'eo-it';
|
||||
} else if(this.req.param('purpose') === 'security'){
|
||||
pagePersonalization = 'eo-security';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue