mirror of
https://github.com/apache/superset.git
synced 2026-04-11 04:15:33 +00:00
Use POST in sqllab_viz instead of url params to avoid error with long queries (#1933)
* Use POST in sqllab_viz instead of url params to avoid error with long queries * Delete error handling * Fix returning statement
This commit is contained in:
@@ -4,6 +4,7 @@ import { Alert, Button, Col, Modal } from 'react-bootstrap';
|
||||
import Select from 'react-select';
|
||||
import { Table } from 'reactable';
|
||||
import shortid from 'shortid';
|
||||
import $ from 'jquery';
|
||||
|
||||
const CHART_TYPES = [
|
||||
{ value: 'dist_bar', label: 'Distribution - Bar Chart', requiresTime: false },
|
||||
@@ -105,7 +106,17 @@ class VisualizeModal extends React.PureComponent {
|
||||
sql: this.props.query.sql,
|
||||
dbId: this.props.query.dbId,
|
||||
};
|
||||
window.open('/superset/sqllab_viz/?data=' + JSON.stringify(vizOptions));
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/superset/sqllab_viz/',
|
||||
async: false,
|
||||
data: {
|
||||
data: JSON.stringify(vizOptions),
|
||||
},
|
||||
success: (url) => {
|
||||
window.open(url);
|
||||
},
|
||||
});
|
||||
}
|
||||
changeDatasourceName(event) {
|
||||
this.setState({ datasourceName: event.target.value });
|
||||
|
||||
Reference in New Issue
Block a user