## Summary - Adds a new testimonial quote from Ed Merrett (Director, Security & TechOps @ Harmonic Security) to `handbook/company/testimonials.yml` - Wires up the testimonial to appear at the end of the quote carousels on both `/security-and-control` and `/visibility-and-reporting` pages - Adds a placeholder profile image for the testimonial author **Quote:** "We use Fleet Device Management. Basically, osquery is the answer." **Note:** The profile image (`testimonial-author-ed-merrett-48x48@2x.png`) is a placeholder transparent PNG. Replace with Ed Merrett's actual profile photo when available. --- Built for [Mike McNeil](https://fleetdm.slack.com/archives/D0AFASLRHNU/p1781716393012429?thread_ts=1780459268.285059&cid=D0AFASLRHNU) by [Kilo for Slack](https://kilo.ai/slack) --------- Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com> Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com> Co-authored-by: Eric <eashaw@sailsjs.com>
72 lines
2.1 KiB
JavaScript
Vendored
72 lines
2.1 KiB
JavaScript
Vendored
module.exports = {
|
|
|
|
|
|
friendlyName: 'View visibility and reporting',
|
|
|
|
|
|
description: 'Display "Visibility and reporting" page.',
|
|
|
|
|
|
exits: {
|
|
|
|
success: {
|
|
viewTemplatePath: 'pages/visibility-and-reporting'
|
|
},
|
|
|
|
badConfig: {
|
|
responseType: 'badConfig'
|
|
},
|
|
|
|
},
|
|
|
|
|
|
fn: async function () {
|
|
|
|
if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.testimonials)) {
|
|
throw {badConfig: 'builtStaticContent.testimonials'};
|
|
}
|
|
// Get testimonials for the <scrolalble-tweets> component.
|
|
let testimonialsForScrollableTweets = _.clone(sails.config.builtStaticContent.testimonials);
|
|
|
|
// Only filter and sort testimonials when static content has been built.
|
|
// If the build-static-content script was not run, we'll show a placeholder testimonial that is added by the custom hook.
|
|
if(sails.config.builtStaticContent.compiledPagePartialsAppPath) {
|
|
|
|
// Specify an order for the testimonials on this page using the last names of quote authors
|
|
let testimonialOrderForThisPage = [
|
|
'Scott MacVicar',
|
|
'Luis Madrigal',
|
|
'Nick Fohs',
|
|
'Kenny Botelho',
|
|
'Charles Zaffery',
|
|
'Arsenio Figueroa',
|
|
'Matt Carr',
|
|
'Andre Shields',
|
|
'Erik Gomez',
|
|
'Ed Merrett',
|
|
];
|
|
// Filter the testimonials by product category and the filtered list we built above.
|
|
testimonialsForScrollableTweets = _.filter(testimonialsForScrollableTweets, (testimonial)=>{
|
|
return _.contains(testimonial.productCategories, 'Observability') && _.contains(testimonialOrderForThisPage, testimonial.quoteAuthorName);
|
|
});
|
|
|
|
testimonialsForScrollableTweets.sort((a, b)=>{
|
|
if(testimonialOrderForThisPage.indexOf(a.quoteAuthorName) === -1){
|
|
return 1;
|
|
} else if(testimonialOrderForThisPage.indexOf(b.quoteAuthorName) === -1) {
|
|
return -1;
|
|
}
|
|
return testimonialOrderForThisPage.indexOf(a.quoteAuthorName) - testimonialOrderForThisPage.indexOf(b.quoteAuthorName);
|
|
});
|
|
}
|
|
|
|
// Respond with view.
|
|
return {
|
|
testimonialsForScrollableTweets,
|
|
};
|
|
|
|
}
|
|
|
|
|
|
};
|