File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
core_plugins/kibana/public/discover/saved_searches Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ export function createSavedSearchClass(services: SavedObjectKibanaServices) {
3232 sort : 'keyword' ,
3333 version : 'integer' ,
3434 } ;
35+ // Order these fields to the top, the rest are alphabetical
36+ public static fieldOrder = [ 'title' , 'description' ] ;
37+ public static searchSource = true ;
38+
39+ public id : string ;
3540 public showInRecentlyAccessed : boolean ;
3641
3742 constructor ( id : string ) {
Original file line number Diff line number Diff line change @@ -42,20 +42,14 @@ export function createSavedObjectClass(services: SavedObjectKibanaServices) {
4242 * @param {* } config
4343 */
4444 class SavedObjectClass {
45- public static fieldOrder = [ 'title' , 'description' ] ;
46- public static searchSource = true ;
47- public id ?: string ;
48- public title : string = '' ;
49- public getFullPath ?: ( ) => string ;
50-
5145 constructor ( config : SavedObjectConfig = { } ) {
5246 // @ts -ignore
5347 const self : SavedObject = this ;
5448 buildSavedObject ( self , config , services ) ;
5549 }
5650 }
5751
58- return SavedObjectClass ;
52+ return SavedObjectClass as new ( config : SavedObjectConfig ) => SavedObject ;
5953}
6054// the old angular way, should be removed once no longer used
6155export function SavedObjectProvider ( ) {
Original file line number Diff line number Diff line change 1717 * under the License.
1818 */
1919import { ChromeStart , OverlayStart , SavedObjectsClientContract } from 'kibana/public' ;
20- import { SearchSourceContract } from 'ui/courier' ;
20+ import { SearchSource , SearchSourceContract } from 'ui/courier' ;
2121import { SavedObjectAttributes , SavedObjectReference } from 'kibana/server' ;
2222import { IndexPatternsContract } from '../../../../plugins/data/public' ;
2323import { IndexPattern } from '../../../core_plugins/data/public' ;
@@ -83,7 +83,7 @@ export interface SavedObjectConfig {
8383 mapping ?: any ;
8484 migrationVersion ?: Record < string , any > ;
8585 path ?: string ;
86- searchSource ?: SearchSourceContract | boolean ;
86+ searchSource ?: SearchSource | boolean ;
8787 type ?: string ;
8888}
8989
You can’t perform that action at this time.
0 commit comments