@@ -32,7 +32,14 @@ import { FieldFormatsService } from './field_formats_provider';
3232import { QueryService } from './query' ;
3333import { createIndexPatternSelect } from './ui/index_pattern_select' ;
3434import { IndexPatterns } from './index_patterns' ;
35- import { setNotifications , setFieldFormats , setOverlays , setIndexPatterns } from './services' ;
35+ import {
36+ setFieldFormats ,
37+ setHttp ,
38+ setIndexPatterns ,
39+ setNotifications ,
40+ setOverlays ,
41+ setQueryService ,
42+ } from './services' ;
3643import { createFilterAction , GLOBAL_APPLY_FILTER_ACTION } from './actions' ;
3744import { APPLY_FILTER_TRIGGER } from '../../embeddable/public' ;
3845import { createSearchBar } from './ui/search_bar/create_search_bar' ;
@@ -72,21 +79,25 @@ export class DataPublicPlugin implements Plugin<DataPublicPluginSetup, DataPubli
7279 public start ( core : CoreStart , { uiActions } : DataStartDependencies ) : DataPublicPluginStart {
7380 const { uiSettings, http, notifications, savedObjects, overlays } = core ;
7481 const fieldFormats = this . fieldFormatsService . start ( ) ;
82+ setHttp ( http ) ;
7583 setNotifications ( notifications ) ;
7684 setFieldFormats ( fieldFormats ) ;
7785 setOverlays ( overlays ) ;
7886
7987 const indexPatternsService = new IndexPatterns ( uiSettings , savedObjects . client , http ) ;
8088 setIndexPatterns ( indexPatternsService ) ;
8189
90+ const queryService = this . queryService . start ( core . savedObjects ) ;
91+ setQueryService ( queryService ) ;
92+
8293 uiActions . attachAction ( APPLY_FILTER_TRIGGER , GLOBAL_APPLY_FILTER_ACTION ) ;
8394
8495 const dataServices = {
8596 autocomplete : this . autocomplete ,
8697 getSuggestions : getSuggestionsProvider ( core . uiSettings , core . http ) ,
8798 search : this . searchService . start ( core ) ,
8899 fieldFormats,
89- query : this . queryService . start ( core . savedObjects ) ,
100+ query : queryService ,
90101 indexPatterns : indexPatternsService ,
91102 } ;
92103
0 commit comments