Skip to content

Commit 3365693

Browse files
committed
feat: add app name in cd button
1 parent 51b9b16 commit 3365693

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

src/components/app/details/appDetails/AppDetails.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ const Details: React.FC<DetailsType> = ({
746746
deploymentUserActionState={deploymentUserActionState}
747747
setHibernationPatchChartName={setHibernationPatchChartName}
748748
applications={applications}
749+
isResourceTreeReloading={isReloadResourceTreeInProgress}
749750
/>
750751
</div>
751752
{!loadingDetails && !loadingResourceTree && !appDetails?.deploymentAppDeleteRequest && (

src/components/app/details/appDetails/AppDetailsCDButton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const ApprovalMaterialModal = importComponentFromFELibrary('ApprovalMaterialModa
4444

4545
const AppDetailsCDButton = ({
4646
appId,
47+
appName,
4748
environmentId,
4849
cdModal,
4950
deploymentAppType,
@@ -94,7 +95,7 @@ const AppDetailsCDButton = ({
9495
text="Rollback"
9596
variant={ButtonVariantType.text}
9697
onClick={onClickDeployButton}
97-
size={ComponentSizeType.medium}
98+
size={ComponentSizeType.small}
9899
/>
99100
) : (
100101
<Button
@@ -152,6 +153,7 @@ const AppDetailsCDButton = ({
152153
isLoading={loadingDetails}
153154
isRedirectedFromAppDetails
154155
handleSuccess={handleSuccess}
156+
selectedAppName={appName}
155157
/>
156158
</div>
157159
</VisibleModal>

src/components/app/details/appDetails/SourceInfo.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export const SourceInfo = ({
8686
setHibernationPatchChartName,
8787
applications,
8888
isAppView,
89+
isResourceTreeReloading,
8990
}: SourceInfoType) => {
9091
const params = useParams<{ appId: string; envId?: string }>()
9192

@@ -171,6 +172,7 @@ export const SourceInfo = ({
171172
const renderAppDetailsCDButton = (isForRollback?: boolean) => (
172173
<AppDetailsCDButton
173174
appId={appDetails.appId}
175+
appName={appDetails.appName}
174176
environmentId={appDetails.environmentId}
175177
environmentName={appDetails.environmentName}
176178
isVirtualEnvironment={appDetails.isVirtualEnvironment}
@@ -445,6 +447,7 @@ export const SourceInfo = ({
445447
appName={appDetails.appName}
446448
envName={appDetails.environmentName}
447449
renderRollbackButton={() => renderAppDetailsCDButton(true)}
450+
isResourceTreeReloading={isResourceTreeReloading}
448451
/>
449452
)}
450453
{!appDetails?.deploymentAppDeleteRequest &&

src/components/app/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,7 @@ export interface SourceInfoType extends Pick<DetailsType, 'isAppView'>, Partial<
587587
filteredEnvIds?: string
588588
deploymentUserActionState?: ACTION_STATE
589589
setHibernationPatchChartName?: Dispatch<SetStateAction<string>>
590+
isResourceTreeReloading?: boolean
590591
}
591592

592593
export interface AppDetailsCDButtonType
@@ -599,6 +600,7 @@ export interface AppDetailsCDButtonType
599600
cdModal: CDModalProps
600601
isForEmptyState?: boolean
601602
isForRollback?: boolean
603+
appName?: string
602604
handleSuccess?: CDMaterialProps['handleSuccess']
603605
}
604606

0 commit comments

Comments
 (0)