2026-01-29 01:08:42 +00:00
|
|
|
module.exports = {
|
|
|
|
|
|
|
|
|
|
|
2026-03-12 03:54:17 +00:00
|
|
|
friendlyName: 'View infrastructure-as-code',
|
2026-01-29 01:08:42 +00:00
|
|
|
|
|
|
|
|
|
2026-03-12 03:54:17 +00:00
|
|
|
description: 'Display "Fleet infrastructure-as-code" page.',
|
2026-01-29 01:08:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
exits: {
|
|
|
|
|
|
|
|
|
|
success: {
|
2026-03-12 03:54:17 +00:00
|
|
|
viewTemplatePath: 'pages/infrastructure-as-code'
|
2026-01-29 01:08:42 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|