mirror of
https://github.com/apache/superset.git
synced 2026-04-17 07:05:04 +00:00
Get query button working in explorev2 (#1581)
* Get query buttonw working in explorev2 - Create new endpoint for updating explore viz - Send over new form_data when query button is pressed * Added endpoint test * Changes based on comments * Added docstring for endpoint, and query spec * Remove white space around docstring
This commit is contained in:
@@ -68,6 +68,29 @@ export const exploreReducer = function (state, action) {
|
||||
{ viz: Object.assign({}, state.viz, { form_data: newFormData }) }
|
||||
);
|
||||
},
|
||||
[actions.UPDATE_CHART]() {
|
||||
const vizUpdates = {
|
||||
column_formats: action.viz.column_formats,
|
||||
json_endpoint: action.viz.json_endpoint,
|
||||
csv_endpoint: action.viz.csv_endpoint,
|
||||
standalone_endpoint: action.viz.standalone_endpoint,
|
||||
query: action.viz.query,
|
||||
data: action.viz.data,
|
||||
};
|
||||
return Object.assign(
|
||||
{},
|
||||
state,
|
||||
{
|
||||
viz: Object.assign({}, state.viz, vizUpdates),
|
||||
isChartLoading: false,
|
||||
});
|
||||
},
|
||||
[actions.CHART_UPDATE_STARTED]() {
|
||||
return Object.assign({}, state, { isChartLoading: true });
|
||||
},
|
||||
[actions.CHART_UPDATE_FAILED]() {
|
||||
return Object.assign({}, state, { isChartLoading: false });
|
||||
},
|
||||
};
|
||||
if (action.type in actionHandlers) {
|
||||
return actionHandlers[action.type]();
|
||||
|
||||
Reference in New Issue
Block a user