From 65c1a16786b575e440b814ac2d3995ba03c8373d Mon Sep 17 00:00:00 2001 From: kay delaney <45561153+kaydelaney@users.noreply.github.com> Date: Tue, 5 May 2020 09:40:47 +0100 Subject: [PATCH] Explore: No longer changes run button red with "cancel" text when live tailing (#24106) Closes #24079 --- public/app/features/explore/ExploreToolbar.tsx | 1 + public/app/features/explore/RunButton.tsx | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/public/app/features/explore/ExploreToolbar.tsx b/public/app/features/explore/ExploreToolbar.tsx index 58e7d8087de..2698a570e87 100644 --- a/public/app/features/explore/ExploreToolbar.tsx +++ b/public/app/features/explore/ExploreToolbar.tsx @@ -324,6 +324,7 @@ export class UnConnectedExploreToolbar extends PureComponent { refreshInterval={refreshInterval} onChangeRefreshInterval={this.onChangeRefreshInterval} splitted={splitted} + isLive={isLive} loading={loading || (isLive && !isPaused)} onRun={this.onRunQuery} showDropdown={!isLive} diff --git a/public/app/features/explore/RunButton.tsx b/public/app/features/explore/RunButton.tsx index a5d975d8748..7f33ca81f69 100644 --- a/public/app/features/explore/RunButton.tsx +++ b/public/app/features/explore/RunButton.tsx @@ -21,6 +21,7 @@ const getStyles = memoizeOne(() => { type Props = { splitted: boolean; loading: boolean; + isLive: boolean; onRun: (loading: boolean) => void; refreshInterval?: string; onChangeRefreshInterval: (interval: string) => void; @@ -28,17 +29,17 @@ type Props = { }; export function RunButton(props: Props) { - const { splitted, loading, onRun, onChangeRefreshInterval, refreshInterval, showDropdown } = props; + const { splitted, loading, onRun, onChangeRefreshInterval, refreshInterval, showDropdown, isLive } = props; const styles = getStyles(); const runButton = ( onRun(loading)} buttonClassName={classNames({ - 'navbar-button--primary': !loading, - 'navbar-button--danger': loading, + 'navbar-button--primary': isLive || !loading, + 'navbar-button--danger': loading && !isLive, 'btn--radius-right-0': showDropdown, })} icon={loading ? 'fa fa-spinner' : 'sync'}