Commit graph

6 commits

Author SHA1 Message Date
Eric
9a9ff5b169
Website: Update policy and query library pages. (#30715)
Closes: https://github.com/fleetdm/fleet/issues/30714


Changes:
- Fixed a bug in the policy and query library pages that prevented
multi-platform queries and policies from being displayed in every
platform they are supported on.
2025-07-09 18:36:07 -05:00
Eric
5c0894ce0a
Website: Create queries.yml, add vitals and query pages, move policies. (#25701)
Related to: https://github.com/fleetdm/confidential/issues/9096

Changes:
- Created docs/queries.yml. A YAML file that contains the queries from
the standard query library (`kind: query`) and the host vitals queries
(`kind: built-in`).
- Added the `vitals/*` page, a page that displays details about host
vital queries used to gather information about.
- Updated the /queries page to show queries from the new
`docs/queries.yml` file, and moved policies to a new page (/policies)
- Updated the view action for the query-detail page to look for/redirect
to a policy page with a matching slug before returning a 404 response if
a matching query is not found. This behavior will make it so all of the
old URLs for policy pages will redirect users to the new URL.
- Updated the website's "Docs" navigation menu to have links to the new
vitals and policies pages.
2025-01-22 21:10:17 -06:00
Eric
16e3161dd7
Website: Enable Docsearch on query pages. (#23496)
Changes:
- enabled Algolia Docsearch on the /queries pages.
2024-11-04 13:31:36 -06:00
Eric
f623eed47b
Website: Update /queries page (#23472)
Changes:
- Standard query library:
- Added three policies to the Standard query library (tagged as premium)
- Changed the `kind` of the "Identify Apple development secrets (macOS)"
query to `policy` because it is an informational query (It returns rows
of results rather than 1 or 0) and removed its `resolution` value
- Updated the build-static-content script to remove platform names from
the end of query names (e.g., (macOS)). This is done to keep the URLs
for queries the same while hiding them in the UI
- Updated the layout of the queries page to match the latest wireframes
and updated the page to only show policies
 - Updated the styles and layout of the queries-details page.

---------

Co-authored-by: Rachael Shaw <[email protected]>
2024-11-04 10:58:08 -06:00
Mike McNeil
ac220ba6e5
Obviate doc-templater dependency + dynamic sitemap.xml (#827)
* trivial

* Simplify build-static-content script and rip out the old markdown compilation for query library

* improve error msg

* trivial

* move helper

* bring in the skeleton

* Compile handbook as well, and bring more stuff inline

* instead of generating sitemap.xml file, could just serve it as a route

* Serve sitemap.xml on the fly

* add failsafe to prevent search engine accidents

* add remaining hand-coded pages to sitemap

* rearrange routes and get rid of commented-out ones

* Update build-static-content.js

* stub out the remaining pieces

* Add assertion (Which actually helped catch a real duplicate query: get-mac-os-disk-free-space-percentage)

* clean out inadvertently committed stuff in sailsrc

* route and serve data for correct query by slug + fix error message re duplicate query slugs + added assertion for duplicate doc page slugs

* yaml == dev dependency

* remove doc-templater dependency, as promised

* stub out handbook page

* clarify comments & remove unnecessary skipAssets

* Update build-static-content.js

* res.badConfig()

* add missing exit that I left out back in ec95df6a4b

* remove unused file

* update comments before commenting out and moving over to basic-documentation.less

* move example styling of generated HTML over to docs/handbook

* include both links

* Fix sitemap.xml URLs in local dev by fixing baseUrl config for local development (since Fleet itself is on 1337).

* followup to d55c777590

* Include query pages in sitemap.xml (+make urls generated for docs/handbook in build script slightly more real) -- but also don't serve sitemap

* sails.config.builtStaticContent.allPages » sails.config.buildStaticContent.markdownPages  (also remove unnecessary trailing slash trimming)

* trivial

* check config when serving sitemap + smarter error message for contributors

* hook up GitHub link to edit the query

* remove html ids

* Update query-detail.ejs

* somre more setup re https://github.com/fleetdm/fleet/issues/368#issuecomment-848566533
2021-05-26 03:24:38 -05:00
Mike McNeil
d50b48e7c2
Absorb yaml queries into website, + stub /queries + /documentation (#812)
* Upgrade to get rid of REPL schmutz

* rename workflow to lessen ambiguity vs. markdown compilation of docs

* ensure lockfile makes it to fleetdm.com prod

* skip force git add of package-lock to avoid confusion for now. (reverts 4e7e23990c)

* rename build script (because now it won't always be markdown source files)

* update metadata to match prev commit

* change key name in generated sailsrc for consistency

* stub query library page

* used named params so others can tell what's up with the forcing

* expand comments

* expand comments

* intermediate commit- playing with inlining the guts from doctemplater

* stub basic docpage shell and a little page to preview that on

* Compile YAML and set up query library page

* clean sailsrc

* optimize build by running everything in parallel

* Add note about the fact that we don't even need to clone anything since we've consolidated it all into one repo now.  facepalm

* un-parallelize one bit that fails in CI if it's parallelized (it'll go away soon anyway)
2021-05-20 03:22:42 -05:00