= ({ isVertical, allowedSignals, sel
return (
-
+ {title && }
{monitors.map((monitor) => {
diff --git a/frontend/webapp/reuseable-components/textarea/index.tsx b/frontend/webapp/reuseable-components/textarea/index.tsx
index 435cb13dd..a69131c97 100644
--- a/frontend/webapp/reuseable-components/textarea/index.tsx
+++ b/frontend/webapp/reuseable-components/textarea/index.tsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { useRef } from 'react';
import { Text } from '../text';
import { FieldLabel } from '../field-label';
import styled, { css } from 'styled-components';
@@ -93,13 +93,27 @@ const ErrorMessage = styled(Text)`
margin-top: 4px;
`;
-const TextArea: React.FC = ({ errorMessage, title, tooltip, required, ...props }) => {
+const TextArea: React.FC = ({ errorMessage, title, tooltip, required, onChange, ...props }) => {
+ const ref = useRef(null);
+
return (
-
+ {
+ if (ref.current) {
+ // The following auto-resizes the textarea to the number of rows typed
+ ref.current.style.height = 'auto';
+ ref.current.style.height = `${ref.current.scrollHeight}px`;
+ }
+
+ onChange?.(e);
+ }}
+ {...props}
+ />
{errorMessage && (
diff --git a/frontend/webapp/store/useAppStore.ts b/frontend/webapp/store/useAppStore.ts
index 680a4eb2c..e3013f0bf 100644
--- a/frontend/webapp/store/useAppStore.ts
+++ b/frontend/webapp/store/useAppStore.ts
@@ -1,20 +1,22 @@
import { create } from 'zustand';
-import type { ConfiguredDestination, K8sActualSource } from '@/types';
+import type { ConfiguredDestination, DestinationInput, K8sActualSource } from '@/types';
export interface IAppState {
availableSources: { [key: string]: K8sActualSource[] };
configuredSources: { [key: string]: K8sActualSource[] };
configuredFutureApps: { [key: string]: boolean };
- configuredDestinations: ConfiguredDestination[];
+ configuredDestinations: { stored: ConfiguredDestination; form: DestinationInput }[];
}
interface IAppStateSetters {
setAvailableSources: (payload: IAppState['availableSources']) => void;
setConfiguredSources: (payload: IAppState['configuredSources']) => void;
setConfiguredFutureApps: (payload: IAppState['configuredFutureApps']) => void;
+
setConfiguredDestinations: (payload: IAppState['configuredDestinations']) => void;
- addConfiguredDestination: (payload: ConfiguredDestination) => void;
- resetSources: () => void;
+ addConfiguredDestination: (payload: { stored: ConfiguredDestination; form: DestinationInput }) => void;
+ removeConfiguredDestination: (payload: { type: string }) => void;
+
resetState: () => void;
}
@@ -27,10 +29,11 @@ const useAppStore = create((set) => ({
setAvailableSources: (payload) => set({ availableSources: payload }),
setConfiguredSources: (payload) => set({ configuredSources: payload }),
setConfiguredFutureApps: (payload) => set({ configuredFutureApps: payload }),
+
setConfiguredDestinations: (payload) => set({ configuredDestinations: payload }),
addConfiguredDestination: (payload) => set((state) => ({ configuredDestinations: [...state.configuredDestinations, payload] })),
+ removeConfiguredDestination: (payload) => set((state) => ({ configuredDestinations: state.configuredDestinations.filter(({ stored }) => stored.type !== payload.type) })),
- resetSources: () => set(() => ({ availableSources: {}, configuredSources: {}, configuredFutureApps: {} })),
resetState: () => set(() => ({ availableSources: {}, configuredSources: {}, configuredFutureApps: {}, configuredDestinations: [] })),
}));
diff --git a/frontend/webapp/styles/styled.tsx b/frontend/webapp/styles/styled.tsx
index bfc3ecf3e..891638cda 100644
--- a/frontend/webapp/styles/styled.tsx
+++ b/frontend/webapp/styles/styled.tsx
@@ -24,7 +24,6 @@ export const Overlay = styled.div`
export const ModalBody = styled.div`
width: 640px;
height: calc(100vh - 300px);
- margin: 0 7vw;
- padding-top: 64px;
+ margin: 64px 7vw 0 7vw;
overflow-y: scroll;
`;
diff --git a/frontend/webapp/types/destinations.ts b/frontend/webapp/types/destinations.ts
index 55850608b..4a83057fe 100644
--- a/frontend/webapp/types/destinations.ts
+++ b/frontend/webapp/types/destinations.ts
@@ -131,7 +131,6 @@ export interface DestinationConfig {
export interface ActualDestination {
id: string;
name: string;
- type: string;
exportedSignals: {
traces: boolean;
metrics: boolean;
diff --git a/frontend/webapp/utils/constants/string.tsx b/frontend/webapp/utils/constants/string.tsx
index c65eb8124..457bbfa68 100644
--- a/frontend/webapp/utils/constants/string.tsx
+++ b/frontend/webapp/utils/constants/string.tsx
@@ -29,6 +29,7 @@ export const ACTION = {
CREATE: 'Create',
UPDATE: 'Update',
DELETE: 'Delete',
+ FETCH: 'Fetch',
};
export const FORM_ALERTS = {