* renders ManageQueriesPage at /queries/manage
* Renames QueriesList components to ScheduledQueriesList components
* creates QueriesList component
* Adds side panel component to display query details
* Adds KolideAce editor to Query Details side panel
* Handle Edit Query button click
* Change text of the Delete Query button
* Show confirmation modal before deleting queries
Changing from the existing method of adding built in labels at server startup.
This new method should be friendlier to long term changes, and falls in line
with the new pattern established for osquery options.
Fixes#702
* consistent error handling
* Display server errors in InviteUserForm
* Handle errors in Form component
* Refactors query form
* creates KolideAce component
* Renders QueryForm from query page and manage hosts page
* Moves ace editor and select targets dropdown to query form
* Render base errors in Form HOC
* LoginPage and ForgotPasswordPage server errors
* Ensure unique key for user blocks
* Adds base error to login form and forgot password form
* Adds base error to query form
* Adds base error to Pack Form
* Adds errors to confirm invite form
* Adds clearErrors action
* clear errors when confirm invite page unmounts
* Handle errors in the App Setting page
* Handle server errors in the User Settings Page
* Handle server errors in the User Management Page
This PR separates the table migrations from the data population migrations. Table migrations run before data migrations.
Now, we have the ability to create the database tables without populating them with data. This can be useful for running "unit" tests against a MySQL store that doesn't have any pre-populated data. When performing real migrations, or for more "integration" style testing, the data migrations can also be executed.
Note there are some special cases that must be observed with these migrations, and the README is updated to reflect those.
* Initial scaffolding of the host summary endpoint
* inmem datastore implementation of GenerateHostStatusStatistics
* HostSummary docstring
* changing the url of the host summary endpoint
* datastore tests for GenerateHostStatusStatistics
* MySQL datastore implementation of GenerateHostStatusStatistics
* <= and >= to catch exact time edge case
* removing clock interface method
* lowercase error wraps
* removin superfluous whitespace
* use updated_at
* adding a seen_at column to the hosts table
* moving the update of seen_time to the caller
* using db.Get instead of db.Select
* Display packs page at /packs/manage
* Adds NumberPill component
* Filter packs list
* Render the pack info side panel when no packs are selected
* Adds packs list
* Moves state management to page component
* Display selected pack count
* Render bulk action buttons
* API client - update pack
* API client - destroy pack
* Adds update/destroy functions to packs redux config
* Bulk actions (enable, disable, delete)
* Selecting a pack updates state
* PackDetailsSidePanel updates pack status
* Link to edit pack on side panel
* sets selected pack in URL
* Sets color for unsettled buttons
* Loads scheduled queries for selected pack in All Packs Page
* PackDetailsSidePanel component
* PackDetailsSidePanel styles
* styles PacksList component
* Stop rendering flash when pack status is updated
* Makes full row clickable
* highlight selected pack
This PR adds the `host_ids` and `label_ids` field to the packs HTTP API so that one can operate on the hosts/labels which a pack is scheduled to be executed on. This replaces (and deletes) the `/api/v1/kolide/packs/123/labels/456` API in favor of `PATCH /api/v1/packs/123` and specifying the `label_ids` field. This also allows for bulk operations.
Consider the following API examples:
## Creating a pack with a known set of hosts and labels
The key addition is the `host_ids` and `label_ids` field in both the request and the response.
### Request
```
POST /api/v1/kolide/packs
```
```json
{
"name": "My new pack",
"description": "The newest of the packs",
"host_ids": [1, 2, 3],
"label_ids": [1, 3, 5]
}
```
### Response
```json
{
"pack": {
"id": 123,
"name": "My new pack",
"description": "The newest of the packs",
"platform": "",
"created_by": 1,
"disabled": false,
"query_count": 0,
"total_hosts_count": 5,
"host_ids": [1, 2, 3],
"label_ids": [1, 3, 5]
}
}
```
## Modifying the hosts and/or labels that a pack is scheduled to execute on
### Request
```
PATCH /api/v1/kolide/packs/123
```
```json
{
"host_ids": [1, 2, 3, 4, 5],
"label_ids": [1, 3, 5, 7]
}
```
### Response
```json
{
"pack": {
"id": 123,
"name": "My new pack",
"description": "The newest of the packs",
"platform": "",
"created_by": 1,
"disabled": false,
"query_count": 0,
"total_hosts_count": 5,
"host_ids": [1, 2, 3, 4, 5],
"label_ids": [1, 3, 5, 7]
}
}
```
close#633
keep the format for error returns consistent by always returning a
[]map[string]string for json errors. This simplifies the error handling
on the frontend.
Use "name":"base" as the name field for errors which do not have
a specific or known form field.
A distributed query campaign can be "orphaned" (left in the QueryRunning state)
if the Kolide server restarts while it is running, or other weirdness occurs.
When this happens, no subscribers are waiting to read results written by
osqueryd agents, but the agents continue to receive the query. Previously, this
would cause us to error on ingestion.
The new behavior will instead set the campaign to completed when it detects
that it is orphaned. This should prevent sending queries for which there is no
subscriber.
- New NoSubscriber error interface in pubsub
- Detect NoSubscriber errors and close campaigns
- Tests on pubsub and service methods
Fixes#695
* AppSettingsPage at /admin/settings
* Adds App Settings to site nav items
* SMTP not configured warning
* Creates AppConfigForm
* Avatar preview
* API client to update app config
* Creates OrgLogoIcon component
* Hide username/password when no auth type