1414 * limitations under the License.
1515 */
1616
17- import { Dispatch , SetStateAction } from 'react'
1817import { MultiValue } from 'react-select'
1918
2019import {
2120 ACTION_STATE ,
2221 AppInfoListType ,
23- ApprovalConfigDataType ,
24- CDModalTabType ,
2522 CIMaterialType ,
2623 CommonNodeAttr ,
2724 DeploymentNodeType ,
28- DeploymentStrategyTypeWithDefault ,
29- FilterConditionsListType ,
3025 GVKType ,
3126 MODAL_TYPE ,
3227 OptionType ,
33- PipelineIdsVsDeploymentStrategyMap ,
3428 ResponseType ,
3529 RuntimePluginVariables ,
3630 ServerErrors ,
31+ TriggerBlockedInfo ,
3732 UseUrlFiltersReturnType ,
38- WorkflowNodeType ,
3933 WorkflowType ,
4034} from '@devtron-labs/devtron-fe-common-lib'
4135
4236import { GitInfoMaterialProps } from '@Components/app/details/triggerView/BuildImageModal/types'
43- import { CDMaterialProps , RuntimeParamsErrorState } from '@Components/app/details/triggerView/types'
37+ import { DeployImageContentProps } from '@Components/app/details/triggerView/DeployImageModal /types'
4438import {
4539 AppConfigState ,
4640 EnvConfigurationsNavProps ,
@@ -72,35 +66,40 @@ export interface BulkCIDetailType extends BulkTriggerAppDetailType {
7266 ignoreCache : boolean
7367}
7468
69+ export type BulkCDDetailDerivedFromNode = Required <
70+ Pick <
71+ DeployImageContentProps ,
72+ | 'pipelineId'
73+ | 'appId'
74+ | 'parentEnvironmentName'
75+ | 'isTriggerBlockedDueToPlugin'
76+ | 'configurePluginURL'
77+ | 'triggerType'
78+ | 'appName'
79+ >
80+ > & {
81+ stageNotAvailable : boolean
82+ errorMessage : string
83+ triggerBlockedInfo : TriggerBlockedInfo
84+ consequence : CommonNodeAttr [ 'pluginBlockState' ]
85+ showPluginWarning : CommonNodeAttr [ 'showPluginWarning' ]
86+ }
87+
88+ export type BulkCDDetailType = BulkCDDetailDerivedFromNode &
89+ Pick < DeployImageContentProps , 'materialResponse' | 'deploymentWindowMetadata' | 'deployViewState' > & {
90+ /**
91+ * True in cases when we reload materials on single app
92+ */
93+ areMaterialsLoading : boolean
94+ materialError : ServerErrors | null
95+ tagsWarningMessage : string
96+ }
97+
7598export interface BulkCDDetailTypeResponse {
7699 bulkCDDetailType : BulkCDDetailType [ ]
77100 uniqueReleaseTags : string [ ]
78101}
79102
80- export interface BulkCDDetailType
81- extends BulkTriggerAppDetailType ,
82- Pick < CDMaterialProps , 'isTriggerBlockedDueToPlugin' | 'configurePluginURL' | 'consequence' > ,
83- Partial < Pick < CommonNodeAttr , 'showPluginWarning' | 'triggerBlockedInfo' > > {
84- workFlowId : string
85- cdPipelineName ?: string
86- cdPipelineId ?: string
87- stageType ?: DeploymentNodeType
88- triggerType ?: string
89- envName : string
90- envId : number
91- parentPipelineId ?: string
92- parentPipelineType ?: WorkflowNodeType
93- parentEnvironmentName ?: string
94- approvalConfigData ?: ApprovalConfigDataType
95- requestedUserId ?: number
96- appReleaseTags ?: string [ ]
97- tagsEditable ?: boolean
98- ciPipelineId ?: number
99- hideImageTaggingHardDelete ?: boolean
100- resourceFilters ?: FilterConditionsListType [ ]
101- isExceptionUser ?: boolean
102- }
103-
104103export type TriggerVirtualEnvResponseRowType =
105104 | {
106105 isVirtual : true
@@ -122,45 +121,6 @@ export type ResponseRowType = {
122121 envId ?: number
123122} & TriggerVirtualEnvResponseRowType
124123
125- interface BulkRuntimeParamsType {
126- runtimeParams : Record < string , RuntimePluginVariables [ ] >
127- setRuntimeParams : React . Dispatch < React . SetStateAction < Record < string , RuntimePluginVariables [ ] > > >
128- runtimeParamsErrorState : Record < string , RuntimeParamsErrorState >
129- setRuntimeParamsErrorState : React . Dispatch < React . SetStateAction < Record < string , RuntimeParamsErrorState > > >
130- }
131-
132- export interface BulkCDTriggerType extends BulkRuntimeParamsType {
133- stage : DeploymentNodeType
134- appList : BulkCDDetailType [ ]
135- closePopup : ( e ) => void
136- updateBulkInputMaterial : ( materialList : Record < string , any > ) => void
137- onClickTriggerBulkCD : (
138- skipIfHibernated : boolean ,
139- pipelineIdVsStrategyMap : PipelineIdsVsDeploymentStrategyMap ,
140- appsToRetry ?: Record < string , boolean > ,
141- ) => void
142- changeTab ?: (
143- materrialId : string | number ,
144- artifactId : number ,
145- tab : CDModalTabType ,
146- selectedCDDetail ?: { id : number ; type : DeploymentNodeType } ,
147- ) => void
148- toggleSourceInfo ?: ( materialIndex : number , selectedCDDetail ?: { id : number ; type : DeploymentNodeType } ) => void
149- selectImage ?: (
150- index : number ,
151- materialType : string ,
152- selectedCDDetail ?: { id : number ; type : DeploymentNodeType } ,
153- ) => void
154- responseList : ResponseRowType [ ]
155- isLoading : boolean
156- setLoading : React . Dispatch < React . SetStateAction < boolean > >
157- isVirtualEnv ?: boolean
158- uniqueReleaseTags : string [ ]
159- feasiblePipelineIds : Set < number >
160- bulkDeploymentStrategy : DeploymentStrategyTypeWithDefault
161- setBulkDeploymentStrategy : Dispatch < SetStateAction < DeploymentStrategyTypeWithDefault > >
162- }
163-
164124export interface ProcessWorkFlowStatusType {
165125 cicdInProgress : boolean
166126 workflows : WorkflowType [ ]
@@ -194,15 +154,11 @@ export interface TriggerResponseModalBodyProps {
194154
195155type RetryFailedType =
196156 | {
197- onClickRetryDeploy : BulkCDTriggerType [ 'onClickTriggerBulkCD' ]
198- skipHibernatedApps : boolean
199- pipelineIdVsStrategyMap : PipelineIdsVsDeploymentStrategyMap
157+ onClickRetryDeploy : ( appsToRetry : Record < string , boolean > ) => void
200158 onClickRetryBuild ?: never
201159 }
202160 | {
203161 onClickRetryDeploy ?: never
204- skipHibernatedApps ?: never
205- pipelineIdVsStrategyMap ?: never
206162 onClickRetryBuild : ( appsToRetry : Record < string , boolean > ) => void
207163 }
208164
@@ -216,11 +172,6 @@ export interface TriggerModalRowType {
216172 isVirtualEnv ?: boolean
217173}
218174
219- export interface WorkflowNodeSelectionType {
220- id : number
221- name : string
222- type : WorkflowNodeType
223- }
224175export interface WorkflowAppSelectionType {
225176 id : number
226177 name : string
0 commit comments