Commit graph

3 commits

Author SHA1 Message Date
Eric
0e72c5daeb
Website: Move query generator out of Admin section (#25301)
Changes:
- Updated the User model to have a new attribute: `canUseQueryGenerator`
a boolean attribute that will grant users access to the query generator
page on the website.
- Added a new policy: `has-query-generate-access`
- Moved the query generator page from the admin section of the website.

Note: before this change can be merged, the website's database will need
to be migrated to add the new column to the User table
2025-01-14 18:09:17 -06:00
Eric
4ad16cc46f
Website: Update admin query generator to work in production. (#25363)
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.)
2025-01-10 17:51:03 -06:00
Eric
0620d7e580
Website: Add admin query generator (#25205)
Changes:
- Added /admin/query-generator, a page that admins can use to generate
queries from natural language questions.
- Added `/admin/get-llm-generated-sql.js` an action that uses the same
method in the `test-llm-generated-sql` script to generate queries from a
natural language question.
2025-01-08 13:47:17 -06:00