Commit Graph

105 Commits

Author SHA1 Message Date
Gabe Hernandez
0b9d20329b
add ts to data table components (#364)
* chnage webpack to resolve typescript modules. convert TextCell to TS

* change headercell and statuscell to ts

* ignore casesensitve error, seems a bit buggy

* ignore camelcase error, we already use snakecase many places

* updated LinkCell and modules it depends on to typescript

* fix up some warnings from changes

* fix more types in textcell and hosttableconfig

* use alias imports

* add require button state interfcae
2021-03-03 16:51:39 +00:00
Gabe Hernandez
3546b7d41a
adding typescript and updating linting to work with it (#356)
* updated typescript version and tsconfig in project

* updated eslint version

* change from experimental export to supported export

* removed accidentally added script

* turn off buggy jsx-a11y eslint rules

* remove unused tslint.json

* fix wrong jsx-a11y depedency

* use correct eslint-plugin-jsx-a11y version

* fix rest of linting errors

* move back js-yaml version to 3 major
2021-03-01 07:48:51 +00:00
Gabe Hernandez
a6c8987200
Feature - add search and sort to host table (#341)
* start adding global search filter

* update polyfill setup to use async await for react-table

* update browerslist to sensible defaults

* get global search functionality woring

* more progress on the data table

* get label network calls working in hostdatatable

* get pagination functionality into the HostDataTable

* get search query making network call

* get ordering making query

* make actual  sort order network calls

* disable cpu column sorting

* seperate get table data from get labels

* fix issues with input resetting and got search query working

* get sort working

* ignore vs code editor settings

* improve loading spinner to move inside the table

* improve styling

* add sorting arrows

* remove unused sorting arrow component

* add host query params to labels endpoint

* fix style for query textarea on label hosts

* got new pagination working

* set server data as source of truth for table global filter

* cleanup logs

* clean up pagination styles

* fix up paginationa and no host styles

* add result count to table

* remove logs

* tweak header styles

* fix to sort order

* simplify default sort direction

* keep sort order of server api responses and use in host table

* clean up logs

* Add styles for header cell and pagination

* fix tests for ManageHostPage

* fix tests for HostContainer

* fix lower level action reducer and thunk tests

* fix tests for hosts client

* fix up some host count styling

* added back no hosts start message

* fix linting errors

* remove unused old pagination code

* add back scrollToTop utility on pagination

* remove unused code in managehostpage test

Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
Zach Wasserman
b83fbf0ec9
Special case host_name on the backend to enable frontend consistency (#318)
See #317 for followup to this.
2021-02-15 11:58:05 -08:00
Zach Wasserman
7a68e3de65
Deprecate /api/v1/kolide routes (#297)
- Support both /api/v1/fleet and /api/v1/kolide routes in server.
- Add logging for use of deprecated routes.
- Rename routes in frontend JS.
- Rename routes and add notes in documentation.
2021-02-10 12:13:11 -08:00
noahtalerman
4e8c5e7f86
Add Host details page (#238)
This PR adds a new Host details page as part of the Hosts UI project #162

Summary of changes:
- New component <HostDetailsPage />
- Move "Query" and "Delete" buttons from the hosts list to the Host details page
- Add new button variants label and text-link
- Add react-tooltip package to the project (v4.2.13)
2021-01-28 12:44:48 -08:00
noahtalerman
5dd9b75e9c
Update query page (edit, new, manage) and packs page (edit, new, manage) styles. (#106)
The goal of this PR is to update the style across the query and packs pages so they are consistent with the latest global styles (colors, buttons, and fonts).
2020-12-08 12:07:54 -08:00
Zach Wasserman
0670db66c4
Migrate JS tests to Jest and update libraries (#74)
- Move from Mocha to Jest for JS testing (Jest seems to have better support for
 'watching' tests and a more active community these days).
- Codemod existing tests to Jest syntax (using https://github.com/skovhus/jest-codemods)
- Fix some errors in tests that were previously hidden.
- Update Babel.
2020-12-01 10:15:12 -08:00
noahtalerman
57950a9645
Update host side panel. New styles for labels. (#72)
The goal of this PR is to implement the new styles in the mockups and update the right-side panel on the hosts
page. This right-side panel includes built-in labels, custom labels, and filtering for custom labels.
2020-11-30 12:17:55 -05:00
Zach Wasserman
6dccabb5b0
Clean up output of JS test errors (#63)
- Output easy to parse stack traces during run of tests
- Fix some spurious warnings and errors in tests
- Add --exit flag to Mocha invocation to fix hang due to timers in ACE editor
2020-11-24 08:25:52 -08:00
noahtalerman
8e37b8938c
Implement osquery options page (#11)
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.
2020-11-04 18:00:51 -08:00
Zachary Wasserman
7494513400 Clean up and comments before merge. 2020-07-21 14:05:46 -07:00
Zachary Wasserman
b0595748f1 Implement pagination of hosts in the web UI
This commit takes advantage of the existing pagination APIs in the Fleet
server, and provides additional APIs to support pagination in the web
UI. Doing this dramatically reduces the response sizes for requests from
the UI, and limits the performance impact of UI clients on the Fleet and
MySQL servers.
2020-07-21 14:05:46 -07:00
Zachary Wasserman
ccc8581229
Upgrade eslint and dependencies (#2255)
Updates configuration and fixes issues introduced
2020-07-06 19:31:48 -07:00
Zachary Wasserman
c1aa8355cb
Add support for multiple enroll secrets (#2238)
- Support multiple enroll secrets
- Record name of enroll secret used when host enrolls
- Update fleetctl and UI to support these features
2020-05-29 09:12:39 -07:00
billcobbler
a83a26b279 Add ability to disable live queries (#2167)
- Add toggle to disable live queries in advanced settings
- Add new live query status endpoint (checks for disabled via config and Redis health)
- Update QueryPage UI to use new live query status endpoint

Implements #2140
2020-01-13 16:53:04 -08:00
Zachary Wasserman
adf87140a7
Add ability to prefix Fleet URLs (#2112)
- Add the server_url_prefix flag for configuring this functionality
- Add prefix handling to the server routes
- Refactor JS to use appropriate paths from modules
- Use JS template to get URL prefix into JS environment
- Update webpack config to support prefixing

Thanks to securityonion.net for sponsoring the development of this feature.

Closes #1661
2019-10-16 16:40:45 -07:00
Austin Burnett
59efb495ca Add automatic host expiration capability (#2117)
When configured, this feature will delete hosts that have not checked in after the specified number of days.

Closes #1860.
2019-10-16 16:35:17 -07:00
Zachary Wasserman
1eccf9a874
Add warning in query UI when Redis fails (#2086)
- Add warning message when Redis fails
- Disable query button when Redis fails
- Refactor SMTP warning banner into component for reuse

Closes #2073
2019-08-13 09:42:58 -07:00
Zachary Wasserman
79b2249e69
Allow update of settings page without enabling SMTP (#1903)
Fixes #1871
2018-09-07 15:37:35 -07:00
Zachary Wasserman
ece5e6cda9
Fix pack targets handling in UI (#1898)
Now targets should be updated to exactly what is displayed in the UI.

Fixes #1827
2018-08-14 12:14:24 -07:00
Zachary Wasserman
ea744709e0
Fix handling of missing scheduled query parameters in UI (#1870)
The UI previously expected these parameters to be set, but instead we can
massage the data appropriately (because they are not required to be set by
fleetctl).

Fixes #1869
2018-07-17 10:03:31 -07:00
Zachary Wasserman
06832697d0
Fix deletion of labels in UI (#1848)
- Add endpoint for deletion of label by ID
- Use ID endpoint from frontend JS

Fixes #1847
2018-06-25 13:56:59 -07:00
Zachary Wasserman
0b7747bef0
Fix pack and query UI issues in Fleet 2.0 (#1829)
Replaces (and appropriately refactors) a number of endpoints that were removed long ago when we decided to kill the UI with the fleetctl release. We turned out not to do this, and now need to restore these missing endpoints.

This is not a straight up replacement of the existing code because of refactoring to the DB schemas that was also done in the migration.

Most of the replaced code was removed in #1670 and #1686.

Fixes #1811, fixes #1810
2018-06-15 10:13:11 -04:00
Mike Arpaia
de6dbd0f13
Remove decorators and osquery config from the UI (#1769) 2018-05-08 11:03:32 -06:00
Mike Arpaia
9d21cbdb8a removing license code (#1551) 2017-09-01 10:42:46 -06:00
John Murphy
151ce35e8c Front end support for decorator crud ops (#1509)
This PR closes #1448, providing front end CRUD operations for decorators.* Front end support for decorator crud ops.
2017-05-30 13:36:29 -05:00
John Murphy
019191c36b SSO Login and Configuration Support (#1506)
Closes issue #1456 This PR adds a single sign on option to the login form, exposes single sign on to the end user, and allows an admin user to set single sign on configuration options.
2017-05-17 10:58:40 -05:00
John Murphy
12d2df1f9a Add SSO support to new user activation (#1504)
Closes #1502. This PR adds support for SSO to the new user creation process. An admin now has the option to select SSO when creating a new user.  When the confirmation form is submitted, the user is automatically authenticated with the IDP, and if successful, is redirected to the Kolide home page. Password authentication, password change and password reset are not allowed for an SSO user.
2017-05-10 11:26:05 -05:00
John Murphy
d533931799 Addresses Issue where the reset button doesn't work on options page (#1447)
Closes issue #1388. The problem here is that previously, the reset button loaded a hard coded list of default options into the component state, instead of the proper behavior which is to reset the options to default values on the back end, and then load them back into the redux store. This PR adds a ResetOptions endpoint on the server, and wires up the UI so that it triggers the endpoint, then loads the default options from the backend server.
2017-03-30 18:56:11 -05:00
Mike Stone
c7535e8d8c Add Front-end Documentation (#1373) 2017-03-10 17:13:29 -05:00
Mike Stone
acca55ec74 Removes unused API client method stub (#1347) 2017-03-03 12:22:34 -05:00
Mike Stone
d747a471af Refactor API client (#1335)
* Isolate each API entity
* Improve code structure in API client and request mocks
* Standardize on a request mock structure
* Use helper for creating request mocks
* Adds Request class to handle API requests
2017-03-02 17:07:01 -05:00
Zachary Wasserman
3d6ca7d5a4 Use sockjs to gracefully degrade websockets (#1255)
Use the [SockJS Protocol](https://github.com/sockjs/sockjs-protocol) to handle
bidirectional communication instead of plain websockets. This allows
distributed queries to function in situations in which they previously failed
(Load balancers not supporting websockets, issues with Safari and self-signed
certs, etc.).

Also includes fixes to the JS message handling logic where slightly different
message delivery semantics (when using XHR) were exposing bugs.

Fixes #1241, #1327.
2017-03-01 13:14:26 -08:00
Mike Stone
cc37cfa828 Allows users to update their email address (#1232) 2017-02-24 10:08:59 -05:00
Mike Arpaia
6c7862c42e Change label queries to use platform instead of build_platform (#1282) 2017-02-23 12:04:51 -07:00
Mike Stone
ff19f81dbe Improve format of delete requests (#1258)
* Improve delete request format
2017-02-22 12:45:01 -05:00
Mike Stone
6446fee2f4 Render label description or default description (#1215) 2017-02-21 17:40:59 -05:00
Mike Stone
8b4b43fb82 938 pack query inspector (#1177)
* API client for patching a scheduled query

* Change select to check on ScheduledQueriesLists

* Clicking a scheduled query list item selects the scheduled query

* Helpers to format scheduled queries for client/server

* Allow updating a scheduled query

* Form cancel button
2017-02-17 13:11:43 -05:00
Mike Stone
ff74ba2233 Edit labels (#1207)
* Moves LabelForm outside of the QueryForm component

* Render LabelForm in ManageHostsPage

* API client to update labels

* Edit button styles
2017-02-15 09:51:19 -05:00
Mike Stone
b32e489716 Fix JS test warnings (#1209) 2017-02-13 18:19:00 -05:00
Mike Stone
f0f40d3168 Indicate failed hosts on Query Results table (#1192)
* Adds hosts_count attribute to campaign with success/fail/total

* Displays error % in Progress Bar component

* Indicate failed hosts on Query Results table

* Changes ProgressBar background to silver
2017-02-10 09:39:20 -05:00
Mike Stone
e565e03130 License features (#1134)
* API client to create and get an app license

* Fixes unhandled promise rejection errors in redux config

* License Page and Form

* Adds getLicense action

* Adds License key area to App Settings Form

* Use license.token instead of license.license

* Implement API client

* Adds key icon to License Form

* Adds License Success component

* Render License Success on License Page when there is a license

* Adds persistent flash actions and reducer to redux

* Adds nag message middleware

* Moves FlashMessage component to flash_message directory

* Adds Persistent Flash component

* Renders Persistent Flash component from Core Layout

* Adds Kyle's styles

* Change license validation message

* Finishing touches for app config form license area

* Handle revoked licenses

* License Page hits setup endpoint

* Display server errors on license form

* Changes 0 allowed hosts to unlimited

* Trims JWT token before sending to the server

* GET setup page after submitting license
2017-02-09 22:16:51 -05:00
Mike Stone
482ff32be6 Display server errors on the Reset Password Form (#1154) 2017-02-07 11:46:08 -08:00
Mike Stone
3120acf8f3 Send platform parameter when creating labels (#1179)
* Catches errors when polling for data on Manage Hosts Page

* Sends platform parameter to server on label create

* Remove unnecessary condition to format platform param

* Clean up scheduled query formData
2017-02-07 13:37:41 -05:00
Mike Stone
f263fbcba2 Add shard to scheduled query form (#1142)
* Adds shard input to Configure Pack Query Form

* Adds shard to API client

* Adds shard attribute to scheduled queries list
2017-02-01 15:48:08 -05:00
Mike Stone
f655ca5966 Adds middleware to logout user for 401 errors (#1121) 2017-01-30 15:20:06 -05:00
Mike Stone
e18f93de02 Wait for API calls to complete before rendering page (#1117) 2017-01-27 10:05:44 -05:00
Mike Stone
8432d0494f Allow users to export query results (#1082) 2017-01-24 16:18:02 -05:00
Mike Stone
99e5af916a send osquery enroll secret to server (#1077) 2017-01-23 09:39:46 -05:00