Skip to content

Commit

Permalink
Change config defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
insmac committed Mar 7, 2024
1 parent ea83a66 commit 1116d65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ export const Components = {
},
Username: {
label: 'Username',
placeholder: 'Username',
placeholder: 'admin',
tooltip: 'QuestDB username',
},
Password: {
label: 'Password',
placeholder: 'Password',
placeholder: 'quest',
tooltip: 'QuestDB password',
},
TLSCACert: {
Expand Down
14 changes: 9 additions & 5 deletions src/views/QuestDBConfigEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ export const ConfigEditor: React.FC<Props> = (props) => {
<Input
name="server"
width={40}
value={jsonData.server || 'localhost'}
value={jsonData.server}
defaultValue={Components.ConfigEditor.ServerAddress.placeholder}
onChange={onUpdateDatasourceJsonDataOption(props, 'server')}
label={Components.ConfigEditor.ServerAddress.label}
aria-label={Components.ConfigEditor.ServerAddress.label}
Expand All @@ -143,8 +144,9 @@ export const ConfigEditor: React.FC<Props> = (props) => {
<Input
name="port"
width={40}
type="number"
value={jsonData.port || '8812'}
type="string"
value={jsonData.port || ''}
defaultValue={Components.ConfigEditor.ServerPort.placeholder}
onChange={(e) => onPortChange(e.currentTarget.value)}
label={Components.ConfigEditor.ServerPort.label}
aria-label={Components.ConfigEditor.ServerPort.label}
Expand All @@ -162,7 +164,8 @@ export const ConfigEditor: React.FC<Props> = (props) => {
<Input
name="user"
width={40}
value={jsonData.username || 'admin'}
value={jsonData.username}
defaultValue={Components.ConfigEditor.Username.placeholder}
onChange={onUpdateDatasourceJsonDataOption(props, 'username')}
label={Components.ConfigEditor.Username.label}
aria-label={Components.ConfigEditor.Username.label}
Expand All @@ -176,7 +179,8 @@ export const ConfigEditor: React.FC<Props> = (props) => {
label={Components.ConfigEditor.Password.label}
aria-label={Components.ConfigEditor.Password.label}
placeholder={Components.ConfigEditor.Password.placeholder}
value={secureJsonData.password || 'quest'}
value={secureJsonData.password}
defaultValue={Components.ConfigEditor.Password.placeholder}
isConfigured={(secureJsonFields && secureJsonFields.password) as boolean}
onReset={onResetPassword}
onChange={onUpdateDatasourceSecureJsonDataOption(props, 'password')}
Expand Down

0 comments on commit 1116d65

Please sign in to comment.