File organization, action naming, comments

- moved ActionTypes to `./state/actionTypes`
- renamed click-related actions
- added comments to actions and state types
- prefixed Explore actions with `explore/`
- fixed query override issue when row was added
This commit is contained in:
David Kaltschmidt
2019-01-15 19:52:53 +01:00
parent 9aede9e636
commit 6ff15039a9
8 changed files with 714 additions and 427 deletions

View File

@@ -7,12 +7,11 @@ import { ExploreId, ExploreItemState } from 'app/types/explore';
import { LogsModel } from 'app/core/logs_model';
import { StoreState } from 'app/types';
import { clickLogsButton } from './state/actions';
import { toggleLogs } from './state/actions';
import Logs from './Logs';
import Panel from './Panel';
interface LogsContainerProps {
clickLogsButton: typeof clickLogsButton;
exploreId: ExploreId;
loading: boolean;
logsHighlighterExpressions?: string[];
@@ -25,11 +24,12 @@ interface LogsContainerProps {
scanning?: boolean;
scanRange?: RawTimeRange;
showingLogs: boolean;
toggleLogs: typeof toggleLogs;
}
export class LogsContainer extends PureComponent<LogsContainerProps> {
onClickLogsButton = () => {
this.props.clickLogsButton(this.props.exploreId);
this.props.toggleLogs(this.props.exploreId);
};
render() {
@@ -85,7 +85,7 @@ function mapStateToProps(state: StoreState, { exploreId }) {
}
const mapDispatchToProps = {
clickLogsButton,
toggleLogs,
};
export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(LogsContainer));