grafana/public/app/features/explore/Wrapper.tsx

54 lines
1.4 KiB
TypeScript
Raw Normal View History

2018-09-28 10:38:50 -05:00
import React, { Component } from 'react';
import { hot } from 'react-hot-loader';
import { connect } from 'react-redux';
import { StoreState } from 'app/types';
import { ExploreId } from 'app/types/explore';
import { CustomScrollbar, ErrorBoundaryAlert } from '@grafana/ui';
import { resetExploreAction } from './state/actionTypes';
import Explore from './Explore';
interface WrapperProps {
split: boolean;
resetExploreAction: typeof resetExploreAction;
}
2019-01-11 11:26:56 -06:00
export class Wrapper extends Component<WrapperProps> {
componentWillUnmount() {
this.props.resetExploreAction({});
}
render() {
2019-01-11 11:26:56 -06:00
const { split } = this.props;
return (
<div className="page-scrollbar-wrapper">
<CustomScrollbar autoHeightMin={'100%'} autoHeightMax={''} className="custom-scrollbar--page">
Tracing: Adds header and minimap (#23315) * Add integration with Jeager Add Jaeger datasource and modify derived fields in loki to allow for opening a trace in Jager in separate split. Modifies build so that this branch docker images are pushed to docker hub Add a traceui dir with docker-compose and provision files for demoing.:wq * Enable docker logger plugin to send logs to loki * Add placeholder zipkin datasource * Fixed rebase issues, added enhanceDataFrame to non-legacy code path * Trace selector for jaeger query field * Fix logs default mode for Loki * Fix loading jaeger query field services on split * Updated grafana image in traceui/compose file * Fix prettier error * Hide behind feature flag, clean up unused code. * Fix tests * Fix tests * Cleanup code and review feedback * Remove traceui directory * Remove circle build changes * Fix feature toggles object * Fix merge issues * Add trace ui in Explore * WIP * WIP * WIP * Make jaeger datasource return trace data instead of link * Allow js in jest tests * Return data from Jaeger datasource * Take yarn.lock from master * Fix missing component * Update yarn lock * Fix some ts and lint errors * Fix merge * Fix type errors * Make tests pass again * Add tests * Fix es5 compatibility * Add header with minimap * Fix sizing issue due to column resizer handle * Fix issues with sizing, search functionality, duplicate react, tests * Refactor TraceView component, fix tests * Fix type errors * Add tests for hooks Co-authored-by: David Kaltschmidt <david.kaltschmidt@gmail.com>
2020-04-08 10:16:22 -05:00
<div className="explore-wrapper">
<ErrorBoundaryAlert style="page">
<Explore exploreId={ExploreId.left} />
</ErrorBoundaryAlert>
{split && (
<ErrorBoundaryAlert style="page">
<Explore exploreId={ExploreId.right} />
</ErrorBoundaryAlert>
)}
</div>
</CustomScrollbar>
</div>
);
}
}
2019-01-11 11:26:56 -06:00
const mapStateToProps = (state: StoreState) => {
const { split } = state.explore;
return { split };
2019-01-11 11:26:56 -06:00
};
const mapDispatchToProps = {
resetExploreAction,
};
export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(Wrapper));