UI – Team-level host expiry setting (#16276)

## ➡️ #15965 

Without global setting:

![Screenshot-2024-01-24-at-12035PM(1)](https://github.com/fleetdm/fleet/assets/61553566/a98007a4-21b2-4f55-84e3-f58cf529af43)

With global setting:

![Screenshot-2024-01-24-at-12925PM(1)](https://github.com/fleetdm/fleet/assets/61553566/e6d20038-d2c2-4f75-a82e-3d4c0c8cb1fd)

 
- [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>
Co-authored-by: Sharon Katz <121527325+sharon-fdm@users.noreply.github.com>
This commit is contained in:
Jacob Shandling
2024-01-25 18:19:49 +00:00
committed by GitHub
co-authored by Jacob Shandling Sharon Katz
parent aa60187aa1
commit 7550fd69fa
23 changed files with 459 additions and 39 deletions
+17 -10
View File
@@ -325,16 +325,6 @@ Below are a few need-to-knows about what's available in Fleet's CSS:
1) When creating a form, **not** in a modal, use the class `${baseClass}__button-wrap` for the
action buttons (cancel, save, delete, etc.) and proceed to style as needed.
## Other
### Local states
Our first line of defense for state management is local states (i.e. `useState`). We
use local states to keep pages/components separate from one another and easy to
maintain. If states need to be passed to direct children, then prop-drilling should
suffice as long as we do not go more than two levels deep. Otherwise, if states need
to be used across multiple unrelated components or 3+ levels from a parent,
then the [app's context](#react-context) should be used.
## Icons and Images
@@ -364,3 +354,20 @@ The icon should now be available to use with the `Icon` component from the given
The recommend line limit per page/component is 500 lines. This is only a recommendation.
Larger files are to be split into multiple files if possible.
## Other
### Local states
Our first line of defense for state management is local states (i.e. `useState`). We
use local states to keep pages/components separate from one another and easy to
maintain. If states need to be passed to direct children, then prop-drilling should
suffice as long as we do not go more than two levels deep. Otherwise, if states need
to be used across multiple unrelated components or 3+ levels from a parent,
then the [app's context](#react-context) should be used.
### Reading and updating configs
If you are dealing with a page that *updates* any kind of config, you'll want to access that config
with a fresh API call to be sure you have the updated values. Otherwise, that is, you are dealing
with a page that is only *reading* config values, get them from context.