forked from odigos-io/odigos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from BenElferink/gen-1515-dynamic-action-form
PR comments
- Loading branch information
Showing
21 changed files
with
354 additions
and
375 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
frontend/webapp/components/setup/destination/destination.card/destination.card.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 25 additions & 25 deletions
50
frontend/webapp/containers/main/actions/choose-action-body/action-custom-fields.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,68 @@ | ||
import styled from 'styled-components' | ||
import { InputList, KeyValueInputsList, Text } from '@/reuseable-components' | ||
import type { ActionsType } from '@/types' | ||
import styled from 'styled-components'; | ||
import { InputList, KeyValueInputsList, Text } from '@/reuseable-components'; | ||
import { ActionsType } from '@/types'; | ||
|
||
interface ActionCustomFieldsProps { | ||
actionType?: ActionsType | ||
value: any | ||
setValue: (value: any) => void | ||
actionType?: ActionsType; | ||
value: any; | ||
setValue: (value: any) => void; | ||
} | ||
|
||
const FieldWrapper = styled.div` | ||
width: 100%; | ||
margin: 8px 0; | ||
` | ||
`; | ||
|
||
const FieldTitle = styled(Text)` | ||
margin-bottom: 12px; | ||
` | ||
`; | ||
|
||
const ActionCustomFields: React.FC<ActionCustomFieldsProps> = ({ actionType, value, setValue }) => { | ||
switch (actionType) { | ||
case 'AddClusterInfo': | ||
case ActionsType.ADD_CLUSTER_INFO: | ||
return ( | ||
<FieldWrapper> | ||
<FieldTitle>Attributes to add</FieldTitle> | ||
<KeyValueInputsList required value={value} onChange={(arr) => setValue(arr)} /> | ||
</FieldWrapper> | ||
) | ||
); | ||
|
||
case 'DeleteAttribute': | ||
case ActionsType.DELETE_ATTRIBUTES: | ||
return ( | ||
<FieldWrapper> | ||
<FieldTitle>Attributes to delete</FieldTitle> | ||
<InputList required value={value} onChange={(arr) => setValue(arr)} /> | ||
</FieldWrapper> | ||
) | ||
); | ||
|
||
case 'RenameAttribute': | ||
case ActionsType.RENAME_ATTRIBUTES: | ||
return ( | ||
<FieldWrapper> | ||
<FieldTitle>Attributes to rename</FieldTitle> | ||
<KeyValueInputsList required value={value} onChange={(arr) => setValue(arr)} /> | ||
</FieldWrapper> | ||
) | ||
); | ||
|
||
case 'PiiMasking': | ||
case ActionsType.PII_MASKING: | ||
return ( | ||
<FieldWrapper> | ||
<FieldTitle>Attributes to mask</FieldTitle> | ||
<InputList required value={value} onChange={(arr) => setValue(arr)} /> | ||
</FieldWrapper> | ||
) | ||
); | ||
|
||
case 'ErrorSampler': | ||
return null | ||
case ActionsType.ERROR_SAMPLER: | ||
return null; | ||
|
||
case 'ProbabilisticSampler': | ||
return null | ||
case ActionsType.PROBABILISTIC_SAMPLER: | ||
return null; | ||
|
||
case 'LatencySampler': | ||
return null | ||
case ActionsType.LATENCY_SAMPLER: | ||
return null; | ||
|
||
default: | ||
return null | ||
return null; | ||
} | ||
} | ||
}; | ||
|
||
export default ActionCustomFields | ||
export default ActionCustomFields; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.