Commit graph

52 commits

Author SHA1 Message Date
Gabriel Hernandez
084ebe6e16 update auth token storage (#40504)
**Related issue:** Resolves #14401

this updates the mechanism of storing the auth token for a user that is
used for making requests and validating a user session. We change the
storage from local storage to a cookie. This allow a bit more security
and prepares for a future change where we will allow the browser to
handle setting and passing the auth token in the request.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] QA'd all new/changed functionality manually
2026-02-27 12:36:42 -06:00
Juan Fernandez
b8dfe40a81 Fixed bug with Host detail software tab page title (#39941)
Resolves #39613

Fixed an issue where the App component incorrectly reset the page title
when navigating to the Software tab on the Host detail page.
2026-02-27 12:34:24 -06:00
Gabriel Hernandez
74a5c94f8e
Fix expired abm token banner and tooltip (#37898)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Fixes #33291

Fix an issue where the abm terms expiry banner was not removed after the
expired token was deleted.

Also added a tooltip to the expired abm token name table cell


- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] QA'd all new/changed functionality manually
2026-01-07 11:54:52 +00:00
Carlo
3b01f6f529
Handle deleted Android Enterprise (#32267)
Implements #26868; adds `EnterpriseLIST` method to Android Management API client
interface

Co-authored-by: Eric <eashaw@sailsjs.com>
2025-09-04 08:17:37 -04:00
Victor Lyuboslavsky
cca4d2440d
Remove Android feature flag from frontend (#29890)
Fixes #26519

- Removed Android feature flag from the frontend
- Added custom error message when Android enterprise already exists, per
https://fleetdm.slack.com/archives/C084F4MKYSJ/p1748981589180829?thread_ts=1748638333.353069&cid=C084F4MKYSJ

# Checklist for submitter

- [x] Manual QA for all new/changed functionality
2025-06-12 20:05:56 -05:00
Gabriel Hernandez
20eb780ffd
add anroid enterprise deleted banner (#26685)
For #26207

added banner that shows when android enterprise has been deleted.

> TODO: this is only the frontend and will not work until BE work is
done. It will not show in the UI currently


![image](https://github.com/user-attachments/assets/842fd4d2-43fe-4b06-95ff-f2c7a43a8b9f)
2025-03-10 13:16:43 +00:00
jacobshandling
689e78a598
UI - use new db user settings to persist user's host table column preferences (#25185)
## For #25032

<img width="1792" alt="Screenshot 2025-01-07 at 6 50 39 PM"
src="https://github.com/user-attachments/assets/17a63b3d-a983-433a-a3c4-6c66dbb08fce"
/>

- Add new `include_ui_settings` query param to `GET` `/me` calls
- Use new `settings` in response to set settings into UI context
- On hosts page, use that context, if present, to set which columns are
hidden. Fallback to a default set of hidden columns.
- When updating visible columns, persist preference via `PATCH` to
`/users/:id` with a new `settings` payload

- [x] Changes file added for user-visible changes in `changes/`
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-01-09 10:53:43 -08:00
jacobshandling
d3ccb51755
UI - Improve UX of Flash messages (#22836)
## #22661 


![ezgif-6-71e48912ae](https://github.com/user-attachments/assets/01144620-0eba-48f0-9254-cc4795fde9fd)

- Update `FlashMessage` behavior to, by default, hide itself when the
user performs any URL-changing navigation
- Add `persistOnPageChange` option to `renderFlash` API and associated
notification context and reducer logic, allowing override of this
behavior on a per-call basis
- Ensure proper order of evaluation of URL changes and render flash
action dispatches on the event loop
- Clean up legacy unused "undo"-related arguments and logic
- Allow the user to click in the same horizontal dimension as a flash
message
- Other misc. cleanup and refactoring

[Demo - messages hidden on page (any URL)
change](https://www.loom.com/share/1e884b6ba11c4b59bc74f51df3690131?sid=9b53e78b-6535-4541-b676-377760366cf4)

- [x] Changes file added for user-visible changes in `changes/`,
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-10-22 10:52:20 -07:00
Jahziel Villasana-Espinoza
a00559e732
feat: enable multiple ABM and VPP tokens (#21693)
> Related issue: #9956 

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
Co-authored-by: Roberto Dip <rroperzh@gmail.com>
Co-authored-by: Sarah Gillespie <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: Dante Catalfamo <43040593+dantecatalfamo@users.noreply.github.com>
Co-authored-by: Roberto Dip <dip.jesusr@gmail.com>
2024-08-29 18:51:46 -04:00
Gabriel Hernandez
58fb563433
Fix showing app-wide warning banners correctly on the first page load. (#20806)
relates to #20784

this fixes an issue where the app-wide warning banners were not loading
on the first-page load.

> NOTE: I changed the fetch method for the data needed for the app-wide
banners (e.g. abm, apns, vpp token data) to use react-query `useQuery`
method as it follows our usual pattern for `GET` requests in components.
To enable this, I moved up the react-query query client wrapper in the
`AppWrapper component in `/frontend/router/index.tsx` file. This also
gives us better control of when/how often this request is initiated.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [ ] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-07-30 13:37:33 +01:00
Gabriel Hernandez
e07313c7de
Add UI banner when VPP token is about to expire/has expired (#20734)
relate to #19691

Adds a UI banner that conditionally shows on every page (excluding my
device page) if the VPP token that was uploaded is within 30 days of
expiring. It will also show a warning banner if the token has already
expired.

**Token about to expire:**


![image](https://github.com/user-attachments/assets/f82a6cf5-405a-4911-87fe-1a354bfadee3)

**Token has expired:**


![image](https://github.com/user-attachments/assets/87bc51b9-f948-4d5b-835a-ff81116b0fa1)

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [ ] Added/updated tests
- [c] Manual QA for all new/changed functionality
2024-07-26 15:39:27 +01:00
RachelElysia
f0ec662996
[unreleased bug] Fleet UI: Only global admins see ABM and APNs banners (#19571) 2024-06-06 16:36:10 -04:00
RachelElysia
474b982deb
[unreleased bug] Fleet UI banners: set expiries into global state (#19565)
Co-authored-by: Roberto Dip <dip.jesusr@gmail.com>
2024-06-06 14:46:03 -04:00
Roberto Dip
2e8f13202b
fixes for cert renewals (#19408)
Co-authored-by: Jahziel Villasana-Espinoza <jahziel@fleetdm.com>
2024-05-31 12:29:05 -03:00
RachelElysia
5c35a922b0
Fleet UI: Add reminder banners for ABM and APNs expirations (#19085) 2024-05-29 12:03:05 -04:00
Lucas Manuel Rodriguez
cdf2a0c47c
iPhone/iPad support (#19221)
#18119

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [X] 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.
- [x] Added/updated tests
- [X] Manual QA for all new/changed functionality

---------

Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
Co-authored-by: Jacob Shandling <61553566+jacobshandling@users.noreply.github.com>
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-05-28 19:17:14 -03:00
Gabriel Hernandez
3decb68220
revert accidental merge for FE lint warning fixes (#18036)
This reverts commit a3f3230aa9.

I accidentally merged to main so am reverting this change.
2024-04-03 17:25:16 +01:00
Gabriel Hernandez
a3f3230aa9
fix up some lint warning that show in github (#17997)
quick PR to clean up some of the warning that show up in github PRs.
2024-04-03 12:33:38 +01:00
Gabriel Hernandez
3c2e4b8f4a
update UI to react 18 (#17471) 2024-03-13 19:09:16 +00:00
RachelElysia
5ae52b3a0b
Fleet UI: Update page titles (#15983) 2024-01-12 09:27:56 -05:00
Jacob Shandling
96fc52b1a1
Various document title fixes (#15699)
## Addresses #15692 


https://github.com/fleetdm/fleet/assets/61553566/373df35f-0de5-4c71-84fc-c181a0a5dd07

- Also addresses title not being updated by the Software page due to new
routes and hard-coded paths that no longer matched the new routes
- Also make this area more flexible to avoid these kinds of bugs in the
future

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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-12-18 10:35:29 -08:00
Jacob Shandling
333674b051
UI – Host query report page (#15511)
## Addresses second major part of #15011  (item 3) – Host query report

_Note for reviewers: The most important files here are:_
- HostQueryReport.tsx
- HQRTable.tsx
- HQRTableConfig.tsx

_The rest are associated API services, interfaces, helpers, routes,
styles, and miscellanious code improvements I made along the way._

____________

### See linked issue for enumeration of feature-related tasks

<img width="1230" alt="Screenshot 2023-12-08 at 4 23 50 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/4ae4b41b-9209-4afa-ae50-8844d01ff8fd">

<img width="1230" alt="collecting"
src="https://github.com/fleetdm/fleet/assets/61553566/061ac2bc-899f-4b29-91ba-36ebecf5ce58">

<img width="1230" alt="Screenshot 2023-12-08 at 4 24 39 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/f8b25e01-fe3b-47e6-b980-eba9538b1a01">

<img width="1230" alt="Screenshot 2023-12-08 at 4 25 01 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/46360274-8500-494c-8fb7-3a1d45347ce0">

Re-routes to host details > queries if:
- query reports are globally disabled:

https://github.com/fleetdm/fleet/assets/61553566/ac67da8c-57bc-4d9b-96be-daf3b198e704

- query has `Discard data` enabled:

https://github.com/fleetdm/fleet/assets/61553566/b797dd24-9893-4360-bf40-b80298848864

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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-12-08 16:54:24 -08:00
Jacob Shandling
36be3d14a1
UI – Refrain from clearing the auth_token and redirecting to login for errors specific to this scenario (#14911)
## Addresses #12968


https://www.loom.com/share/37aaaa36936b47079ff3088c3430e36b?sid=c249306b-a32e-4a33-be83-aae2d13c98aa

- Improve the implementation of error reporting by `sendRequest` to
handle when AxiosError information is being provided in different fields
(`response`, `message`, `code`, or nowhere), as opposed to relying on
only the `response` field, which is empty in some (including this)
situations
- Using the more fine-grained reporting above, exempt `Request aborted`
errors when fetching a user's data, which is what occurs here, from
triggering a token clear and login page redirect.
- Use dedicated token handling utilities everywhere

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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-11-03 08:32:41 -07:00
Gabriel Hernandez
fa252e4977
Update controls tabs to show mdm disabled UI state per tab (#13794)
relates to #9831

Update Controls page to individually show the mdm disabled UI state per
tab. Before this was done across the entire control page:


![image](https://github.com/fleetdm/fleet/assets/1153709/67a88cf4-c489-46aa-a802-58c4ef61ac5a)


Also, refactors the code to be less specific to mac OS.


- [x] Manual QA for all new/changed functionality
2023-09-11 12:52:24 +01:00
RachelElysia
d4c8111038
Fleet UI: Add more specific page titles to browser tab (#13335) 2023-08-30 16:11:49 -07:00
gillespi314
a7fb9039b2
Update UI to handle "No team" filters (#10706) 2023-03-31 12:40:14 -05:00
Zachary Winnerman
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
RachelElysia
93e684d524
Frontend: Cleanup implied types, unused imports and variables (#7439) 2022-09-01 11:28:02 -04:00
Gabriel Hernandez
d88c4e3066
fix fleet setup styles (#6909) 2022-07-27 14:43:13 +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
RachelElysia
9367464d20
Fleet Desktop Device User Page: Remove unnecessary API call (#6427) 2022-06-30 10:42:41 -04:00
Luke Heath
0530a86b7c
Fix device page redirect on expired token (#5976) 2022-06-02 17:56:26 -05:00
RachelElysia
e3c0e2d3b5
Fix password reset redux auth token issue (#5630)
Co-authored by: Sarah Gillespie <sarahgillespi314@gmail.com>
2022-05-09 10:16:35 -05:00
Luke Heath
2651343be4
Refresh user and config on every route change (#5425)
* Refresh user and config on every route change

* Fix build error

* Remove stray log
2022-04-29 08:22:02 -07: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
Martavis Parker
6a5f7172ef
Fixed error handling for invalid auth token (#5261)
* fixed error handling for invalid auth token

* lint fixes
2022-04-20 12:51:01 -07:00
gillespi314
6708ecc304
Handle routing for setup page (#5152) 2022-04-15 18:13:59 -05: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
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
RachelElysia
a022a11ebf
Frontend Tech Debt: Typescript types (#4319) 2022-03-10 10:10:44 -05:00
RachelElysia
bb11f5008f
Frontend tech debt: Clean up 409 lint warnings (#3703)
* Clean up unused variables, return types, many quick type any
2022-02-14 17:11:12 -05:00
RachelElysia
778ee22147
/logout route automatically logs out user (#4057)
Co-authored-by: Luke Heath <luke@fleetdm.com>
2022-02-09 11:36:24 -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
gillespi314
ba64dc0003
Improve loading of manage policies page (#3695) 2022-01-18 09:17:44 -06:00
Luke Heath
84d36d9e22
Policies own their queries flow QA fixes (#3323) 2021-12-10 13:17:36 -06:00
Lucas Manuel Rodriguez
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
RachelElysia
c194f8ae57
Team Admin: Give team admin all team maintainer's permissions for query experience (#2689) 2021-10-26 16:55:53 -04:00
Martavis Parker
58b26ae1ba
Removed 500 route middleware, added error boundary (#2665) 2021-10-26 09:26:51 -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
RachelElysia
7d5821f527
Team maintainer does not request enroll secret (#2260) 2021-09-29 14:13:53 -04:00