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

@@ -13,7 +13,7 @@ const propTypes = {
onHide: PropTypes.func.isRequired,
actions: PropTypes.object.isRequired,
form_data: PropTypes.object,
user_id: PropTypes.string.isRequired,
userId: PropTypes.string.isRequired,
dashboards: PropTypes.array.isRequired,
alert: PropTypes.string,
slice: PropTypes.object,
@@ -34,7 +34,7 @@ class SaveModal extends React.Component {
};
}
componentDidMount() {
this.props.actions.fetchDashboards(this.props.user_id);
this.props.actions.fetchDashboards(this.props.userId);
}
onChange(name, event) {
switch (name) {
@@ -243,7 +243,7 @@ function mapStateToProps({ explore, saveModal }) {
datasource: explore.datasource,
slice: explore.slice,
can_overwrite: explore.can_overwrite,
user_id: explore.user_id,
userId: explore.userId,
dashboards: saveModal.dashboards,
alert: saveModal.saveModalAlert,
};