fleet/website/api/controllers/view-fleet-gitops.js
Eric 5160095f78
Website: Add Fleet GitOps page (#38974)
Changes:
- Added a Fleet GitOps page (/fleet-gitops)
- Added a link to the new page in the "Solutions" dropdown to the
website's header navigation

---------

Co-authored-by: Mike Thomas <[email protected]>
2026-01-29 10:08:42 +09:00

40 lines
856 B
JavaScript
Vendored

module.exports = {
friendlyName: 'View fleet gitops',
description: 'Display "Fleet gitops" page.',
exits: {
success: {
viewTemplatePath: 'pages/fleet-gitops'
},
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 = _.uniq(_.clone(sails.config.builtStaticContent.testimonials), (quote)=>{
return quote.quoteAuthorName.toLowerCase();
});
// Respond with view.
return {
testimonialsForScrollableTweets
};
}
};