mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 23:16:16 -06:00
Merge branch 'master' of github.com:grafana/grafana into gauge-multi-series
This commit is contained in:
commit
7e4225c08a
@ -27,6 +27,7 @@
|
||||
"@types/react-dom": "^16.0.9",
|
||||
"@types/react-grid-layout": "^0.16.6",
|
||||
"@types/react-select": "^2.0.4",
|
||||
"@types/react-transition-group": "^2.0.15",
|
||||
"@types/react-virtualized": "^9.18.12",
|
||||
"angular-mocks": "1.6.6",
|
||||
"autoprefixer": "^6.4.0",
|
||||
|
@ -1,11 +1,12 @@
|
||||
import React, { FC } from 'react';
|
||||
import Transition from 'react-transition-group/Transition';
|
||||
import Transition, { ExitHandler } from 'react-transition-group/Transition';
|
||||
|
||||
interface Props {
|
||||
duration: number;
|
||||
children: JSX.Element;
|
||||
in: boolean;
|
||||
unmountOnExit?: boolean;
|
||||
onExited?: ExitHandler;
|
||||
}
|
||||
|
||||
export const FadeIn: FC<Props> = props => {
|
||||
@ -22,7 +23,12 @@ export const FadeIn: FC<Props> = props => {
|
||||
};
|
||||
|
||||
return (
|
||||
<Transition in={props.in} timeout={props.duration} unmountOnExit={props.unmountOnExit || false}>
|
||||
<Transition
|
||||
in={props.in}
|
||||
timeout={props.duration}
|
||||
unmountOnExit={props.unmountOnExit || false}
|
||||
onExited={props.onExited}
|
||||
>
|
||||
{state => (
|
||||
<div
|
||||
style={{
|
||||
|
@ -149,6 +149,10 @@ export class VisualizationTab extends PureComponent<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
clearQuery = () => {
|
||||
this.setState({ searchQuery: '' });
|
||||
};
|
||||
|
||||
onPanelOptionsChanged = (options: any) => {
|
||||
this.props.panel.updateOptions(options);
|
||||
this.forceUpdate();
|
||||
@ -241,7 +245,7 @@ export class VisualizationTab extends PureComponent<Props, State> {
|
||||
setScrollTop={this.setScrollTop}
|
||||
>
|
||||
<>
|
||||
<FadeIn in={isVizPickerOpen} duration={200} unmountOnExit={true}>
|
||||
<FadeIn in={isVizPickerOpen} duration={200} unmountOnExit={true} onExited={this.clearQuery}>
|
||||
<VizTypePicker
|
||||
current={plugin}
|
||||
onTypeChanged={this.onTypeChanged}
|
||||
|
@ -220,6 +220,7 @@ export class Explore extends React.PureComponent<ExploreProps> {
|
||||
{supportsTable && <TableContainer exploreId={exploreId} onClickCell={this.onClickLabel} />}
|
||||
{supportsLogs && (
|
||||
<LogsContainer
|
||||
width={width}
|
||||
exploreId={exploreId}
|
||||
onChangeTime={this.onChangeTime}
|
||||
onClickLabel={this.onClickLabel}
|
||||
|
@ -51,6 +51,7 @@ function renderMetaItem(value: any, kind: LogsMetaKind) {
|
||||
|
||||
interface Props {
|
||||
data?: LogsModel;
|
||||
width: number;
|
||||
exploreId: string;
|
||||
highlighterExpressions: string[];
|
||||
loading: boolean;
|
||||
@ -165,6 +166,7 @@ export default class Logs extends PureComponent<Props, State> {
|
||||
range,
|
||||
scanning,
|
||||
scanRange,
|
||||
width,
|
||||
} = this.props;
|
||||
|
||||
if (!data) {
|
||||
@ -215,6 +217,7 @@ export default class Logs extends PureComponent<Props, State> {
|
||||
<Graph
|
||||
data={timeSeries}
|
||||
height={100}
|
||||
width={width}
|
||||
range={range}
|
||||
id={`explore-logs-graph-${exploreId}`}
|
||||
onChangeTime={this.props.onChangeTime}
|
||||
|
@ -25,6 +25,7 @@ interface LogsContainerProps {
|
||||
scanRange?: RawTimeRange;
|
||||
showingLogs: boolean;
|
||||
toggleLogs: typeof toggleLogs;
|
||||
width: number;
|
||||
}
|
||||
|
||||
export class LogsContainer extends PureComponent<LogsContainerProps> {
|
||||
@ -46,6 +47,7 @@ export class LogsContainer extends PureComponent<LogsContainerProps> {
|
||||
showingLogs,
|
||||
scanning,
|
||||
scanRange,
|
||||
width,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
@ -63,6 +65,7 @@ export class LogsContainer extends PureComponent<LogsContainerProps> {
|
||||
range={range}
|
||||
scanning={scanning}
|
||||
scanRange={scanRange}
|
||||
width={width}
|
||||
/>
|
||||
</Panel>
|
||||
);
|
||||
|
@ -150,8 +150,8 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
|
||||
controllerAs: 'ctrl',
|
||||
})
|
||||
.when('/dashboards/f/:uid', {
|
||||
templateUrl: 'public/app/features/dashboard/partials/folder_dashboards.html',
|
||||
controller: 'FolderDashboardsCtrl',
|
||||
templateUrl: 'public/app/features/folders/partials/folder_dashboards.html',
|
||||
controller: FolderDashboardsCtrl,
|
||||
controllerAs: 'ctrl',
|
||||
})
|
||||
.when('/explore', {
|
||||
|
Loading…
Reference in New Issue
Block a user