mirror of
https://github.com/apache/superset.git
synced 2026-04-12 20:57:55 +00:00
* 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
34 lines
1.0 KiB
JavaScript
34 lines
1.0 KiB
JavaScript
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import ExploreViewContainer from './components/ExploreViewContainer';
|
|
import { createStore, applyMiddleware, compose } from 'redux';
|
|
import { Provider } from 'react-redux';
|
|
import thunk from 'redux-thunk';
|
|
|
|
import { initialState } from './stores/store';
|
|
|
|
const exploreViewContainer = document.getElementById('js-explore-view-container');
|
|
const bootstrapData = JSON.parse(exploreViewContainer.getAttribute('data-bootstrap'));
|
|
|
|
import { exploreReducer } from './reducers/exploreReducer';
|
|
|
|
const bootstrappedState = Object.assign(initialState, {
|
|
can_download: bootstrapData.can_download,
|
|
datasources: bootstrapData.datasources,
|
|
datasource_id: parseInt(bootstrapData.datasource_id, 10),
|
|
datasource_type: bootstrapData.datasource_type,
|
|
viz: bootstrapData.viz,
|
|
});
|
|
|
|
const store = createStore(exploreReducer, bootstrappedState,
|
|
compose(applyMiddleware(thunk))
|
|
);
|
|
|
|
ReactDOM.render(
|
|
<Provider store={store}>
|
|
<ExploreViewContainer />
|
|
</Provider>,
|
|
exploreViewContainer
|
|
);
|
|
|