From 17aa3130adecbf5b3b8f3fe58b8735a6fbb0b96e Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Thu, 18 Jan 2024 22:41:59 +0530 Subject: [PATCH] feat: add reverse mapping of actions to locator --- src/Pages/GlobalConfigurations/BuildInfra/types.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Pages/GlobalConfigurations/BuildInfra/types.tsx b/src/Pages/GlobalConfigurations/BuildInfra/types.tsx index 5d38117cb..b2db79fbb 100644 --- a/src/Pages/GlobalConfigurations/BuildInfra/types.tsx +++ b/src/Pages/GlobalConfigurations/BuildInfra/types.tsx @@ -32,6 +32,14 @@ export enum BuildInfraLocators { BUILD_TIMEOUT = 'build_timeout', } +export const BuildInfraLocatorsActionMap = { + [BuildInfraConfigTypes.BUILD_TIMEOUT]: BuildInfraLocators.BUILD_TIMEOUT, + [BuildInfraConfigTypes.CPU_LIMIT]: BuildInfraLocators.CPU, + [BuildInfraConfigTypes.CPU_REQUEST]: BuildInfraLocators.CPU, + [BuildInfraConfigTypes.MEMORY_LIMIT]: BuildInfraLocators.MEMORY, + [BuildInfraConfigTypes.MEMORY_REQUEST]: BuildInfraLocators.MEMORY, +} + // FIXME: Derive this from BuildInfraLocators // Appending the locators from above export enum BuildInfraInheritActions { @@ -307,7 +315,7 @@ interface BaseBuildInfraProfileResponseType { } export interface BuildInfraListResponseType extends BaseBuildInfraProfileResponseType { - profiles: BuildInfraProfileConfigResponseDataType[] + profiles: BuildInfraProfileResponseDataType[] } export interface BuildInfraProfileAPIResponseType extends BaseBuildInfraProfileResponseType {