Kibana version: 7.8.1
Elasticsearch version: 7.8.1
Server OS version: Ubuntu 20.04 LTS
Browser version: Google Chrome 84.0.4147.125
Browser OS version: Windows 10 2004 Enterprise
Original install method (e.g. download page, yum, from source, etc.): Debian repository
Describe the bug: TSVB shows more than one date even when specifically stating you only want the top 1 record
Steps to reproduce:
Expected behavior: Should only show 1 date
Screenshots (if relevant): https://discuss.elastic.co/t/tsvb-markdown-dates/215916
Errors in browser console (if relevant): None
Provide logs and/or server output (if relevant): Not relevant
Any additional context: This was brought up back in January by Mack_rogers, and there was a suggestion to file a bug report. There is no indication as to whether it was reported or not, and the thread is now closed:
Pinging @elastic/kibana-app (Team:KibanaApp)
I think this explains the behaviour of TSVB, I think it works as expected :)
@stratoula I still do not feel that TSVB is working as expected. The suggestion at the bottom of the page you linked said to use last.formatted. In both the screenshots from that post, and my own console, last.formatted only displays "0". This does not give me the formatted date value I am after. I am totally open to other suggestions, but at this point, I feel not being able to display a formatted date value is a bug. I need to display several different fields from the top 1 document returned, and a date field is one of them (not @timestamp).
I am not sure how to post a screenshot here, but a record will contain user.name, user.last_logon, etc. The last_logon field is a date retrieved from Active Directory. This field is indexed as a Date type, and it displays just fine in Data Tables, Discover, etc. Here is a snippet copy/pasted from Discover:
user.name | jdoe
user.last_logon | May 28, 2020 @ 17:41:15.000
Now in TSVB, I add the fields I want to display, using only the above two as examples, and these are my options presented:
{{ jdoe.user_name.last.raw }} | โ0โ
{{ jdoe.user_name.last.formatted }} | โ0โ
{{ jdoe.user_name.data.raw }} | [ [ โ1597781400000โ, โ0โ ], ... ]
{{ jdoe.user_name.data.formatted }} | [ [ โAug 19, 2020 @ 13:58:20.000โ, โ0โ ], ... ]
{{ jdoe.label }} | โjdoeโ
{{ 1590687675000.last_logon.last.raw }} | โ0โ
{{ 1590687675000.last_logon.last.formatted }} | โ0โ
{{ 1590687675000.last_logon.data.raw }} | [ [ โ1597867100000โ, โ0โ ], ... ]
{{ 1590687675000.last_logon.data.formatted }} | [ [ โAug 19, 2020 @ 13:58:20.000โ, โ0โ ], ... ]
{{ 1590687675000.label }} | โ-1590687675000โ
It appears the only correct value for the last_logon variable is the label (but negative???), but it is in epoch time. The data.raw and data.formatted both show NOW, and the last.raw and last.formatted always show "0". How do I display the "label" value as a human-readable date in TSVB Markdown just as it displays everywhere else in Kibana?
@MakoWish I see, you can use the label but you prefer a more human-readable format. We will look into this! Thanks for sharing :)
Thank you @stratoula !