mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Merge pull request #1681 from rashidkpc/feature/save-columns
Save columns with search
This commit is contained in:
commit
e243be97ba
2 changed files with 5 additions and 2 deletions
|
@ -82,7 +82,7 @@ define(function (require) {
|
|||
|
||||
var stateDefaults = {
|
||||
query: initialQuery || '',
|
||||
columns: ['_source'],
|
||||
columns: savedSearch.columns || ['_source'],
|
||||
index: $scope.searchSource.get('index').id || config.get('defaultIndex'),
|
||||
interval: 'auto',
|
||||
filters: _.cloneDeep($scope.searchSource.get('filter'))
|
||||
|
@ -232,6 +232,7 @@ define(function (require) {
|
|||
return $scope.updateDataSource()
|
||||
.then(function () {
|
||||
savedSearch.id = savedSearch.title;
|
||||
savedSearch.columns = $scope.state.columns;
|
||||
|
||||
return savedSearch.save()
|
||||
.then(function () {
|
||||
|
|
|
@ -20,12 +20,14 @@ define(function (require) {
|
|||
mapping: {
|
||||
title: 'string',
|
||||
description: 'string',
|
||||
hits: 'integer'
|
||||
hits: 'integer',
|
||||
columns: 'string'
|
||||
},
|
||||
|
||||
defaults: {
|
||||
title: 'New Saved Search',
|
||||
description: '',
|
||||
columns: [],
|
||||
hits: 0
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue