Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(frontend): adding default value for data store connection types #2742

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import DataStoreDocsBanner from '../../../DataStoreDocsBanner/DataStoreDocsBanne
const AzureAppInsights = () => {
const baseName = ['dataStore', SupportedDataStores.AzureAppInsights];
const form = Form.useFormInstance<TDraftDataStore>();
const connectionType = Form.useWatch([...baseName, 'connectionType'], form);
const connectionType = Form.useWatch([...baseName, 'connectionType'], form) || ConnectionTypes.Direct;
const useAzureActiveDirectoryAuth = Form.useWatch([...baseName, 'useAzureActiveDirectoryAuth'], form);

return (
Expand All @@ -17,7 +17,7 @@ const AzureAppInsights = () => {
<Col span={12}>
Connection type:
<Form.Item name={[...baseName, 'connectionType']}>
<Radio.Group>
<Radio.Group defaultValue={connectionType}>
<Radio value={ConnectionTypes.Direct}>Direct Connection</Radio>
<Radio value={ConnectionTypes.Collector}>Open Telemetry Collector</Radio>
</Radio.Group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const BaseClient = () => {
<Col span={12}>
Connection type:
<Form.Item name={[...baseName, 'type']}>
<Radio.Group>
<Radio.Group defaultValue={type}>
<Radio value={SupportedClientTypes.GRPC}>gRPC</Radio>
<Radio value={SupportedClientTypes.HTTP}>Http</Radio>
</Radio.Group>
Expand Down