1
1
import { SortingOrder } from '@Common/Constants'
2
2
3
- import { ConfigMapSecretDataConfigDatumDTO , DeploymentTemplateDTO } from '@Shared/Services'
3
+ import {
4
+ AppEnvDeploymentConfigDTO ,
5
+ ConfigMapSecretDataConfigDatumDTO ,
6
+ DeploymentTemplateDTO ,
7
+ EnvResourceType ,
8
+ ManifestTemplateDTO ,
9
+ } from '@Shared/Services'
10
+
4
11
import { DeploymentHistoryDetail } from '../CICDHistory'
5
12
import { CollapsibleListConfig , CollapsibleListItem } from '../CollapsibleList'
6
13
import { SelectPickerProps } from '../SelectPicker'
@@ -45,6 +52,11 @@ export interface DeploymentConfigDiffNavigationCollapsibleItem
45
52
46
53
export interface DeploymentConfigDiffProps {
47
54
isLoading ?: boolean
55
+ errorConfig ?: {
56
+ error : boolean
57
+ code : number
58
+ reload : ( ) => void
59
+ }
48
60
configList : DeploymentConfigListItem [ ]
49
61
headerText ?: string
50
62
scrollIntoViewId ?: string
@@ -62,18 +74,31 @@ export interface DeploymentConfigDiffProps {
62
74
goBackURL ?: string
63
75
navHeading : string
64
76
navHelpText ?: string
77
+ tabConfig ?: {
78
+ tabs : {
79
+ value : string
80
+ href : string
81
+ } [ ]
82
+ onClick : ( tab : string ) => void
83
+ }
65
84
}
66
85
67
86
export interface DeploymentConfigDiffNavigationProps
68
87
extends Pick <
69
88
DeploymentConfigDiffProps ,
70
- 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText'
89
+ 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText' | 'tabConfig'
71
90
> { }
72
91
73
92
export interface DeploymentConfigDiffMainProps
74
93
extends Pick <
75
94
DeploymentConfigDiffProps ,
76
- 'isLoading' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig'
95
+ | 'isLoading'
96
+ | 'errorConfig'
97
+ | 'headerText'
98
+ | 'configList'
99
+ | 'scrollIntoViewId'
100
+ | 'selectorsConfig'
101
+ | 'sortingConfig'
77
102
> { }
78
103
79
104
export interface DeploymentConfigDiffAccordionProps extends Pick < CollapseProps , 'onTransitionEnd' > {
@@ -88,3 +113,18 @@ export interface DeploymentConfigDiffAccordionProps extends Pick<CollapseProps,
88
113
export type DiffHeadingDataType < DeploymentTemplate > = DeploymentTemplate extends true
89
114
? DeploymentTemplateDTO
90
115
: ConfigMapSecretDataConfigDatumDTO
116
+
117
+ export type AppEnvDeploymentConfigListParams < IsManifestView > = ( IsManifestView extends true
118
+ ? {
119
+ currentList : ManifestTemplateDTO
120
+ compareList : ManifestTemplateDTO
121
+ sortOrder ?: never
122
+ }
123
+ : {
124
+ currentList : AppEnvDeploymentConfigDTO
125
+ compareList : AppEnvDeploymentConfigDTO
126
+ sortOrder ?: SortingOrder
127
+ } ) & {
128
+ getNavItemHref : ( resourceType : EnvResourceType , resourceName : string ) => string
129
+ isManifestView ?: IsManifestView
130
+ }
0 commit comments