mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Post merge updates
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// 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()}`}
|
||||
|
||||
Reference in New Issue
Block a user