feat: finalize Word Cloud move to new chart data endpoint (#9975)

* remove word cloud from viz.py

* Fix Run in SQL Lab

* remove deprecated python tests

* break out legacy endpoint type into function

* Break out exploreChart from exportChart and implement results type

* Fix jest tests and refactor accordingly

* lint

* Rename v1 payload function

* Add dashboard id to v1 chart data request url params

* Add support for domain sharding to v1 chart data request
This commit is contained in:
Ville Brofeldt
2020-06-05 14:08:46 +03:00
committed by GitHub
parent 619fbc9557
commit 5c4d4f16b3
15 changed files with 177 additions and 198 deletions

View File

@@ -90,7 +90,11 @@ export class DisplayQueryButton extends React.PureComponent {
beforeOpen(resultType) {
this.setState({ isLoading: true });
getChartDataRequest(this.props.latestQueryFormData, 'json', resultType)
getChartDataRequest({
formData: this.props.latestQueryFormData,
resultFormat: 'json',
resultType,
})
.then(response => {
// Currently displaying of only first query is supported
const result = response.result[0];

View File

@@ -47,8 +47,16 @@ export default function ExploreActionButtons({
const exportToCSVClasses = cx('btn btn-default btn-sm', {
'disabled disabledButton': !canDownload,
});
const doExportCSV = exportChart.bind(this, latestQueryFormData, 'csv');
const doExportChart = exportChart.bind(this, latestQueryFormData, 'results');
const doExportCSV = exportChart.bind(this, {
formData: latestQueryFormData,
resultType: 'results',
resultFormat: 'csv',
});
const doExportChart = exportChart.bind(this, {
formData: latestQueryFormData,
resultType: 'results',
resultFormat: 'json',
});
return (
<div className="btn-group results" role="group">