mirror of
https://github.com/fleetdm/fleet
synced 2026-05-09 18:20:48 +00:00
Related to: #23792 Changes: - Added /app-library, a page that displays information about Fleet-maintained apps - Added the app details page (/app-library/{app identifier}), a page that gives users detailed information about a single Fleet-maintained app - Updated the build-static-content script to add information about Fleet-maintained apps to the website's configuration.
33 lines
652 B
JavaScript
Vendored
33 lines
652 B
JavaScript
Vendored
module.exports = {
|
|
|
|
|
|
friendlyName: 'View app library',
|
|
|
|
|
|
description: 'Display "App library" page.',
|
|
|
|
|
|
exits: {
|
|
|
|
success: {
|
|
viewTemplatePath: 'pages/app-library'
|
|
},
|
|
badConfig: { responseType: 'badConfig' },
|
|
},
|
|
|
|
|
|
fn: async function () {
|
|
|
|
if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.appLibrary) || !sails.config.builtStaticContent.appLibrary) {
|
|
throw {badConfig: 'builtStaticContent.appLibrary'};
|
|
}
|
|
|
|
let allApps = sails.config.builtStaticContent.appLibrary;
|
|
allApps = _.sortBy(allApps, 'name');
|
|
// Respond with view.
|
|
return {allApps};
|
|
|
|
}
|
|
|
|
|
|
};
|