mirror of
https://github.com/apache/superset.git
synced 2026-04-10 11:55:24 +00:00
* [explore] DatasourceControl to pick datasource in modal Makes it easier to change datasource, also makes it such that the list of all datasources doesn't need to be loaded upfront. * Adding more metadata
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
import React from 'react';
|
|
import { render } from 'react-dom';
|
|
import { createStore, compose, applyMiddleware } from 'redux';
|
|
import { Provider } from 'react-redux';
|
|
import thunkMiddleware from 'redux-thunk';
|
|
|
|
import { getInitialState, sqlLabReducer } from './reducers';
|
|
import { initEnhancer } from '../reduxUtils';
|
|
import { initJQueryAjax } from '../modules/utils';
|
|
import App from './components/App';
|
|
import { appSetup } from '../common';
|
|
|
|
import './main.css';
|
|
import '../../stylesheets/reactable-pagination.css';
|
|
import '../components/FilterableTable/FilterableTableStyles.css';
|
|
|
|
appSetup();
|
|
initJQueryAjax();
|
|
|
|
const appContainer = document.getElementById('app');
|
|
const bootstrapData = JSON.parse(appContainer.getAttribute('data-bootstrap'));
|
|
const state = Object.assign({}, getInitialState(bootstrapData.defaultDbId), bootstrapData);
|
|
|
|
const store = createStore(
|
|
sqlLabReducer, state, compose(applyMiddleware(thunkMiddleware), initEnhancer()));
|
|
|
|
// jquery hack to highlight the navbar menu
|
|
$('a:contains("SQL Lab")').parent().addClass('active');
|
|
|
|
render(
|
|
<Provider store={store}>
|
|
<App />
|
|
</Provider>,
|
|
appContainer,
|
|
);
|