diff --git a/frontend/webapp/components/overview/actions/actions.table/actions.table.row.tsx b/frontend/webapp/components/overview/actions/actions.table/actions.table.row.tsx index 8d89c227b..383712998 100644 --- a/frontend/webapp/components/overview/actions/actions.table/actions.table.row.tsx +++ b/frontend/webapp/components/overview/actions/actions.table/actions.table.row.tsx @@ -6,7 +6,7 @@ import styled, { css } from 'styled-components'; import { KeyvalCheckbox, KeyvalText } from '@/design.system'; import ActionRowDynamicContent from './action.row.dynamic.content'; import { TapList } from '@/components/setup/destination/tap.list/tap.list'; -import { MONITORING_OPTIONS } from '@/components/setup/destination/utils'; +import { MONITORING_OPTIONS } from '@/utils/constants/monitors'; import { ActionIcon } from '../action.icon'; const StyledTr = styled.tr` diff --git a/frontend/webapp/components/overview/destination/manage.destination.header/manage.destination.header.tsx b/frontend/webapp/components/overview/destination/manage.destination.header/manage.destination.header.tsx index fb221b83d..90bcb5abd 100644 --- a/frontend/webapp/components/overview/destination/manage.destination.header/manage.destination.header.tsx +++ b/frontend/webapp/components/overview/destination/manage.destination.header/manage.destination.header.tsx @@ -3,6 +3,7 @@ import styled from 'styled-components'; import { KeyvalImage, KeyvalText } from '@/design.system'; import theme from '@/styles/palette'; import { LinkIcon } from '@keyval-dev/design-system'; +import { DOCS_LINK } from '@/utils'; const ManageDestinationHeaderWrapper = styled.div` display: flex; @@ -10,11 +11,7 @@ const ManageDestinationHeaderWrapper = styled.div` align-items: center; border-radius: 25px; margin: 24px 0; - background: radial-gradient( - 78.09% 72.18% at 100% -0%, - rgba(150, 242, 255, 0.4) 0%, - rgba(150, 242, 255, 0) 61.91% - ), + background: radial-gradient(78.09% 72.18% at 100% -0%, rgba(150, 242, 255, 0.4) 0%, rgba(150, 242, 255, 0) 61.91%), linear-gradient(180deg, #2e4c55 0%, #303355 100%); `; @@ -27,9 +24,7 @@ const IMAGE_STYLE: React.CSSProperties = { marginLeft: 16, }; -export function ManageDestinationHeader({ - data: { image_url, display_name, type }, -}) { +export function ManageDestinationHeader({ data: { image_url, display_name, type } }) { return ( @@ -37,15 +32,9 @@ export function ManageDestinationHeader({ {display_name} -
- window.open(`https://docs.odigos.io/backends/${type}`, '_blank') - } - > +
window.open(`${DOCS_LINK}/backends/${type}`, '_blank')}> - find out more about {display_name} in{' '} - our docs + find out more about {display_name} in our docs
diff --git a/frontend/webapp/components/overview/destination/managed.destination.table/destinations.table.row.tsx b/frontend/webapp/components/overview/destination/managed.destination.table/destinations.table.row.tsx index 3112f6964..7963c7861 100644 --- a/frontend/webapp/components/overview/destination/managed.destination.table/destinations.table.row.tsx +++ b/frontend/webapp/components/overview/destination/managed.destination.table/destinations.table.row.tsx @@ -3,7 +3,7 @@ import theme from '@/styles/palette'; import { Destination } from '@/types'; import styled, { css } from 'styled-components'; import { KeyvalImage, KeyvalText } from '@/design.system'; -import { MONITORING_OPTIONS } from '@/components/setup/destination/utils'; +import { MONITORING_OPTIONS } from '@/utils/constants/monitors'; import { TapList } from '@/components/setup/destination/tap.list/tap.list'; import { ConditionCheck } from '@/components/common'; diff --git a/frontend/webapp/components/setup/destination/destination.card/destination.card.tsx b/frontend/webapp/components/setup/destination/destination.card/destination.card.tsx index 163416787..a8586dac7 100644 --- a/frontend/webapp/components/setup/destination/destination.card/destination.card.tsx +++ b/frontend/webapp/components/setup/destination/destination.card/destination.card.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; import { KeyvalCard, KeyvalImage, KeyvalText } from '@/design.system'; import { TapList } from '../tap.list/tap.list'; -import { MONITORING_OPTIONS } from '../utils'; +import { MONITORING_OPTIONS } from '../../../../utils/constants/monitors'; import { ApplicationNameWrapper, DestinationCardContentWrapper, diff --git a/frontend/webapp/containers/main/actions/choose-action-body/action-custom-fields.tsx b/frontend/webapp/containers/main/actions/choose-action-body/action-custom-fields.tsx index 7d782038c..c3c94f01b 100644 --- a/frontend/webapp/containers/main/actions/choose-action-body/action-custom-fields.tsx +++ b/frontend/webapp/containers/main/actions/choose-action-body/action-custom-fields.tsx @@ -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 = ({ actionType, value, setValue }) => { switch (actionType) { - case 'AddClusterInfo': + case ActionsType.ADD_CLUSTER_INFO: return ( Attributes to add setValue(arr)} /> - ) + ); - case 'DeleteAttribute': + case ActionsType.DELETE_ATTRIBUTES: return ( Attributes to delete setValue(arr)} /> - ) + ); - case 'RenameAttribute': + case ActionsType.RENAME_ATTRIBUTES: return ( Attributes to rename setValue(arr)} /> - ) + ); - case 'PiiMasking': + case ActionsType.PII_MASKING: return ( Attributes to mask setValue(arr)} /> - ) + ); - 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; diff --git a/frontend/webapp/containers/main/actions/choose-action-body/index.tsx b/frontend/webapp/containers/main/actions/choose-action-body/index.tsx index 4e2b20eef..6262974cf 100644 --- a/frontend/webapp/containers/main/actions/choose-action-body/index.tsx +++ b/frontend/webapp/containers/main/actions/choose-action-body/index.tsx @@ -1,41 +1,41 @@ -import React, { Fragment, useEffect, useMemo } from 'react' -import styled from 'styled-components' -import { CheckboxList, DocsButton, Input, Text, TextArea } from '@/reuseable-components' -import { MONITORING_OPTIONS } from '@/components/setup/destination/utils' -import { useActionFormData } from '@/hooks/actions/useActionFormData' -import ActionCustomFields from './action-custom-fields' -import { type ActionOption } from '../choose-action-modal/action-options' +import styled from 'styled-components'; +import React, { useEffect } from 'react'; +import ActionCustomFields from './action-custom-fields'; +import { useActionFormData } from '@/hooks/actions/useActionFormData'; +import { MONITORING_OPTIONS } from '@/utils/constants/monitors'; +import { type ActionOption } from '../choose-action-modal/action-options'; +import { CheckboxList, DocsButton, Input, Text, TextArea } from '@/reuseable-components'; const Description = styled(Text)` color: ${({ theme }) => theme.text.grey}; line-height: 150%; display: flex; -` +`; const FieldWrapper = styled.div` width: 100%; margin: 8px 0; -` +`; const FieldTitle = styled(Text)` margin-bottom: 12px; -` +`; interface ChooseActionContentProps { - action: ActionOption + action: ActionOption; } const ChooseActionBody: React.FC = ({ action }) => { - const { formData, handleFormChange, resetFormData, exportedSignals, setExportedSignals } = useActionFormData() + const { formData, handleFormChange, resetFormData, exportedSignals, setExportedSignals } = useActionFormData(); useEffect(() => { return () => { - resetFormData() - } - }, []) + resetFormData(); + }; + }, []); return ( - + <> {action.docsDescription} @@ -47,8 +47,8 @@ const ChooseActionBody: React.FC = ({ action }) => { monitors={MONITORING_OPTIONS} exportedSignals={exportedSignals} handleSignalChange={(id, val) => { - const found = MONITORING_OPTIONS.find((item) => item.id === id) - if (found) setExportedSignals((prev) => ({ ...prev, [found.type]: val })) + const found = MONITORING_OPTIONS.find((item) => item.id === id); + if (found) setExportedSignals((prev) => ({ ...prev, [found.type]: val })); }} /> @@ -72,8 +72,8 @@ const ChooseActionBody: React.FC = ({ action }) => { Notes