Prometheus: Default cache value in UI doesn't match functional default (#67159)

* add disabled state style, set correct default value to match default functionality
This commit is contained in:
Galen Kistler 2023-04-24 15:24:12 -05:00 committed by GitHub
parent c4c747cca6
commit 57d3027cb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -357,7 +357,10 @@ export const PromSettings = (props: Props) => {
className={`width-25`}
onChange={onChangeHandler('cacheLevel', options, onOptionsChange)}
options={cacheValueOptions}
value={cacheValueOptions.find((o) => o.value === options.jsonData.cacheLevel)}
disabled={options.readOnly}
value={
cacheValueOptions.find((o) => o.value === options.jsonData.cacheLevel) ?? PrometheusCacheLevel.Low
}
/>
}
/>