Commit graph

20 commits

Author SHA1 Message Date
Ian Littman
2891904f31
🤖 Switch InputField + InputFieldWithIcon JSX components to TS, add more test coverage, fix Storybook build (#43307)
Zed + Opus 4.6; prompt: Convert the InputField JSX component to
TypeScript and remove the ts-ignore directives that we no longer need
after doing so.

- [x] Changes file added
- [x] Automated tests updated
2026-04-09 08:41:48 -05:00
jacobshandling
0db86ef2f1
UI housekeeping: Update Modal.children from JSX.Element to React.ReactNode, remove empty fragment wrappers (#41394)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Refactor**
* Simplified modal structures across multiple dialog components for
improved code maintainability.
* Enhanced modal component's flexibility to support broader content
types.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-10 15:30:55 -07:00
Scott Gress
fe7be1833a
Update urls to use "fleets" and "reports" instead of "teams" and "queries" (#41084)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** For #41030

# Details

This PR updates front-end routes and redirects the old routes to the new
ones.

While I typically have shied away from renaming vars and constants in
this phase of the renaming work, I chose to rename the path constants
here because they're a lot less useful when they have names that don't
correspond to the paths they're representing. I did the renames using
VSCode's "Rename Symbol" feature which automatically finds and fixes any
references. I then asked Claude to verify the changes and it didn't find
any dangling references (also the code would fail to compile unless all
the new names collided with old ones).

# Checklist for submitter

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

- [ ] 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/guides/committing-changes.md#changes-files)
for more information.
n/a

## Testing

- [ ] Added/updated automated tests
no relevant tests exist
- [X] QA'd all new/changed functionality manually

## Reports (formerly Queries)

**New routes:**
- [x] /reports/manage — Reports list page
- [x] /reports/new — New report editor
- [x] /reports/new/live — New report live query
- [x] /reports/:id — Report details
- [x] /reports/:id/edit — Edit report
- [x] /reports/:id/live — Live report run

**Redirects from old routes:**
- [x] /queries → /reports
- [x] /queries/manage → /reports/manage
- [x] /queries/new → /reports/new
- [x] /queries/new/live → /reports/new/live
- [x] /queries/:id → /reports/:id
- [x] /queries/:id/edit → /reports/:id/edit
- [x] /queries/:id/live → /reports/:id/live

## Host Reports (formerly Host Queries)

**New routes:**
- [x] /hosts/:host_id/reports/:query_id — Host report results

**Redirects from old routes:**
- [ ] ~/hosts/:host_id/schedule → /hosts/:host_id/reports~ <- this is
not a real URL; removed current broken redirect
- [x] /hosts/:host_id/queries/:query_id →
/hosts/:host_id/reports/:query_id

## Fleets (formerly Teams)

**New routes:**
- [x] /settings/fleets — Fleets list page
- [x] /settings/fleets/users?fleet_id=:id — Fleet users
- [x] /settings/fleets/options?fleet_id=:id — Fleet agent options
- [x] /settings/fleets/settings?fleet_id=:id — Fleet settings

**Redirects from old routes:**
- [x] /settings/teams → /settings/fleets
- [x] /settings/teams/users → /settings/fleets/users
- [x] /settings/teams/options → /settings/fleets/options
- [x] /settings/teams/settings → /settings/fleets/settings
- [x] /settings/teams/:team_id → /settings/fleets
- [x] /settings/teams/:team_id/users → /settings/fleets
- [x] /settings/teams/:team_id/options → /settings/fleets

**Navigation & Links**

- [x] Top nav "Reports" link goes to /reports/manage
- [x] User menu team switcher navigates to
/settings/fleets/users?fleet_id=:id
- [x] Admin sidebar "Fleets" tab goes to /settings/fleets
- [x] "Create a fleet" links (user form, transfer host modal) go to
/settings/fleets
- [x] "Back to fleets" button on fleet details goes to /settings/fleets
- [x] Fleet table name links go to /settings/fleets/users?fleet_id=:id
- [x] Host details "Add query" button goes to /reports/new
- [x] Select query modal links go to /reports/new and /reports/:id/edit
- [x] Query report "full report" link goes to /reports/:id
- [x] Browser tab titles show correct names for report pages

**Query params preserved through redirects**

- [x] /queries/:id?fleet_id=1 → /reports/:id?fleet_id=1
- [x] /settings/teams/users?fleet_id=1 →
/settings/fleets/users?fleet_id=1

For unreleased bug fixes in a release candidate, one of:

- [X] Confirmed that the fix is not expected to adversely impact load
test results
2026-03-06 08:24:50 -06:00
Scott Gress
cd18ced3e9
Rename teams and queries to fleets and reports in UI (#39572) 2026-02-17 15:19:33 -06:00
RachelElysia
769154b821
Fleet UI: Fix several team ids that were dropping in certain flows (#26590) 2025-02-27 10:53:34 -05:00
jacobshandling
d1335986dd
UI – Include team-level queries in Select query modal, only call for queries when needed (#25286)
## For #25114

- When host is on a team, include both the team's and global queries in
list presented to the user
- Optimize by only calling queries API when needed

<img width="1464" alt="Screenshot 2025-01-08 at 6 47 06 PM"
src="https://github.com/user-attachments/assets/9ed6fb1b-7cc3-4e34-a38d-4c7baecedf4c"
/>

- [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:08:46 -08:00
RachelElysia
346ebe0d0a
Fleet UI: Close modals with no CTA, and query sidebar, using enter key (#22907) 2024-10-16 11:24:08 -04:00
jacobshandling
4c661acb19
UI - Limit width of query selection options (#22722)
## #22660 
<img width="1271" alt="Screenshot 2024-10-07 at 1 48 25 PM"
src="https://github.com/user-attachments/assets/5621b0fc-62b5-40c7-8f94-150bb2bf49fb">
- [x] Manual QA for all new/changed functionality

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-10-07 15:02:05 -07:00
RachelElysia
21d1d90e3c
Fleet UI: Select a query modal revamp (#18001) 2024-04-10 13:54:31 -04:00
Jacob Shandling
c69bba6d0e Merge branch '7765-frontend' into 7765-combined-schedules-and-queries 2023-07-27 13:35:07 -07:00
Jacob Shandling
1daf6f02c6 Revert "Merge front-end changes into 7765 Master Dev branch (#12905)"
This reverts commit 7bff7447b0.
2023-07-27 13:32:24 -07:00
Juan Fernandez
7bff7447b0
Merge front-end changes into 7765 Master Dev branch (#12905)
Front-end changes for combined schedules and queries.
2023-07-24 09:47:05 -04:00
Jacob Shandling
27a1bfd805
UI - Restore host details Query action and Schedule tab (#12832)
## Addresses a conversation in which we decided _not_ to remove the host
details page's Query action and Schedule tab after all. @zhumo
@rachaelshaw, related to #12636

### Restores these features

<img width="758" alt="Screenshot 2023-07-18 at 4 17 41 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/6a7ce26a-6ee2-4c3d-b2a3-524b90e417f8">

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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-07-19 11:02:53 -07:00
RachelElysia
629f408d31
Fleet UI styleguide update: Replace all search bars and icons with new styling (#12312) 2023-07-19 10:40:59 -04:00
Jacob Shandling
f9ac557c8e
UI: Make all Modal widths consistent (#11722)
## Addresses #11356

Images of 3 fixed modals referenced in the issue:
<img width="1235" alt="Screenshot 2023-05-12 at 4 11 52 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/098081c7-15d4-4009-92a0-7a2e14ffaab1">
<img width="1235" alt="Screenshot 2023-05-12 at 4 12 50 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/7d0f268d-f2dc-4686-a64d-94e28a94c717">
<img width="1235" alt="Screenshot 2023-05-12 at 4 13 26 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/d486b005-1344-4656-adec-c4929332816b">

## Implemented:
- [x] Updated global modal styles for consistency
- [x] Add optional "width" prop to `Modal`
- [x] Misc cleanup:
  - [x]  Restore missing padding from inverse-alert buttons
  - [x]  Improve naming, lots of cleanup
  - [x] More coming in separate PR
- [x] Check each of the following modals, define `width` where
necessary:
  - [x]  Add hosts
  - [x]  EnrollSecret
    - [x] Also fix misaligned icons  
  - [x]  SecretEditor
  - [x]  DeleteSecret
  - [x]  ShowQuery
  - [x]  AddIntegration
  - [x]  DeleteIntegration
  - [x]  EditIntegration
  - [x]  EditTeam
  - [x]  RequestCSR
  - [x]  HostStatusWebhook
  - [x]  CreateTeam
  - [x]  DeleteTeam
  - [x]  EditTeam
  - [x]  AddMember
  - [x]  RemoveMember
  - [x]  CreateUser
  - [x]  DeleteUser
  - [x]  EditUser
    - [x] Also fix randomly shorter 'Password' field  
  - [x]  ResetPassword
  - [x]  ResetSessions
  - [x]  WelcomeHost
  - [x]  DeletHost
  - [x]  TransferHost
  - [x]  POlicyDetails
  - [x]  AutoEnrollMdm
  - [x]  Info
  - [x]  ManualEnrollMdm
  - [x]  ResetKey
  - [x]  BootstrapPackage
  - [x]  DiskEncryption
  - [x]  OSPOlicy
  - [x]  SelectQuery
  - [x]  UnenrollMdm
  - [x]  MacSettings
  - [x]  DeleteLabel
  - [x]  EditCOlumns
  -  WIP, cannot QA yet (cc @ghernandez345):
      - DeleteScript
      - RerunScript
  - [x]  DeleteProfile
  - [x]  DeletePackage - allow to conform to default "m" width, 650px
  - [x]  PackQueryEditor - allow to conform to default "m" width
  - [x]  RemovePackQuery - allow to conform to default "m" width
  - [x]  DeletePack - allow to conform to default "m" width
  - [x]  AddPolicy 
  - [x]  DeletePolicy - allow to conform to default "m" width
- [x] NewPolicy (now "SaveNewPolicyModal") - allow to conform to default
"m" width
  - [x]  DeleteQuery
  - [x]  NewQuery - allow to conform to default "m" width
  - [x]  PreviewData
  - [x]  RemoveScheduledQuery
  - [x]  ScheduleEditor
  - [x]  UserSettingsPage (aka "get API token")
  - [x]  2 x ManageAutomations –  set to large
  - [x]  2 x PreviewPayload - allow to conform to default "m" width 
  - [x]  2 x PreviewTicket - same as ManageAutomations

## Checklist for submitter

- [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>
2023-05-17 10:07:38 -07:00
RachelElysia
bfa257c8b5
Fleet UI: 1 new premium role (Observer+, GitOps is hidden) (#11028) 2023-04-07 11:36:47 -04:00
Jacob Shandling
dc7bfd2a35
Select query style bugs (#11043) 2023-04-06 18:45:13 -05:00
RachelElysia
ecb7c333d2
Frontend: Standardize modal and modal button code (#7740) 2022-10-03 15:11:36 -04:00
RachelElysia
6b34f32e88
Frontend Tech Debt: All data/page errors use same component (#5455) 2022-05-03 16:57:08 -04:00
RachelElysia
6748e8bff6
Refactor host details page into components (#4632)
* Refactor host details and device user page into components and shared components
* Refactor stylesheets and update class names on cypress tests
2022-03-25 13:38:50 -04:00
Renamed from frontend/pages/hosts/HostDetailsPage/SelectQueryModal/SelectQueryModal.tsx (Browse further)