|
1 |
| -import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiPopover, EuiSpacer, EuiTitle } from '@elastic/eui' |
| 1 | +import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiPopover, EuiSpacer, EuiTitle, EuiToolTip } from '@elastic/eui' |
2 | 2 | import cx from 'classnames'
|
3 | 3 | import React, { useEffect, useState } from 'react'
|
4 | 4 | import { monaco } from 'react-monaco-editor'
|
@@ -31,7 +31,7 @@ export interface Props {
|
31 | 31 | params?: CodeButtonParams
|
32 | 32 | }
|
33 | 33 |
|
34 |
| -const FINISHED_COMMAND_INDICATOR_TIME_MS = 3_000 |
| 34 | +const FINISHED_COMMAND_INDICATOR_TIME_MS = 5_000 |
35 | 35 |
|
36 | 36 | const CodeButtonBlock = (props: Props) => {
|
37 | 37 | const {
|
@@ -136,20 +136,25 @@ const CodeButtonBlock = (props: Props) => {
|
136 | 136 | scrollLock: true
|
137 | 137 | }}
|
138 | 138 | button={(
|
139 |
| - <EuiButton |
140 |
| - onClick={handleRunClicked} |
141 |
| - iconType={isRunned ? 'check' : 'play'} |
142 |
| - iconSide="right" |
143 |
| - color="success" |
144 |
| - size="s" |
145 |
| - disabled={isLoading || isRunned} |
146 |
| - isLoading={isLoading} |
147 |
| - className={cx(styles.actionBtn, styles.runBtn)} |
148 |
| - {...rest} |
149 |
| - data-testid={`run-btn-${label}`} |
| 139 | + <EuiToolTip |
| 140 | + content={isPopoverOpen ? undefined : 'Open Workbench in the left menu to see the command results.'} |
| 141 | + data-testid="run-btn-open-workbench-tooltip" |
150 | 142 | >
|
151 |
| - Run |
152 |
| - </EuiButton> |
| 143 | + <EuiButton |
| 144 | + onClick={handleRunClicked} |
| 145 | + iconType={isRunned ? 'check' : 'play'} |
| 146 | + iconSide="right" |
| 147 | + color="success" |
| 148 | + size="s" |
| 149 | + disabled={isLoading || isRunned} |
| 150 | + isLoading={isLoading} |
| 151 | + className={cx(styles.actionBtn, styles.runBtn)} |
| 152 | + {...rest} |
| 153 | + data-testid={`run-btn-${label}`} |
| 154 | + > |
| 155 | + Run |
| 156 | + </EuiButton> |
| 157 | + </EuiToolTip> |
153 | 158 | )}
|
154 | 159 | >
|
155 | 160 | {!!notLoadedModule && (
|
|
0 commit comments