Commit 65c1a167 by kay delaney Committed by GitHub

Explore: No longer changes run button red with "cancel" text when live tailing (#24106)

Closes #24079
parent 97c02855
......@@ -324,6 +324,7 @@ export class UnConnectedExploreToolbar extends PureComponent<Props> {
refreshInterval={refreshInterval}
onChangeRefreshInterval={this.onChangeRefreshInterval}
splitted={splitted}
isLive={isLive}
loading={loading || (isLive && !isPaused)}
onRun={this.onRunQuery}
showDropdown={!isLive}
......
......@@ -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 = (
<ResponsiveButton
splitted={splitted}
title={loading ? 'Cancel' : 'Run Query'}
title={loading && !isLive ? 'Cancel' : 'Run Query'}
onClick={() => 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'}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment