Skip to content

Commit

Permalink
[Unified search] Adds 1minute option to the date picker (#172944)
Browse files Browse the repository at this point in the history
## Summary

Adds 1 minute option to the commonly used section of unified search
datepicker. There are use cases which this can be very beneficiary.

<img width="1672" alt="image"
src="https://github.com/elastic/kibana/assets/17003240/3b9ab27d-6e7d-43fd-8a2d-d74e0758177c">
  • Loading branch information
stratoula authored Dec 11, 2023
1 parent f5dec20 commit 1a6ab7e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
9 changes: 8 additions & 1 deletion src/plugins/data/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,13 @@ export function getUiSettings(
defaultMessage: 'This week',
}),
},
{
from: 'now-1m',
to: 'now',
display: i18n.translate('data.advancedSettings.timepicker.last1Minute', {
defaultMessage: 'Last 1 minute',
}),
},
{
from: 'now-15m',
to: 'now',
Expand Down Expand Up @@ -471,7 +478,7 @@ export function getUiSettings(
to: schema.string(),
display: schema.string(),
}),
{ maxSize: 10 }
{ maxSize: 12 }
)
: schema.arrayOf(
schema.object({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
.kbnQueryBar__datePickerWrapper {
.euiDatePopoverButton-isInvalid {
background-image: euiFormControlGradient($euiColorDanger);

// @todo Remove when EUI issue is resolved.
// @see https://github.com/elastic/eui/issues/4612
&:focus {
color: $euiTextColor;
background-color: $euiFormBackgroundColor;
background-image: euiFormControlGradient($euiColorPrimary);
}
}
}
// increase the section height to avoid vertical scrolling
.euiQuickSelectPopover__section {
max-height: 142px;
}

0 comments on commit 1a6ab7e

Please sign in to comment.