Commit Graph

1157 Commits

Author SHA1 Message Date
Jacob Shandling
fd1b1c50b5
14415 - Loose ends 2 (#15595)
## Addresses #15011 

- Sort host details > queries list by query name
- Update shape of expected response from HQR call to schedulable query
API
- Shorten the 'clipped' banner's message for Observers and Observers+
- Update tooltips in RevealButton

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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-12-12 11:32:16 -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
bb56e288e5
UI – 14415 frontend - host details (#15437)
## Addresses the first major part of #15011 (item 2) – Host Details >
Queries tab

<img width="1274" alt="Screenshot 2023-12-04 at 1 09 31 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/47075ebb-eb98-48f5-82ab-af4022932376">
<img width="678" alt="Screenshot 2023-12-04 at 1 09 57 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/db48ca6d-e73b-4a90-b782-f9ee265927f1">

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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-12-05 13:58:02 -08:00
Jacob Shandling
eaa124eb1b
UI – Fix bug with line breaks in example command (#15331)
## Addresses #14970 

Command fails for correct reason (no real path provided), instead of
reading it as multiple commands due to line breaks:

<img width="801" alt="Screenshot 2023-11-27 at 4 27 21 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/c30b183a-d8e4-4b90-85be-9097dcd7315c">

- [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-12-01 09:11:56 -08:00
Gabriel Hernandez
dc1ba8a395
make query table doc dropdown truncation consistant (#15386)
relates to #14441

Makes the truncation consistent for the dropdown options on the query
table selector.

- [x] Manual QA for all new/changed functionality
2023-12-01 12:14:47 +00:00
Gabriel Hernandez
74ea455628
add truncation to dropdown options for the query table documentation sidebar (#15368)
relates to #14441

add truncation to dropdown options for the query table documentation
sidebar


![image](https://github.com/fleetdm/fleet/assets/1153709/d7100090-c636-4bba-88c7-370ce6426e99)

- [x] 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.
- [x] Manual QA for all new/changed functionality
2023-11-29 18:02:51 +00:00
Gabriel Hernandez
b72aaa56b0
add copied message to copy button on input (#15366)
relates to #14090

adds copied message when user click on the copy button on inputs.


![image](https://github.com/fleetdm/fleet/assets/1153709/b5d89630-37a3-4b05-9678-ac62da2e6109)

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
- [x] Manual QA for all new/changed functionality
2023-11-29 17:27:01 +00:00
Martin Angers
2f927df4f0
Implement Windows OS Updates (feature branch). (#15359) 2023-11-29 11:07:24 -05:00
Roberto Dip
f439432fae
feature: windows profiles (#15349) 2023-11-29 09:32:42 -05:00
Luke Heath
557b53e5df
Set filter cell input background to transparent (#15321) 2023-11-27 14:36:00 -06:00
Gabriel Hernandez
c7ea572698
Revert "Implement windows custom profiles in fleet UI (#15205)" (#15275)
This reverts commit 8e37977605.
2023-11-27 16:43:21 +00:00
Jacob Shandling
e709357ca2
UI – Restore clickability to entirety of sort headers except in filter text inputs (#15260)
## Addresses #14519 

- Applies anywhere there is a sort header, including the query results
and query report tables


https://github.com/fleetdm/fleet/assets/61553566/5bf0db8f-3d13-434d-b811-914fdded02df



- [x] Changes file added for user-visible changes in `changes/`
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-11-21 13:49:41 -08:00
Jacob Shandling
b961c8e912
UI – Add help text, modularize help text styling, misc cleanup (#15252)
## Addresses #14882 

- Add help text
- Align heading of Advanced section
- Add `help-text` mixin for improved modularity/reusability
- Fix responsive styles on LabelFilterSelect

<img width="721" alt="Screenshot 2023-11-21 at 9 52 45 AM"
src="https://github.com/fleetdm/fleet/assets/61553566/216112f8-de9d-4ee3-acb5-376e6ccd3b4e">

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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-11-21 10:16:33 -08:00
Gabriel Hernandez
8e37977605
Implement windows custom profiles in fleet UI (#15205)
related to #14359

Implements the UI for windows custom profiles. This includes:

- uploading, downloading, viewing, and deleting windows profiles
- updating the profile status aggregate to new endpoint that includes
windows profiles.
- UI updates and refactoring of some code to be more maintainable
2023-11-20 18:35:46 -03:00
Marko Lisica
669be3a53c
Enroll hosts docs improvements (#14862)
Summary:
- Enroll hosts page refinement
- Since page was too long and had a lot of content I did following:
    - Moved most important sections to the top
- Did some changes to make things more consistent, when possible having
UI and CLI sections with steps (ordered list)
- Moved `Add hosts with plain osquery` to contributor docs, since I
learned this approach is used just by couple of Fleet customers, and we
don't advise this as best practice anymore
- Added overview (table of contents) on the top to make easier to
navigate through the page
- Moved some technical (advanced) topics into separate section on the
bottom of the page

---------

Co-authored-by: Noah Talerman <noahtal@umich.edu>
Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
Co-authored-by: Rachael Shaw <r@rachael.wtf>
2023-11-20 19:39:41 +01:00
Jacob Shandling
41c2ebfb27
UI – Small adjustments to various Tooltipwrapper instances (#15170)
## Addresses #14244 

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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-11-16 14:34:56 -08:00
Jacob Shandling
376be83062
UI – Add support for Windows powershell scripts (#15128)
## Addresses #14752
### (see issue for detailed list of features implemented)

![script list
alpha](https://github.com/fleetdm/fleet/assets/61553566/1b35da72-5ff9-47e2-9d4b-0e0334e2c2b8)


![details-scripts-mac](https://github.com/fleetdm/fleet/assets/61553566/6ccad298-d4bd-47fa-bd0b-193f87b68881)

![details-scripts-windows](https://github.com/fleetdm/fleet/assets/61553566/208bb2c4-eaf8-45c4-8a9b-dfd7590f2117)

![error](https://github.com/fleetdm/fleet/assets/61553566/c0f1ad90-345b-4356-922a-ad76da96db0e)

- Also addresses #15140:

![fixed-dropdown-table-issue](https://github.com/fleetdm/fleet/assets/61553566/6a0d951d-156a-4d86-a1ab-9b00cd731e94)
- Align host details > scripts > Status cells' icon alignments (see
misaligned "pending" icon above):
![Screenshot 2023-11-14 at 4 08
01 PM](https://github.com/fleetdm/fleet/assets/61553566/a354d8c4-f56a-4cf0-8d58-1fc0ad662180)

## Checklist for submitter

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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-11-15 11:28:57 -08:00
Gabriel Hernandez
da20214938
Create new ListItem and FileUploader component and use on controls page (#15103)
This adds a new ListItem component and FileUploader component and
updates the Custom settings and scripts page to use this new ListItem
component.

This List component centralises where the markup and styles live. We
still need to update the bootstrap list item and eula upload list item
but will do that in the future.

- [x] Manual QA for all new/changed functionality
2023-11-13 15:30:22 -08:00
Jacob Shandling
1a5633e716
UI – Truncate long query results cells (#15079) 2023-11-10 13:31:11 -08:00
Jacob Shandling
29b3da14f3
UI – Replace overflow-x: scroll with ...auto; remove redundant local declarations (#15054)
## Addresses #11753 

Fixed:
![Screenshot 2023-11-08 at 5 45
09 PM](https://github.com/fleetdm/fleet/assets/61553566/55570f5b-eb7d-4974-96e3-0304eef30b87)
(Was also occurring on queries page)
![Screenshot 2023-11-08 at 5 45
16 PM](https://github.com/fleetdm/fleet/assets/61553566/139d1ac6-e1e7-4b22-87d5-8cb43d00005d)

## 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-11-09 09:16:22 -08:00
Jacob Shandling
bf8504a028
Refactor Tooltip Wrapper (#13845) 2023-11-07 13:15:49 -08:00
Jacob Shandling
cc129d61b1
UI - Use flex properties for issues cell (#14967)
Instead of less flexible `margin`

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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-11-07 09:16:52 -08:00
Jacob Shandling
9d628d9e0f
UI - align issues icons on manage hosts page (#14962)
<img width="135" alt="Screenshot 2023-11-06 at 9 53 05 AM"
src="https://github.com/fleetdm/fleet/assets/61553566/b42eb365-d246-40c3-b08d-0a093bd18db7">

## Checklist for submitter

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

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-11-06 10:34:06 -08:00
Gabriel Hernandez
76059564a9
Fix UI abm message link font (#14927)
quick fix to update abm expiry message text and link to same size as
other warning messages
2023-11-03 16:14:02 +00:00
Gabriel Hernandez
7b3d3e7a18
update ABM expiry message to match font size of other warning messages (#14926)
quick fix to font size to match other warning message font sizes
2023-11-03 16:05:30 +00: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
82e576ef59
fix view all host link chevron icon (#14924)
Fixes chevron icon for view all host link component


- [x] Manual QA for all new/changed functionality
2023-11-03 15:22:17 +00:00
RachelElysia
2a22c40345
Fleet UI: Icon alignment (#14860) 2023-11-03 07:41:13 -04:00
RachelElysia
f0d3760784
Fleet UI: Changing pages, filters, or search query clears checkbox selections (#14902) 2023-11-03 07:40:19 -04:00
Gabriel Hernandez
992eb17cf8
fix clipping svg for pdf graphic on chrome (#14892)
related to #14691

fix pdf graphic svg clipping on chrome

**before:**


![image](https://github.com/fleetdm/fleet/assets/1153709/46d80349-ea42-4c8a-9d66-fc1d8b7a1bb5)

**after:**


![image](https://github.com/fleetdm/fleet/assets/1153709/d32f73d2-33ea-4c2a-a25a-415e5735ff2c)

- [x] Manual QA for all new/changed functionality
2023-11-02 15:28:58 +00:00
RachelElysia
487b216a5f
Fleet UI: Align number in host target count when selecting targets (#14849) 2023-11-01 13:03:04 -04:00
Marko Lisica
8162d052bf
Icons improvements (making frontend consistent with Figma component library) (#14185)
# Checklist for submitter

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

- [ ] Manual QA for all new/changed functionality

---------

Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
2023-10-31 16:06:38 +00:00
Gabriel Hernandez
019377368d
update copy for ABM terms banner message (#14774)
relates to #13012

Updates the copy of the ABM terms banner message to reflect that Apple
may take a long time to update that the terms have been accepted.

- [x] 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.
- [x] Manual QA for all new/changed functionality
2023-10-27 18:06:10 +01:00
Gabriel Hernandez
4d7410d7ae
Fixs multiple banners on host details page when we only want to show ABM expired banner (#14772)
relates to #13010

This fixes the issue where we only want the user to see the ABM banner
on the Host Details page.

We've pulled out the rendering logic of the banners into its own
component and suppress the other banners if the ABM expired banner is
already showing.

- [x] 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.
- [x] Manual QA for all new/changed functionality
2023-10-27 16:05:19 +01:00
RachelElysia
06aec6401f
Fleet UI: Manage queries page uses URL params as source of truth for table and inherited table views (#14750) 2023-10-26 13:35:55 -04:00
RachelElysia
e75f413d04
Fleet UI: [styling bugs] Scrollbars attack pt. 2 and unreleased checkbox bug introduced (#14630) 2023-10-18 17:04:08 -04:00
Jordan Wright
39e9cdd7b1
Fix certain datetimes to display "Never" when they are prior to Fleet's launch date (#14487)
# Checklist for submitter

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

> [!NOTE]  
> For the reviewer, you won't hurt my feelings at all if you have a
better implementation in mind and want to close this out! I'll be
upfront that I'm much more of a Go dev than a frontend dev. I'm just
using this issue as an opportunity to become more familiar with Fleet,
since I'm a fan of what y'all are doing and have been looking for a
project to spend some spare-time contributing to 😄
>
> You should also have edit access to this branch, so feel free to
commandeer it as you see fit.

# Summary

This PR aims to fix a regression identified in #14353 in which certain
"zero" datetimes are displayed as "54 years ago" instead of the
preferred "Never". The "zero" datetimes are commonly used [as a proxy to
indicate](5cb8051a40/server/datastore/mysql/hosts.go (L1649))
that a date wasn't set, e.g. when a host hasn't had its details fetched
yet.

We don't want to apply this treatment to _all_ datetimes, since some
(like vulnerability data) have valid dates before Fleet was created.

To support both use cases, I:

* Added an optional boolean, `cutoffBeforeFleetLaunch`, to indicate that
dates should be cutoff prior to the hardcoded Fleet launch date. This is
set to `false` in `HumanTimeDiffWithDateTip` for
backwards-compatibility.
* Created `HumanTimeDiffWithFleetLaunchCutoff` which is a drop-in
replacement for `HumanTimeDiffWithDateTip` that sets the
`cutoffBeforeFleetLaunch` flag to `true`.

I then used `HumanTimeDiffWithFleetLaunchCutoff` in the various host
related fields I could find. It's possible I missed some, so please
double-check me! I'm still getting my bearings on the codebase.

Here's a screenshot showing the host table with a host that I had
deleted and waited to appear again:

<img width="1381" alt="Screenshot 2023-10-11 at 11 27 29 PM"
src="https://github.com/fleetdm/fleet/assets/1317288/3cd23879-3233-409f-91a0-8b5e02d09deb">

You may find it helpful to review this commit-by-commit.

Closes #14353
2023-10-16 16:43:47 +01:00
RachelElysia
cf6f226bd5
Fleet UI: [unreleased bug] Fix online hosts percentage string that wasn't rendering (#14568) 2023-10-16 10:55:47 -04:00
Jacob Shandling
53b08bfa99
UI: Fix edit query form padding; align all Fleet checkboxes with their text (#14545)
## Addresses #14535 

- Fix the issue
- Dedupe and modularize styles while at it

**Left: fix | Right: bug**
<img width="1750" alt="Screenshot 2023-10-13 at 11 27 31 AM"
src="https://github.com/fleetdm/fleet/assets/61553566/f13daf10-977c-45f1-bfcc-c294551ca18c">

- Also fix global alignment issue with checkboxes and their text:

**Left: fix | Right: bug**
<img width="868" alt="Screenshot 2023-10-13 at 11 46 42 AM"
src="https://github.com/fleetdm/fleet/assets/61553566/33e92582-65b8-4c5d-aa46-45f8730ef439">

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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-10-13 16:07:53 -07:00
Jacob Shandling
aeba3f0396
Disable edit query for o and o+ (#14514) 2023-10-12 13:45:37 -07:00
RachelElysia
481a8bcff2
Fleet UI: [tiny fix] Body background color for auth pages on resize (#14489) 2023-10-12 11:58:43 -04:00
RachelElysia
05c5af1f2c
Fleet UI: Repush changes to fix info banner again (#14490) 2023-10-12 11:56:40 -04:00
Jacob Shandling
70e0182e4d Merge branch 'main' into 7766-main-merge 2023-10-11 12:56:52 -07:00
Roberto Dip
aeb4810541
prevent input secret from overflowing (#14458)
this implements the exact same fix as the component in
`frontend/components/EnrollSecrets/SecretField/_styles.scss`

we should probably refactor the three different components we have:
`SecretField`, `InputFieldHiddenContent` and the ad-hoc component (which
has a TODO) we have inside `EnrollSecretRow`.

for now, adding the padding for #14416
2023-10-11 16:08:48 -03:00
RachelElysia
2ad6fb3603
Fleet UI: [unreleased bug] Fix info banner gap/padding issue (#14443) 2023-10-11 11:50:52 -04:00
RachelElysia
102f2af372
Fleet UI: [small fixes] Table horizontally scrolls, "Get help" is on one line (#14414) 2023-10-11 11:16:45 -04:00
Roberto Dip
9ffa11c25d
Feat: saved scripts (#14409)
For #9537
2023-10-10 19:00:45 -03:00
RachelElysia
c541409ba4
Fleet UI: Small fixes (e.g. hiding last_fetched filter, hide Edit query button for observers) (#14410) 2023-10-10 12:46:51 -04:00
Jacob Shandling
eb327faabf
maintenance merge of main into feature branch (#14393)
maintenance merge of `main` into feature branch
2023-10-09 14:28:35 -07:00
Marcos Oviedo
f0d77ab3db
Merging Bitlocker feature branch (#14350)
This relates to #12577

---------

Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: Roberto Dip <dip.jesusr@gmail.com>
2023-10-06 19:04:33 -03:00