Skip to content

[Backport 2.x] removed update button from explorer #1775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -405,17 +405,17 @@ exports[`Explorer Search component renders basic component 1`] = `
onTimeChange={[Function]}
recentlyUsedRanges={Array []}
refreshInterval={0}
showUpdateButton={true}
showUpdateButton={false}
start="now-15m"
timeFormat="HH:mm"
>
<EuiFlexGroup
className="euiSuperDatePicker__flexWrapper"
className="euiSuperDatePicker__flexWrapper euiSuperDatePicker__flexWrapper--noUpdateButton"
gutterSize="s"
responsive={false}
>
<div
className="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--directionRow euiSuperDatePicker__flexWrapper"
className="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--directionRow euiSuperDatePicker__flexWrapper euiSuperDatePicker__flexWrapper--noUpdateButton"
>
<EuiFlexItem>
<div
Expand Down Expand Up @@ -724,146 +724,6 @@ exports[`Explorer Search component renders basic component 1`] = `
</EuiFormControlLayout>
</div>
</EuiFlexItem>
<EuiFlexItem
grow={false}
>
<div
className="euiFlexItem euiFlexItem--flexGrowZero"
>
<EuiSuperUpdateButton
data-test-subj="superDatePickerApplyTimeButton"
isDisabled={false}
isLoading={false}
needsUpdate={false}
onClick={[Function]}
showTooltip={true}
>
<EuiToolTip
delay="regular"
position="bottom"
>
<span
className="euiToolTipAnchor"
onKeyUp={[Function]}
onMouseOut={[Function]}
onMouseOver={[Function]}
>
<EuiButton
className="euiSuperUpdateButton"
color="primary"
data-test-subj="superDatePickerApplyTimeButton"
fill={true}
iconType="refresh"
isDisabled={false}
isLoading={false}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
textProps={
Object {
"className": "euiSuperUpdateButton__text",
}
}
>
<EuiButtonDisplay
baseClassName="euiButton"
className="euiSuperUpdateButton"
color="primary"
data-test-subj="superDatePickerApplyTimeButton"
disabled={false}
element="button"
fill={true}
iconType="refresh"
isDisabled={false}
isLoading={false}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
textProps={
Object {
"className": "euiSuperUpdateButton__text",
}
}
type="button"
>
<button
className="euiButton euiButton--primary euiButton--fill euiSuperUpdateButton"
data-test-subj="superDatePickerApplyTimeButton"
disabled={false}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
style={
Object {
"minWidth": undefined,
}
}
type="button"
>
<EuiButtonContent
className="euiButton__content"
iconSide="left"
iconType="refresh"
isLoading={false}
textProps={
Object {
"className": "euiButton__text euiSuperUpdateButton__text",
}
}
>
<span
className="euiButtonContent euiButton__content"
>
<EuiIcon
className="euiButtonContent__icon"
color="inherit"
size="m"
type="refresh"
>
<EuiIconBeaker
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonContent__icon"
focusable="false"
role="img"
style={null}
>
<svg
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonContent__icon"
focusable="false"
height={16}
role="img"
style={null}
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5.277 10.088c.02.014.04.03.057.047.582.55 1.134.812 1.666.812.586 0 1.84-.293 3.713-.88L9 6.212V2H7v4.212l-1.723 3.876Zm-.438.987L3.539 14h8.922l-1.32-2.969C9.096 11.677 7.733 12 7 12c-.74 0-1.463-.315-2.161-.925ZM6 2H5V1h6v1h-1v4l3.375 7.594A1 1 0 0 1 12.461 15H3.54a1 1 0 0 1-.914-1.406L6 6V2Z"
/>
</svg>
</EuiIconBeaker>
</EuiIcon>
<span
className="euiButton__text euiSuperUpdateButton__text"
>
<EuiI18n
default="Refresh"
token="euiSuperUpdateButton.refreshButtonLabel"
>
Refresh
</EuiI18n>
</span>
</span>
</EuiButtonContent>
</button>
</EuiButtonDisplay>
</EuiButton>
</span>
</EuiToolTip>
</EuiSuperUpdateButton>
</div>
</EuiFlexItem>
</div>
</EuiFlexGroup>
</EuiSuperDatePicker>
Expand Down
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 @@ -11,7 +11,7 @@
export function DatePicker(props: IDatePickerProps) {
const { startTime, endTime, handleTimePickerChange, handleTimeRangePickerRefresh } = props;

const handleTimeChange = (e: any) => handleTimePickerChange([e.start, e.end]);

Check warning on line 14 in public/components/common/search/date_picker.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type

return (
<EuiSuperDatePicker
Expand All @@ -22,6 +22,7 @@
onTimeChange={handleTimeChange}
onRefresh={handleTimeRangePickerRefresh}
className="osdQueryBar__datePicker"
showUpdateButton={false}
/>
);
}
Loading