From 95656e1e956935279bb9a354bd05be56bb667a1c Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Tue, 18 Dec 2018 14:49:59 +0100 Subject: [PATCH] renaming component --- .../components/PanelHelp/{PanelHelp.tsx => PluginHelp.tsx} | 4 ++-- public/app/features/dashboard/dashgrid/QueriesTab.tsx | 4 ++-- public/app/features/dashboard/dashgrid/VisualizationTab.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename public/app/core/components/PanelHelp/{PanelHelp.tsx => PluginHelp.tsx} (93%) diff --git a/public/app/core/components/PanelHelp/PanelHelp.tsx b/public/app/core/components/PanelHelp/PluginHelp.tsx similarity index 93% rename from public/app/core/components/PanelHelp/PanelHelp.tsx rename to public/app/core/components/PanelHelp/PluginHelp.tsx index 7920e772b6a..f675ab10ecb 100644 --- a/public/app/core/components/PanelHelp/PanelHelp.tsx +++ b/public/app/core/components/PanelHelp/PluginHelp.tsx @@ -14,7 +14,7 @@ interface State { help: string; } -export default class PanelHelp extends PureComponent { +export default class PluginHelp extends PureComponent { state = { isError: false, isLoading: false, @@ -48,7 +48,7 @@ export default class PanelHelp extends PureComponent { 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, diff --git a/public/app/features/dashboard/dashgrid/QueriesTab.tsx b/public/app/features/dashboard/dashgrid/QueriesTab.tsx index 112ba50822c..36f38cadbd3 100644 --- a/public/app/features/dashboard/dashgrid/QueriesTab.tsx +++ b/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 { }; renderHelp = () => { - return ; + return ; }; onAddQuery = (query?: Partial) => { diff --git a/public/app/features/dashboard/dashgrid/VisualizationTab.tsx b/public/app/features/dashboard/dashgrid/VisualizationTab.tsx index f479bab57d5..2cf03b3a871 100644 --- a/public/app/features/dashboard/dashgrid/VisualizationTab.tsx +++ b/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 { } }; - renderHelp = () => ; + renderHelp = () => ; render() { const { plugin } = this.props;