Kibana: Possibility to hide time field in Discover view

Created on 11 Mar 2015  路  63Comments  路  Source: elastic/kibana

It would be nice, if you could hide the Time field in the Discover view (or saved searches) if you select individual columns. Currently there is only: _source and time is shown if nothing is selected. And time and other columns are shown if you start to add columns.

Would be nice to have the possibility to be able to deselect the time column also in that case, because one might not want to have this visible, especially if you want to place saved searched on a Dashboard in a kind of small area.

Discover Kibana Management KibanaApp good first issue enhancement

Most helpful comment

Hi,

Just to say that this feature will be available in Kibana 6.7!

So @timroes could you close the issue?

All 63 comments

Also it would be great to have default sorting by relevance, not by Time field.

:+1: this has proven to be quite annoying (compared to Kibana 3). It takes a lot of room and is not always relevant.

Thanks :)

+1

+1

+1

+1

+1

+1

++

+1

+1

+1

+1

+1 .. or selecting a different time field for a Discover view and not only the indice

I totally quote @gmalkas ! It simply a step backward compared to K3!!!

+1

+1

+1

+1

+1

+1

+1

+1

+1 have people found a workaround or has this been forgotten?

+1

+1

+1

+1

+1

+1

+1

+1

+1 This is a totally killer for using kibana as a dashboard for me.

+1 This would be ideal.

:+1:

+1 with a vengeance.

+1

Well - I just successfully hid the default 'Time' / indexPattern.timeFieldName column from the Discover Dashboard! In the following JavaScript file, I caused 2 IF-Conditions, which are responsible for displaying this column, to fail.
$KIBANA_HOME/optimize/bundles/kibana.bundle.js

On Line 118, there are two places where I changed the fieldname to an invalid fieldname:

<th ng-if="indexPattern.timeFieldName2" ...
;indexPattern.timeFieldName2&&newHtmls.push

Note that timeFieldName has been changed to timeFieldName2 - hence the IF-condition will fail and the column will not get displayed. I don't know if this might break any code, but for now, my Dashboards look shiny without the default/annoying 'Time' column.

Post Scriptum: I am using Kibana 5.5.2

+1

+1

+1

+1

Temporary solution for me was to add http://tampermonkey.net/ chrome extension and run a custom javascript to remove the dates from the column. This could easilly be adjusted to completely remove the column.

(function() {
'use strict';

setInterval(function(){

$(".discover-table-timefield").each( function(i, obj) { obj.innerHTML = obj.innerHTML.replace(/[A-Z][a-z]* [0-9]{1,2}[a-z ]{0,4}[0-9]{4}, ([0-9:\.]{8})/,'$1'); });

}, 5000);

})();

+1

+1
kibana 5.6.8

+1

+1

+1

+1

+1

+1

+1

Thanks @sgrover01 . Your solution worked for me :) (though with a slight modification)

I am using Kibana 6.2.1. I changed

mapping=indexPattern.fields.byName;indexPattern.timeFieldName&&newHtmls.push

to

mapping=indexPattern.fields.byName;indexPattern.timeFieldName2&&newHtmls.push
in

$KIBANA_HOME/optimize/bundles/kibana.bundle.js

on line 12.

Well, given the workaround found by some users, an easy way to implement the feature would be to add a new boolean advanced setting (say "discover:hideTimeColumn") which lets to hide time column both on Discover tab and Saved Searches in dashboards.
And despite this setting is enabled, people can still voluntary add "@timestamp" column on Discover view or a saved searches.

This seems to be different in 6.2.4.... or at least I can't find that setting in the kibana.bundle.js file.

+1

@fbaligand has kindly taken the time to put together #23897, which adds an Advanced Setting that addresses some use cases related to this issue.

As @fbaligand explains in the PR:

When this advanced setting (boolean) is enabled, on discover app and saved searches on Dashboard app, the first 'Time' column is not displayed.
...
Despite this setting is enabled, users can still add '@timestamp' field manually on some saved searches.

We will be keeping this issue open as there are other use cases that have yet to be addressed (like removing the Time column on a per-saved-search basis, or making it behave more like a "normal" column), but wanted to make a note here for any folks following the issue who may be able to make use of the new setting.

Hope that this new feature will somewhat answer the need requested here!

BTW, a cool way to have the "time" column removable or movable as you wish, is to set @timestamp,_source as value for "defaultColumns" advanced setting.

+1

Hi,

Just to say that this feature will be available in Kibana 6.7!

So @timroes could you close the issue?

Closed via #23897

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stacey-gammon picture stacey-gammon  路  3Comments

LukeMathWalker picture LukeMathWalker  路  3Comments

Ginja picture Ginja  路  3Comments

snide picture snide  路  3Comments

MaartenUreel picture MaartenUreel  路  3Comments