Skip to content

Commit

Permalink
repace refresh button with run
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
  • Loading branch information
paulstn committed Nov 6, 2023
1 parent 1263c81 commit ff84089
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions public/components/common/search/date_picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export function DatePicker(props: IDatePickerProps) {
onTimeChange={handleTimeChange}
onRefresh={handleTimeRangePickerRefresh}
className="osdQueryBar__datePicker"
showUpdateButton={false}
/>
);
}
17 changes: 14 additions & 3 deletions public/components/common/search/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const Search = (props: any) => {
const [isLanguagePopoverOpen, setLanguagePopoverOpen] = useState(false);
const [isFlyoutVisible, setIsFlyoutVisible] = useState(false);
const [queryLang, setQueryLang] = useState(QUERY_LANGUAGE.PPL);
const [timePicker, setTimePicker] = useState(['now', 'now']); // TODO: make sure this default value won't interfere with anything
const sqlService = new SQLService(coreRefs.http);
const { application } = coreRefs;

Expand Down Expand Up @@ -274,15 +275,25 @@ export const Search = (props: any) => {
setIsOutputStale={setIsOutputStale}
liveStreamChecked={props.liveStreamChecked}
onLiveStreamChange={props.onLiveStreamChange}
handleTimePickerChange={(timeRange: string[]) =>
handleTimePickerChange(timeRange)
}
handleTimePickerChange={(timeRange: string[]) => setTimePicker(timeRange)}
handleTimeRangePickerRefresh={() => {
onQuerySearch(queryLang);
}}
/>
)}
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton
iconType={'play'}
fill={true}
onClick={() => {
onQuerySearch(queryLang);
handleTimePickerChange(timePicker);
}}
>
Run
</EuiButton>
</EuiFlexItem>
{showSaveButton && !showSavePanelOptionsList && (
<EuiFlexItem className="euiFlexItem--flexGrowZero live-tail">
<EuiPopover
Expand Down

0 comments on commit ff84089

Please sign in to comment.