Skip to content

Commit 8e1e7d7

Browse files
[Backport 2.14] removed update button from explorer (#1776)
* remove update button * update snapshot --------- (cherry picked from commit cb845f2) Signed-off-by: Paul Sebastian <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 95679a2 commit 8e1e7d7

File tree

2 files changed

+4
-143
lines changed

2 files changed

+4
-143
lines changed

public/components/common/search/__tests__/__snapshots__/search.test.tsx.snap

+3-143
Original file line numberDiff line numberDiff line change
@@ -405,17 +405,17 @@ exports[`Explorer Search component renders basic component 1`] = `
405405
onTimeChange={[Function]}
406406
recentlyUsedRanges={Array []}
407407
refreshInterval={0}
408-
showUpdateButton={true}
408+
showUpdateButton={false}
409409
start="now-15m"
410410
timeFormat="HH:mm"
411411
>
412412
<EuiFlexGroup
413-
className="euiSuperDatePicker__flexWrapper"
413+
className="euiSuperDatePicker__flexWrapper euiSuperDatePicker__flexWrapper--noUpdateButton"
414414
gutterSize="s"
415415
responsive={false}
416416
>
417417
<div
418-
className="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--directionRow euiSuperDatePicker__flexWrapper"
418+
className="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--directionRow euiSuperDatePicker__flexWrapper euiSuperDatePicker__flexWrapper--noUpdateButton"
419419
>
420420
<EuiFlexItem>
421421
<div
@@ -724,146 +724,6 @@ exports[`Explorer Search component renders basic component 1`] = `
724724
</EuiFormControlLayout>
725725
</div>
726726
</EuiFlexItem>
727-
<EuiFlexItem
728-
grow={false}
729-
>
730-
<div
731-
className="euiFlexItem euiFlexItem--flexGrowZero"
732-
>
733-
<EuiSuperUpdateButton
734-
data-test-subj="superDatePickerApplyTimeButton"
735-
isDisabled={false}
736-
isLoading={false}
737-
needsUpdate={false}
738-
onClick={[Function]}
739-
showTooltip={true}
740-
>
741-
<EuiToolTip
742-
delay="regular"
743-
position="bottom"
744-
>
745-
<span
746-
className="euiToolTipAnchor"
747-
onKeyUp={[Function]}
748-
onMouseOut={[Function]}
749-
onMouseOver={[Function]}
750-
>
751-
<EuiButton
752-
className="euiSuperUpdateButton"
753-
color="primary"
754-
data-test-subj="superDatePickerApplyTimeButton"
755-
fill={true}
756-
iconType="refresh"
757-
isDisabled={false}
758-
isLoading={false}
759-
onBlur={[Function]}
760-
onClick={[Function]}
761-
onFocus={[Function]}
762-
textProps={
763-
Object {
764-
"className": "euiSuperUpdateButton__text",
765-
}
766-
}
767-
>
768-
<EuiButtonDisplay
769-
baseClassName="euiButton"
770-
className="euiSuperUpdateButton"
771-
color="primary"
772-
data-test-subj="superDatePickerApplyTimeButton"
773-
disabled={false}
774-
element="button"
775-
fill={true}
776-
iconType="refresh"
777-
isDisabled={false}
778-
isLoading={false}
779-
onBlur={[Function]}
780-
onClick={[Function]}
781-
onFocus={[Function]}
782-
textProps={
783-
Object {
784-
"className": "euiSuperUpdateButton__text",
785-
}
786-
}
787-
type="button"
788-
>
789-
<button
790-
className="euiButton euiButton--primary euiButton--fill euiSuperUpdateButton"
791-
data-test-subj="superDatePickerApplyTimeButton"
792-
disabled={false}
793-
onBlur={[Function]}
794-
onClick={[Function]}
795-
onFocus={[Function]}
796-
style={
797-
Object {
798-
"minWidth": undefined,
799-
}
800-
}
801-
type="button"
802-
>
803-
<EuiButtonContent
804-
className="euiButton__content"
805-
iconSide="left"
806-
iconType="refresh"
807-
isLoading={false}
808-
textProps={
809-
Object {
810-
"className": "euiButton__text euiSuperUpdateButton__text",
811-
}
812-
}
813-
>
814-
<span
815-
className="euiButtonContent euiButton__content"
816-
>
817-
<EuiIcon
818-
className="euiButtonContent__icon"
819-
color="inherit"
820-
size="m"
821-
type="refresh"
822-
>
823-
<EuiIconBeaker
824-
aria-hidden={true}
825-
className="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonContent__icon"
826-
focusable="false"
827-
role="img"
828-
style={null}
829-
>
830-
<svg
831-
aria-hidden={true}
832-
className="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonContent__icon"
833-
focusable="false"
834-
height={16}
835-
role="img"
836-
style={null}
837-
viewBox="0 0 16 16"
838-
width={16}
839-
xmlns="http://www.w3.org/2000/svg"
840-
>
841-
<path
842-
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"
843-
/>
844-
</svg>
845-
</EuiIconBeaker>
846-
</EuiIcon>
847-
<span
848-
className="euiButton__text euiSuperUpdateButton__text"
849-
>
850-
<EuiI18n
851-
default="Refresh"
852-
token="euiSuperUpdateButton.refreshButtonLabel"
853-
>
854-
Refresh
855-
</EuiI18n>
856-
</span>
857-
</span>
858-
</EuiButtonContent>
859-
</button>
860-
</EuiButtonDisplay>
861-
</EuiButton>
862-
</span>
863-
</EuiToolTip>
864-
</EuiSuperUpdateButton>
865-
</div>
866-
</EuiFlexItem>
867727
</div>
868728
</EuiFlexGroup>
869729
</EuiSuperDatePicker>

public/components/common/search/date_picker.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export function DatePicker(props: IDatePickerProps) {
2222
onTimeChange={handleTimeChange}
2323
onRefresh={handleTimeRangePickerRefresh}
2424
className="osdQueryBar__datePicker"
25+
showUpdateButton={false}
2526
/>
2627
);
2728
}

0 commit comments

Comments
 (0)