Commit Graph
65 Commits
Author SHA1 Message Date
RachelElysia c84ef31ed9 Fleet UI: [bug fix for release] Team admin and team maintainer can edit query (#14603) 2023-10-18 11:03:55 -04:00
Jacob ShandlingandJacob Shandling 2adf3ce477 UI – Componentize "Discard data" option and add it to Edit Query page (#14343)
## Addresses #13470 

- [x] Save query
  - [x] Add checkbox
    - [x] default unchecked
- [x] If global setting is disabled (that is, "Disable query reports" is
_enabled_)
      - [x] this box is disabled
      - [x] copy below is changed
- [x] If enabled locally but globally disabled, box is checked and
disabled
- [x] If user clicks "Edit anyway", the normal checkbox state is
restored, allowing them to edit it anyway., e.g. to prepare for enabling
globally before doing so
- [x] banner under [certain
conditions](https://www.figma.com/file/ss8dSfoueq3REJxoGaxkNw/%237766-See-latest-query-results?type=design&node-id=470%3A9996&mode=design&t=XDBlQetD7kqdEdh9-1)
  - [x] 2 x update help text
- [x] Edit query
  - [x] checkbox
  - [x] back button
  - [x] 2 x help text updates
- [x] save changes modals when
[conditions](https://www.figma.com/file/ss8dSfoueq3REJxoGaxkNw/%237766-See-latest-query-results?type=design&node-id=470%3A8745&mode=design&t=XDBlQetD7kqdEdh9-1)
are met:
    - [x] changed SQL
    - [x] other 
- [x] Mange queries - update[
tooltip](https://www.figma.com/file/ss8dSfoueq3REJxoGaxkNw/%237766-See-latest-query-results?type=design&node-id=470%3A10035&mode=design&t=ACwsj3wVdqzCXulq-1)
- [x] Significant cleanup and improvement of styles and structure around
the Edit Queries page


<img width="854" alt="Screenshot 2023-10-05 at 3 44 05 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/9831570f-3c83-4e59-b040-649d52faa257">
<img width="854" alt="Screenshot 2023-10-05 at 3 44 15 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/dec76eba-46d1-4e43-87e9-e7fc44e84691">
<img width="854" alt="Screenshot 2023-10-05 at 3 45 09 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/a7879b21-49b0-476a-81ab-6b465967510f">
<img width="854" alt="Screenshot 2023-10-05 at 3 45 29 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/14a90d0a-2a52-4e59-8ee8-fb76fce55417">
<img width="1105" alt="Screenshot 2023-10-05 at 3 46 58 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/6c488fbe-4e5a-442b-8b62-2ddd15bda1fe">
<img width="1105" alt="Screenshot 2023-10-05 at 3 47 10 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/649534c5-d859-41f9-8c8a-6882b1dc2219">
<img width="1105" alt="Screenshot 2023-10-05 at 3 47 24 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/eaa0469c-a57a-474d-87bc-21cf2133dd3c">


## Checklist for submitter

- [x] Added/updated tests
- [ ] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-10-09 11:31:31 -07:00
RachelElysia 11fc7edc0f Fleet UI: Fix new query bugs introduced (#14309) 2023-10-06 10:03:19 -07:00
RachelElysia ee365ea276 Frontend: Step 1 for query caching (organize FE directories, build save modals, modify routes/URLs) (#13908) 2023-10-02 12:26:53 -07:00
RachelElysia fd4e2733ba Frontend: [hour/s old bug] Ensure type null option for lastEditedQueryId (#14055) 2023-09-21 14:51:13 -04:00
RachelElysia 8dab938a89 Fleet UI: [small bug] Creating multiple new policies save button always enabled (#14042) 2023-09-21 13:44:02 -04:00
Jacob Shandling 72f5c5b30c UI: include team_id when nav to new policy from host details (#13757) 2023-09-06 11:07:13 -07:00
RachelElysia e8889a4d61 Fleet UI: Disable save button for invalid sql or name (#12994) 2023-08-09 16:24:46 -04:00
RachelElysia a45edfdffa Fleet UI: New edit query page (#12777) 2023-07-18 16:58:52 -04:00
Jacob ShandlingandJacob Shandling 53f57c44db UI - Queries page updates, pt.1 (#12784)
## Addresses #12636 – follow-up work for PR #12713

- Update Platforms column to render the user-selected platforms for a
query if any, otherwise those that are compatible
<img width="686" alt="Screenshot 2023-07-14 at 6 03 06 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/abd1f079-bdfe-45be-b1dd-58eb903672ef">

  - Clean up typing and names around this column 
- Encapsulate logic for query automations column cells into new
QueryAutomationsStatusIndicator component
  - Increase modularity and decrease coupling of StatusIndicator
- Cleanly handle overflowing queries table due to very long query name
<img width="512" alt="Screenshot 2023-07-14 at 6 07 20 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/6e970038-0aac-4f71-b21d-ececfa66b94f">

- Small copy and layout fixes

- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-07-17 14:09:12 -07:00
gillespi314 62e8e9e36a Fix unreleased bugs related to policies page URL params (#11873) 2023-05-23 10:46:19 -05:00
RachelElysia 63546a0688 Fleet UI: Policies URL params (bookmarkability) (#11585) 2023-05-12 09:41:12 -04:00
RachelElysia affd32a62b Fleet UI: Manage queries page URL params (#11485) 2023-05-08 09:17:19 -04:00
RachelElysia e3729ffae0 Fleet UI: Fix policy details page to not freeze up (#11294) 2023-04-25 12:38:03 -04:00
RachelElysia 3908e63b64 Fleet UI: Manage Host and Manage Software uses URL params as source of truth (#11253) 2023-04-24 09:24:28 -04:00
RachelElysia bfa257c8b5 Fleet UI: 1 new premium role (Observer+, GitOps is hidden) (#11028) 2023-04-07 11:36:47 -04:00
gillespi314 a7fb9039b2 Update UI to handle "No team" filters (#10706) 2023-03-31 12:40:14 -05:00
Zachary WinnermanandRachelElysia b5e37ce056 Rebase sandcastle onto main (#10317)
# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [ ] Documented any permissions changes
- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [ ] Added/updated tests
- [ ] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).

---------

Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2023-03-30 11:22:41 -07:00
Roberto Dip 98845f03a6 remove feature flags to enable MDM (#10746)
https://github.com/fleetdm/fleet/issues/10025
2023-03-27 16:30:29 -03:00
RachelElysia c21d592fe1 Fleet UI: Default policies preselect targeted platforms only (#9861) 2023-02-17 08:48:40 -05:00
Roberto Dip e06b00df11 Add readonly MDM.EnabledAndConfigured to app config and device responses (#9575)
Related to #9571, this adds a new value to both responses which is
calculated when the Fleet server is started, and only set to `true` if
the server is properly configured for MDM.

This helps the UI to determine wether or not we should show certain UI
elements that we only want to show to servers with MDM enabled.
2023-02-01 14:47:52 -03:00
Gabriel Hernandez afed2e35e0 change integration page layout to side nav layout. (#9057) 2023-01-04 18:39:39 +00:00
RachelElysia 929421f3bd Fleet UI: MDM settings page (#8977) 2022-12-16 17:33:10 -05:00
RachelElysia 51d1cf8569 Fleet UI: Add critical policy option (#8758) 2022-12-14 13:57:57 -05:00
RachelElysia f16b7ba13e Fleet UI: Save manage host table filters in state so we can return back to same filters (#8806) 2022-11-28 14:49:27 -05:00
Gabriel Hernandez bcfd000adf integration test device user page with mock and custom renderer (#8475) 2022-11-01 18:59:40 +00:00
Gabriel Hernandez a950e9d095 Feat/update query doc sidepanel (#8214)
* create new components for query side panel

* add reusable icon component that uses svg for icons

* integrate with new osquery_fleet_schema.json data

* update UI to work with osquery_fleet_schema.json

* add remark-gfm to safely support direct urls in markdown

* move fleet ace into markdown component so we can render code with ace editor

* add testing for new query sidebar

* remove incomplete tests for query sidepanel
2022-10-14 17:45:57 +01:00
Gabriel Hernandez eb06ef8049 simplify TeamsDropdown component and update ManageHostPage to keep po… (#7606)
* simplify TeamsDropdown component and update ManageHostPage to keep policy filter across team change

* fix TeamDropdown for users not on global team
2022-09-12 16:18:12 +01:00
Gabriel Hernandez 7a1317432b Add expiry time warning in sandbox mode (#6830)
* create a MainContent and SidePanelContent containers for layout

this creates these two new components for handling layout more cleanly. It also allows us to put in common components into main layout, like sandbox expiration notification

* use MainContent and SidePanelContent in current pages

this brings in the two new components and wraps the page contents in these. This also allowed us to clean up and remove unused/no needed styling code

* add MainContent component to user settings page and clean up user settings component

this cleans up the user settings page to follow the panel convention we have as well as adds the MainContent component to this page

* add MainContent component to team pages

* update Sandbox gate to render optional component when in sandbox mode and add to MainContent

* add call to sandbox api to get expiry time

this adds a conditional call when the user is in sandbox mode to get the expiry time of the instance

* fix sticky elements on settings pages to work with sandbox expiry message

* fix e2e test after MainContent refactor
2022-07-26 13:05:57 +01:00
gillespi314 3aa64f93ba Add isSandboxMode to AppContext (#6704) 2022-07-18 09:13:23 -05:00
Luke Heath f6225cc52c Add sandbox_enabled property to config interface (#6598) 2022-07-13 09:00:16 -07:00
gillespi314 44f902218c Improve live query UX (#5749) 2022-06-10 13:29:45 -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
RachelElysia d885758a6a UI: Settings > Integrations tab, Software Vulnerabilities Webhook v. Integration (#4874) 2022-04-11 15:04:41 -04:00
Martavis Parker cfb1474eb8 Auth Redux Removal (#4924)
* all login methods no longer use redux

* removed redux from registration

* redirect user from registration

* removed redux from sso invite

* removed redundant component

* refactored user settings page

* removed redux from logout

* cleaned up unused redux calls

* lint fixes

* removed test

* removed old config interface

* fixed registration bug

* team permission fix

* removed remaining redux references from pages - #4436

* better way to set config
2022-04-07 09:08:00 -07:00
gillespi314 727ba8b0db Fix bug sort availableTeams context (#4948) 2022-04-05 17:44:05 -05:00
Martavis Parker 3575d34507 Refactor Redux-triggered flash message component (#4795)
* base logic to handle rendering a notification without redux

* removed dispatches for new flash mesage triggers

* query page wrapper is no longer needed

* refactored confirm invite page to remove redux

* refactored email token redirect to functional and typescript

* refactored pack composer page to functional and typescript

* clean up

* lint fixes

* tests no longer needed

* fixed confirm sso invite test

* test fix

* fixed test

* fixed tests

* removed redux from flash on rebased pages
2022-03-31 23:42:26 -07:00
gillespi314 6940200cbd Check policy on all platforms if no platform selection is specified (#4785) 2022-03-24 10:47:43 -05:00
gillespi314 deeaf9d036 Add ability to detect compatibility and update which hosts are checked for a policy (#4703)
Add new usePlatformSelector custom hook
Add new usePlatformCompatibility custom hook
Add new PlatformSelector global component
Refactor PlatformCompatibility as global component
Refactor sql_tools to TypeScript
Improve type definitions for context/policy
Align PolicyPage and QueryPage with platform compatibility changes
2022-03-21 11:51:00 -05:00
gillespi314 a693d82c11 Improve TypeScript definitions for app context (#4603)
* Refactor AppContext with improved TypeScript definitions for actions
* Sort teams on setAvailableTeams action
* Add case insensitive sort by name to team table on team settings page
2022-03-16 10:01:35 -05:00
RachelElysia 7c87dad4e1 New navigation bar (#3962) 2022-02-02 11:27:14 -06:00
gillespi314 4d5e3277ef Add new feature: Software page (#3923)
* Add new software page
* Add hosts counts and last updated to software card on homepage
* Extend InfoCard component to all children to set dynamic title information and hyperlinks
* Add new TeamsDropdownHeader component
* Refactor TableContainer to move server-side pagination buttons to DataTable
* Extend DataTable to include footer element
2022-01-31 16:24:20 -06:00
gillespi314 3e66746707 Improve loading state for query platform compatibility (#3752) 2022-01-18 15:08:54 -06:00
gillespi314 ba64dc0003 Improve loading of manage policies page (#3695) 2022-01-18 09:17:44 -06:00
Luke Heath 0d52460c27 Allow platform selection on policy query creation (#3338) 2021-12-13 18:21:36 -06:00
Luke Heath 84d36d9e22 Policies own their queries flow QA fixes (#3323) 2021-12-10 13:17:36 -06:00
RachelElysia d0d0700c1f Fix policy resolution api request (#3234) 2021-12-07 14:09:06 -06:00
RachelElysia 1253020678 New Policy UI: Add policy resolution to create and edit policy (#3125) 2021-12-02 10:03:56 -05:00
gillespi314 a51225f3a5 Add team policies to new policy flow UI (#3116) 2021-11-29 13:50:58 -06:00
Lucas Manuel RodriguezandMartavis Parker 964f85b174 Amend policy creation and spec (for proprietary query), and add update APIs (#2890)
* Amend policy creation (proprietary query), add update APIs

* Fix Datastore.SavePolicy bug (and add tests)

* Add integration tests for new policy APIs

* Add author email

* Add activities

* Push breaking changes for return policy fields

* WIP

* Add integration test for host policies

* Make more improvements to policy representation

* Improve upgrade code (from PR review comments)

* PR changes

* Revert activities for policies

* Use *uint instead of uint for queryID, use fleet.PolicyPayload

* Filter out other schemas

* New policy flow (#2922)

* created new policy flow -- no API connection

* added api props

* fixed prop name

* lint fixes

* removed unused modal; fixed style

* name, desc icons; created global components

* lint fixes

* ignoring certain files and lines for prettier

* Update frontend/pages/policies/PolicyPage/PolicyPage.tsx

* Make policy names unique across deployment

* Amend upgrade script

* Fix migration for unique names

* Do not deduplicate but instead rename policies

Co-authored-by: Martavis Parker <47053705+martavis@users.noreply.github.com>
2021-11-24 14:16:42 -03:00