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,29 @@ export interface DeploymentConfigDiffProps {
62
74
goBackURL ?: string
63
75
navHeading : string
64
76
navHelpText ?: string
77
+ tabConfig ?: {
78
+ tabs : string [ ]
79
+ activeTab : string
80
+ onClick : ( tab : string ) => void
81
+ }
65
82
}
66
83
67
84
export interface DeploymentConfigDiffNavigationProps
68
85
extends Pick <
69
86
DeploymentConfigDiffProps ,
70
- 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText'
87
+ 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText' | 'tabConfig'
71
88
> { }
72
89
73
90
export interface DeploymentConfigDiffMainProps
74
91
extends Pick <
75
92
DeploymentConfigDiffProps ,
76
- 'isLoading' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig'
93
+ | 'isLoading'
94
+ | 'errorConfig'
95
+ | 'headerText'
96
+ | 'configList'
97
+ | 'scrollIntoViewId'
98
+ | 'selectorsConfig'
99
+ | 'sortingConfig'
77
100
> { }
78
101
79
102
export interface DeploymentConfigDiffAccordionProps extends Pick < CollapseProps , 'onTransitionEnd' > {
@@ -88,3 +111,18 @@ export interface DeploymentConfigDiffAccordionProps extends Pick<CollapseProps,
88
111
export type DiffHeadingDataType < DeploymentTemplate > = DeploymentTemplate extends true
89
112
? DeploymentTemplateDTO
90
113
: ConfigMapSecretDataConfigDatumDTO
114
+
115
+ export type AppEnvDeploymentConfigListParams < IsManifestView > = ( IsManifestView extends true
116
+ ? {
117
+ currentList : ManifestTemplateDTO
118
+ compareList : ManifestTemplateDTO
119
+ sortOrder ?: never
120
+ }
121
+ : {
122
+ currentList : AppEnvDeploymentConfigDTO
123
+ compareList : AppEnvDeploymentConfigDTO
124
+ sortOrder ?: SortingOrder
125
+ } ) & {
126
+ getNavItemHref : ( resourceType : EnvResourceType , resourceName : string ) => string
127
+ isManifestView ?: IsManifestView
128
+ }
0 commit comments