mirror of
https://github.com/fleetdm/fleet
synced 2026-05-19 15:09:20 +00:00
https://github.com/fleetdm/confidential/issues/4533 Changes: - Added `/handbook/company/testimonials.yml`. - Updated `build-static-content` to validate each item in `testimonials.yml` and to add each item to `sails.config.builtStaticContent.testimonials` - Updated the scrollable tweets component to build cards of quotes from `sails.config.builtStaticContent.testimonials`. - Updated view-actions for pages where the `<scrollable-tweets>` component is being used to throw an error if the testimonials configuration is missing and to send the testimonials config to the page. - Updated pages where `<scrollable-tweets>` was being used. - Updated the landing page generator to create new view-actions that send the testimonials configuration to generated pages and updated the template .ejs file.
33 lines
795 B
JavaScript
Vendored
33 lines
795 B
JavaScript
Vendored
module.exports = {
|
|
|
|
|
|
friendlyName: 'View vulnerability-management',
|
|
|
|
|
|
description: 'Display "Vulnerability management" page.',
|
|
|
|
|
|
exits: {
|
|
|
|
success: {
|
|
viewTemplatePath: 'pages/vulnerability-management'
|
|
},
|
|
badConfig: { responseType: 'badConfig' },
|
|
},
|
|
|
|
|
|
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 testimonialsForScrollableTweets = sails.config.builtStaticContent.testimonials;
|
|
// Respond with view.
|
|
return {
|
|
testimonialsForScrollableTweets,
|
|
};
|
|
|
|
}
|
|
|
|
|
|
};
|