mirror of
https://github.com/apache/superset.git
synced 2026-05-11 10:55:43 +00:00
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:
@@ -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];
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user