Skip to content

Commit

Permalink
saved search leftovers from visualizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant committed Mar 3, 2020
1 parent 3887055 commit 957ab4a
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ import {

import { DiscoverStartPlugins } from './plugin';
import { SharePluginStart } from '../../../../../plugins/share/public';
import { SavedSearch } from './np_ready/types';
import { DocViewsRegistry } from './np_ready/doc_views/doc_views_registry';
import { ChartsPluginStart } from '../../../../../plugins/charts/public';
import { VisualizationsStart } from '../../../visualizations/public';
import { createSavedSearchesLoader } from '../../../../../plugins/discover/public';
import { createSavedSearchesLoader, SavedSearch } from '../../../../../plugins/discover/public';

export interface DiscoverServices {
addBasePath: (path: string) => string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import {
Embeddable,
} from '../../../../../embeddable_api/public/np_ready/public';
import * as columnActions from '../angular/doc_table/actions/columns';
import { SavedSearch } from '../types';
import searchTemplate from './search_template.html';
import { ISearchEmbeddable, SearchInput, SearchOutput } from './types';
import { SortOrder } from '../angular/doc_table/components/table_header/helpers';
Expand All @@ -51,6 +50,7 @@ import {
ISearchSource,
} from '../../kibana_services';
import { SEARCH_EMBEDDABLE_TYPE } from './constants';
import { SavedSearch } from '../../../../../../../plugins/discover/public';

interface SearchScope extends ng.IScope {
columns?: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

import { EmbeddableInput, EmbeddableOutput, IEmbeddable } from 'src/plugins/embeddable/public';
import { SavedSearch } from '../types';
import { SortOrder } from '../angular/doc_table/components/table_header/helpers';
import { Filter, IIndexPattern, TimeRange, Query } from '../../../../../../../plugins/data/public';
import { SavedSearch } from '../../../../../../../plugins/discover/public';

export interface SearchInput extends EmbeddableInput {
timeRange: TimeRange;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import { DefaultEditorControls } from './controls';
import { setStateParamValue, useEditorReducer, useEditorFormState, discardChanges } from './state';
import { DefaultEditorAggCommonProps } from '../agg_common_props';
import { SidebarTitle } from './sidebar_title';
import { SavedSearch } from '../../../../kibana/public/discover/np_ready/types';
import { PersistedState } from '../../../../../../plugins/visualizations/public';
import { SavedSearch } from '../../../../../../plugins/discover/public';

interface DefaultEditorSideBarProps {
isCollapsed: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';

import { Vis } from 'src/legacy/core_plugins/visualizations/public';
import { SavedSearch } from '../../../../kibana/public/discover/np_ready/types';
import { SavedSearch } from '../../../../../../plugins/discover/public';

interface LinkedSearchProps {
savedSearch: SavedSearch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ export {
setBounds,
} from '../../data/public';
export { createAggConfigs } from 'ui/agg_types';
export { createSavedSearchesLoader } from '../../../../plugins/discover/public';
21 changes: 0 additions & 21 deletions src/legacy/core_plugins/visualizations/public/legacy_mocks.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import {
} from './build_pipeline';
import { Vis } from '..';
import { IAggConfig } from '../../../legacy_imports';
import { searchSourceMock } from '../../../legacy_mocks';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { searchSourceMock } from '../../../../../../../plugins/data/public/search/search_source/mocks';

jest.mock('ui/new_platform');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { SavedObject } from '../../../../../../plugins/saved_objects/public';
import { Vis, VisState, VisParams, VisualizationController } from './vis';
import { ISearchSource } from '../../../../../../plugins/data/public/';
import { SavedSearch } from '../../../../kibana/public/discover/np_ready/types';
import { SavedSearch } from '../../../../../../plugins/discover/public';

export { Vis, VisState, VisParams, VisualizationController };

Expand Down
1 change: 1 addition & 0 deletions src/plugins/discover/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
*/

export { createSavedSearchesLoader } from './saved_searches/saved_searches';
export { SavedSearchLoader, SavedSearch } from './saved_searches/types';
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* under the License.
*/

import { ISearchSource } from '../kibana_services';
import { SortOrder } from './angular/doc_table/components/table_header/helpers';
import { ISearchSource } from '../../../data/public';

export type SortOrder = [string, string];
export interface SavedSearch {
readonly id: string;
title: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import React, { createContext, useContext, FC } from 'react';

import { IUiSettingsClient } from 'kibana/public';

import { SavedSearch } from '../../../../../../../../src/legacy/core_plugins/kibana/public/discover/np_ready/types';
import {
IndexPattern,
IndexPatternsContract,
} from '../../../../../../../../src/plugins/data/public';
import { SavedSearch } from '../../../../../../../../src/plugins/discover/public/';

interface UninitializedKibanaContextValue {
initialized: false;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/transform/public/shim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { docTitle } from 'ui/doc_title/doc_title';

// @ts-ignore: allow traversal to fail on x-pack build
import { createUiStatsReporter } from '../../../../../src/legacy/core_plugins/ui_metric/public';
import { SavedSearchLoader } from '../../../../../src/legacy/core_plugins/kibana/public/discover/np_ready/types';

import { TRANSFORM_DOC_PATHS } from './app/constants';
import { SavedSearchLoader } from '../../../../../src/plugins/discover/public';

export type NpCore = typeof npStart.core;
export type NpPlugins = typeof npStart.plugins;
Expand Down

0 comments on commit 957ab4a

Please sign in to comment.