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

[Log Explorer] Show message column by default #160422

Closed
weltenwort opened this issue Jun 23, 2023 · 5 comments · Fixed by #162678
Closed

[Log Explorer] Show message column by default #160422

weltenwort opened this issue Jun 23, 2023 · 5 comments · Fixed by #162678
Assignees
Labels
Feature:LogsExplorer Logs Explorer feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services

Comments

@weltenwort
Copy link
Member

weltenwort commented Jun 23, 2023

📓 Summary

For time-based dataviews Discover shows the timestamp field and a mixed "document" field by default. In the log-explorer profile we want to show the timestamp and the message field by default when the user selects a dataset.

✔️ Acceptance criteria

  • When the user navigates to Discover with the log-explorer profile...
    • if the URL state is empty, the columns are initialized as
      • the timestamp field of the dataview
      • the field message
    • if the URL state is pre-populated but the columns state is an empty list, the columns are initialized as
      • the timestamp field of the dataview
      • the field message
    • if the URL state is pre-populated and the columns state has content, they are restored from the URL
  • When the user selects a dataset in the dataset selector and the columns application state is an empty list, the columns are initialized as
    • the timestamp field of the dataview
    • the field message
  • When the user selects a dataset in the dataset selector and the columns application state has content, the columns are kept as they were before

💡 Implementation hints

  • This is an intermediate step towards supporting full curation of the columns via packaged or generated saved searches.
@weltenwort weltenwort added Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Jun 23, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@tonyghiani
Copy link
Contributor

💡 Implementation hint

Doing some attempt while waiting on the blocked task, should be achievable with a call to

stateContainer.appState.update({ columns: [TIMESTAMP_FIELD, MESSAGE_FIELD] });

@tonyghiani
Copy link
Contributor

@weltenwort regarding some additional acceptance criteria for this task, what do you think about:

  • When the user lands on the log-explorer profile...
    • if the URL state is empty, should initialize the columns selection to @timestamp and message.
    • if the URL state is pre-populated...
      • in case the columns state is an empty list, should initialize the columns selection to @timestamp and message.
      • in case the columns has content, should restore the existing selection.
  • When the user selects a dataset in the dataset selector...
    • in case the columns state is an empty list, should initialize the columns selection to @timestamp and message.
    • in case the columns has content, should restore the existing selection.

The user could update the columns selection while navigating the datasets, so I thought would be correct to keep their selection if they apply a custom one, so that it can be restored from the URL too. Does it sound correct?

@weltenwort
Copy link
Member Author

Yes, these look good 👍 thank you!

@weltenwort
Copy link
Member Author

ℹ️ I've updated the ACs with your proposed content (just phrased a bit differently).

tonyghiani added a commit that referenced this issue Aug 2, 2023
## 📓 Summary

Closes #160422 

This work sets the columns for the logs explorer to the default
`@timestamp` field and to `message`, giving priority to existing columns
set by the user and applying those when accessing the log explorer with
the default columns.


https://github.com/elastic/kibana/assets/34506779/39c6053b-30b8-4a29-80e4-80aa5718b072

---------

Co-authored-by: Marco Antonio Ghiani <[email protected]>
@gbamparop gbamparop added Feature:LogsExplorer Logs Explorer feature and removed Feature:Logs UI Logs UI feature labels Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:LogsExplorer Logs Explorer feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants