Skip to content

Commit d3bd35f

Browse files
committed
Merge branch 'feat/plugin-policy' into feat/ci-pipeline-mandatory-plugins
2 parents 592f0c8 + fdfebbb commit d3bd35f

File tree

4 files changed

+30
-16
lines changed

4 files changed

+30
-16
lines changed

src/Common/Policy.Types.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,18 @@ export enum ConsequenceAction {
112112
ALLOW_FOREVER = 'ALLOW_FOREVER',
113113
}
114114

115-
export interface ConsequenceType {
116-
action: ConsequenceAction
117-
metadataField: string
118-
}
115+
export type ConsequenceType =
116+
| {
117+
action: Exclude<ConsequenceAction, ConsequenceAction.ALLOW_UNTIL_TIME>
118+
metadataField?: never | null
119+
}
120+
| {
121+
action: ConsequenceAction.ALLOW_UNTIL_TIME
122+
/**
123+
* Denotes the time till which the policy enforcement is relaxed
124+
*/
125+
metadataField: string
126+
}
119127

120128
export interface BlockedStateData {
121129
isOffendingMandatoryPlugin: boolean

src/Common/Types.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,15 @@ import React, { ReactNode, CSSProperties, ReactElement } from 'react'
1818
import { Placement } from 'tippy.js'
1919
import { UserGroupDTO } from '@Pages/GlobalConfigurations'
2020
import { ImageComment, ReleaseTag } from './ImageTags.Types'
21-
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.'
2221
import { MandatoryPluginBaseStateType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared'
22+
import {
23+
ACTION_STATE,
24+
ConsequenceType,
25+
DEPLOYMENT_WINDOW_TYPE,
26+
DockerConfigOverrideType,
27+
SortingOrder,
28+
TaskErrorObj,
29+
} from '.'
2330

2431
/**
2532
* Generic response type object with support for overriding the result type
@@ -450,12 +457,12 @@ export interface ArtifactReleaseMappingType {
450457
}
451458

452459
export interface CDMaterialListModalServiceUtilProps {
453-
artifacts: any[],
454-
offset: number,
455-
artifactId?: number,
456-
artifactStatus?: string,
457-
disableDefaultSelection?: boolean,
458-
userApprovalConfig?: UserApprovalConfigType,
460+
artifacts: any[]
461+
offset: number
462+
artifactId?: number
463+
artifactStatus?: string
464+
disableDefaultSelection?: boolean
465+
userApprovalConfig?: UserApprovalConfigType
459466
}
460467

461468
export interface CDMaterialType {

src/Shared/Components/FilterChips/FilterChips.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const FilterChip = ({
4545
<span className="dc__divider h-24" />
4646
</>
4747
)}
48-
<Tooltip content={valueToDisplay} showOnTruncate>
48+
<Tooltip content={valueToDisplay}>
4949
<span className="dc__ellipsis-right dc__word-break dc__mxw-150">{valueToDisplay}</span>
5050
</Tooltip>
5151
{showRemoveIcon && (

src/Shared/Components/SelectPicker/common.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,8 @@ export const SelectPickerOption = <OptionValue, IsMulti extends boolean>({
170170
/>
171171
)}
172172
<div className={`flex left ${showDescription ? 'top' : ''} dc__gap-8`}>
173-
{/* startIcon is not to be shown in option in case of multi select */}
174-
{!isMulti && startIcon && (
175-
<div className="dc__no-shrink icon-dim-20 flex dc__fill-available-space">{startIcon}</div>
173+
{startIcon && (
174+
<div className="dc__no-shrink icon-dim-16 flex dc__fill-available-space">{startIcon}</div>
176175
)}
177176
<div className="flex-grow-1">
178177
<h4 className={`m-0 fs-13 ${isCreatableOption ? 'cb-5' : 'cn-9'} fw-4 lh-20 dc__truncate`}>
@@ -191,7 +190,7 @@ export const SelectPickerOption = <OptionValue, IsMulti extends boolean>({
191190
))}
192191
</div>
193192
{endIcon && (
194-
<div className="dc__no-shrink icon-dim-20 flex dc__fill-available-space">{endIcon}</div>
193+
<div className="dc__no-shrink icon-dim-16 flex dc__fill-available-space">{endIcon}</div>
195194
)}
196195
</div>
197196
</div>

0 commit comments

Comments
 (0)