diff --git a/public/app/core/components/BackButton/BackButton.tsx b/public/app/core/components/BackButton/BackButton.tsx deleted file mode 100644 index 62ed6e2ff44..00000000000 --- a/public/app/core/components/BackButton/BackButton.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React, { ButtonHTMLAttributes } from 'react'; -import { IconButton } from '@grafana/ui'; -import { selectors } from '@grafana/e2e-selectors'; - -export interface Props extends ButtonHTMLAttributes { - surface: 'dashboard' | 'panel' | 'header'; -} - -export const BackButton: React.FC = ({ surface, onClick }) => { - return ( - - ); -}; - -BackButton.displayName = 'BackButton'; diff --git a/public/app/features/dashboard/components/DashboardSettings/DashboardSettings.tsx b/public/app/features/dashboard/components/DashboardSettings/DashboardSettings.tsx index 76c0b15aacf..03db9cfa83b 100644 --- a/public/app/features/dashboard/components/DashboardSettings/DashboardSettings.tsx +++ b/public/app/features/dashboard/components/DashboardSettings/DashboardSettings.tsx @@ -1,10 +1,9 @@ import React, { PureComponent } from 'react'; import { css, cx } from 'emotion'; import { selectors } from '@grafana/e2e-selectors'; -import { Button, CustomScrollbar, Icon, IconName, stylesFactory } from '@grafana/ui'; +import { Button, CustomScrollbar, Icon, IconName, PageToolbar, stylesFactory } from '@grafana/ui'; import config from 'app/core/config'; import { contextSrv } from 'app/core/services/context_srv'; -import { BackButton } from 'app/core/components/BackButton/BackButton'; import { dashboardWatcher } from 'app/features/live/dashboard/dashboardWatcher'; import { updateLocation } from 'app/core/actions'; import { DashboardModel } from '../../state/DashboardModel'; @@ -146,7 +145,6 @@ export class DashboardSettings extends PureComponent { render() { const { dashboard, editview } = this.props; const folderTitle = dashboard.meta.folderTitle; - const haveFolder = (dashboard.meta.folderId ?? 0) > 0; const pages = this.getPages(); const currentPage = pages.find((page) => page.id === editview) ?? pages[0]; const canSaveAs = contextSrv.hasEditPermissionInFolders; @@ -155,15 +153,7 @@ export class DashboardSettings extends PureComponent { return (
-
-
- -
-
- {haveFolder &&
{folderTitle} /
} - {dashboard.title} / Settings -
-
+
diff --git a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx index 363d139343a..052a628af71 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx @@ -6,7 +6,7 @@ import { Subscription } from 'rxjs'; import { FieldConfigSource, GrafanaTheme } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; -import { Button, HorizontalGroup, Icon, RadioButtonGroup, stylesFactory } from '@grafana/ui'; +import { HorizontalGroup, Icon, PageToolbar, RadioButtonGroup, stylesFactory, ToolbarButton } from '@grafana/ui'; import config from 'app/core/config'; import { appEvents } from 'app/core/core'; @@ -17,8 +17,6 @@ import { DashNavTimeControls } from '../DashNav/DashNavTimeControls'; import { OptionsPaneContent } from './OptionsPaneContent'; import { DashNavButton } from 'app/features/dashboard/components/DashNav/DashNavButton'; import { SubMenuItems } from 'app/features/dashboard/components/SubMenu/SubMenuItems'; -import { BackButton } from 'app/core/components/BackButton/BackButton'; -import { PageToolbar } from 'app/core/components/PageToolbar/PageToolbar'; import { SplitPaneWrapper } from 'app/core/components/SplitPaneWrapper/SplitPaneWrapper'; import { SaveDashboardModalProxy } from '../SaveDashboard/SaveDashboardModalProxy'; import { DashboardPanel } from '../../dashgrid/DashboardPanel'; @@ -253,22 +251,26 @@ export class PanelEditorUnconnected extends PureComponent { renderEditorActions() { return [ - , - , - , + , ]; } @@ -308,11 +310,9 @@ export class PanelEditorUnconnected extends PureComponent { return (
- } - actions={this.renderEditorActions()} - /> + + {this.renderEditorActions()} +