mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
Created 3 new components: <OsqueryOptionsPage /> , <OsqueryOptionsForm />, and <YamlAce /> The <OsqueryOptionsPage /> component is rendered at the new route /admin/osquery. The user navigates to this route by selecting the "Osquery Options" sub-navigation in the admin dropdown menu. On the Osquery Options page, the user is presented with a ACE editor filled with the current osquery options. The current osquery options are retrieved from the serve when the page component mounts. These current osquery options are stored in the osquery slice of state. Clicking "UPDATE OPTIONS" will trigger a form submit and hit the v1/kolide/spec/osquery_options endpoint if the yaml is valid. If the yaml is not valid, an error message is presented to the user with details on what the error is and where it occurred. If the yaml is valid, the osquery options will be updated even if the options haven't change. |
||
|---|---|---|
| .. | ||
| entities | ||
| base.js | ||
| endpoints.js | ||
| helpers.js | ||
| helpers.tests.js | ||
| index.js | ||
| index.tests.js | ||
| README.md | ||
| request.js | ||
| status.js | ||
| websockets.js | ||
Kolide API Client
The Kolide API Client is used for communicating with the Kolide API. Kolide has a number of entities (hosts, labels, packs, queries, users, etc), all of which have CRUD methods to perform on a specific entity or collection of entities.
Entities are assigned to the API Client in the constructor function. Each
entity's methods can be found in the /frontend/kolide/entities directory.
The CRUD methods that are typically implemented in the API client are as follows:
create
- The
createmethod is used for creating a new entity. The input parameter is typically an object containing the attributes for the new entity.
destroy
- The
destroymethod is used for deleting an entity. Then input parameter is typically the entity to be deleted.
load
- The
loadmethod is used for loading a single entity. The input parameter is typically theidof the entity to load.
loadAll
- The
loadAllmethod is used for loading all of the entities.
update
- The
updatemethod is used to update an entity. The input parameters are typically the entity being updated and an object with the updated attributes.