diff --git a/packages/grafana-ui/src/components/PageLayout/PageToolbar.tsx b/packages/grafana-ui/src/components/PageLayout/PageToolbar.tsx index b31470ae630..73dbb044885 100644 --- a/packages/grafana-ui/src/components/PageLayout/PageToolbar.tsx +++ b/packages/grafana-ui/src/components/PageLayout/PageToolbar.tsx @@ -190,7 +190,7 @@ const getStyles = (theme: GrafanaTheme2) => { min-width: 0; `, h1Styles: css` - margin: 0; + margin: ${spacing(0, 1, 0, 0)}; line-height: inherit; flex-grow: 1; min-width: 0; @@ -229,7 +229,7 @@ const getStyles = (theme: GrafanaTheme2) => { ${theme.breakpoints.up('md')} { align-items: center; display: flex; - padding-left: ${spacing(0.5)}; + padding-right: ${spacing(0.5)}; } `, }; diff --git a/public/app/features/explore/AddToDashboard/index.tsx b/public/app/features/explore/AddToDashboard/index.tsx index cb36ecc8d57..6dabde1e230 100644 --- a/public/app/features/explore/AddToDashboard/index.tsx +++ b/public/app/features/explore/AddToDashboard/index.tsx @@ -20,6 +20,7 @@ export const AddToDashboard = ({ exploreId }: Props) => { <> setIsOpen(true)} aria-label="Add to dashboard" disabled={!explorePaneHasQueries} diff --git a/public/app/features/explore/Explore.tsx b/public/app/features/explore/Explore.tsx index 83373d562b4..267a78fe8fe 100644 --- a/public/app/features/explore/Explore.tsx +++ b/public/app/features/explore/Explore.tsx @@ -79,9 +79,6 @@ const getStyles = (theme: GrafanaTheme2) => { padding: ${theme.spacing(2)}; padding-top: 0; `, - exploreContainerTopnav: css` - padding-top: ${theme.spacing(2)}; - `, }; }; @@ -409,7 +406,6 @@ export class Explore extends React.PureComponent { showTrace, showNodeGraph, showFlameGraph, - splitted, timeZone, isFromCompactUrl, } = this.props; @@ -441,11 +437,7 @@ export class Explore extends React.PureComponent { {isFromCompactUrl ? this.renderCompactUrlWarning() : null} {datasourceMissing ? this.renderEmptyState(styles.exploreContainer) : null} {datasourceInstance && ( -
+
{ return ( { syncedTimes, onChangeTimeZone, onChangeFiscalYearStartMonth, - refreshInterval, - loading, isPaused, hasLiveOption, containerWidth, @@ -168,6 +159,7 @@ class UnConnectedExploreToolbar extends PureComponent { return [ !splitted ? ( { Split ) : ( - + - + Close - + ), showExploreToDashboard && ( @@ -217,10 +209,6 @@ class UnConnectedExploreToolbar extends PureComponent { this.renderRefreshPicker(showSmallTimePicker), - refreshInterval && ( - - ), - hasLiveOption && ( {(c) => { @@ -251,12 +239,13 @@ class UnConnectedExploreToolbar extends PureComponent { }; render() { - const { datasourceMissing, exploreId, splitted, containerWidth, topOfViewRef } = this.props; + const { datasourceMissing, exploreId, splitted, containerWidth, topOfViewRef, refreshInterval, loading } = + this.props; const showSmallDataSourcePicker = (splitted ? containerWidth < 700 : containerWidth < 800) || false; const isTopnav = config.featureToggles.topnav; - const getDashNav = () => ( + const shareButton = ( { /> ); - const topNavActions = [ - getDashNav(), - !splitted && getDataSourcePicker(), -
, - - {this.renderActions()} - , - ].filter(Boolean); - - const toolbarLeftItems = [exploreId === ExploreId.left && getDashNav(), getDataSourcePicker()].filter(Boolean); - - const toolbarLeftItemsTopNav = [ - exploreId === ExploreId.left && ( - ].filter( - Boolean - )} - /> - ), + const toolbarLeftItems = [ + // We only want to show the shortened link button in the left Toolbar if topnav is not enabled as with topnav enabled it sits next to the brecrumbs + !isTopnav && exploreId === ExploreId.left && shareButton, getDataSourcePicker(), ].filter(Boolean); - return isTopnav && !splitted ? ( -
- -
- ) : ( + return (
+ {refreshInterval && } + {isTopnav && ( +
+ ]} /> +
+ )} {this.renderActions()} diff --git a/public/app/features/explore/LiveTailButton.tsx b/public/app/features/explore/LiveTailButton.tsx index 304e7aad342..e062dc0d6f7 100644 --- a/public/app/features/explore/LiveTailButton.tsx +++ b/public/app/features/explore/LiveTailButton.tsx @@ -16,7 +16,7 @@ type LiveTailButtonProps = { export function LiveTailButton(props: LiveTailButtonProps) { const { start, pause, resume, isLive, isPaused, stop, splitted } = props; - const buttonVariant = isLive && !isPaused ? 'active' : 'default'; + const buttonVariant = isLive && !isPaused ? 'active' : 'canvas'; const onClickMain = isLive ? (isPaused ? resume : pause) : start; return ( diff --git a/public/app/features/explore/TimeSyncButton.tsx b/public/app/features/explore/TimeSyncButton.tsx index 7745eccf140..d0f74356757 100644 --- a/public/app/features/explore/TimeSyncButton.tsx +++ b/public/app/features/explore/TimeSyncButton.tsx @@ -20,7 +20,7 @@ export function TimeSyncButton(props: TimeSyncButtonProps) {