diff --git a/ui/src/visualizations/File-Evolution/config.js b/ui/src/visualizations/File-Evolution/config.js new file mode 100644 index 00000000..21f44b5c --- /dev/null +++ b/ui/src/visualizations/File-Evolution/config.js @@ -0,0 +1,165 @@ +'use strict'; + +import { connect } from 'react-redux'; +import styles from './styles.scss'; + +import { + setSelectedAuthors, + setCommitBoxHeight, + setCommitBoxWidth, + setCommitBoxColor, + setSelectedBranches, + setShowCommitDate, + setShowCommitMessage, + setShowCommitAuthor +} from './sagas'; + +import React from 'react'; +import CheckboxLegend from '../../components/CheckboxLegend'; +import TabCombo from '../../components/TabCombo'; + +const mapStateToProps = (state /*, ownProps*/) => { + //console.log(state); + const FileEvolutionState = state.visualizations.fileEvolution.state; + console.log(FileEvolutionState); + return { + branches: FileEvolutionState.data.data.branches, + committers: FileEvolutionState.data.data.committers, + commits: FileEvolutionState.data.data.commits, + authorsColorPalette: FileEvolutionState.data.data.authorsColorPalette, + branchesColorPalette: FileEvolutionState.data.data.branchesColorPalette, + selectedAuthors: FileEvolutionState.config.selectedAuthors, + selectedBranches: FileEvolutionState.config.selectedBranches, + commitBoxHeight: FileEvolutionState.config.commitBoxHeight, + commitBoxWidth: FileEvolutionState.config.commitBoxWidth, + commitBoxColor: FileEvolutionState.config.commitBoxColor, + showCommitDate: FileEvolutionState.config.showCommitDate, + showCommitAuthor: FileEvolutionState.config.showCommitAuthor, + showCommitMessage: FileEvolutionState.config.showCommitMessage + }; +}; + +const mapDispatchToProps = (dispatch /*, ownProps*/) => { + return { + onSetSelectedAuthors: selectedAuthors => dispatch(setSelectedAuthors(selectedAuthors)), + onSetSelectedBranches: selectedBranches => dispatch(setSelectedBranches(selectedBranches)), + onSetCommitBoxHeight: commitBoxHeight => dispatch(setCommitBoxHeight(commitBoxHeight)), + onSetCommitBoxWidth: commitBoxWidth => dispatch(setCommitBoxWidth(commitBoxWidth)), + onClickShowCommitBoxDate: showCommitDate => dispatch(setShowCommitDate(showCommitDate)), + onClickShowCommitBoxAuthor: showCommitAuthor => dispatch(setShowCommitAuthor(showCommitAuthor)), + onSetShowCommitMessage: showCommitMessage => dispatch(setShowCommitMessage(showCommitMessage)), + onClickCommitBoxColor: commitBoxColor => dispatch(setCommitBoxColor(commitBoxColor)) + }; +}; + +//TODO ICONS in TabCombo +const FileEvolutionConfigComponent = props => { + return ( +