From 77394a074c554d6fa1c2808ad96221acafc11388 Mon Sep 17 00:00:00 2001 From: Miguel Crespo Date: Thu, 31 Oct 2024 11:51:25 +0000 Subject: [PATCH 1/3] reload button --- .../components/ServiceLane/ServiceLane.scss | 4 ++++ .../ui/components/ServiceLane/ServiceLane.tsx | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/services/frontend-service/src/ui/components/ServiceLane/ServiceLane.scss b/services/frontend-service/src/ui/components/ServiceLane/ServiceLane.scss index 6a338132c..a6e75fc75 100644 --- a/services/frontend-service/src/ui/components/ServiceLane/ServiceLane.scss +++ b/services/frontend-service/src/ui/components/ServiceLane/ServiceLane.scss @@ -121,4 +121,8 @@ Copyright freiheit.com*/ .service-lane__date { padding-right: 2px; } + .servicelane__reload { + font-size: xx-large; + } + } diff --git a/services/frontend-service/src/ui/components/ServiceLane/ServiceLane.tsx b/services/frontend-service/src/ui/components/ServiceLane/ServiceLane.tsx index 85e28a6e5..57efdf87f 100644 --- a/services/frontend-service/src/ui/components/ServiceLane/ServiceLane.tsx +++ b/services/frontend-service/src/ui/components/ServiceLane/ServiceLane.tsx @@ -21,6 +21,7 @@ import { getAppDetails, showSnackbarError, showSnackbarWarn, + updateAppDetails, useAppDetailsForApp, useCurrentlyExistsAtGroup, useMinorsForApp, @@ -38,6 +39,7 @@ import { EnvSelectionDialog } from '../SelectionDialog/SelectionDialogs'; import { AuthHeader, useAzureAuthSub } from '../../utils/AzureAuthProvider'; import { SmallSpinner } from '../Spinner/Spinner'; import { FormattedDate } from '../FormattedDate/FormattedDate'; +import { Button } from '../button'; // number of releases on home. based on design // we could update this dynamically based on viewport width @@ -279,6 +281,15 @@ export const ReadyServiceLane: React.FC<{ }, [application.name, envs] ); + const onReload = useCallback(() => { + const details = updateAppDetails.get(); + details[application.name] = { + details: undefined, + appDetailState: AppDetailsState.NOTREQUESTED, + updatedAt: new Date(Date.now()), + }; + updateAppDetails.set(details); + }, [application.name]); const buttons: DotsMenuButton[] = [ { label: 'View History', @@ -316,6 +327,16 @@ export const ReadyServiceLane: React.FC<{ /> ); + const reloadButton = ( +