Commit 076defdc by Dominik Prokop

Post merge updates

parent 1e7f3f28
// Library
import React, { Component } from 'react';
import Tooltip from 'app/core/components/Tooltip/Tooltip';
import { Tooltip } from '@grafana/ui';
import { Themes } from '@grafana/ui/src/components/Tooltip/Popper';
import ErrorBoundary from 'app/core/components/ErrorBoundary/ErrorBoundary';
// Services
......@@ -12,7 +14,6 @@ import kbn from 'app/core/utils/kbn';
// Types
import { DataQueryOptions, DataQueryResponse } from 'app/types';
import { TimeRange, TimeSeries, LoadingState } from '@grafana/ui';
import { Themes } from 'app/core/components/Tooltip/Popper';
const DEFAULT_PLUGIN_ERROR = 'Error in plugin';
......@@ -144,10 +145,10 @@ export class DataPanel extends Component<Props, State> {
this.setState({
loading: LoadingState.Error,
isFirstLoad: false,
errorMessage: errorMessage
errorMessage: errorMessage,
});
}
}
};
render() {
const { queries } = this.props;
......@@ -171,7 +172,7 @@ export class DataPanel extends Component<Props, State> {
<>
{this.renderLoadingStates()}
<ErrorBoundary>
{({error, errorInfo}) => {
{({ error, errorInfo }) => {
if (errorInfo) {
this.onError(error.message || DEFAULT_PLUGIN_ERROR);
return null;
......@@ -200,15 +201,11 @@ export class DataPanel extends Component<Props, State> {
);
} else if (loading === LoadingState.Error) {
return (
<Tooltip
content={errorMessage}
className="popper__manager--block"
refClassName={`panel-info-corner panel-info-corner--error`}
placement="bottom-start"
theme={Themes.Error}
>
<i className="fa" />
<span className="panel-info-corner-inner" />
<Tooltip content={errorMessage} placement="bottom-start" theme={Themes.Error}>
<div className="panel-info-corner panel-info-corner--error">
<i className="fa" />
<span className="panel-info-corner-inner" />
</div>
</Tooltip>
);
}
......
......@@ -78,7 +78,7 @@ export class PanelHeaderCorner extends Component<Props> {
{infoMode === InfoModes.Info || infoMode === InfoModes.Links ? (
<Tooltip
content={this.getInfoContent}
placement="bottom-start"
placement="bottom-start"
>
<div
className={`panel-info-corner panel-info-corner--${infoMode.toLowerCase()}`}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment