Skip to content

Commit c400d9b

Browse files
committed
feat: display text for deployments by exception users
1 parent c1962be commit c400d9b

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/Shared/Components/CICDHistory/Artifacts.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {
3636
useGetUserRoles,
3737
} from '../../../Common'
3838
import { EMPTY_STATE_STATUS } from '../../constants'
39+
import { Icon } from '../Icon'
3940
import { TargetPlatformBadgeList } from '../TargetPlatforms'
4041
import { TERMINAL_STATUS_MAP } from './constants'
4142
import { ArtifactType, CIListItemType } from './types'
@@ -84,6 +85,13 @@ export const CIListItem = ({
8485
</div>
8586
)}
8687

88+
{isDeploymentWithoutApproval && (
89+
<div className="w-100 bg__primary flex left dc__gap-6 px-12 pt-8 pb-7 border__secondary--bottom border__primary--top border__primary--left border__primary--right dc__top-radius-4">
90+
<Icon name="ic-lightning-fill" color="Y500" />
91+
<p className="m-0 fs-13 lh-20 cn-9">Deployed by an exception user</p>
92+
</div>
93+
)}
94+
8795
{headerMetaDataPresent &&
8896
renderCIListHeader &&
8997
renderCIListHeader({
@@ -93,12 +101,13 @@ export const CIListItem = ({
93101
appliedFiltersTimestamp,
94102
promotionApprovalMetadata,
95103
selectedEnvironmentName,
96-
isDeploymentWithoutApproval,
97104
})}
98105

99106
<div
100107
className={`dc__h-fit-content ci-artifact image-tag-parent-card bg__primary br-4 dc__border p-12 w-100 dc__mxw-800 ci-artifact--${type} ${
101-
headerMetaDataPresent && renderCIListHeader ? 'dc__no-top-radius dc__no-top-border' : ''
108+
(headerMetaDataPresent && renderCIListHeader) || isDeploymentWithoutApproval
109+
? 'dc__no-top-radius dc__no-top-border'
110+
: ''
102111
}`}
103112
data-testid="hover-on-report-artifact"
104113
>

src/Shared/Components/CICDHistory/types.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ export interface DeploymentDetailStepsType {
446446
renderDeploymentApprovalInfo: (userApprovalMetadata: UserApprovalMetadataType) => JSX.Element
447447
}
448448

449-
export interface RenderCIListHeaderProps extends Pick<History, 'isDeploymentWithoutApproval'> {
449+
export interface RenderCIListHeaderProps {
450450
userApprovalMetadata: UserApprovalMetadataType
451451
triggeredBy: string
452452
appliedFilters: FilterConditionsListType[]

0 commit comments

Comments
 (0)