Skip to content

Commit

Permalink
[Visualizations] Make visualization saved object share-capable and re…
Browse files Browse the repository at this point in the history
…move savedVisLoader (#114620)

* Make visualization saved object share-capable and remove savedVisLoader

* Fixed some tests

* FIx tests

* Fix API tests

* Fix spaces API integration tests

* Fix core saved objects API integration tests

Co-authored-by: Joe Portner <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
3 people authored Oct 18, 2021
1 parent 4d40ae0 commit e9d6a07
Show file tree
Hide file tree
Showing 19 changed files with 162 additions and 682 deletions.
3 changes: 0 additions & 3 deletions src/plugins/visualizations/public/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ const createStartContract = (): VisualizationsStart => ({
getAliases: jest.fn(),
getByGroup: jest.fn(),
unRegisterAlias: jest.fn(),
savedVisualizationsLoader: {
get: jest.fn(),
} as any,
getSavedVisualization: jest.fn(),
saveVisualization: jest.fn(),
findListItems: jest.fn(),
Expand Down
12 changes: 0 additions & 12 deletions src/plugins/visualizations/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
setUsageCollector,
setExpressions,
setUiActions,
setSavedVisualizationsLoader,
setTimeFilter,
setAggs,
setChrome,
Expand All @@ -39,7 +38,6 @@ import { visDimension as visDimensionExpressionFunction } from '../common/expres
import { xyDimension as xyDimensionExpressionFunction } from '../common/expression_functions/xy_dimension';

import { createStartServicesGetter, StartServicesGetter } from '../../kibana_utils/public';
import { createSavedVisLoader, SavedVisualizationsLoader } from './saved_visualizations';
import type { SerializedVis, Vis } from './vis';
import { showNewVisModal } from './wizard';

Expand Down Expand Up @@ -83,7 +81,6 @@ import type { VisSavedObject, SaveVisOptions, GetVisOptions } from './types';
export type VisualizationsSetup = TypesSetup;

export interface VisualizationsStart extends TypesStart {
savedVisualizationsLoader: SavedVisualizationsLoader;
createVis: (visType: string, visState: SerializedVis) => Promise<Vis>;
convertToSerializedVis: typeof convertToSerializedVis;
convertFromSerializedVis: typeof convertFromSerializedVis;
Expand Down Expand Up @@ -194,14 +191,6 @@ export class VisualizationsPlugin
setSpaces(spaces);
}

const savedVisualizationsLoader = createSavedVisLoader({
savedObjectsClient: core.savedObjects.client,
indexPatterns: data.indexPatterns,
savedObjects,
visualizationTypes: types,
});
setSavedVisualizationsLoader(savedVisualizationsLoader);

return {
...types,
showNewVisModal,
Expand Down Expand Up @@ -236,7 +225,6 @@ export class VisualizationsPlugin
await createVisAsync(visType, visState),
convertToSerializedVis,
convertFromSerializedVis,
savedVisualizationsLoader,
__LEGACY: {
createVisEmbeddableFromObject: createVisEmbeddableFromObject({
start: this.getStartServicesOrDie!,
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit e9d6a07

Please sign in to comment.