File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
src/Pages/GlobalConfigurations/BuildInfra Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ const useBuildInfraForm = ({
284
284
name,
285
285
editProfile,
286
286
handleSuccessRedirection,
287
- canConfigureUseK8sDriver,
287
+ canConfigureUseK8sDriver = false ,
288
288
} : UseBuildInfraFormProps ) : UseBuildInfraFormResponseType => {
289
289
const fromCreateView = ! name
290
290
@@ -336,6 +336,11 @@ const useBuildInfraForm = ({
336
336
const lastSavedConfiguration = profileResponse . profile . configurations [ targetPlatform ] || currentConfiguration
337
337
338
338
switch ( action ) {
339
+ case BuildInfraProfileInputActionType . TOGGLE_USE_K8S_DRIVER : {
340
+ currentInput . useK8sDriver = ! currentInput . useK8sDriver
341
+ break
342
+ }
343
+
339
344
case BuildInfraMetaConfigTypes . DESCRIPTION : {
340
345
const { value } = data
341
346
currentInput . description = value
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ export interface UseBuildInfraFormProps {
264
264
/**
265
265
* @default - false
266
266
*/
267
- canConfigureUseK8sDriver : boolean
267
+ canConfigureUseK8sDriver ? : boolean
268
268
}
269
269
270
270
export interface GetBuildInfraProfileType extends Pick < UseBuildInfraFormProps , 'canConfigureUseK8sDriver' > {
@@ -327,6 +327,7 @@ interface NumericBuildInfraConfigPayloadType {
327
327
328
328
export enum BuildInfraProfileInputActionType {
329
329
ADD_TARGET_PLATFORM = 'add_target_platform' ,
330
+ TOGGLE_USE_K8S_DRIVER = 'toggle_use_k8s_driver' ,
330
331
REMOVE_TARGET_PLATFORM = 'remove_target_platform' ,
331
332
RENAME_TARGET_PLATFORM = 'rename_target_platform' ,
332
333
RESTORE_PROFILE_CONFIG_SNAPSHOT = 'restore_profile_config_snapshot' ,
@@ -341,6 +342,10 @@ export enum BuildInfraProfileInputActionType {
341
342
}
342
343
343
344
export type HandleProfileInputChangeType =
345
+ | {
346
+ action : BuildInfraProfileInputActionType . TOGGLE_USE_K8S_DRIVER
347
+ data ?: never
348
+ }
344
349
| {
345
350
action : NumericBuildInfraConfigTypes
346
351
data : ProfileInputDispatchDataType & NumericBuildInfraConfigPayloadType
You can’t perform that action at this time.
0 commit comments