#31871 introduced support for configuring timeout in seconds
for HTTP data sources. That had a bug where backend expected
a numeric timeout value where it was actually stored as a
string. This should resolve this by requiring input to be
numbers, storing input as numeric and falling back to string
value if there's no numeric value.
Ref #31871
(cherry picked from commit d15d87db8a)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
This commit is contained in:
co-authored by
Marcus Efraimsson
parent
ad6f9a0c32
commit
422e388fa2
@@ -167,13 +167,14 @@ export const DataSourceHttpSettings: React.FC<HttpSettingsProps> = (props) => {
|
||||
<div className="gf-form">
|
||||
<FormField
|
||||
label="Timeout"
|
||||
type="number"
|
||||
labelWidth={13}
|
||||
inputWidth={20}
|
||||
tooltip="HTTP request timeout in seconds"
|
||||
value={dataSourceConfig.jsonData.timeout}
|
||||
onChange={(event) => {
|
||||
onSettingsChange({
|
||||
jsonData: { ...dataSourceConfig.jsonData, timeout: event.currentTarget.value },
|
||||
jsonData: { ...dataSourceConfig.jsonData, timeout: parseInt(event.currentTarget.value, 10) },
|
||||
});
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user