1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00
unleash.unleash/frontend/src/hooks
Thomas Heartman 04b2b488f6
chore(1-3133): change avg health to current health in project status (#8803)
This PR updates the project status service (and schemas and UI) to use
the project's current health instead of the 4-week average.

I nabbed the `calculateHealthRating` from
`src/lib/services/project-health-service.ts` instead of relying on the
service itself, because that service relies on the project service,
which relies on pretty much everything in the entire system.

However, I think we can split the health service into a service that
*does* need the project service (which is used for 1 of 3 methods) and a
service (or read model) that doesn't. We could then rely on the second
one for this service without too much overhead. Or we could extract the
`calculateHealthRating` into a shared function that takes its stores as
arguments. ... but I suggest doing that in a follow-up PR.

Because the calculation has been tested other places (especially if we
rely on a service / shared function for it), I've simplified the tests
to just verify that it's present.

I've changed the schema's `averageHealth` into an object in case we want
to include average health etc. in the future, but this is up for debate.
2024-11-20 11:41:45 +01:00
..
api chore(1-3133): change avg health to current health in project status (#8803) 2024-11-20 11:41:45 +01:00
useChangeRequestAddStrategy.ts
useChangeRequestInReviewWarning.tsx
useChangeRequestsEnabled.test.tsx
useChangeRequestsEnabled.ts
useChangeRequestToggle.ts
useClearSWRCache.test.ts
useClearSWRCache.ts
useCollaborateData.tsx
useConditionallyHiddenColumns.ts
useCustomEvent.ts
useDefaultProjectSettings.ts
useDragItem.ts
useEventSettings.ts
useFormErrors.ts
useGlobalLocalStorage.ts
useGlobalState.ts
useHasAccess.ts
useHiddenEnvironments.ts
useHighestPermissionChangeRequestEnvironment.test.ts
useHighestPermissionChangeRequestEnvironment.ts
useId.test.ts
useId.ts
useIsAppleDevice.ts
useKeyboardShortcut.ts
useLastViewedFlags.test.tsx
useLastViewedFlags.ts
useLastViewedProject.test.tsx
useLastViewedProject.ts
useLoading.ts [wip] add data to ui (#8710) 2024-11-12 11:35:42 +01:00
useLocalStorageState.test.tsx
useLocalStorageState.ts
useLocationSettings.ts
useOnBlur.test.tsx
useOnBlur.ts
useOnClickOutside.test.tsx
useOnClickOutside.ts
useOnVisible.ts
useOptionalPathParam.ts
usePageTitle.ts
usePagination.ts
usePersistentGlobalState.ts
usePersistentTableState.test.tsx
usePersistentTableState.ts
usePinnedFavorites.test.ts
usePinnedFavorites.ts
usePlausibleTracker.ts chore: list release templates in strategy popover (#8703) 2024-11-08 14:26:01 +00:00
useQueryParams.ts
useRecentlyVisited.test.tsx
useRecentlyVisited.ts
useRequiredPathParam.ts
useRequiredQueryParam.ts
useSearch.test.tsx
useSearch.ts
useStickinessOptions.ts
useSubmittedFeedback.ts feat: add project status feedback (#8764) 2024-11-15 10:51:00 +02:00
useTabs.ts
useThemeMode.ts
useToast.tsx
useTrafficData.test.ts
useTrafficData.ts
useUiFlag.ts
useUsersPlan.ts chore: PAYG billing (#8743) 2024-11-14 11:29:05 +00:00
useVariant.ts
useVirtualizedRange.ts
useWeakMap.ts