Closes: https://github.com/fleetdm/fleet/issues/17188
Changes:
- Updated `get-extended-osquery-schema.js` to only include the last
example from the osquery schema if a table has an override file that
does not contain an `examples` value.
- Regenerated osquery_fleet_schema.json with the correct `examples`
values
When running a live query recently, I noticed some columns in the
results that we didn't have documented, and realized we weren't using
the latest osquery schema version when regenerating the merged schema.
According to the docs, [we support the latest version of
osquery](https://fleetdm.com/docs/using-fleet/enroll-hosts#supported-osquery-versions),
so figure we ought to update the schema version to the latest.
---------
Co-authored-by: Eric <eashaw@sailsjs.com>
Closes: #12836
Changes:
- Updated the `build-static-content` script to not add HTML comments to
Markdown codeblocks, and to not replace HTML comments in generated HTML
pages
- Updated the custom codeblock renderer in the `to-html` helper to add
syntax highlighting classes to Markdown codeblocks.
- Updated the indentation of content in lists on the MDM macOS setup
docs page.
---------
Co-authored-by: Rachael Shaw <r@rachael.wtf>
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
Closes: #13722
Changes:
- Updated the `get-extended-osquery-schema` helper to sort the merged
schema by table name.
- Regenerated `/schema/osquery_fleet_schema.JSON`
Closes: #13728
Changes:
- Added /support to the array of hand-coded HTML pages in
`download-sitemap.js`:
- Updated `get-extended-osquery-schema`:
- Added a new (optional) input: `includeLastModifiedAtValue` if this
input is provided, the helper will:
- Set a `lastModifiedAt` value on all tables.
- Send a request to the GitHub API to get a lastModifiedAt timestamp for
tables that have no fleet overrides.
- Use `git` to get a lastModifiedAt timestamp of when the tables YAML
file was changed.
- Updated the `build-static-content` script to include a lastModifiedAt
timestamp for table pages, and updated the `lastModifiedAt` value that
is set for pages built from `/handbook/company/open-positions.yml`
---------
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
Closes: #12954
Changes:
- Added an admin page that displays a table containing all of the users
that are currently on the Fleet Sandbox waitlist where admins can
approve waitlisted users.
- Added a new email template that tells users that their Fleet Sandbox
instance is ready.
- Added a new action:
`admin/provision-sandbox-instance-and-deliver-email.js`, an action that
provisions a Fleet sandbox instance for a single user and sends them an
email telling them that their Fleet Sandbox Instance is ready.
- Added a script that provisions a Fleet Sandbox instance for the user
who has been on the waitlist the longest and sends them an email telling
them that their Sandbox instance is ready.
Closes: https://github.com/fleetdm/confidential/issues/3230
Changes:
- Added a new (optional) input to the admin license key generator:
`partnerName`.
- Renamed `admin/generate-license-key.js` to
`admin/build-license-key.js`, updated routes and regenerated
`cloud.setup.js`
- Updated the create license key helper to add a `partner` field to the
generated license key if `partnerName` is provided.
https://github.com/fleetdm/confidential/issues/3146
To test this works:
- sam should be able to change ceo handbook and be autoapproved
- mike submitting a PR to the ceo handbook should request review from
Sam but auto-approve for mike
- Jarod's use case of creating an article should now work, even if his
PR contains images
.
---------
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
Closes: #12434
Changes:
- Updated the `fleetRepoUrl` value for tables that don't have Fleet
overrides. The additional `/tables` in the file path is causing the
template link to create a new file in a `schema/tables//tables/` folder.
Changes:
- Updated the `platform` value for osquery tables and columns that
support chromeos to be `chrome` (Previously `chromeos`)
- Updated `get-exteneded-osquery-schema.js` to use the new `platform`
value
- Updated the Fleet website to use the `chrome` `platform`.
- Regenerated `schema/osquery_fleet_schema.json` with ChromeOS tables.
Closes https://github.com/fleetdm/fleet/issues/11837
Changes:
- Changed the OS icons used on tables/ and queries/ pages.
- updated `get-extended-osquery-schema` to change the `platform` value
of osquery table columns to be the normalized platform name (`chromeos`
» `ChromeOS`)
- updated `build-static-content` to support three `platforms` values
when adding platform compatibility notes to generated Markdown tables
(e.g., "**Only available on macOS, Linux, and Windows.**" )
- Added dropdown options and icons for ChromeOS on osquery schema table
pages, query details pages, and the query library.
Closes: #11989
Changes:
- Changed the Bootstrap 4 class that is added to every table in content
built from Markdown so our tables are responsive at all widths
(`table-responsive-xl` » `table-responsive`)
Closes: #10458
Changes:
- Updated the generated id's for headings in Markdown content to remove
extra dashes in words that have multiple letter casings (e.g., `#my-sql`
» `#mysql`, `#git-hub-security` » `#github-security`)
- Updated links to Markdown headings that have changed.
. ..
---------
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
Changes:
- Changed the version of osquery schema we merge with Fleet's overrides
from `5.7.0` to `5.8.1`
- Rand the `generate-merged-schema` script to regenerate
`osquery_fleet_schema.json` .
## EDIT
Mike: Hi Eric, if my changes look good to you, and if it's passing CI,
would you merge?
.
---------
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
Changes:
- Added three errors to
`website/api/helpers/get-extended-osquery-schema.js` that are thrown if
a YAML schema table has:
- A `platforms` value that is not an array
- A `description` value that is not a string
- A `columns` value that is not an array
- Updated the `platforms` of YAML schema tables in `schema/tables/` that
had string `platforms` values
- Regenerated `/schema/osquery_fleet_schema.json`
.
Changes:
- Updated the version of the osquery schema we merge with Fleet's
overrides (`5.6.0` » `5.7.0`)
- Ran the `generate-merged-schema` script to regenerate
`schema/osquery_fleet_schema.json`
. .
Changes:
- Updated the `expiresAt` input description in
`api/controllers/admin/generate-license-key.js` and
`api/helpers/create-license-key.js`
- Updated timestamps sent to `generate-license-key` and
`create-license-key` to be in seconds.
. .
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
As raised by a community member in
[Slack](https://osquery.slack.com/archives/C01DXJL16D8/p1672751794862639),
this updates our documentation to account for both `unified_log` and
`macadmins_unified_log`.
Per my testing, it should also help with the #9158 bug in Fleet's UI.
I have updated the columns of `macadmins_unified_log` according to
what's in the [source
code](50f94d0d70/tables/unifiedlog/unified_log.go (L47-L69)),
and modified the example to work.
Since I was there I have also updated the osquery version we use to pull
the JSON to `5.6.0` and fixed a small bug related to the examples we
pull from there.
. . . . . . .
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
https://github.com/fleetdm/fleet/issues/9172
Changes:
- Added
`website/api/controllers/webhooks/recieve-stripe-subscription-events.js`
a webhook for receiving Stripe events.
- If the stripe event received is from a user's subscription
automatically renewing, A new license key is generated, the subscription
record is updated, and a renewal confirmation email is sent.
- If the stripe event received is from a user's subscription's upcoming
renewal, a renewal notification email is sent.
- If any other event type is received from Stripe, the webhook returns a
200 response.
- Added new email templates:
- `email-subscription-renewal-confirmation`
- `email-upcoming-subscription-renewal`
- Updated `website/api/controllers/admin/view-email-template-preview.js`
to have fake data for the added email templates.
- Updated `website/api/controllers/customers/view-dashboard.js` to set
two boolean variables: `subscriptionExpiresSoon` and
`subscriptionHasBeenRecentlyRenewed`
- Updated the customer dashboard to display notifications on the top of
the page if a user's subscription will renew in the next 30 days, or if
the user's subscription has been renewed in the past 30 days.
- `website/views/layouts/layout-email.ejs` - Updated the font, padding,
and text color to match wireframes.
* add link to "defaults to root" text and evented table labels
* override requires_user_context value in merged schema
* update link styles on table pages
* Update get-extended-osquery-schema.js
* encodeURIComponent
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
* update helper to use the osquery schema from the osquery/osquery-site repo
* update script description and generated json filename
* Add ritual to digital experience handbook
* add merged schema
* Update README.md
* Update get-extended-osquery-schema.js
* add #handbook label to handbook PRs
* Update get-is-pr-only-handbook-changes.js
* remove while loop from _.all()
* revert changes to github token name
* Simplifications
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
* trivial (comments)
* Remove old unfreeze/freeze logic
* trivial (clarify comment)
* Trivial (fix weird character)
* Extrapolate DRI mappings into config.
* Explain why this exists
* Extrapolate logic
* Use extrapolated logic + add 5 second wait time to prevent accidents + clean up
* Use extrapolated logic and fix omission in helper
* Make freezing actually happen and document usage
* In script, don't freeze PRs as long as they're preapproved to be edited by SOMEBODY
* Lint fixes
* add custom blockquote render and styles
* Update to-html.js
* adjust margin, replace icon
* increase margin on image
* Style updates
After seeing it in action, I noticed some improvements. I also updated Figma to reflect.
• Changed colors and icon alignment
• Adjusted top/bottom margins
• Adjusted corner radius
• Added new color variable (existing in Figma) to colors.less
Co-authored-by: Mike Thomas <mthomas@fleetdm.com>
* added a default renderer for headings to keep the links consistent with the ids
* adjusted the render function to create a link for each heading
* added styles for the heading links and link icon
* changing variable names to be more specific, fixing sidebar links, hiding autogenerated <ul>s
* Removed lodash require, updated comment, removed px from icon filename, and updated link to image.
* minor clarifications
* further expand comments and stubs
* absorb custom titles embedded in metadata, plus further comment expansion and a followup fix for something i left hanging in f8cbc14829d91e7577c63307fd9c4346dbc229bb
* Skip non-markdown files and use real path maths
* Prep for running in parallel (Remove `continue` so this isn't dependent on the `for` loop)
* determine + track unique HTML output paths
* Compile markdown + spit out real HTML (without involving any but the crunchy nougaty dependency from the very center of everything)
* add md metadata parsing
* add timestamp
* Update build-static-content.js
* attach misc metadata as "other"
* how doc images might should work (this also aligns with how the select few images in the sailsjs.com docs work)
* add file extension to generated HTML files
* "options"=>"meta"
* Make "htmlId" useful for alphabetically sorting pages within their bottom-level section
See recent comments on https://github.com/fleetdm/fleet/issues/706 for more information.
* list out the most important, specific build-time transformations
* Omit ordering prefixes like "1-" from expected content page URLs
* add a little zone for consolidating backwards compatible permalinks
* interpret README.md files by mapping their URLs to match their containing folder
* clarify plan for images
* decrease probability of collisions
* Make capitalization smarter using known acronyms, proper nouns, and a smarter numeric word trim
* Resolve app path in case pwd is different in prod
* Delete HTML output from previous runs, if any
* condense the stuff about github emojis
* got rid of "permalink" thing, since id gets automatically attached during markdown compilation anyway
Also "permalink" isn't even a good name for what this is. See https://github.com/fleetdm/fleet/issues/706#issuecomment-884693931
* …and that eliminates the need for the cheerio dep!
* Bring in bubbles+syntax highlighting into build script, and remove sails.helpers.compileMarkdownContent() -- this leaves link munging as a todo though
* trivial (condense comments)
* Remove unused code from toHtml() helper
* Implemented target="_blank" and root-relative-ification
* remove todo about emojis after testing and verifying it works just fine
* trivial: add link to comment in case github emojis matter at some point
* consolidate "what ifs" in comments
* Leave this up to Sarah, for now. (Either bring it back here in the build script or do it all on the frontend)
* Enable /docs and /handbook routes, and add example of a redirect for a legacy/deprecated URL
* implement routing
* Upgrade deps
this takes advantages of the latest work from @eashaw, @rachaelshaw, and the rest of the Sails community
* tweak var names and comments
* make readme pages use their folder names to determine their default (fallback) titles
as discussed in https://github.com/fleetdm/fleet/issues/706#issuecomment-884788002
* first (good enough for now) pass at link rewriting
as discussed in https://github.com/fleetdm/fleet/issues/706#issuecomment-884742072
* Adapt docs pages to build from markdown output
* Continue work on docs pages
* Add landing page
* Remove unused code; minor changes
* Replace regex
* fixes https://github.com/fleetdm/fleet/pull/1380#issuecomment-891429581
* Don't rely on "path" being a global var
* Syle fleetdm doc pages
* Continue work on docs pages
* Fix linting error
* Disable lesshint style warnings
* parasails-has-no-page-script attribute
Added a parasails-has-no-page-script attribute to the docs template, added a check for that attribute in parasails.js and removed the empty page script for 498
* bring in latest parasails dep
* trivial
* Update links to dedupe and not open in new tab unless actually external
* Disable handbook for now til styles are ready
* fix CTA links
* trivial
* make sitemap.xml get served in prod
* hide search boxes for now, remove hard-coded version and make releases open in new tab
* clean out unused files
Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: eashaw <caglc@live.com>
* 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
* 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 4e7e23990c472e84f3f24391ef360a175f725609)
* 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)
* Brought in the mostly-unchanged stuff from Sails website- changed just enough to get it working
* inline beforeConvert and afterConvert, for readability
because it's better when you tell a story with the parts of the story in order
* trivial (change arg name for clarity)
* trivial (apply more up-to-date err callback convention)
* modernize some of the bits relying on reassigning arguments
* convert the rest of the way to async/await
* trivial
* just aesthetics
* remove reliance on app-level config
* mostly i'm doing this to remember how it works
* normalize better so this can be more flexible
* this makes it work (albeit needs a bit more fluffing)
* strip out more sails-specific stuff
* clean up menu files between runs, scrape off a bit more technical debt
* scrape out some more dead code
* use devDependencies for markdown compilation stuff since it won't be compiling at runtime
* stub script for compiling markdown content
* Fill in implementation of script, rename helper.
* add note about the non-markdown file problem
* tweak output paths for clarity
* Improve generated menu content and set up groundwork for being able to easily access it via config
* Use .sailsrc to hold onto menu content, so it's injected into config for easier access (rather than reading JSON files whenever needed)
* more explicit tmp filename, in case we forget how this works later
* fix typo in build script (missing .js extension)
* Stub query detail page and a dev route for developing it
http://localhost:2024/sandbox/example-query
* fix helper friendlyName
* Run compilation in series to avoid race condition in doc-templater when cloning from the same repo. Add todos about sitemap and further menu data cleanup.
* make sandbox actually useful
* Help prevent accidental checking in of compiled HTML files.
* rename script and generated folder in partials/
* fix/expand script metadata