fleet/frontend/utilities
jacobshandling 91b9c4a107
Add host's next maintenance window to the hosts/{id} and hosts/identifier/{identifier} endpoints, and render that data on the host details page (#19820)
## Addresses full stack for  #18554 
- Add new `timezone` column to `calendar_events` table
- When fetched from Google's API, save calendar user's timezone in this
new column along with rest of event data
- Implement datastore method to retrieve the start time and timezone for
a host's next calendar event as a `HostMaintenanceWindow`
- Localize and add UTC offset to the `HostMaintenanceWindow`'s start
time according to its `timezone`
- Include the processed `HostMaintenanceWindow`, if present, in the
response to the `GET` `hosts/{id}` and `hosts/identifier/{identifier}`
endpoints
- Implement UI on the host details page to display this data
- Add new and update existing UI, core integration, datastore, and
`fleetctl` tests
- Update `date-fns` package to the latest version

<img width="1062" alt="Screenshot 2024-06-26 at 1 02 34 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/c3ddad97-23da-42c1-b4ed-b7615ec88aed">

# 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/`
- [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 database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Checked schema for all modified tables 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] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-06-28 10:51:13 -07:00
..
append_target_type_to_targets replaced old api calls with new version (#5254) 2022-04-20 10:45:32 -07:00
campaign_helpers update UI to react 18 (#17471) 2024-03-13 19:09:16 +00:00
convert_to_csv Fleet UI: Catch unlikely key edge case, test, refactor (#20015) 2024-06-26 12:24:11 -04:00
date_format Update UI for software self-service features (#19244) 2024-05-31 11:09:53 +01:00
debounce Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
deep_difference Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
file Update UI for MDM settings to support new macOS workflows (#19297) 2024-05-30 09:10:26 -05:00
format_api_errors Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
format_error_response Enhance error handling for UI sendRequest service (#14971) 2023-11-09 09:33:31 -06:00
generate_csv update UI to react 18 (#17471) 2024-03-13 19:09:16 +00:00
permissions Fleet UI: Hide CTA on inherited queries/policies from team level users, and related unexpected UI fixes (#19523) 2024-06-24 15:59:06 -04:00
simple_search Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
sort Add software details page (#6089) 2022-06-08 14:01:38 -05:00
strings Merge branch 'main' into 15919-vulnerabilities-page 2024-02-22 16:27:15 -06:00
url Update UI for software self-service features (#19244) 2024-05-31 11:09:53 +01:00
yaml Fleet Documentation: Update agent options and enrollment secret documentation (#9565) 2023-02-13 10:45:37 -05:00
constants.tsx Add host's next maintenance window to the hosts/{id} and hosts/identifier/{identifier} endpoints, and render that data on the host details page (#19820) 2024-06-28 10:51:13 -07:00
copy_text.ts update jest setup and move config to its own file (#8258) 2022-10-25 14:17:32 +01:00
endpoints.ts UI code cleanup and tests for self service feature (#19487) 2024-06-11 12:56:50 +01:00
helpers.tsx Fleet UI: Host details page > policies improvements (#19483) 2024-06-11 14:27:43 -04:00
local.ts UI – Refrain from clearing the auth_token and redirecting to login for errors specific to this scenario (#14911) 2023-11-03 08:32:41 -07:00
osquery_tables.ts Fleet UI: Platform compatibility checker hides unsupported osquery tables (#16435) 2024-01-30 10:31:06 -05:00
platform_icon_class.ts Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
software_install_scripts.ts adjust logic to get default scripts (#18719) 2024-05-06 11:41:31 -03:00
sql_tools.ts Fleet UI: Platform compatibility checker hides unsupported osquery tables (#16435) 2024-01-30 10:31:06 -05:00