diff --git a/public/app/features/dashboard/dashgrid/EditorTabBody.tsx b/public/app/features/dashboard/dashgrid/EditorTabBody.tsx index 86ebdf86b67..ff83ee06011 100644 --- a/public/app/features/dashboard/dashgrid/EditorTabBody.tsx +++ b/public/app/features/dashboard/dashgrid/EditorTabBody.tsx @@ -4,7 +4,7 @@ import { FadeIn } from 'app/core/components/Animations/FadeIn'; interface Props { children: JSX.Element; - main: EditorToolBarView; + main?: EditorToolBarView; toolbarItems: EditorToolBarView[]; } @@ -75,11 +75,13 @@ export class EditorTabBody extends PureComponent { return ( <> -
- {this.renderMainSelection(main)} -
- {toolbarItems.map(item => this.renderButton(item))} -
+ {main && ( +
+ {this.renderMainSelection(main)} +
+ {toolbarItems.map(item => this.renderButton(item))} +
+ )}
diff --git a/public/app/features/dashboard/dashgrid/GeneralTab.tsx b/public/app/features/dashboard/dashgrid/GeneralTab.tsx index 2ffac98bfd7..073da7dcc98 100644 --- a/public/app/features/dashboard/dashgrid/GeneralTab.tsx +++ b/public/app/features/dashboard/dashgrid/GeneralTab.tsx @@ -4,11 +4,9 @@ import { getAngularLoader, AngularComponent } from 'app/core/services/AngularLoa import { EditorTabBody } from './EditorTabBody'; import { PanelModel } from '../panel_model'; -import { DashboardModel } from '../dashboard_model'; interface Props { panel: PanelModel; - dashboard: DashboardModel; } export class GeneralTab extends PureComponent { @@ -24,14 +22,13 @@ export class GeneralTab extends PureComponent { return; } - const { panel, dashboard } = this.props; + const { panel } = this.props; const loader = getAngularLoader(); const template = ''; const scopeProps = { ctrl: { panel: panel, - dashboard: dashboard, }, }; diff --git a/public/app/features/dashboard/dashgrid/PanelEditor.tsx b/public/app/features/dashboard/dashgrid/PanelEditor.tsx index 6d9072048ae..d42f97efb85 100644 --- a/public/app/features/dashboard/dashgrid/PanelEditor.tsx +++ b/public/app/features/dashboard/dashgrid/PanelEditor.tsx @@ -82,7 +82,7 @@ export class PanelEditor extends PureComponent {
- {activeTab === 'general' && } + {activeTab === 'general' && } {activeTab === 'queries' && } {activeTab === 'visualization' && ( diff --git a/public/app/features/panel/GeneralTabCtrl.ts b/public/app/features/panel/GeneralTabCtrl.ts index 46db29b2e9b..c692106c92d 100644 --- a/public/app/features/panel/GeneralTabCtrl.ts +++ b/public/app/features/panel/GeneralTabCtrl.ts @@ -1,5 +1,4 @@ import coreModule from 'app/core/core_module'; -import { DashboardModel } from '../dashboard/dashboard_model'; export class GeneralTabCtrl { panelCtrl: any;