Commit Graph

218 Commits

Author SHA1 Message Date
RachelElysia
0f8e3d063b
Manage Host Page: Reintroduce add host modal (#2681)
Reverts #2493 - Generate Installer Modal built within that PR
2021-10-26 16:24:50 -04:00
gillespi314
cab1099890
Surface query-platform compatibility in FleetUI (#2640)
- Add functionality to parse sql for platform compatibility based on osquery tables
- Surface query-platform compatibility in create/edit query form
- Surface query-platform compatibility as new column in manage queries table
- Add filter-by-platform feature to manage queries table
- Refactor manage queries page to useQuery and useContext patterns
2021-10-25 13:00:32 -05:00
RachelElysia
36babcc510
UI feature: Frontend of performance impact bubbles (#2589)
Includes backend fixes and test
Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2021-10-22 16:05:49 -04:00
RachelElysia
70dc68f329
Dev X: Fix hosts.spec.ts commented out tests (#2610) 2021-10-22 11:20:41 -04:00
Martavis Parker
5be54a72cf
Teams and Software for Homepage (#2567)
* added global teams dropdown

* added teams dropdown

* created tabs wrapper component

* comment out software table for now

* lint fixes

* added changes file

* removed test data

* fixed permissions

* fixed scroll behavior for test with sticky header

* lint fixes
2021-10-19 11:13:18 -07:00
RachelElysia
ce8a8e371a
Team Settings: Edit team modal can hit enter to save team name (#2555) 2021-10-19 10:38:42 -04:00
Luke Heath
fb6d83ea05
Add policies table to host details page (#2547) 2021-10-18 13:29:48 -05:00
RachelElysia
cc40bf132d
Manage Host Page: No host renders generate installer modal (#2493)
* Update Context API to contain enrollSecret
* Update e2e tests with generate installer modal
* Edge case with empty Team showing Generate Installer CTA
2021-10-15 09:40:42 -04:00
Luke Heath
6cda48220d
Fix hosts table search and pagination (#2494) 2021-10-13 13:36:17 -05:00
RachelElysia
de1e73b5b4
Bug Fixes: sortBy key and e2e hosts.spec.ts (#2506) 2021-10-13 13:12:44 -05:00
Martavis Parker
688a9f01d5
E2E Test fixes (#2491)
* fixed flow for resetting current session

* ignoring downloads for windows because paths

* using correct shell for windows

* using correct shell for windows

* ignoring exception; we can't fake react context

* changes file

* must wait for flash to show

* lint fixes

* re-added secure package
2021-10-12 14:33:56 -07:00
RachelElysia
ded8feea56
Host Details Page: Relocate host details page header and buttons (#2447) 2021-10-11 14:59:43 -04:00
RachelElysia
2000b1b263
Manage Host Page: Custom host count based on filters, labels, etc (#2377)
* Host count includes label id parameter
* Remove page and pageSize from hostCountAPI call
* Only retrieve hostCount on filter change
2021-10-11 13:27:14 -04:00
RachelElysia
981028705e
Sentence Case: Throughout UI, tests, validators, docs (#2455) 2021-10-11 10:58:27 -04:00
RachelElysia
ea3f0f127f
Manage Host Page: Spiffier icons for filter status/policy button/dropdowns (#2379) 2021-10-06 10:54:15 -04:00
RachelElysia
a2fe3bae7e
Edit Packs Page: Refactor and revamp (#1400)
* New query pack table renders
* services/entities created/updated with 5+ needed APIs requests for EditPacksPage
* Refactor jsx to tsx PackQueriesListWrapper, EditPackForm, EditPackPage
* Refactor to new patterns on useQuery, useEffect, and useState
* Refactor to new pattern formData formatting
* Edit, remove pack query modals
* e2e test: packflow built to test create, update, delete of pack, fix brittle teamflow
2021-10-04 16:26:10 -04:00
Zach Wasserman
55aa8c702e
Use new home dashboard (#2212)
Adapted from @RachelElysia's original #1640.
2021-10-03 11:15:58 -07:00
Martavis Parker
d0056b8941
Fixed broken e2e tests (broken Manage Hosts page) (#2320)
* fixed localstorage retrieval

* fixed broken tests

* lint fixes

* bug fixes that tests caught

* fixed edit label test

* fixed deleting label in test

* another fix

* more label test fixes
2021-10-01 18:46:19 -07:00
RachelElysia
f397b77c1a
Schedule Page: Team maintainer can modify their team's schedule (#2243)
* Change permissions to schedule UI to include team maintainers
* Update e2e tests
2021-09-30 10:30:44 -04: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
Martavis Parker
8ab5c27621
Fixed passing query info around Query console (#2247)
* refactored state mgmt for query console

* changes files

* lint fixes

* teams e2e test were flaky

* lint fixes

* fixed bug for observer running query, run again button

* fixed inconsistent query body change

* disabled refetch on window focus
2021-09-28 11:33:51 -07:00
RachelElysia
7dee7c56ef
Schedules Page: Surface all teams schedule on team schedule page (#2080)
* Render inherited queries table on teams page
* e2e team schedules on e2e premium testing
2021-09-23 13:10:43 -04:00
Renee Jackson
ca27bd9d5c
fix broken links by adding missing 0 (#2187)
* fix broken links by adding missing 0

* fix broken links take 2

gather links missed in first pass
2021-09-22 13:28:25 -03:00
Tomas Touceda
b32b441c12
Issue 1512 filter observer can run queries (#2110)
* wip

* Filter queries for observers

* Update e2e test now that we filter queries
2021-09-20 13:07:51 -03: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
RachelElysia
e9d3460877
Manage Host Page > Add New Host Modal: Add copy to run command (#2048) 2021-09-14 15:25:34 -04:00
gillespi314
6a3458f6f0
Fix missing field in setup confirmation (#2005)
* Fix missing field in setup confirmation

* Change setup buttons text
2021-09-10 18:53:28 -05: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
RachelElysia
d32479622c
App Settings Page: Host status webhook UI (#1899)
* Skeleton UI

* Rebase to main

* Work towards config API request modification

* Nest and unnest when formatting for server and frontend

* Changelog

* Add validation to UI, fix ? vertical spacing

* Rebase e2e

* 1 of 2 passing unit tests for config

* Update REST-API.md to include webhook_settings

* Destructure / flatten config webhook in unit test

* Merge advance options e2e conflict

* x and y example not x and x

* Fix observer e2e

* Add new data to read only example request

Co-authored-by: Noah Talerman <noahtal@umich.edu>
Co-authored-by: Martavis Parker <martavis@auraticdevelopment.com>
2021-09-10 10:49:11 -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
gillespi314
a8c4e10fad
FleetUI: Update Avatar component (#1880)
* Replace default avatar; update components

* Add permanent images folder to website; update paths

* Disable flaky e2e tests
2021-09-02 12:12:42 -05:00
RachelElysia
66597ced71
App wide UI: Error and empty states for tables (#1875) 2021-09-02 08:16:19 -04:00
RachelElysia
36971b4cb8
Host Details Page: Query performance column (#1867) 2021-09-01 18:08:20 -04:00
RachelElysia
da2a3aa1f0
App Settings Page: New advance options UI (#1832) 2021-09-01 10:57:25 -04:00
gillespi314
452392f5d2
Add new feature: Policies (#1772) 2021-08-30 18:02:53 -05:00
RachelElysia
36b69c7a68
UI: License expiration warning banner (#1825) 2021-08-30 15:52:13 -04:00
noahtalerman
63df5881c0
Temporarily comment out failing e2e tests and add coverage to manual QA (#1859)
- Commented out the following e2e tests because they're consistently failing in the GitHub CI:
  - Delete a host from the **Host details** page
  - Query a host from the **Host details** page
  - As a global maintainer, delete a host
- Add coverage for the commented out tests in the manual QA doc
2021-08-30 15:34:28 -04:00
RachelElysia
2c8d43f06b
Cypress Testing: Modify default timeout (#1835)
- Change default timeout to 20 seconds on 8 more brittle e2e tests
2021-08-27 15:13:32 -07:00
RachelElysia
e66cb536ab
Host Details Page: Query button for observers (#1799) 2021-08-27 11:13:28 -07:00
gillespi314
aa588bc1ae
Manage hosts page improvements (#1690)
* Improve loading states, query param validation

* Refactor getNextLocationUrl; persist url params

* Update next location routing for certain UI actions
2021-08-26 14:49:30 -05:00
RachelElysia
3947838b65
Manage Hosts Page: Enroll secret secondary action (#1787) 2021-08-25 13:06:35 -07:00
Zach Wasserman
eead6d8bd1
Add retries for flaky admin test (#1780)
This test was flaky in CI, and should mostly stop causing issues with
retries configured.
2021-08-24 15:59:51 -07:00
gillespi314
40b0888416
Refresh host details after team transfer (#1746)
* Add API call to refresh host in local state

* Add API call to refresh host in local state

* Add host details tests to Cypress
2021-08-23 14:11:37 -05:00
gillespi314
8b4c6a1dd7
Add host modal: Select team dropdown (#1740)
* Fix Add host modal dropdown for team maintainer

* Update Cypress tests

* Set default values for add host team dropdown
2021-08-20 23:00:44 -05:00
Tomas Touceda
c6c63ab12a
Refactor app config (POC, for now) (#1685) 2021-08-20 12:27:41 -03:00
Zach Wasserman
39cef4c43f
Revert "Fleet UI: Reroute homepage (#1640)" (#1724)
Reverts #1640 so that the homepage does not change during the patch release.

This commit will be re-applied after the release is cut.
2021-08-18 18:06:03 -07:00
noahtalerman
4b5891edbc
Add minimum width for Fleet UI and "Pack" tables on "Host details" page and "Queries" table (#1701)
- Add `$min-app-width: 1200px` to define the minimum width of the Fleet UI. 
- Remove sort form the "Query name" column in the "Pack" tables on the **Host details** page
- Set static widths all column in the "Pack" tables on the **Host details** page except the "Query name" column to support the new minimum width
- Set static widths for all columns in the "Queries" table except the "Name" and "Author" columns to support the new minimum width
2021-08-18 09:17:16 -04:00
RachelElysia
f6091509f4
Fleet UI: Side bar restyled, update UI for Team/Roles to match Figma (#1659)
* Style all settings side panels
* Add builtin label icons
* Update tests aligning jest userStub and adminUserStub
* Update tests adding cypress checks for user teams/roles
2021-08-16 12:25:51 -04:00
RachelElysia
dc77974ef6
Fleet UI: Reroute homepage (#1640)
* Reroute homepage
* Update e2e tests brittle URLs
2021-08-13 10:41:53 -04:00
gillespi314
601ffb4fcd
Disable edit label page select platform dropdown (#1635)
* Disable edit label page select platform dropdown

* Update label flow test
2021-08-11 15:27:52 -05:00
RachelElysia
267b7343e1
Manage Packs Page: Refactor to typescript, functional components, new UI (#1567)
* Refactor ManagePacksPage as functional component in TypeScript
* Refactor old table using TableContainer component
* Add Enable, Disable buttons to DataTable component
* Update Packs interface with additional properties
* Update Cypress e2e tests
2021-08-10 14:25:34 -04:00
Zach Wasserman
1b393a7cf1
Fix flaky E2E test (#1604)
Due to https://github.com/cypress-io/cypress/issues/7306, we need to use
`force: true` in many places to avoid flakiness in Cypress tests.
2021-08-09 18:18:04 -07:00
Martavis Parker
672db9e2a7
Host Status Dropdown (#1556)
* #1372 created dropdown for status

* #1372 fixed default state for dropdown

* #1372 added help text and styling

* clean up

* fixed linting

* created changes log

* fixed e2e test

* created new header

* clean up

* added logic to edit and delete label using icons

* reworked selectedFilter to support status & label

* fixed multiple params in url

* comment clean up

* fixed tests

* linting fixes

* fixed height of status dropdown

* bug fix for selecting status 1st, label 2nd

* fixed e2e test

* minor style fix for side panel label scroll

* fixed label e2e test

* removed SQL editor for label selection

* removed edit and delete for platform labels

* fixed bugs loading hosts for every label click

* fixed linting

* fixed basic e2e test

* fixed observer basic e2e test

* modified changes file

* fixed bug with label replacement logic for url
2021-08-06 15:09:49 -07:00
gillespi314
df47fcb808
Refactor manage queries page (#1526)
Refactor ManageQueriesPage as functional component in TypeScript
Refactor old table using TableContainer component
Enhance ActionButton component with optional icons
Update DataTable component to render table header buttons per Figma
Update Query interface with additional properties
Update Cypress e2e tests
Remove unused files
2021-08-03 15:09:01 -05:00
RachelElysia
c934f3e172
Schedules page: Action cell (Update and delete a global scheduled query) (#1525)
* Create and edit modal component
* Update e2e test for update and delete global scheduled query
2021-08-03 14:06:09 -04:00
RachelElysia
05691d49ca
Schedule Page - New Feature! (#1333)
- Schedule page functionality: Create (modal), delete (modal), view schedule, advanced options
- Replaces Packs tab with Schedules tab
- Updates e2e tests, mocks, stubs, etc
- Defaults logging type to snapshot for packs
- Adds conversion helpers and tests helper functions
- Adds global_scheduled_queries to redux
2021-07-26 14:41:36 -04:00
Zach Wasserman
6eebbd2aec
Add retries to flaky enroll secret test (#1445)
There seems to be something flaky about downloading the enroll secret in
the test. I can't reproduce any issue with doing so locally, so I'm
adding a retry to get this to quiet down in CI.
2021-07-22 11:14:26 -07:00
Zach Wasserman
f14b1a563b
Increase timeout on Cypress enroll secret download (#1356)
This seemed to be causing flaky tests. TBD whether this improves the situation.
2021-07-12 11:06:03 -07:00
gillespi314
2bb2bf2d5d
Add ability in Fleet UI for admin to create new users without email invitations (#1261) 2021-07-12 10:26:11 -05: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
Zach Wasserman
a7461d3ece
Improvements to fleetctl enroll secret specs (#1244)
- Do not render Team ID if null.
- Make request and response schema consistent (breaking change).

Fixes #186
2021-06-29 10:58:15 -07:00
RachelElysia
7d99084f5b
Host Details Page: Transfer button (#1233)
* Transfer teams modal for Global Admin and Global Maintainer
* CTA to Create a team for Global Admin only
* Update e2e tests to include transfer host button
2021-06-29 13:48:57 -04:00
gillespi314
917e1886d2
Redirect user to login when they reset their own sessions/API tokens from admin user management page (#1240)
* Redirect to login when user resets their sessions

* Update Cypress test
2021-06-28 19:33:05 -05:00
gillespi314
33a02834c8
Add ability to rotate a user's API token (#1211)
* Add reset sessions action to manage users page

* Add Cypress test
2021-06-28 10:20:32 -05:00
noahtalerman
6c03415dae
Update documentation structure (#1230)
- Remove `2-Orbit-osquery` directory
- Rename `3-Deployment` directory to `2-Deploying`
- Rename `4-Contribution` directory to `3-Contributing`
2021-06-28 11:15:22 -04:00
Zach Wasserman
b00df0929e
Fix URLs in documentation (#1218)
Fix URLs not caught in previous PR CI run.
2021-06-25 19:23:45 -07:00
noahtalerman
a21d027518
Add success notification for creating and updating labels (#1205)
- Add "Label created. Try refreshing this page in just a moment to see the updated host count for your label." message after the user successfully creates a label.
2021-06-25 11:58:02 -04:00
RachelElysia
aeb852e168
Remove username from UI (#1168)
* Remove username from UI code
* Remove username from tests
* Remove username from database
* Modify server endpoints for removing username
* Implement backend aspects of removing username
* Update API docs
* Add name to fleetctl
2021-06-24 13:42:29 -07:00
gillespi314
c51ef4447d
Revise help text on team members page (#1179)
* Revise help text on team members page

* Update Cypress test
2021-06-23 22:20:56 -05:00
RachelElysia
8900d1bea3
E2e test: Fleet basic observers - global and team only (#1118)
* Oliver flow with some stubbed code
* Create team observer only test user and stub test (Toni)
2021-06-21 21:29:59 -04:00
RachelElysia
5387deb40f
E2e test: Fleet basic admin - test host on team (#1117) 2021-06-17 10:12:00 -04:00
RachelElysia
eaef007982
E2e test: addDockerHost to a specific team (#1116)
* Add optional argument to addDockerHost for teams
2021-06-17 10:09:12 -04:00
gillespi314
0279139632
E2e testing: Add stopDockerHost command to Cypress tests (#1112)
* Add stopDockerHost command to e2e tests
2021-06-16 13:09:52 -05:00
gillespi314
40b756e46e
E2E testing: Cypress e2e tests for RBAC (#1096)
* Add e2e test for dual-role team maintainer/observer

* Refine tests for global admin role
2021-06-16 12:43:25 -05:00
RachelElysia
1d3b624be2
E2e Testing: Fleet Core global observer (#1099) 2021-06-16 13:40:23 -04:00
RachelElysia
8a77d64e65
Test basic global observer only (#1101) 2021-06-16 13:39:51 -04:00
gillespi314
7a7943ddce
Add Cypress test for core-tier global admin role (#1094) 2021-06-15 18:46:23 -05:00
RachelElysia
8fd35b9626
E2e Testing: Fleet Core global maintainer and Fleet Basic global maintainer (#1095)
* Basic global maintainer e2e test match manual QA doc
* Core global maintainer e2e test match manual QA doc
2021-06-15 15:21:57 -04:00
gillespi314
2dbeea528e
Cypress e2e test for teams global admin (Fleet basic tier) (#1082)
* Add cypress test for Basic tier - Admin user

* Add cypress test for Basic tier - Admin user

* Refine Cypress tests for global admin role

* Fix linting error
2021-06-15 12:57:03 -05: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
Martavis Parker
38d3bec074
Corrected API route for testing (#1078)
* Closes #922

* #922 added Windows section to build docs

* go sum updated

* updated go sum

* fixed #963 - calling teams api if not on core

* added command for seeding queries

* added command default to higher level

* linted test

* only need 2 queries

* fixed e2e command for seeding queries
2021-06-14 11:27:20 -07:00
RachelElysia
de116a3cb0
Important directories and their use cases 2021-06-14 11:04:49 -04:00
RachelElysia
5e3beb367f
Typos 2021-06-14 09:42:56 -04:00
RachelElysia
35a49ed87e
Fix code converting 2021-06-14 09:39:05 -04:00
RachelElysia
c276395f49
Update Cypress README.md (#1071) 2021-06-11 18:41:27 -04:00
Martavis Parker
172fbbb43f
Added command for seeding queries (#1061)
* Closes #922

* #922 added Windows section to build docs

* go sum updated

* updated go sum

* fixed #963 - calling teams api if not on core

* added command for seeding queries

* added command default to higher level

* linted test

* only need 2 queries
2021-06-11 14:27:19 -07:00
Zach Wasserman
8c97b36764
Set up Cypress testing for Teams/Tiers (#1005)
- Update names/roles of users in `make e2e-setup`.
- Update test SSO user info.
- Add Cypress commands for seeding users/Teams.
- Stub Cypress tests for team/tier matrix.
2021-06-09 11:56:59 -07:00
Zach Wasserman
229a9afed2
Change name of localstorage auth token (#980) 2021-06-06 18:28:37 -07:00
RachelElysia
9469cb0bf1
Packs pages: Edit page empty state rendering, Manage page update UI (#885)
* Packs: Update empty state, tables, select targets pills, platform pills, icons, phrasing
2021-06-01 09:10:35 -04:00
Zach Wasserman
417ef2c9b6
Refactor teams service methods (#910)
- Move team-related service methods to `ee/server/service`.
- Instantiate different service on startup based on license key.
- Refactor service errors into separate package.
- Add support for running E2E tests in both Core and Basic tiers.
2021-05-31 17:07:51 -07:00
Zach Wasserman
a5bd03e5d7 Merge branch 'master' into teams 2021-05-31 10:56:50 -07:00
RachelElysia
19dd6e772b
Teams query manage page: Styling (#881)
* Style query manage page including side panel and table
* Conditional side panel rendering

Additional riders:
* Less brittle team e2e test
* Update all search icons across app
2021-05-27 19:39:35 -04:00
noahtalerman
4cca4e7e7f
Remove @fleetdm.com emails from fleetdm/fleet repo (#882)
- In tests and documentation, replace `@fleetdm.com` with `@example.com`
- In documentation, replace `hello@fleetdm.com` with `fleetdm.com/contact`
- In documentation, replace `security@fleetdm.com` with `fleetdm.com/contact`
- In Dockerfiles, replace `engineering@fleetdm.com` with `hello@fleetdm.com`. These two files are the only remaining files with a `@fleetdm.com` email.
2021-05-27 17:19:14 -04:00
RachelElysia
c42f150fac
Query Edit/Run Page: Observer view (#820)
* Query Edit/Run page renders based on user role
* Original UI for global admin/ global maintainer
* New UI for global observer / team maintainer / team observer
* New create new query UI for team maintainer
* Styling matches Figma
* Tests modified accordingly

Styling Closes #859

Co-authored by: Sarah Gillespie @gillespi314
Tests co-authored by: @ghernandez345
2021-05-27 12:06:24 -04:00
RachelElysia
bbd5741599
Less brittle e2e teams flow test (#831) 2021-05-21 15:44:40 -04:00
RachelElysia
4119c07d55
Add modifying agent options to E2e teams test (#775) 2021-05-17 15:23:04 -04:00
Zach Wasserman
bc42d9e03a
Add waits in Teams e2e test (#721)
Waits will hopefully further reduce flakiness.

Add TODO for investigating possible bug in React code.
2021-05-04 16:18:09 -07:00
Zach Wasserman
f4e4185a0e
Fix for flaky teams e2e test (#720)
Adding a `.contains` selector seems to allow the rendering to complete and the correct dropdown to be clicked.
2021-05-04 12:28:43 -07:00
Zach Wasserman
665345c334
Remove extra loginSSO typescript definition (#709)
Fixes failing lint.
2021-05-03 08:31:52 -07:00
Gabe Hernandez
00b9c77777
Improve team setting functionality (#704)
This makes some improvements to the team settings pages. These polish up the experience.
2021-04-30 12:13:04 -07:00
Zach Wasserman
a17556b2db Merge branch 'master' into teams 2021-04-30 09:40:10 -07:00
RachelElysia
0376555683
E2e test: invite/activate user (#699)
* Tests user invite, email link, and user activation
* Disables cypress fixtures folder

Reviews and suggestions by: Zach Wasserman <zach@fleetdm.com>
2021-04-30 11:47:33 -04:00
RachelElysia
afcd75d227
Testing SMTP email service with Cypress (#659)
* Turn off jest error on cypress library
* Refactor email test into commands.ts
* Test "Hello from Fleet" from updating user settings

Reviews and suggestions by: Zach Wasserman <zach@fleetdm.com>
2021-04-29 13:10:25 -04:00
RachelElysia
7490878029
E2e test: add/edit/delete team (#694) 2021-04-28 18:14:26 -04:00
RachelElysia
8b5a436dc8
Flowtest E2E settings (#654)
* Fill out form, pseudocode check updated fields

* Create update assertions

* Update page before assertions

* Start advanced options

* Add advance options

Co-authored-by: Rachel Elysia Perkins <rachel@fleetdm.com>
2021-04-19 17:44:31 -04:00
Gabriel Hernandez
04712c0426 Merge master into teams 2021-04-14 17:52:15 +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
Gabe Hernandez
1f97aebf61
implement user table with new table and hook up create and edit and delete users (#587)
* hook up user and invite data together for data table

* added client derived data to user table

* hooked up action dropdown to table

* hooked up edit modal and password reset

* started adding editing user functiaonlity

* add query params to /invite call

* clean up editing teams

* update select team from to handle existing users with teams

* update closes modal now

* reuse getUser to clean up code in userManagementpage

* pass form data to updating user that is not the current User

* add dynamic userform submit text and fix tests

* fix lint error in table component

* added empty state for user table

* clean up unused data table props

* added delete modal

* add delete user functionality

* add delete option for invite

* Add styles for rows in user table and action dropdown cell

* hook up user and invite data together for data table

* added client derived data to user table

* hooked up action dropdown to table

* hooked up edit modal and password reset

* started adding editing user functiaonlity

* add query params to /invite call

* clean up editing teams

* update select team from to handle existing users with teams

* update closes modal now

* reuse getUser to clean up code in userManagementpage

* pass form data to updating user that is not the current User

* add dynamic userform submit text and fix tests

* fix lint error in table component

* added empty state for user table

* clean up unused data table props

* added delete modal

* add delete user functionality

* add delete option for invite

* Merge in generateClassTag

* Refactor table styles

* Add newline to DropdownCell style sheet

Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>

* update checking for admin through global_role in nav

* added defaultGloablRole for creat user modal

* remove unused comment

* fix broken tests

* reenabled search for users tests

Co-authored-by: noahtalerman <47070608+noahtalerman@users.noreply.github.com>
2021-04-09 11:44:57 +01:00
Zach Wasserman
56d2480389
Fix E2E SSO testing (#589)
Some of the command helpers were dropped in a rebase/merge.
2021-04-05 11:01:30 -07:00
Gabe Hernandez
e33bbb8811
enhance data table for two datasets and client derived data (#559)
* rework data table, got to point of calling network request correctly

* got to point of rendering table columns and data

* finish up functional changes to data table

* fix tests

* fix styles for table container and data table

* clean up some styles

* update to styles for no host configured

* cleanup and docs

* add missing method for host table text formatting

* disabling unused test. will add back in next PR

* clean up code
2021-04-04 13:45:24 +01: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
fb9706912d
Prevent user enumeration (#533)
- Return same error in all cases for login endpoint.
- Log error details in server logs.
- Make most login errors take ~1s to prevent timing attacks.
- Don't return forgot password errors.
- Log password errors in server logs.
- Make most forgot password requests take ~1s to prevent timing attacks.

Fixes #531
2021-03-24 19:36:30 -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
Zach Wasserman
fbc1636994
Improve E2E testing and test documentation (#448)
- Add Makefile commands for E2E testing.
- Document E2E testing.
- Cleanup other test documentation.
2021-03-11 15:55:58 -08:00
Zach Wasserman
20f21fafe4
Migrate tests to GitHub Actions and add E2E testing (#381)
- Migrate unit tests and linting from CircleCI to GitHub Actions
- Add E2E test in CI run
2021-03-04 17:13:28 -08: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