feat: Synchronously return cached charts (#15157)

* feat: Synchronously return cached charts

* Fix lint issue

* Fix python lint error

* Change getChartDataRequest to return response

* Fix lint errors

* Add test

* explore_json: skip cached data check for forced refresh

Co-authored-by: Rob DiCiuccio <rob.diciuccio@gmail.com>
This commit is contained in:
Ben Reinhart
2021-06-22 10:00:57 -07:00
committed by GitHub
parent 4d48f0426d
commit ab153e66cc
8 changed files with 181 additions and 83 deletions

View File

@@ -58,9 +58,9 @@ const ViewQueryModal: React.FC<Props> = props => {
resultFormat: 'json',
resultType,
})
.then(response => {
.then(({ json }) => {
// Only displaying the first query is currently supported
const result = response.result[0];
const result = json.result[0];
setLanguage(result.language);
setQuery(result.query);
setIsLoading(false);