Peter Holmberg 7 лет назад
Родитель
Сommit
95656e1e95

+ 2 - 2
public/app/core/components/PanelHelp/PanelHelp.tsx → public/app/core/components/PanelHelp/PluginHelp.tsx

@@ -14,7 +14,7 @@ interface State {
   help: string;
 }
 
-export default class PanelHelp extends PureComponent<Props, State> {
+export default class PluginHelp extends PureComponent<Props, State> {
   state = {
     isError: false,
     isLoading: false,
@@ -48,7 +48,7 @@ export default class PanelHelp extends PureComponent<Props, State> {
         const markdown = new Remarkable();
         const helpHtml = markdown.render(response);
 
-        if (response === '' && this.props.type) {
+        if (response === '' && this.props.type === 'help') {
           this.setState({
             isError: false,
             isLoading: false,

+ 2 - 2
public/app/features/dashboard/dashgrid/QueriesTab.tsx

@@ -21,7 +21,7 @@ import config from 'app/core/config';
 import { PanelModel } from '../panel_model';
 import { DashboardModel } from '../dashboard_model';
 import { DataSourceSelectItem, DataQuery } from 'app/types';
-import PanelHelp from '../../../core/components/PanelHelp/PanelHelp';
+import PluginHelp from '../../../core/components/PanelHelp/PluginHelp';
 
 interface Props {
   panel: PanelModel;
@@ -134,7 +134,7 @@ export class QueriesTab extends PureComponent<Props, State> {
   };
 
   renderHelp = () => {
-    return <PanelHelp plugin={this.state.currentDS.meta} type="query_help" />;
+    return <PluginHelp plugin={this.state.currentDS.meta} type="query_help" />;
   };
 
   onAddQuery = (query?: Partial<DataQuery>) => {

+ 2 - 2
public/app/features/dashboard/dashgrid/VisualizationTab.tsx

@@ -8,7 +8,7 @@ import { getDatasourceSrv } from '../../plugins/datasource_srv';
 // Components
 import { EditorTabBody } from './EditorTabBody';
 import { VizTypePicker } from './VizTypePicker';
-import PanelHelp from 'app/core/components/PanelHelp/PanelHelp';
+import PluginHelp from 'app/core/components/PanelHelp/PluginHelp';
 import { FadeIn } from 'app/core/components/Animations/FadeIn';
 import { PanelOptionSection } from './PanelOptionSection';
 
@@ -205,7 +205,7 @@ export class VisualizationTab extends PureComponent<Props, State> {
     }
   };
 
-  renderHelp = () => <PanelHelp plugin={this.state.currentDataSource.meta} type="panel_help" />;
+  renderHelp = () => <PluginHelp plugin={this.state.currentDataSource.meta} type="panel_help" />;
 
   render() {
     const { plugin } = this.props;