mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
For: #23721 Changes: - Added /customer-stories, a page that displays the testimonials from testimonials.yml - Changed the /testimonials redirect to go to the /customer-stories page. - Updated the "What people are saying" link on the homepage and the header navigation. @mike-j-thomas FYI: To make this PR quickly, I did not implement the sort order in the wireframes or change the testimonials yaml.
51 lines
1.4 KiB
JavaScript
Vendored
51 lines
1.4 KiB
JavaScript
Vendored
module.exports = {
|
|
|
|
|
|
friendlyName: 'View testimonials',
|
|
|
|
|
|
description: 'Display "Testimonials" page.',
|
|
|
|
|
|
exits: {
|
|
|
|
success: {
|
|
viewTemplatePath: 'pages/testimonials'
|
|
}
|
|
|
|
},
|
|
|
|
|
|
fn: async function () {
|
|
|
|
if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.testimonials) || !sails.config.builtStaticContent.compiledPagePartialsAppPath) {
|
|
throw {badConfig: 'builtStaticContent.testimonials'};
|
|
}
|
|
// Get testimonials for the <scrolalble-tweets> component.
|
|
let testimonials = _.clone(sails.config.builtStaticContent.testimonials);
|
|
|
|
// Filter the testimonials by product category
|
|
let testimonialsForMdm = _.filter(testimonials, (testimonial)=>{
|
|
return _.contains(testimonial.productCategories, 'Device management');
|
|
});
|
|
let testimonialsForSecurityEngineering = _.filter(testimonials, (testimonial)=>{
|
|
return _.contains(testimonial.productCategories, 'Vulnerability management');
|
|
});
|
|
let testimonialsForItEngineering = _.filter(testimonials, (testimonial)=>{
|
|
return _.contains(testimonial.productCategories, 'Endpoint operations');
|
|
});
|
|
let testimonialsWithVideoLinks = _.filter(testimonials, (testimonial)=>{
|
|
return testimonial.youtubeVideoUrl;
|
|
});
|
|
|
|
return {
|
|
testimonialsForMdm,
|
|
testimonialsForSecurityEngineering,
|
|
testimonialsForItEngineering,
|
|
testimonialsWithVideoLinks,
|
|
};
|
|
|
|
}
|
|
|
|
|
|
};
|