mirror of
https://github.com/fleetdm/fleet
synced 2026-05-09 10:11:03 +00:00
Changes: - Updated the `build-static-content` script to add the merged osquery schema JSON to the website's `builtStaticContent` configuration - Updated view-query-generator to have a badConfig exit that is used if the website has an invalid `builtStaticContent.schemaTables` configuration - Updated `get-llm-generated-sql` to use the `builtStaticContent.schemaTables` instead of attempting to use `sails.helpers.getExtendedOsquerySchema()` (Which does not work as intended when run in a production environment.)
29 lines
515 B
JavaScript
Vendored
29 lines
515 B
JavaScript
Vendored
module.exports = {
|
|
|
|
|
|
friendlyName: 'View query generator',
|
|
|
|
|
|
description: 'Display "Query generator" page.',
|
|
|
|
|
|
exits: {
|
|
|
|
success: {
|
|
viewTemplatePath: 'pages/admin/query-generator'
|
|
},
|
|
badConfig: { responseType: 'badConfig' },
|
|
},
|
|
|
|
|
|
fn: async function () {
|
|
if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.schemaTables)) {
|
|
throw {badConfig: 'builtStaticContent.schemaTables'};
|
|
}
|
|
// Respond with view.
|
|
return {};
|
|
|
|
}
|
|
|
|
|
|
};
|