-
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
[Infra UI] Add tooltips to Asset Details #164858
[Infra UI] Add tooltips to Asset Details #164858
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
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.
Nice 🚀 ! The tooltips are working as expected. Just left one comment concerning the metadata timestamp, but, overall, it looks good.
const { getDateRangeInTimestamp } = useDateRangeProviderContext(); | ||
const dateFromRange = new Date(getDateRangeInTimestamp().to); | ||
const dateString = dateFromRange.toLocaleDateString(); | ||
const timeString = dateFromRange.toLocaleTimeString(); |
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.
This is OK (I think), but it's not entirely true. The true timestamp of the latest metadata info, should come from the /api/infra/metadata
endpoint.
The query is here, adding TIMESTAMP_FIELD
to _source
and propagating it in the endpoint response will give the FE the right information.
Both values (metadata API timestamp and date picker timestamp) will be pretty close if the period in metricbeat is set to 10s, but I suspect that they might diverge if the period in metricbeat is set to 1m.
Might be worth testing it.
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 am not sure if I understand this issue: I checked the request and the date/time shown in there and we have the to
matching with the date shown:
In my metricbeat config I have:
- module: system
metricsets:
............
period: 1m
processes: [".*"]
So I saw that we pass that time range when we do the request to get the metadata as this is the to
date should we have "before" {date/time} not "on" {date/time} in the text to be clear as it's at the end of the range 🤔
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.
What you're seeing in your screenshot is the request payload? We pass that to the API, which runs a query using that range and returns that top 1 desc document.
This top 1 desc doc timestamp could be the same or pretty close to to
. But if the last document ingested was 30 seconds before to
, then there should be a small difference between that and to
.
Not sure if it's clear. Happy to discuss over slack.
@crespocarlos So I updated the date format and added the missing seconds to the time value and now it should match the datapicker and also should be localized as I used the i18n formatter. Wdyt? |
@@ -83,6 +83,7 @@ export const InfraMetadataInfoRT = rt.partial({ | |||
cloud: InfraMetadataCloudRT, | |||
host: InfraMetadataHostRT, | |||
agent: InfraMetadataAgentRT, | |||
'@timestamp': rt.string, |
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.
Q: would it be better if the API returned timestamp
without the @
?
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.
What is the difference there - Is it because of the usage of metadata?.info?.['@timestamp']
? Where do we want to rename it - if I change the type the response should also change the _source
and there I should use the @timestamp
. So after changing this type, I need to have a different type here in the response and then map the response to the timestamp
key using the @timestamp
value from the response. I don't see how changing this type will fix all that, it looks more confusing to use the timestamp
mapped to the @timestamp
and have 2 types for the response 🤔
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.
A new type was added as discussed (commit)
…://github.com/jennypavlova/kibana into 164594-infra-ui-add-tooltips-to-asset-details
Thanks for making the changes @jennypavlova. I've noticed a couple of things. On the metadata, while the page waits for the endpoint to respond, the date/and time shows the value from the date picker. metadata_loading.movAlso on the processes tab, when looking at a date range where there is no data, we are showing the message. I now I'm starting to think that it's confusing. We might want to double check that with @roshan-elastic and @kkurstak ![]() It seems like we shouldn't show the message + tooltip when there is data to be in those tabs. Wdyt? |
@crespocarlos Thanks for checking that! |
@crespocarlos @kkurstak - Maybe we should just remove the 'Showing process data...' message completely if no processes are found? Maybe it's helpful to show it though? @kkurstak - what's your initial reaction? |
So regarding the metadata loading, I added a spinner, it will look like this: metadata_loading_spinner.mov |
…://github.com/jennypavlova/kibana into 164594-infra-ui-add-tooltips-to-asset-details
The processes message is now displayed only if we have data and no error: ![]() Regarding the metadata integration test that is currently failing - I am getting different dates locally and in the ci ( It should be the same data I think but I got some failed tests because of that 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.
hey @jennypavlova , there are a couple of things I'd like to get your opinion on:
- When looking at a future date, the metadata tooltip is shown with the date picker's end date. Should we hide when there is no data too?

- Should there be a loading indicator for the Processes tab's tooltip?
processes_loading_indicator.mov
This is great @jennypavlova - I like your initiative and thinking here. Why do we need me? 🤣 |
Hey @crespocarlos, I mentioned you there to help with the code review in case you are wondering what the issue was and why I am changing it and to hear what you think about it :) |
@crespocarlos Thank you for the review!
It makes sense to check the metadata before showing the tooltip - In this case now that we have
Added, thank you for finding that!
@roshan-elastic Thanks for the input! We did that and added similar logic for the metadata 🙂 |
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.
LGTM 🚀 !! Thanks for all the improvements.
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
Closes elastic#164594 ## Summary This PR adds tooltips to explain the time range used to collect process data and metadata. The tooltips will be shown inside the overview (metadata summary section) tab, metadata tab, and processes tab (both flyout and full page views). ## Fixes I saw that the icons showing different explanation/ docs links inside the overveiew tab are not consistent ( sometimes we have `questionInCircle` and sometimes `iInCircles`) - the designs are using `iInCircles` so I changed it everywhere: <img width="671" alt="icons" src="https://github.com/elastic/kibana/assets/14139027/edda271b-5030-4d83-9722-448fbae8cf8b"> ## Testing 1. Go to host view and open the flyout for any host. The new explanation and tooltips should be shown in: - Overview tab <img width="938" alt="overview" src="https://github.com/elastic/kibana/assets/14139027/ac4ae369-d825-4fba-8865-c9410de29c28"> - Metadata tab <img width="945" alt="metadata" src="https://github.com/elastic/kibana/assets/14139027/4d174bf3-3411-40a5-a208-eb5df2266c61"> - Processed tab <img width="937" alt="processes" src="https://github.com/elastic/kibana/assets/14139027/11d32c66-4a25-4fce-a95e-42698f2e1682"> 2. Click Open as page and check the same on the asset details page <img width="1653" alt="Screenshot 2023-08-28 at 11 28 47" src="https://github.com/elastic/kibana/assets/14139027/342d1565-bb51-4961-b8ac-8b8270c851ff"> <img width="1637" alt="Screenshot 2023-08-28 at 11 28 32" src="https://github.com/elastic/kibana/assets/14139027/63b66a12-d634-4ecc-83de-ad1e1b79334c"> <img width="1649" alt="Screenshot 2023-08-28 at 11 28 16" src="https://github.com/elastic/kibana/assets/14139027/59720bf3-88ad-44b1-8584-769b38d956ed"> --------- Co-authored-by: Kibana Machine <[email protected]>
Closes #164594
Summary
This PR adds tooltips to explain the time range used to collect process data and metadata. The tooltips will be shown inside the overview (metadata summary section) tab, metadata tab, and processes tab (both flyout and full page views).
Fixes
I saw that the icons showing different explanation/ docs links inside the overveiew tab are not consistent ( sometimes we have

questionInCircle
and sometimesiInCircles
) - the designs are usingiInCircles
so I changed it everywhere:Testing
Go to host view and open the flyout for any host. The new explanation and tooltips should be shown in:
Click Open as page and check the same on the asset details page