From 57b9aab575e2e986a26717988349cacbf06e48f0 Mon Sep 17 00:00:00 2001 From: Liza Katz Date: Tue, 16 Apr 2019 18:31:03 +0300 Subject: [PATCH] Moved filter options from search bar into filter bar --- .../data/public/search_bar/search_bar_service.ts | 2 -- .../core_plugins/kibana/public/dashboard/dashboard_app.js | 2 +- .../kibana/public/discover/controllers/discover.js | 3 ++- .../core_plugins/kibana/public/visualize/editor/editor.js | 2 +- src/legacy/ui/public/filter_bar/filter_bar.tsx | 6 +----- .../components => ui/public/filter_bar}/filter_options.tsx | 0 6 files changed, 5 insertions(+), 10 deletions(-) rename src/legacy/{core_plugins/data/public/search_bar/components => ui/public/filter_bar}/filter_options.tsx (100%) diff --git a/src/legacy/core_plugins/data/public/search_bar/search_bar_service.ts b/src/legacy/core_plugins/data/public/search_bar/search_bar_service.ts index ff47f2eac490e..f212a9aa3fbd5 100644 --- a/src/legacy/core_plugins/data/public/search_bar/search_bar_service.ts +++ b/src/legacy/core_plugins/data/public/search_bar/search_bar_service.ts @@ -18,7 +18,6 @@ */ import { SearchBar } from './components/search_bar'; -import { FilterOptions } from './components/filter_options'; // @ts-ignore import { setupDirective } from './directive'; @@ -33,7 +32,6 @@ export class SearchBarService { setupDirective(); return { SearchBar, - FilterOptions, }; } diff --git a/src/legacy/core_plugins/kibana/public/dashboard/dashboard_app.js b/src/legacy/core_plugins/kibana/public/dashboard/dashboard_app.js index cf8dabeb322e6..15787fb1b6fce 100644 --- a/src/legacy/core_plugins/kibana/public/dashboard/dashboard_app.js +++ b/src/legacy/core_plugins/kibana/public/dashboard/dashboard_app.js @@ -58,7 +58,7 @@ import { getUnhashableStatesProvider } from 'ui/state_management/state_hashing'; import { DashboardViewportProvider } from './viewport/dashboard_viewport_provider'; -// import 'plugins/data'; +import 'plugins/data'; const app = uiModules.get('app/dashboard', [ 'elasticsearch', diff --git a/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js b/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js index 3f1f0aaa06cb8..91cb69feb032b 100644 --- a/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js +++ b/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js @@ -69,7 +69,8 @@ import { getRootBreadcrumbs, getSavedSearchBreadcrumbs } from '../breadcrumbs'; import { buildVislibDimensions } from 'ui/visualize/loader/pipeline_helpers/build_pipeline'; import 'ui/capabilities/route_setup'; -// import { data } from 'plugins/data'; +import 'plugins/data'; + const fetchStatuses = { UNINITIALIZED: 'uninitialized', diff --git a/src/legacy/core_plugins/kibana/public/visualize/editor/editor.js b/src/legacy/core_plugins/kibana/public/visualize/editor/editor.js index 3cc5cc6ed8024..faf16bb5dfe1d 100644 --- a/src/legacy/core_plugins/kibana/public/visualize/editor/editor.js +++ b/src/legacy/core_plugins/kibana/public/visualize/editor/editor.js @@ -54,7 +54,7 @@ import { showSaveModal } from 'ui/saved_objects/show_saved_object_save_modal'; import { SavedObjectSaveModal } from 'ui/saved_objects/components/saved_object_save_modal'; import { getEditBreadcrumbs, getCreateBreadcrumbs } from '../breadcrumbs'; -// import 'plugins/data'; +import 'plugins/data'; uiRoutes .when(VisualizeConstants.CREATE_PATH, { diff --git a/src/legacy/ui/public/filter_bar/filter_bar.tsx b/src/legacy/ui/public/filter_bar/filter_bar.tsx index 76a59aac97cea..1d16b8ab9f61f 100644 --- a/src/legacy/ui/public/filter_bar/filter_bar.tsx +++ b/src/legacy/ui/public/filter_bar/filter_bar.tsx @@ -35,11 +35,7 @@ import chrome from 'ui/chrome'; import { IndexPattern } from 'ui/index_patterns'; import { FilterEditor } from './filter_editor'; import { FilterItem } from './filter_item'; - -// TODO: how the unpacking should go? -import { data } from 'plugins/data'; -console.log(data); -const { FilterOptions } = data ; +import { FilterOptions } from './filter_options'; const config = chrome.getUiSettingsClient(); diff --git a/src/legacy/core_plugins/data/public/search_bar/components/filter_options.tsx b/src/legacy/ui/public/filter_bar/filter_options.tsx similarity index 100% rename from src/legacy/core_plugins/data/public/search_bar/components/filter_options.tsx rename to src/legacy/ui/public/filter_bar/filter_options.tsx