Dashboard refactory (#3581)

Create Chart component for all chart fetching and rendering, and apply redux architecture in dashboard view.
This commit is contained in:
Grace Guo
2017-11-08 10:46:21 -08:00
committed by GitHub
parent 39e502faae
commit 4fa1f0ab17
47 changed files with 2048 additions and 876 deletions

View File

@@ -1,4 +1,5 @@
/* eslint camelcase: 0 */
import { triggerQuery } from '../../chart/chartAction';
const $ = window.$ = require('jquery');
@@ -54,11 +55,6 @@ export function resetControls() {
return { type: RESET_FIELDS };
}
export const TRIGGER_QUERY = 'TRIGGER_QUERY';
export function triggerQuery(value = true) {
return { type: TRIGGER_QUERY, value };
}
export function fetchDatasourceMetadata(datasourceKey, alsoTriggerQuery = false) {
return function (dispatch) {
dispatch(fetchDatasourceStarted());
@@ -146,11 +142,6 @@ export function updateChartTitle(slice_name) {
return { type: UPDATE_CHART_TITLE, slice_name };
}
export const RENDER_TRIGGERED = 'RENDER_TRIGGERED';
export function renderTriggered() {
return { type: RENDER_TRIGGERED };
}
export const CREATE_NEW_SLICE = 'CREATE_NEW_SLICE';
export function createNewSlice(can_add, can_download, can_overwrite, slice, form_data) {
return { type: CREATE_NEW_SLICE, can_add, can_download, can_overwrite, slice, form_data };