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

Make default column configurable #2964

Closed
avleen opened this issue Feb 10, 2015 · 4 comments
Closed

Make default column configurable #2964

avleen opened this issue Feb 10, 2015 · 4 comments

Comments

@avleen
Copy link

avleen commented Feb 10, 2015

Currently if no fields are selected, _source is displayed. This isn't super ideal. Especially in the Logstash use case, message is much more useful.

I tried to patch this but it didn't quite work - I ended up with no default field displayed, rather than _source or message. Maybe someone can make it work :)

diff --git a/src/kibana/plugins/discover/controllers/discover.js b/src/kibana/plugins/discover/controllers/discover.js
index d112284..d17f46d 100644
--- a/src/kibana/plugins/discover/controllers/discover.js
+++ b/src/kibana/plugins/discover/controllers/discover.js
@@ -63,7 +63,7 @@ define(function (require) {
     }
   });

-  app.controller('discover', function ($scope, config, courier, $route, $window, Notifier,
+  app.controller('discover', function ($scope, config, configFile, courier, $route, $window, Notifier,
     AppState, timefilter, Promise, Private, kbnUrl, highlightTags) {

     var Vis = Private(require('components/vis/vis'));
@@ -508,9 +508,9 @@ define(function (require) {
       // Make sure there are no columns added that aren't in the displayed field list.
       $state.columns = _.intersection($state.columns, fields);

-      // If no columns remain, use _source
+      // If no columns remain, use configFile.default_display_field
       if (!$state.columns.length) {
-        $scope.toggleField('_source');
+        $scope.toggleField(configFile.default_display_field);
         return;
       }

diff --git a/src/server/config/kibana.yml b/src/server/config/kibana.yml
index 3bc7102..a573b6a 100644
--- a/src/server/config/kibana.yml
+++ b/src/server/config/kibana.yml
@@ -49,3 +49,5 @@ verify_ssl: true
 # Set the path to where you would like the process id file to be created.
 # pid_file: /var/run/kibana.pid

+# The default field to use when a column isn't provided.
+default_display_field: _source
@ohTHATaaronbrown
Copy link

👍 though i'd like to see it to be a list of default fields

@wjimenez5271
Copy link
Contributor

Yep this would add a lot in terms of usability. Users coming from other tools have more trouble with the transition when the default display column is _source.

@buckett
Copy link

buckett commented May 18, 2015

We're seeing this issue where we would like the default fields to "identifier, logger, level, message", but instead you have the manually add them each time.

@tkuther
Copy link

tkuther commented Dec 4, 2015

+1 for the ability to set a default search in the discover app.

A default set of fields for each index pattern, or at least for the default index pattern would accomplish the same, but I think it would result in a sort of unintuitive configuration. Something like a "discover:defaultSearch" in Settings -> Advanced would be perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants