Skip to content
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

[Backport 2.x] [Bug] Services Data Picker, UI Fixes #2193

Merged
merged 2 commits into from
Oct 7, 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
4 changes: 2 additions & 2 deletions common/constants/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ export const observabilityMetricsTitle = 'Metrics';
export const observabilityMetricsPluginOrder = 5092;

export const observabilityTracesNewNavID = 'observability-traces-nav';
export const observabilityTracesNewNavURL = observabilityTracesNewNavID + '#/traces';
export const observabilityTracesNewNavURL = observabilityTracesNewNavID;
export const observabilityTracesID = 'observability-traces';
export const observabilityTracesTitle = 'Traces';
export const observabilityTracesPluginOrder = 5093;

export const observabilityServicesNewNavID = 'observability-services-nav';
export const observabilityServicesNewNavURL = observabilityServicesNewNavID + '#/services';
export const observabilityServicesNewNavURL = observabilityServicesNewNavID;
export const observabilityServicesID = 'observability-services';
export const observabilityServicesTitle = 'Services';
export const observabilityServicesPluginOrder = 5092;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,11 @@ exports[`Added Integration View Test Renders added integration view using dummy
>
<EuiFlexGroup
alignItems="center"
gutterSize="m"
gutterSize="s"
wrap={true}
>
<div
className="euiFlexGroup euiFlexGroup--gutterMedium euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
className="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
>
<EuiFlexItem
className="euiSearchBar__searchHolder"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,10 @@ exports[`Metrics Top Menu Component renders Top Menu Component when enabled 1`]
className="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--directionRow euiFlexGroup--responsive"
>
<EuiFlexItem
className="metrics-search-bar-datepicker"
grow={false}
>
<div
className="euiFlexItem euiFlexItem--flexGrowZero metrics-search-bar-datepicker"
className="euiFlexItem euiFlexItem--flexGrowZero"
>
<EuiCompressedSuperDatePicker
commonlyUsedRanges={
Expand Down Expand Up @@ -445,17 +444,17 @@ exports[`Metrics Top Menu Component renders Top Menu Component when enabled 1`]
onTimeChange={[Function]}
recentlyUsedRanges={Array []}
refreshInterval={0}
showUpdateButton={true}
showUpdateButton={false}
start="now-1d"
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 @@ -768,153 +767,70 @@ exports[`Metrics Top Menu Component renders Top Menu Component when enabled 1`]
</EuiFormControlLayout>
</div>
</EuiFlexItem>
<EuiFlexItem
grow={false}
>
<div
className="euiFlexItem euiFlexItem--flexGrowZero"
>
<EuiSuperUpdateButton
compressed={true}
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"
iconType="refresh"
isDisabled={false}
isLoading={false}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
size="s"
textProps={
Object {
"className": "euiSuperUpdateButton__text",
}
}
>
<EuiButtonDisplay
baseClassName="euiButton"
className="euiSuperUpdateButton"
color="primary"
data-test-subj="superDatePickerApplyTimeButton"
disabled={false}
element="button"
iconType="refresh"
isDisabled={false}
isLoading={false}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
size="s"
textProps={
Object {
"className": "euiSuperUpdateButton__text",
}
}
type="button"
>
<button
className="euiButton euiButton--primary euiButton--small euiSuperUpdateButton"
data-test-subj="superDatePickerApplyTimeButton"
disabled={false}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
style={
Object {
"minWidth": undefined,
}
}
type="button"
>
<EuiButtonContent
className="euiButton__content"
iconGap="m"
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>
</EuiCompressedSuperDatePicker>
</div>
</EuiFlexItem>
<EuiFlexItem
grow={false}
>
<div
className="euiFlexItem euiFlexItem--flexGrowZero"
>
<EuiButtonIcon
aria-label="Refresh"
data-click-metric-element="metrics.refresh_button"
data-test-subj="superDatePickerApplyTimeButton"
display="base"
iconType="refresh"
onClick={[Function]}
size="s"
>
<button
aria-label="Refresh"
className="euiButtonIcon euiButtonIcon--primary euiButtonIcon--small"
data-click-metric-element="metrics.refresh_button"
data-test-subj="superDatePickerApplyTimeButton"
disabled={false}
onClick={[Function]}
type="button"
>
<EuiIcon
aria-hidden="true"
className="euiButtonIcon__icon"
color="inherit"
size="m"
type="refresh"
>
<EuiIconBeaker
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonIcon__icon"
focusable="false"
role="img"
style={null}
>
<svg
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonIcon__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>
</button>
</EuiButtonIcon>
</div>
</EuiFlexItem>
<EuiFlexItem
grow={false}
>
Expand Down
15 changes: 14 additions & 1 deletion public/components/metrics/top_menu/top_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import {
EuiButtonIcon,
EuiCompressedFieldText,
EuiCompressedSelect,
EuiCompressedSuperDatePicker,
Expand Down Expand Up @@ -52,13 +53,25 @@ export const TopMenu = () => {
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFlexGroup gutterSize="s">
<EuiFlexItem grow={false} className="metrics-search-bar-datepicker">
<EuiFlexItem grow={false}>
<EuiCompressedSuperDatePicker
dateFormat={uiSettingsService.get('dateFormat')}
start={dateSpanFilter.start}
end={dateSpanFilter.end}
onTimeChange={(dateSpan) => dispatch(setDateSpan(dateSpan))}
recentlyUsedRanges={dateSpanFilter.recentlyUsedRanges}
showUpdateButton={false}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonIcon
iconType="refresh"
aria-label="Refresh"
display="base"
onClick={() => dispatch(setDateSpan(dateSpanFilter))}
size="s"
data-test-subj="superDatePickerApplyTimeButton"
data-click-metric-element="metrics.refresh_button"
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
Expand Down
8 changes: 4 additions & 4 deletions public/components/overview/components/card_configs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { i18n } from '@osd/i18n';
import {
observabilityGettingStartedID,
observabilityMetricsID,
observabilityTracesNewNavURL,
observabilityServicesNewNavURL,
observabilityTracesNewNavID,
observabilityServicesNewNavID,
alertingPluginID,
anomalyDetectionPluginID,
tutorialSampleDataPluginId,
Expand Down Expand Up @@ -82,7 +82,7 @@ const TRACES_CONFIG: GettingStartedConfig = {
}),
description: 'Analyze performance bottlenecks using event flow visualizations.',
footer: 'Traces',
url: observabilityTracesNewNavURL,
url: observabilityTracesNewNavID,
path: '#/',
};

Expand All @@ -94,7 +94,7 @@ const SERVICES_CONFIG: GettingStartedConfig = {
}),
description: 'Identify service performance issues with comprehensive monitoring and analysis.',
footer: 'Services',
url: observabilityServicesNewNavURL,
url: observabilityServicesNewNavID,
path: '#/',
};

Expand Down
Loading
Loading