Skip to content

Commit

Permalink
feat: add reverse mapping of actions to locator
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhishekA1509 committed Jan 18, 2024
1 parent 5079acc commit 17aa313
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Pages/GlobalConfigurations/BuildInfra/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -307,7 +315,7 @@ interface BaseBuildInfraProfileResponseType {
}

export interface BuildInfraListResponseType extends BaseBuildInfraProfileResponseType {
profiles: BuildInfraProfileConfigResponseDataType[]
profiles: BuildInfraProfileResponseDataType[]
}

export interface BuildInfraProfileAPIResponseType extends BaseBuildInfraProfileResponseType {
Expand Down

0 comments on commit 17aa313

Please sign in to comment.