Commit Graph

110 Commits

Author SHA1 Message Date
Gabriel Hernandez
f61a17bd9b
add google analytics to sandbox instances (#6941)
* add google analytics to sandbox instances

* Add serverType variable to frontend handler

* update version of html-webpack-plugin

Co-authored-by: Lucas Rodriguez <lucas@fleetdm.com>
2022-08-01 11:27:12 +01:00
Zach Wasserman
3290eb5fd7
Update SockJS client (#6048)
Mainly motivated by update to eventsource dependency to address
CVE-2022-1650. This polyfill would have been unused by all modern
browsers.
2022-06-02 16:44:07 -07:00
Tharun Rajendran
3b21e8630b
chore(test): remove enzyme from the package.json (#5359) 2022-04-25 20:28:41 -05:00
Martavis Parker
384c987389
Removed all traces of Redux from the app! (#5287)
* clean up routes and useless components

* component clean up

* removed redux from routes

* rename file

* moved useDeepEffect hook with others

* removed redux, fleet, app_constants dirs; added types to utilities

* style cleanup

* typo fix

* removed unused ts-ignore comments

* removed redux packages!!!

* formatting

* fixed typing for simple search function

* updated frontend readme
2022-04-22 09:45:35 -07:00
Luke Heath
48f85cfb17
Optimize webpack using esbuild-loader (#4586) 2022-03-15 09:45:34 -05:00
Luke Heath
a9d2d28495
Version bump frontend dependencies (#4577) 2022-03-14 11:59:05 -05:00
Luke Heath
df08b40eb8
Update dependencies to resolve dependabot alerts (#4396) 2022-03-01 11:02:05 -06:00
Luke Heath
0aac17d035
Bump isomorphic-fetch and css-loader (#4302) 2022-02-28 10:32:19 -06:00
Luke Heath
fbfc77150f
Version bump prop-types and storybook (#4236) 2022-02-16 17:09:41 -06:00
Martavis Parker
d536aad63e
Removed moment.js in favor of date-fns (#4238)
* removed moment.js in favor of date-fns

* updated yarn and unit test

* fixed e2e test
2022-02-16 15:01:05 -08:00
dependabot[bot]
06e7d5472f
Bump node-sass from 6.0.1 to 7.0.0 (#4148)
Bumps [node-sass](https://github.com/sass/node-sass) from 6.0.1 to 7.0.0.
- [Release notes](https://github.com/sass/node-sass/releases)
- [Changelog](https://github.com/sass/node-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/node-sass/compare/v6.0.1...v7.0.0)

---
updated-dependencies:
- dependency-name: node-sass
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-15 10:09:11 -06:00
Martavis Parker
349a88e25b
Forcing 404 page where entity ids do not exist (#3833)
* Allow sort by more than one key

* forcing 404 page where entity ids do not exist

* refactored error boundary; handling 404s now

* added 403 overlay; refactored auth wrappers

* fixed test for maintainer

* more efficient fetches; test fixes

* clarify comment

* clean up

Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2022-01-27 14:10:12 -08:00
Luke Heath
7161160a9f
Audit UI logic and remove redundant initializations (#3574) 2022-01-05 21:41:52 -06:00
Zach Wasserman
ab664e5304
Clean up E2E testing configurations (#3360) 2021-12-24 12:18:00 -08:00
Luke Heath
f6a74f69c9
Refine create policy UI flow (#3379) 2021-12-16 12:09:10 -06:00
Zach Wasserman
2b8502ad61
Upgrade node-sass for Node 16 compatibility (#2863) 2021-11-09 14:33:33 -08:00
Martavis Parker
bcfac603f0
Added components to Storybook library (#2768)
* added storybook

* added avatar component

* added button story

* added dropdown button story

* removed unused ellipsis component

* cleaned up modal path

* reorganized enroll secrets table file

* added flash story; removed unused persistent flash

* added fleet ace story

* added checkbox story

* added dropdown story

* added input story

* fixed storybook build

* fixed avatar

* added input with icon story

* added radio button story

* added select targets dropdown story

* added slider story

* added tooltip story

* added info banner story

* removed unused loaders; added spinner story

* added modal story

* removed unused NumberPill

* added pagination story

* lint fixes

* added documentation to run

* modified documentation

* fixed corelayout test

* fixed format for date-fns

* fixed date format that breaks tests

* wait for page
2021-11-06 23:41:09 -07:00
Martavis Parker
f1ed172ac5
Client side search for tables no longer debounce (#2807)
Relates to #2793.

Removed debounce from client-side search for tables because it conflicted with react-table's search mechanism.
2021-11-04 21:16:42 -07:00
gillespi314
47dcafa2d5
Enhance UI for query-platform compatibility checks in new/edit query form (#2757) 2021-11-04 18:01:24 -05:00
RachelElysia
a0f6768fe2
UI: Replace Contenteditables with Textareas (#2261)
* Replace content editables with textboxes

* Change log

* removed lib

* fixed bugs; no error handling for empty name

* lint fixes

* fixed query test

* lint fixes

* corrected query test

* bug fix; save modal didn't open for new query

Co-authored-by: Martavis Parker <martavis@auraticdevelopment.com>
2021-09-28 20:42:43 -07:00
Zach Wasserman
1e87caa1aa
Improve Cypress E2E testing stability (#2117)
- Slight redesigns in some tests.
- Enable default retry in run mode.
- Disable flaky team flow test.
2021-09-17 10:04:51 -07:00
Martavis Parker
5d647025f9
1497 improved query experience (#1998)
* Step 1 for improving query experience (#1591)

* fake change to create draft PR

* temp routes to work and not modify old query page

* created new API abstraction for query

* refactored App.jsx to prepare react-query

* fixed flow of redirects after page refresh; functional component added

* setup for getting data on edit

* implementing functions for query page

* Old form showing on new setup

* improving and breaking up query form

* no need for the helpers anymore; clean up

* added type for button component variant

* step toward new save modal; have to switch gears to #1619

* creating new query works

* clean up

* linting cleanup

* added default value for new query

* will address dynamic save disabled in edit step

* Step 2 for improving query experience (select targets) (#1732)

* fake change to create draft PR

* temp routes to work and not modify old query page

* created new API abstraction for query

* refactored App.jsx to prepare react-query

* fixed flow of redirects after page refresh; functional component added

* setup for getting data on edit

* implementing functions for query page

* Old form showing on new setup

* improving and breaking up query form

* no need for the helpers anymore; clean up

* added type for button component variant

* step toward new save modal; have to switch gears to #1619

* creating new query works

* clean up

* linting cleanup

* added default value for new query

* split steps into separate files for readability

* components laid out

* new targets picker

* function clean up

* styling tables

* fixing logic

* fixed logic to keep getting related hosts

* formatting targets for API

* fixed default query

* clean up

* styled target selectors; fixed target input styles

* began total count

* forgot to remove debugging code

* lint fixes

* added target count from API

* clean up

* able to remove selected host targets from table

* lint fixes

* Improving query experience - Step 3 (query results) (#1766)

* fake change to create draft PR

* temp routes to work and not modify old query page

* created new API abstraction for query

* refactored App.jsx to prepare react-query

* fixed flow of redirects after page refresh; functional component added

* setup for getting data on edit

* implementing functions for query page

* Old form showing on new setup

* improving and breaking up query form

* no need for the helpers anymore; clean up

* added type for button component variant

* step toward new save modal; have to switch gears to #1619

* creating new query works

* clean up

* linting cleanup

* added default value for new query

* split steps into separate files for readability

* components laid out

* new targets picker

* function clean up

* styling tables

* fixing logic

* fixed logic to keep getting related hosts

* formatting targets for API

* fixed default query

* clean up

* styled target selectors; fixed target input styles

* began total count

* forgot to remove debugging code

* lint fixes

* added target count from API

* clean up

* able to remove selected host targets from table

* lint fixes

* connected run query with modern React/JS; clean up

* linting fixes

* fixed logic to retrieve results from live query

* linting fixes

* created new, simpler query progress

* populating results and errors tables as expected

* syntax fixes

* fixing styles for query results

* more styling for query results

* manual merge from main

* Rename core->free and basic->premium

* Fix lint js

* Comment out portion of test that seems to timeout

* Rename tier  to premium if basic is still loaded

* go sum

* Query Experience Cleanup Tasks (#1807)

* fixes to get merged main branch to build and work

* moved screens for query pages; clean up

* updated and typed react ace for query form; clean up

* using console error instead

* added real types instead of `any` except for errors

* query side panel ts and functional. prep for close task.

* ability to hide, show query table sidebar

* improved live query status warning

* added loading and error state for targets search

* error screen for targets; improved loading display

* now using API-created label for all linux

* missed some files on previous commit

* able to edit query

* clean up

* lint fixes

* query results showing as they come

* remove unused code

* removed old query page. major file cleanup.

* removed selectedTargets redux implementation

* removed unused redux actions and reducers

* removed unused keys in initial state

* selectedOsqueryTable is now using context API

* removed all querypages redux code

* set up context for app and user

* fixed auth with temp fix for wrapper

* completed redux removal from query page

* fixed var names coming from main branch

* fixed var name changes coming from issue 1501

* fixed save popup bug; clean up

* added permissions

* fixed login redirect

* removed unused props

* linting fix

* clean up

* removed unused component, refactor, and clean up

* fixed styles for step 1 as admin

* fixed styles for step 1 as observer

* fixed percentage of online hosts

* added loading progress to query stop button

* reset query status on run again

* added download icon to export button text

* fixed error reset on name input; fixed styles

* fixed bug where query value wasn't saving

* fixed query value when blank

* fixed bug - default query was running every time

* auto adding host from url to targets

* fixed flows for repeating run and save steps

* fleet ace is now TS and functional

* fixed a couple of tests

* fixed issues with query value text inconsistencies

* fixed query side panel not showing

* hiding error count if not > 0

* fixed showing editor for different roles

* using integer for targets

* go sum

* fixed targets param

* catching all errors while running query

* fixed hover state for title and description

* ignore unit test for now; lint fixes

* locking react-ace version

* ignoring tests breaking in github actions

* brought tests back

* fixing file name

* fixing file name again

* fixed e2e test

* have to ignore tests for now

* ignore certain premium tests for now

* one last test to revamp

* another test

* fixed teamflow test

* fixed observer query 403

* lint fixes

* fixed maintainer test

* added changes file

Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2021-09-10 12:06:37 -07:00
Tomas Touceda
6d2ae02efd
Rename core->free and basic->premium (#1870)
* Rename core->free and basic->premium

* Fix lint js

* Comment out portion of test that seems to timeout

* Rename tier  to premium if basic is still loaded
2021-09-03 13:05:23 -03:00
Martavis Parker
53dbb2ad50
#1496 fixed sorting using API (#1536)
* #1496 fixed sorting using API

* #1496 added try catch

* #1496 removed test that no longer serves a purpose

* #1496 fixed linting

* #1496 cleanup

* #1496 added loading indicator back

* #1496 fix lint issues

* #1496 added changes log

* #1496 minor fixes
2021-08-03 12:42:48 -07:00
Martavis Parker
5d0c7e510e
New Cypress configs and commands (#1268)
* #1024 added configs and commands to run

* #1024 fixed github actions for e2e tests

* #1024 optimized test configs
2021-07-01 10:32:12 -07:00
Martavis Parker
3af64748ab
Pressing Enter on setup's Confirmation page (#1141)
* #917 fixed enter key for last page; TS overhaul

* #917 clean up

* Update frontend/components/forms/FormField/FormField.tsx

Co-authored-by: Zach Wasserman <zach@fleetdm.com>

* #917 fixed tests and linted

Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2021-06-18 13:33:45 -07:00
Zach Wasserman
663641d521
Add commands for enrolling hosts in E2E tests (#1089)
- Add `addDockerHost` and `stopDockerHost` commands.
- Example usage in test.
2021-06-15 10:14:57 -07:00
Gabe Hernandez
7926734266
test and team feature improvements (#804)
* add messaging in autocomplete dropdown to show reason why user cannot be selected

* user permission utils

* doc autocomplete dropdown and move it closer to wehre its used

* test for select teams form

* test for data table and transfer host endpoint
gss

* moving host actions and entities to ts

* change host transfer to new endpoint:

* added more tests to data table

* change some comments

* change import path

* fix build TS errors

* change data table test string
2021-05-21 17:29:28 +01:00
Noah Talerman
72882e8f9f Merge branch 'master' into teams 2021-05-19 13:16:54 -04:00
RachelElysia
bf81875d10
Teams agent options page (#727)
* Team managers can configure agent_options for each team
* Previous osquery_options now passes teamId for team.agent_options 
* Code conversions: JS to TS, global to team specific, class components to functional components

(Linting errors on PR are just those external broken links)
2021-05-14 10:14:19 -04:00
RachelElysia
d4147e916d
Host details page: packs accordion (#724)
* Pack queries accordion
* Connects to query_stats API
* No packs edge case

Co-authored-by: Sarah Gillespie <sarahgillespi314@gmail.com>
2021-05-07 18:18:52 -04:00
Zach Wasserman
a17556b2db Merge branch 'master' into teams 2021-04-30 09:40:10 -07:00
Gabe Hernandez
a85476c23b
implement member page for team details (#685)
* added reducers and kolide api teams code, hooked up empty state

* request for get all teams and remove unused loading bar

* added create team functionality|gs

* update link cell to be more generic

* create teams detail page and hook it up

* added tabbing and styling to top nav team details

* added edit and delete modal functionality

* add in table and modals for members for teams

* created reusable edit user modal and use it in manage teams page

* creating add member autocomplete

* hook up adding members to teams

* hook up real members from api into table, and empty state for table

* fix proptype warning

* hooked up table querying for member page

* added remove member modal

* added tems to edit useres on member page

* finish remove member from team

* fixed up editing on members page

* fix the role value in member table

* fix prettier errors

* fixes from PR comments round 1

* add missing error handler on add member

* add dynamic team name to member page and user dynamic user and team names to succuess and errors

* add test for userManagementHelper module

* fix lint errors

* fix tests

* add member test to row results on member page
2021-04-29 14:47:33 +01:00
Zach Wasserman
1e78c0ffe2
Speed up CI build/test (#657)
- Use NODE_ENV=development for Webpack in CI.
- Add caching for Webpack modules in development.
- Remove time of day from dates in version string (helps with build caching).
- Use Go cache in CI.

This makes about a 20% savings on the total time for the CI run.
2021-04-16 16:14:56 -07:00
Gabriel Hernandez
04712c0426 Merge master into teams 2021-04-14 17:52:15 +01:00
Gabe Hernandez
64904d1d9b
implement manage teams page (#624)
* create skeleton of team management page and hook it up with routing

* added reducers and kolide api teams code, hooked up empty state

* request for get all teams and remove unused loading bar

* fix sending teams response to store

* added create team functionality|gs

* added edit and delete fuctionality to teams management

* fixed up some edge cases for deleting and editing teams

* remove unused UserRow

* get list of teams for user to add new users to, fix up Userform
2021-04-14 10:20:56 +01:00
Gabe Hernandez
efb35b537a
add prettier and have it format all fleet application code (#625)
* add prettier and have it format all js code except website:
:

* trying running prettier check in CI

* fix runs on in CI

* change CI job name

* fix prettier erros and fix CI
2021-04-12 14:32:25 +01:00
RachelElysia
b7f81a8c39
E2E tests for query flow, label flow, packs flow (#611)
Label flow
  - Create a new label and make sure it shows up on the hosts page
  - Edit the label name
  - Delete the label

Query flow
  - Create a new saved query
  - Edit the query
  - Delete the query

Pack flow
  - Create a pack
  - Edit the pack name
  - Schedule a query
  - Remove a query from the pack
  - Delete the pack

Closes #597
2021-04-09 08:47:16 -07:00
Zach Wasserman
2e2805d9fe
Fix JS test warnings and errors on Node 15 (#572)
- unhandledPromiseRejection errors caused test failures on Node 15.
  Instead verbose log these for later followup.
- Fix uses of Nock in tests
- Fix some warnings in tests
- Upgrade some test dependencies
2021-04-01 11:45:21 -07:00
Gabe Hernandez
be77b0de59 add tests for new manage users UI and improve checkbox accessibility (#536)
* e2e test for manage user page, and updating styles for ui components

* make checkbox more accessible and create e2e test around creating user

* add react testing library and use it for radio testing

* clean up comments

* update docs and clean up
2021-03-31 11:58:38 -07:00
Zach Wasserman
2203bd81a2
Add support for IdP-initiated SSO login (#556)
This feature is off by default due to minor potential security concerns
with IdP-initiated SSO (see
https://auth0.com/docs/protocols/saml-protocol/saml-configuration-options/identity-provider-initiated-single-sign-on#risks-of-using-an-identity-provider-initiated-sso-flow).

Closes #478
2021-03-30 12:56:20 -07:00
Zach Wasserman
39fc25cf5c
Refactor cypress tests and expand testing (#450)
- Add cypress commands `setup` and `login`.
- Test setup page.
- Test add new host dialog (MVP establishing testing patterns).
- Add `testing-library/cypress`.
- Add `cypress` directory to lint config.
2021-03-12 11:49:28 -08:00
Gabe Hernandez
8591e2a3e7
tooltip for org settings form input descriptions (#434)
* added tooltip to input description on org settings form

* pull out IconToolTip into its own component
2021-03-10 17:37:49 +00:00
Gabe Hernandez
70b76d9aef
change to horizontal nav (#379)
* start with making nav horizontal and updating nav and main content areas

* remove unneded subnav styling and JS code

* remove unused isSmallNav and --small styles

* remove isSmallNav in reducer and fix tests

* change 'admin' to 'settings'

* remove unnneded username to logo

* change account page urls

* Add user avatar dropdown to nav

* remove unused background colour on company logo

* get tabbing to work correctly

* implement styling of tab and page descriptions

* change default settings nav to organisation settings

* remove more unneeded subnav code

* fix some broken tests after changes

* pull out getdefaultTabIndex in settingsWrapper

* sticky sub nav for settings pages

* tweak zindex for setting subnav

* updated yarn.lock

* update icons

* fix collapsing nav items

* tweak avatar dropdown styles

* remove sidebar on osquery page
2021-03-08 16:48:29 +00:00
Gabe Hernandez
0483cc7aaa
Bring in Cypress e2e framework (#380)
Beginning of an e2e testing framework for the fleet application.

This uses [Cypress](https://www.cypress.io/) to implement a first end-to-end test in Fleet.
2021-03-04 14:08:11 -08:00
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
Gabe Hernandez
8c8c3f9516
Update to new host table (#298)
* recreate host table with react-table

* move old host table and container next to other code related to host page

* start replacing old host table with new host table

* replace old table with with new data table

* fix up tests and remove some unused code
2021-02-11 16:22:22 +00:00
Gabe Hernandez
85ce3982d0
update react-redux 7.7.2. redux 4.0.5, react 17.0.1 (#287)
* update react-redux to 7.7.2

* update redux to 4.05

* update react to 17.0.1

* Revert "update react to 17.0.1"

This reverts commit 004f3bb5a9e26bfcea9e921a2093adcc1e95068f.
2021-02-10 10:32:13 +00:00