Skip to content

Commit 06bef09

Browse files
author
Liza Katz
authored
Replace StaticIndexPattern with IIndexPattern from NP (#51872)
* replace SIP with IIP * import path
1 parent 45e7a11 commit 06bef09

File tree

53 files changed

+130
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+130
-133
lines changed

src/legacy/core_plugins/data/public/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export {
3535
FieldListInterface,
3636
IndexPattern,
3737
IndexPatterns,
38-
StaticIndexPattern,
3938
} from './index_patterns';
4039
export { QueryStringInput } from './query';
4140
export { SearchBar, SearchBarProps } from './search';

src/legacy/core_plugins/kibana/public/dashboard/dashboard_app.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* under the License.
1818
*/
1919

20-
import { StaticIndexPattern } from 'plugins/data';
2120
import moment from 'moment';
2221
import { Subscription } from 'rxjs';
2322

@@ -31,7 +30,13 @@ import {
3130
import { ViewMode } from '../../../embeddable_api/public/np_ready/public';
3231
import { SavedObjectDashboard } from './saved_dashboard/saved_dashboard';
3332
import { DashboardAppState, SavedDashboardPanel, ConfirmModalFn } from './types';
34-
import { TimeRange, Query, esFilters, SavedQuery } from '../../../../../../src/plugins/data/public';
33+
import {
34+
IIndexPattern,
35+
TimeRange,
36+
Query,
37+
esFilters,
38+
SavedQuery,
39+
} from '../../../../../../src/plugins/data/public';
3540

3641
import { DashboardAppController } from './dashboard_app_controller';
3742
import { RenderDeps } from './application';
@@ -54,7 +59,7 @@ export interface DashboardAppScope extends ng.IScope {
5459
savedQuery?: SavedQuery;
5560
refreshInterval: any;
5661
panels: SavedDashboardPanel[];
57-
indexPatterns: StaticIndexPattern[];
62+
indexPatterns: IIndexPattern[];
5863
$evalAsync: any;
5964
dashboardViewMode: ViewMode;
6065
expandedPanel?: string;

src/legacy/core_plugins/kibana/public/discover/angular/doc_table/lib/get_sort.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
* under the License.
1818
*/
1919

20-
import { StaticIndexPattern } from '../../../kibana_services';
20+
import { IIndexPattern } from '../../../../../../../../plugins/data/public';
2121
import { SortOrder } from '../components/table_header/helpers';
2222

2323
export function getSort(
2424
sort?: SortOrder[],
25-
indexPattern?: StaticIndexPattern,
25+
indexPattern?: IIndexPattern,
2626
defaultSortOrder?: SortOrder
2727
): any;

src/legacy/core_plugins/kibana/public/discover/embeddable/types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818
*/
1919

2020
import { EmbeddableInput, EmbeddableOutput, IEmbeddable } from 'src/plugins/embeddable/public';
21-
import { StaticIndexPattern } from '../kibana_services';
2221
import { SavedSearch } from '../types';
2322
import { SortOrder } from '../angular/doc_table/components/table_header/helpers';
24-
import { esFilters, TimeRange, Query } from '../../../../../../plugins/data/public';
23+
import { esFilters, IIndexPattern, TimeRange, Query } from '../../../../../../plugins/data/public';
2524

2625
export interface SearchInput extends EmbeddableInput {
2726
timeRange: TimeRange;
@@ -34,7 +33,7 @@ export interface SearchInput extends EmbeddableInput {
3433

3534
export interface SearchOutput extends EmbeddableOutput {
3635
editUrl: string;
37-
indexPatterns?: StaticIndexPattern[];
36+
indexPatterns?: IIndexPattern[];
3837
editable: boolean;
3938
}
4039

src/legacy/core_plugins/kibana/public/discover/kibana_services.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export { unhashUrl } from 'ui/state_management/state_hashing';
8484

8585
// EXPORT types
8686
export { Vis } from 'ui/vis';
87-
export { StaticIndexPattern, IndexPatterns, IndexPattern, FieldType } from 'ui/index_patterns';
87+
export { IndexPatterns, IndexPattern, FieldType } from 'ui/index_patterns';
8888
export { ElasticSearchHit } from 'ui/registry/doc_views_types';
8989
export { DocViewRenderProps, DocViewRenderFn } from 'ui/registry/doc_views';
9090
export { Adapters } from 'ui/inspector/types';

src/legacy/core_plugins/kibana/public/visualize/embeddable/get_index_pattern.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,15 @@
1717
* under the License.
1818
*/
1919

20-
import {
21-
getServices,
22-
getFromSavedObject,
23-
StaticIndexPattern,
24-
VisSavedObject,
25-
} from '../kibana_services';
20+
import { getServices, getFromSavedObject, VisSavedObject } from '../kibana_services';
21+
22+
import { IIndexPattern } from '../../../../../../plugins/data/public';
2623

2724
const { savedObjectsClient, uiSettings } = getServices();
2825

2926
export async function getIndexPattern(
3027
savedVis: VisSavedObject
31-
): Promise<StaticIndexPattern | undefined> {
28+
): Promise<IIndexPattern | undefined> {
3229
if (savedVis.vis.type.name !== 'metrics') {
3330
return savedVis.vis.indexPattern;
3431
}

src/legacy/core_plugins/kibana/public/visualize/embeddable/visualize_embeddable.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919

2020
import _, { forEach } from 'lodash';
21-
import { StaticIndexPattern } from 'ui/index_patterns';
2221
import { PersistedState } from 'ui/persisted_state';
2322
import { Subscription } from 'rxjs';
2423
import * as Rx from 'rxjs';
@@ -33,6 +32,7 @@ import { IExpressionLoaderParams } from 'src/plugins/expressions/public';
3332
import { SearchSourceContract } from '../../../../../ui/public/courier';
3433
import { VISUALIZE_EMBEDDABLE_TYPE } from './constants';
3534
import {
35+
IIndexPattern,
3636
TimeRange,
3737
Query,
3838
onlyDisabledFiltersChanged,
@@ -61,7 +61,7 @@ export interface VisSavedObject extends SavedObject {
6161

6262
export interface VisualizeEmbeddableConfiguration {
6363
savedVisualization: VisSavedObject;
64-
indexPatterns?: StaticIndexPattern[];
64+
indexPatterns?: IIndexPattern[];
6565
editUrl: string;
6666
editable: boolean;
6767
appState?: AppState;
@@ -81,7 +81,7 @@ export interface VisualizeInput extends EmbeddableInput {
8181

8282
export interface VisualizeOutput extends EmbeddableOutput {
8383
editUrl: string;
84-
indexPatterns?: StaticIndexPattern[];
84+
indexPatterns?: IIndexPattern[];
8585
savedObjectId: string;
8686
visTypeName: string;
8787
}

src/legacy/core_plugins/kibana/public/visualize/kibana_services.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ export {
117117

118118
// export types
119119
export { METRIC_TYPE };
120-
export { StaticIndexPattern } from 'ui/index_patterns';
121120
export { AppState } from 'ui/state_management/app_state';
122121
export { VisType } from 'ui/vis';
123122

src/legacy/ui/public/index_patterns/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export {
4444
FieldListInterface,
4545
IndexPattern,
4646
IndexPatterns,
47-
StaticIndexPattern,
4847
} from '../../../core_plugins/data/public';
4948

5049
export { FieldList } from '../../../../plugins/data/public';

src/plugins/data/public/index_patterns/index_patterns_service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { FieldFormatsStart } from '../field_formats_provider';
2727
import { setNotifications, setFieldFormats } from './services';
2828
import { IndexPatterns } from './index_patterns';
2929

30-
interface IndexPatternDependencies {
30+
export interface IndexPatternDependencies {
3131
uiSettings: IUiSettingsClient;
3232
savedObjectsClient: SavedObjectsClientContract;
3333
http: HttpServiceBase;

0 commit comments

Comments
 (0)