diff --git a/frontend/graph/schema.resolvers.go b/frontend/graph/schema.resolvers.go index 910c5273ff..983b6a2187 100644 --- a/frontend/graph/schema.resolvers.go +++ b/frontend/graph/schema.resolvers.go @@ -213,7 +213,6 @@ func (r *mutationResolver) TestConnectionForDestination(ctx context.Context, inp return nil, err } - // Assuming testconnection.TestConnection returns a struct with fields similar to res.Succeeded, res.StatusCode, etc. res := testconnection.TestConnection(ctx, configurer) if !res.Succeeded { return &model.TestConnectionResponse{ diff --git a/frontend/webapp/app/setup/styled.ts b/frontend/webapp/app/setup/styled.ts index 2f543a6448..a4d810aa6d 100644 --- a/frontend/webapp/app/setup/styled.ts +++ b/frontend/webapp/app/setup/styled.ts @@ -4,4 +4,8 @@ export const SideMenuWrapper = styled.div` position: absolute; left: 24px; top: 144px; + + @media (max-width: 1050px) { + display: none; + } `; diff --git a/frontend/webapp/containers/main/destinations/add-destination/connect-destination-modal-body/index.tsx b/frontend/webapp/containers/main/destinations/add-destination/connect-destination-modal-body/index.tsx index 498b58c321..eab788dee2 100644 --- a/frontend/webapp/containers/main/destinations/add-destination/connect-destination-modal-body/index.tsx +++ b/frontend/webapp/containers/main/destinations/add-destination/connect-destination-modal-body/index.tsx @@ -2,9 +2,12 @@ import React, { useEffect, useMemo, useState } from 'react'; import styled from 'styled-components'; import { SideMenu } from '@/components'; import { useQuery } from '@apollo/client'; -import { useConnectDestinationForm, useConnectEnv } from '@/hooks'; +import { useDispatch } from 'react-redux'; +import { addConfiguredDestination } from '@/store'; +import { TestConnection } from '../test-connection'; import { GET_DESTINATION_TYPE_DETAILS } from '@/graphql'; import { Body, Container, SideMenuWrapper } from '../styled'; +import { useConnectDestinationForm, useConnectEnv } from '@/hooks'; import { DynamicConnectDestinationFormFields } from '../dynamic-form-fields'; import { StepProps, @@ -22,9 +25,6 @@ import { NotificationNote, SectionTitle, } from '@/reuseable-components'; -import { addConfiguredDestination } from '@/store'; -import { useDispatch } from 'react-redux'; -import { TestConnection } from '../test-connection'; const SIDE_MENU_DATA: StepProps[] = [ { @@ -45,6 +45,11 @@ const FormContainer = styled.div` max-width: 500px; flex-direction: column; gap: 24px; + height: 443px; + overflow-y: auto; + padding-right: 16px; + box-sizing: border-box; + overflow: overlay; `; const NotificationNoteWrapper = styled.div` @@ -60,26 +65,27 @@ export function ConnectDestinationModalBody({ destination, onSubmitRef, }: ConnectDestinationModalBodyProps) { - const { data } = useQuery( - GET_DESTINATION_TYPE_DETAILS, - { - variables: { type: destination?.type }, - skip: !destination, - } - ); + const [formData, setFormData] = useState>({}); + const [destinationName, setDestinationName] = useState(''); + const [showConnectionError, setShowConnectionError] = useState(false); + const [dynamicFields, setDynamicFields] = useState([]); const [exportedSignals, setExportedSignals] = useState({ logs: false, metrics: false, traces: false, }); - const [showConnectionError, setShowConnectionError] = useState(false); - const [destinationName, setDestinationName] = useState(''); - const [dynamicFields, setDynamicFields] = useState([]); - const [formData, setFormData] = useState>({}); - const { buildFormDynamicFields } = useConnectDestinationForm(); - const { connectEnv } = useConnectEnv(); const dispatch = useDispatch(); + const { connectEnv } = useConnectEnv(); + const { buildFormDynamicFields } = useConnectDestinationForm(); + + const { data } = useQuery( + GET_DESTINATION_TYPE_DETAILS, + { + variables: { type: destination?.type }, + skip: !destination, + } + ); const monitors = useMemo(() => { if (!destination) return []; diff --git a/frontend/webapp/containers/main/destinations/add-destination/destinations-list/index.tsx b/frontend/webapp/containers/main/destinations/add-destination/destinations-list/index.tsx index 1d62f9bfd9..9d71e35beb 100644 --- a/frontend/webapp/containers/main/destinations/add-destination/destinations-list/index.tsx +++ b/frontend/webapp/containers/main/destinations/add-destination/destinations-list/index.tsx @@ -10,10 +10,12 @@ const Container = styled.div` align-items: flex-start; gap: 12px; align-self: stretch; - border-radius: 16px; - height: 100%; - max-height: 548px; + max-height: calc(100vh - 410px); overflow-y: auto; + + @media (height < 800px) { + max-height: calc(100vh - 400px); + } `; const ListItem = styled.div<{}>` diff --git a/frontend/webapp/containers/main/destinations/add-destination/dynamic-form-fields/index.tsx b/frontend/webapp/containers/main/destinations/add-destination/dynamic-form-fields/index.tsx index 196767bcf6..190be415da 100644 --- a/frontend/webapp/containers/main/destinations/add-destination/dynamic-form-fields/index.tsx +++ b/frontend/webapp/containers/main/destinations/add-destination/dynamic-form-fields/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { INPUT_TYPES } from '@/utils/constants/string'; -import { Dropdown, Input } from '@/reuseable-components'; +import { Dropdown, Input, TextArea } from '@/reuseable-components'; export function DynamicConnectDestinationFormFields({ fields, @@ -35,7 +35,13 @@ export function DynamicConnectDestinationFormFields({ case INPUT_TYPES.KEY_VALUE_PAIR: return
; case INPUT_TYPES.TEXTAREA: - return
; + return ( +