mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
- Renamed fleet-gitops => infrastructure-as-code - Changed the URL (maintaining backwards compatibility) --------- Co-authored-by: Eric <[email protected]>
40 lines
892 B
JavaScript
Vendored
40 lines
892 B
JavaScript
Vendored
module.exports = {
|
|
|
|
|
|
friendlyName: 'View infrastructure-as-code',
|
|
|
|
|
|
description: 'Display "Fleet infrastructure-as-code" page.',
|
|
|
|
|
|
exits: {
|
|
|
|
success: {
|
|
viewTemplatePath: 'pages/infrastructure-as-code'
|
|
},
|
|
|
|
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
|
|
};
|
|
|
|
}
|
|
|
|
|
|
};
|