-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Logs UI] Use short timestamps in the log stream view #47042
Conversation
Pinging @elastic/infra-logs-ui |
💔 Build Failed |
be227dc
to
039c171
Compare
💔 Build Failed |
x-pack/legacy/plugins/infra/public/components/formatted_time.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/infra/public/components/formatted_time.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/infra/public/components/logging/log_text_stream/column_headers.tsx
Outdated
Show resolved
Hide resolved
039c171
to
934f683
Compare
💔 Build Failed |
9bb2fc1
to
643f539
Compare
💔 Build Failed |
643f539
to
d3bdd0a
Compare
💔 Build Failed |
d3bdd0a
to
10ac82e
Compare
x-pack/legacy/plugins/infra/public/components/formatted_time.tsx
Outdated
Show resolved
Hide resolved
columnWidth={columnWidths[columnConfiguration.timestampColumn.id]} | ||
data-test-subj="logColumnHeader timestampLogColumnHeader" | ||
> | ||
{firstVisiblePosition ? localizedDate(firstVisiblePosition.time) : 'Timestamp'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I like that localizedDate
is a utility function which can be used directly, by hooks, etc
x-pack/legacy/plugins/infra/public/utils/formatters/datetime.ts
Outdated
Show resolved
Hide resolved
💔 Build Failed |
💔 Build Failed
|
7a237c0
to
94ae431
Compare
💔 Build Failed
|
💔 Build Failed
|
b766a14
to
d9af56d
Compare
💚 Build Succeeded
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩👍
@@ -83,13 +89,16 @@ const LogColumnHeadersWrapper = euiStyled.div.attrs({ | |||
justify-content: flex-start; | |||
overflow: hidden; | |||
padding-right: ${ASSUMED_SCROLLBAR_WIDTH}px; | |||
border-bottom: ${props => props.theme.eui.euiBorderThin}; | |||
box-shadow: 0 2px 2px -1px ${props => transparentize(0.3, props.theme.eui.euiColorLightShade)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could use the euiSlightShadow
mixin here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could use the
euiSlightShadow
mixin here.
I'm not sure that can be done with the CSS-in-JS library we use. I'll give it a shot
Allows the consumers of the hook to specify if they want to show the full date and time or just the time.
I tweaked the `RendererResult` type to allow returning strings as well in the renderer of `WithLogPosition`.
Make the wrapper relative to ensure the shadow stays on top of the rows, even when they are hovered.
d9af56d
to
0347e3e
Compare
💚 Build Succeeded |
This commit changes the appearance of the log stream page. It removes the date value from the timestamp column, making it shorter and giving more space for the message of the log When the date of two log entries is different, we add a marker to indicate this change. The date of the first visible log item is written in the header of the table.
Summary
This PR changes the appearance of the log stream page. It removes the date value from the timestamp column, making it shorter and giving more space for the message.
When the date of two log entries is different, we add a marker to indicate this change. The date of the first visible log item is written in the header of the table.
Screenshots
Before:
After:
Known issues
When the user scrolls past a date marker the table header takes around a second to update. This is related to how we handle scrolling in this view. Since this also affects other parts of the view (i.e., how the minimap updates) and needs a big refactor, I would suggest to fix it in a different PR.
Closes #45986.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibilityFor maintainers
This was checked for breaking API changes and was labeled appropriately