mirror of
https://github.com/fleetdm/fleet
synced 2026-05-15 21:18:29 +00:00
Closes #25655 Changes: - Created a new component: `<docs-nav-and-search>`, a component that displays links to documentation pages and a search bar. - Added the `<docs-nav-and-search>` component to documentation pages, query pages, policy pages, vitals pages, app library pages, and osquery schema documentation pages. - Updated the documentation template page to match the latest wireframes. - Updated the osquery schema documentation pages to match the latest wireframes. --------- Co-authored-by: Mike Thomas <[email protected]>
61 lines
1.2 KiB
JavaScript
Vendored
61 lines
1.2 KiB
JavaScript
Vendored
module.exports = {
|
|
|
|
|
|
friendlyName: 'View app details',
|
|
|
|
|
|
description: 'Display "App details" page.',
|
|
|
|
|
|
inputs: {
|
|
appIdentifier: {
|
|
type: 'string',
|
|
required: true,
|
|
description: 'the identifier of an app in Fleet\'s maintained app library.',
|
|
example: '1password'
|
|
},
|
|
},
|
|
|
|
exits: {
|
|
|
|
success: {
|
|
viewTemplatePath: 'pages/app-details'
|
|
},
|
|
|
|
badConfig: {
|
|
responseType: 'badConfig'
|
|
},
|
|
|
|
notFound: {
|
|
responseType: 'notFound'
|
|
},
|
|
|
|
},
|
|
|
|
|
|
fn: async function ({appIdentifier}) {
|
|
|
|
if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.appLibrary) || !sails.config.builtStaticContent.appLibrary) {
|
|
throw {badConfig: 'builtStaticContent.appLibrary'};
|
|
}
|
|
|
|
let thisApp = _.find(sails.config.builtStaticContent.appLibrary, { identifier: appIdentifier });
|
|
if (!thisApp) {
|
|
throw 'notFound';
|
|
}
|
|
// FUTURE: make these better.
|
|
let pageTitleForMeta = thisApp.name + ' | Fleet app library';
|
|
// let pageDescriptionForMeta = 'TODO'
|
|
|
|
// Respond with view.
|
|
return {
|
|
thisApp,
|
|
// pageDescriptionForMeta,
|
|
pageTitleForMeta,
|
|
algoliaPublicKey: sails.config.custom.algoliaPublicKey,
|
|
};
|
|
|
|
}
|
|
|
|
|
|
};
|