Skip to content

Commit

Permalink
Merge pull request #5696 from vquemener/master
Browse files Browse the repository at this point in the history
Make default columns configurable
  • Loading branch information
Rashid Khan committed Mar 7, 2016
2 parents ab276c9 + a7716d7 commit 320fef3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/kibana/public/discover/controllers/discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ app.controller('discover', function ($scope, config, courier, $route, $window, N
return {
query: $scope.searchSource.get('query') || '',
sort: getSort.array(savedSearch.sort, $scope.indexPattern),
columns: savedSearch.columns || ['_source'],
columns: savedSearch.columns.length > 0 ? savedSearch.columns : config.get('defaultColumns'),
index: $scope.indexPattern.id,
interval: 'auto',
filters: _.cloneDeep($scope.searchSource.getOwn('filter'))
Expand Down
4 changes: 4 additions & 0 deletions src/ui/public/config/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export default function configDefaultsProvider() {
value: null,
description: 'The index to access if no index is set',
},
'defaultColumns': {
value: ['_source'],
description: 'Columns displayed by default in the Discovery tab',
},
'metaFields': {
value: ['_source', '_id', '_type', '_index', '_score'],
description: 'Fields that exist outside of _source to merge into our document when displaying it',
Expand Down

0 comments on commit 320fef3

Please sign in to comment.