1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-10 01:16:39 +02: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 chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useChangeRequestInReviewWarning.tsx chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useChangeRequestsEnabled.test.tsx chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useChangeRequestsEnabled.ts
useChangeRequestToggle.ts
useClearSWRCache.test.ts feat: introduce large cache for swr (#7470) 2024-06-28 10:44:35 +03:00
useClearSWRCache.ts feat: introduce large cache for swr (#7470) 2024-06-28 10:44:35 +03:00
useCollaborateData.tsx chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useConditionallyHiddenColumns.ts
useCustomEvent.ts feat: Recent flags (#7211) 2024-05-29 16:01:52 +02:00
useDefaultProjectSettings.ts refactor: replace useProject with useProjectOverview (#7087) 2024-05-20 15:15:24 +02:00
useDragItem.ts chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useEventSettings.ts chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useFormErrors.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useGlobalLocalStorage.ts
useGlobalState.ts chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useHasAccess.ts chore: useProject cleanup (#6700) 2024-03-27 10:28:43 +02:00
useHiddenEnvironments.ts
useHighestPermissionChangeRequestEnvironment.test.ts
useHighestPermissionChangeRequestEnvironment.ts chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useId.test.ts feat: upgrade from react v17 to v18 (#7265) 2024-06-11 13:59:52 +03:00
useId.ts
useIsAppleDevice.ts
useKeyboardShortcut.ts
useLastViewedFlags.test.tsx feat: Recent flags (#7211) 2024-05-29 16:01:52 +02:00
useLastViewedFlags.ts feat: Recent flags (#7211) 2024-05-29 16:01:52 +02:00
useLastViewedProject.test.tsx feat: Synced last viewed projects (#7208) 2024-05-29 12:58:14 +02:00
useLastViewedProject.ts feat: Recent flags (#7211) 2024-05-29 16:01:52 +02:00
useLoading.ts [wip] add data to ui (#8710) 2024-11-12 11:35:42 +01:00
useLocalStorageState.test.tsx feat: upgrade from react v17 to v18 (#7265) 2024-06-11 13:59:52 +03:00
useLocalStorageState.ts feat: Persist navigation settings (#7144) 2024-05-24 13:21:12 +02:00
useLocationSettings.ts chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useOnBlur.test.tsx
useOnBlur.ts
useOnClickOutside.test.tsx
useOnClickOutside.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useOnVisible.ts
useOptionalPathParam.ts
usePageTitle.ts
usePagination.ts poc: many strategies pagination (#7011) 2024-05-08 14:20:51 +02:00
usePersistentGlobalState.ts chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
usePersistentTableState.test.tsx feat: projects list sorting (#8011) 2024-08-29 15:43:16 +02:00
usePersistentTableState.ts feat: projects list sorting (#8011) 2024-08-29 15:43:16 +02:00
usePinnedFavorites.test.ts chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
usePinnedFavorites.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
usePlausibleTracker.ts chore: list release templates in strategy popover (#8703) 2024-11-08 14:26:01 +00:00
useQueryParams.ts
useRecentlyVisited.test.tsx chore: fix "key" prop issues in front end tests (#8459) 2024-10-16 14:57:43 +02:00
useRecentlyVisited.ts feat: move recording recently visited into separate component (#7494) 2024-07-01 10:35:02 +02:00
useRequiredPathParam.ts
useRequiredQueryParam.ts feat: add new feature strategy create/edit pages (#739) 2022-03-09 14:59:24 +01:00
useSearch.test.tsx chore: rename toggle to flag #1 (#7092) 2024-05-21 15:18:00 +03:00
useSearch.ts task: upgraded semver dependency (and biome) (#7272) 2024-06-04 15:01:43 +02:00
useStickinessOptions.ts support setting mode and stickiness in new project form (#6972) 2024-05-03 07:27:13 +02:00
useSubmittedFeedback.ts feat: add project status feedback (#8764) 2024-11-15 10:51:00 +02:00
useTabs.ts
useThemeMode.ts chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useToast.tsx chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useTrafficData.test.ts fix: traffic estimate should Math.floor price estimate to full million (#8468) 2024-10-17 09:45:45 +02:00
useTrafficData.ts fix: traffic estimate should Math.floor price estimate to full million (#8468) 2024-10-17 09:45:45 +02:00
useUiFlag.ts
useUsersPlan.ts chore: PAYG billing (#8743) 2024-11-14 11:29:05 +00:00
useVariant.ts chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
useVirtualizedRange.ts
useWeakMap.ts