Skip to content

Commit

Permalink
fix(frontend): adding default value for data store connection types (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Jun 16, 2023
1 parent cc74056 commit 4bb77e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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
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

0 comments on commit 4bb77e5

Please sign in to comment.