diff --git a/web/src/components/AnalyzerResult/AnalyzerResult.styled.ts b/web/src/components/AnalyzerResult/AnalyzerResult.styled.ts
index 979d1f69c1..59f095103e 100644
--- a/web/src/components/AnalyzerResult/AnalyzerResult.styled.ts
+++ b/web/src/components/AnalyzerResult/AnalyzerResult.styled.ts
@@ -50,7 +50,7 @@ export const RuleContainer = styled.div`
border-bottom: ${({theme}) => `1px dashed ${theme.color.borderLight}`};
padding-bottom: 16px;
margin-bottom: 16px;
- margin-left: 32px;
+ margin-left: 43px;
`;
export const RuleHeader = styled.div`
diff --git a/web/src/components/Settings/DataStoreDocsBanner/DataStoreDocsBanner.styled.ts b/web/src/components/DocsBanner/DocsBanner.styled.ts
similarity index 86%
rename from web/src/components/Settings/DataStoreDocsBanner/DataStoreDocsBanner.styled.ts
rename to web/src/components/DocsBanner/DocsBanner.styled.ts
index 27f0a6c7ca..d1820112d7 100644
--- a/web/src/components/Settings/DataStoreDocsBanner/DataStoreDocsBanner.styled.ts
+++ b/web/src/components/DocsBanner/DocsBanner.styled.ts
@@ -1,7 +1,7 @@
import { Typography } from 'antd';
import styled from 'styled-components';
-export const DataStoreDocsBannerContainer = styled.div`
+export const DocsBannerContainer = styled.div`
display: flex;
gap: 8px;
align-items: center;
diff --git a/web/src/components/DocsBanner/DocsBanner.tsx b/web/src/components/DocsBanner/DocsBanner.tsx
new file mode 100644
index 0000000000..5c7e786052
--- /dev/null
+++ b/web/src/components/DocsBanner/DocsBanner.tsx
@@ -0,0 +1,13 @@
+import {ReadOutlined} from '@ant-design/icons';
+import * as S from './DocsBanner.styled';
+
+const DocsBanner: React.FC = ({children}) => {
+ return (
+
+
+ {children}
+
+ );
+};
+
+export default DocsBanner;
diff --git a/web/src/components/DocsBanner/index.ts b/web/src/components/DocsBanner/index.ts
new file mode 100644
index 0000000000..bb0cd26b27
--- /dev/null
+++ b/web/src/components/DocsBanner/index.ts
@@ -0,0 +1,2 @@
+// eslint-disable-next-line no-restricted-exports
+export {default} from './DocsBanner';
diff --git a/web/src/components/Settings/DataStoreDocsBanner/DataStoreDocsBanner.tsx b/web/src/components/Settings/DataStoreDocsBanner/DataStoreDocsBanner.tsx
index 5e3993a376..6d6b34851a 100644
--- a/web/src/components/Settings/DataStoreDocsBanner/DataStoreDocsBanner.tsx
+++ b/web/src/components/Settings/DataStoreDocsBanner/DataStoreDocsBanner.tsx
@@ -1,7 +1,6 @@
-import {ReadOutlined} from '@ant-design/icons';
import {SupportedDataStoresToDocsLink, SupportedDataStoresToName} from 'constants/DataStore.constants';
import {SupportedDataStores} from 'types/DataStore.types';
-import * as S from './DataStoreDocsBanner.styled';
+import DocsBanner from 'components/DocsBanner/DocsBanner';
interface IProps {
dataStoreType: SupportedDataStores;
@@ -9,15 +8,12 @@ interface IProps {
const DataStoreDocsBanner = ({dataStoreType}: IProps) => {
return (
-
-
-
- Need more information about setting up {SupportedDataStoresToName[dataStoreType]}?{' '}
-
- Go to our docs
-
-
-
+
+ Need more information about setting up {SupportedDataStoresToName[dataStoreType]}?{' '}
+
+ Go to our docs
+
+
);
};
diff --git a/web/src/components/Settings/DataStoreForm/DataStoreForm.styled.ts b/web/src/components/Settings/DataStoreForm/DataStoreForm.styled.ts
index 8cc7902b6c..dfc940b94e 100644
--- a/web/src/components/Settings/DataStoreForm/DataStoreForm.styled.ts
+++ b/web/src/components/Settings/DataStoreForm/DataStoreForm.styled.ts
@@ -78,13 +78,6 @@ export const Title = styled(Typography.Title)`
}
`;
-export const Explanation = styled(Typography.Text)`
- && {
- color: ${({theme}) => theme.color.textSecondary};
- font-size: ${({theme}) => theme.size.md};
- }
-`;
-
export const Description = styled(Typography.Text)`
&& {
color: ${({theme}) => theme.color.textSecondary};
diff --git a/web/src/components/Settings/DataStoreForm/DataStoreForm.tsx b/web/src/components/Settings/DataStoreForm/DataStoreForm.tsx
index 203be9b9eb..9783f74dfa 100644
--- a/web/src/components/Settings/DataStoreForm/DataStoreForm.tsx
+++ b/web/src/components/Settings/DataStoreForm/DataStoreForm.tsx
@@ -2,9 +2,8 @@ import {Button, Form} from 'antd';
import {useCallback, useEffect, useMemo} from 'react';
import DataStoreService from 'services/DataStore.service';
import {TDraftDataStore, TDataStoreForm, SupportedDataStores} from 'types/DataStore.types';
-import {SupportedDataStoresToExplanation, SupportedDataStoresToName} from 'constants/DataStore.constants';
+import {SupportedDataStoresToName} from 'constants/DataStore.constants';
import DataStoreConfig from 'models/DataStoreConfig.model';
-import DataStoreDocsBanner from '../DataStoreDocsBanner/DataStoreDocsBanner';
import DataStoreComponentFactory from '../DataStorePlugin/DataStoreComponentFactory';
import * as S from './DataStoreForm.styled';
import DataStoreSelectionInput from './DataStoreSelectionInput';
@@ -36,11 +35,17 @@ const DataStoreForm = ({
isLoading,
isFormValid,
}: IProps) => {
- const initialValues = useMemo(() => DataStoreService.getInitialValues(dataStoreConfig), [dataStoreConfig]);
+ const configuredDataStoreType = dataStoreConfig.defaultDataStore.type as SupportedDataStores;
+ const initialValues = useMemo(
+ () => DataStoreService.getInitialValues(dataStoreConfig, configuredDataStoreType),
+ [configuredDataStoreType, dataStoreConfig]
+ );
const dataStoreType = Form.useWatch('dataStoreType', form);
useEffect(() => {
- form.setFieldsValue({dataStore: {name: '', type: SupportedDataStores.JAEGER, ...initialValues.dataStore}});
+ form.setFieldsValue({
+ dataStore: {name: '', type: SupportedDataStores.JAEGER, ...initialValues.dataStore},
+ });
}, [dataStoreType, form, initialValues.dataStore]);
const onValidation = useCallback(
@@ -50,7 +55,6 @@ const DataStoreForm = ({
},
[onIsFormValid]
);
- const explanation = SupportedDataStoresToExplanation[dataStoreType!];
return (