Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep visualizations plugin for NP migration. #44839

Merged
merged 10 commits into from
Sep 10, 2019
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { SavedObjectsClientProvider } from 'ui/saved_objects';
import { VisualizeListingTable } from './visualize_listing_table';
import { NewVisModal } from '../wizard/new_vis_modal';
import { VisualizeConstants } from '../visualize_constants';
import { setup } from '../../../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../../../visualizations/public/legacy';
lukeelmers marked this conversation as resolved.
Show resolved Hide resolved
import { i18n } from '@kbn/i18n';

const app = uiModules.get('app/visualize', ['ngRoute', 'react']);
Expand All @@ -46,7 +46,7 @@ export function VisualizeListingController($injector, createNewVis) {
const savedObjectClient = Private(SavedObjectsClientProvider);

this.visTypeRegistry = Private(VisTypesRegistryProvider);
this.visTypeAliases = setup.types.visTypeAliasRegistry.get();
this.visTypeAliases = visualizationsSetup.types.visTypeAliasRegistry.get();

timefilter.disableAutoRefreshSelector();
timefilter.disableTimeRangeSelector();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { VisTypesRegistryProvider } from 'ui/registry/vis_types';
import { uiModules } from 'ui/modules';
import { SavedObjectLoader, SavedObjectsClientProvider } from 'ui/saved_objects';
import { savedObjectManagementRegistry } from '../../management/saved_object_registry';
import { setup } from '../../../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../../../visualizations/public/legacy';
import { createVisualizeEditUrl } from '../visualize_constants';
import { findListItems } from './find_list_items';

Expand Down Expand Up @@ -86,7 +86,7 @@ app.service('savedVisualizations', function (SavedVis, Private, kbnUrl, chrome)
size,
mapSavedObjectApiHits: this.mapSavedObjectApiHits.bind(this),
savedObjectsClient: this.savedObjectsClient,
visTypes: setup.types.visTypeAliasRegistry.get(),
visTypes: visualizationsSetup.types.visTypeAliasRegistry.get(),
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { i18n } from '@kbn/i18n';

import chrome from 'ui/chrome';
import { VisType } from 'ui/vis';
import { VisTypeAlias } from '../../../../visualizations/public/np_ready/public';
import { VisTypeAlias } from '../../../../visualizations/public';
import { VisualizeConstants } from '../visualize_constants';

import { SearchSelection } from './search_selection';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
} from '@elastic/eui';
import { memoizeLast } from 'ui/utils/memoize';
import { VisType } from 'ui/vis';
import { VisTypeAlias } from '../../../../../visualizations/public/np_ready/public';
import { VisTypeAlias } from '../../../../../visualizations/public';
import { NewVisHelp } from './new_vis_help';
import { VisHelpText } from './vis_help_text';
import { VisTypeIcon } from './vis_type_icon';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import afterdatachangePng from './afterdatachange.png';
import afterdatachangeandresizePng from './afterdatachangeandresize.png';
import aftercolorchangePng from './aftercolorchange.png';
import changestartupPng from './changestartup.png';
import { setup } from '../../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../../visualizations/public/legacy';

import { createRegionMapVisualization } from '../region_map_visualization';
import { createRegionMapTypeDefinition } from '../region_map_type';
Expand Down Expand Up @@ -106,7 +106,7 @@ describe('RegionMapsVisualizationTests', function () {
uiSettings,
};

setup.types.registerVisualization(() => createRegionMapTypeDefinition(dependencies));
visualizationsSetup.types.registerVisualization(() => createRegionMapTypeDefinition(dependencies));

Vis = Private(visModule.VisProvider);
RegionMapsVisualization = createRegionMapVisualization(dependencies);
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/core_plugins/region_map/public/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { PluginInitializerContext } from 'kibana/public';
import { npSetup, npStart } from 'ui/new_platform';

import { setup as setupVisualizations } from '../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../visualizations/public/legacy';
import { RegionMapPluginSetupDependencies, RegionMapsConfig } from './plugin';
import { LegacyDependenciesPlugin } from './shim';
import { plugin } from '.';
Expand All @@ -30,7 +30,7 @@ const regionmapsConfig = npSetup.core.injectedMetadata.getInjectedVar(
) as RegionMapsConfig;

const plugins: Readonly<RegionMapPluginSetupDependencies> = {
visualizations: setupVisualizations,
visualizations: visualizationsSetup,
data: npSetup.plugins.data,

// Temporary solution
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/region_map/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
UiSettingsClientContract,
} from '../../../../core/public';
import { Plugin as DataPublicPlugin } from '../../../../plugins/data/public';
import { VisualizationsSetup } from '../../visualizations/public/np_ready/public';
import { VisualizationsSetup } from '../../visualizations/public';

import { LegacyDependenciesPlugin, LegacyDependenciesPluginSetup } from './shim';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { createRegionMapVisualization } from './region_map_visualization';
import { Status } from 'ui/vis/update_status';
import { RegionMapOptions } from './components/region_map_options';

import { visFactory } from '../../visualizations/public/np_ready/public';
import { visFactory } from '../../visualizations/public';

// TODO: reference to TILE_MAP plugin should be removed
import { ORIGIN } from '../../tile_map/common/origin';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import EMS_TILES from '../../../../ui/public/vis/__tests__/map/ems_mocks/sample_
import EMS_STYLE_ROAD_MAP_BRIGHT from '../../../../ui/public/vis/__tests__/map/ems_mocks/sample_style_bright';
import EMS_STYLE_ROAD_MAP_DESATURATED from '../../../../ui/public/vis/__tests__/map/ems_mocks/sample_style_desaturated';
import EMS_STYLE_DARK_MAP from '../../../../ui/public/vis/__tests__/map/ems_mocks/sample_style_dark';
import { setup } from '../../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../../visualizations/public/legacy';

import { createTileMapVisualization } from '../tile_map_visualization';
import { createTileMapTypeDefinition } from '../tile_map_type';
Expand Down Expand Up @@ -84,7 +84,7 @@ describe('CoordinateMapsVisualizationTest', function () {
$injector,
};

setup.types.registerVisualization(() => createTileMapTypeDefinition(dependencies));
visualizationsSetup.types.registerVisualization(() => createTileMapTypeDefinition(dependencies));

Vis = Private(visModule.VisProvider);
CoordinateMapsVisualization = createTileMapVisualization(dependencies);
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/core_plugins/tile_map/public/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
import { PluginInitializerContext } from 'kibana/public';
import { npSetup, npStart } from 'ui/new_platform';

import { setup as setupVisualizations } from '../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../visualizations/public/legacy';
import { TileMapPluginSetupDependencies } from './plugin';
import { LegacyDependenciesPlugin } from './shim';
import { plugin } from '.';

const plugins: Readonly<TileMapPluginSetupDependencies> = {
visualizations: setupVisualizations,
visualizations: visualizationsSetup,
data: npSetup.plugins.data,

// Temporary solution
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/tile_map/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
UiSettingsClientContract,
} from '../../../../core/public';
import { Plugin as DataPublicPlugin } from '../../../../plugins/data/public';
import { VisualizationsSetup } from '../../visualizations/public/np_ready/public';
import { VisualizationsSetup } from '../../visualizations/public';

import { LegacyDependenciesPlugin, LegacyDependenciesPluginSetup } from './shim';

Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/tile_map/public/tile_map_type.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { colorSchemas } from 'ui/vislib/components/color/truncated_colormaps';
import { convertToGeoJson } from 'ui/vis/map/convert_to_geojson';

import { createTileMapVisualization } from './tile_map_visualization';
import { visFactory } from '../../visualizations/public/np_ready/public';
import { visFactory } from '../../visualizations/public';
import { TileMapOptions } from './components/tile_map_options';
import { MapTypes } from './map_types';

Expand Down
4 changes: 2 additions & 2 deletions src/legacy/core_plugins/vis_type_markdown/public/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import { PluginInitializerContext } from 'kibana/public';
import { npSetup, npStart } from 'ui/new_platform';

import { setup as setupVisualizations } from '../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../visualizations/public/legacy';
import { MarkdownPluginSetupDependencies } from './plugin';
import { plugin } from '.';

const plugins: Readonly<MarkdownPluginSetupDependencies> = {
visualizations: setupVisualizations,
visualizations: visualizationsSetup,
data: npSetup.plugins.data,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { i18n } from '@kbn/i18n';

import { visFactory, DefaultEditorSize } from '../../visualizations/public/np_ready/public';
import { visFactory, DefaultEditorSize } from '../../visualizations/public';

import { MarkdownVisWrapper } from './markdown_vis_controller';
import { MarkdownOptions } from './markdown_options';
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/vis_type_markdown/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '../../../../core/public';
import { Plugin as DataPublicPlugin } from '../../../../plugins/data/public';
import { VisualizationsSetup } from '../../visualizations/public/np_ready/public';
import { VisualizationsSetup } from '../../visualizations/public';

import { markdownVis } from './markdown_vis';
import { createMarkdownVisFn } from './markdown_fn';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import expect from '@kbn/expect';
import { VisProvider } from 'ui/vis';
import LogstashIndexPatternStubProvider from 'fixtures/stubbed_logstash_index_pattern';

import { setup as setupVisualizations } from '../../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../../visualizations/public/legacy';
import { createMetricVisTypeDefinition } from '../metric_vis_type';

describe('metric_vis - createMetricVisTypeDefinition', () => {
Expand All @@ -38,7 +38,7 @@ describe('metric_vis - createMetricVisTypeDefinition', () => {
const Vis = Private(VisProvider);
const metricVisType = createMetricVisTypeDefinition();

setupVisualizations.types.registerVisualization(() => metricVisType);
visualizationsSetup.types.registerVisualization(() => metricVisType);

const indexPattern = Private(LogstashIndexPatternStubProvider);

Expand Down
4 changes: 2 additions & 2 deletions src/legacy/core_plugins/vis_type_metric/public/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
import { PluginInitializerContext } from 'kibana/public';
import { npSetup, npStart } from 'ui/new_platform';

import { setup as setupVisualizations } from '../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../visualizations/public/legacy';
import { MetricVisPluginSetupDependencies } from './plugin';
import { LegacyDependenciesPlugin } from './shim';
import { plugin } from '.';

const plugins: Readonly<MetricVisPluginSetupDependencies> = {
visualizations: setupVisualizations,
visualizations: visualizationsSetup,
data: npSetup.plugins.data,

// Temporary solution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { vislibColorMaps } from 'ui/vislib/components/color/colormaps';
// @ts-ignore
import { MetricVisComponent } from './components/metric_vis_controller';

import { visFactory } from '../../visualizations/public/np_ready/public';
import { visFactory } from '../../visualizations/public';

export const createMetricVisTypeDefinition = () => {
return visFactory.createReactVisualization({
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/vis_type_metric/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '../../../../core/public';
import { LegacyDependenciesPlugin } from './shim';
import { Plugin as DataPublicPlugin } from '../../../../plugins/data/public';
import { VisualizationsSetup } from '../../visualizations/public/np_ready/public';
import { VisualizationsSetup } from '../../visualizations/public';

import { createMetricVisFn } from './metric_vis_fn';
// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { AppStateProvider } from 'ui/state_management/app_state';
import { tabifyAggResponse } from 'ui/agg_response/tabify';

import { createTableVisTypeDefinition } from '../table_vis_type';
import { setup as setupVisualizations } from '../../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../../visualizations/public/legacy';

describe('Table Vis - Controller', async function () {
let $rootScope;
Expand All @@ -52,7 +52,7 @@ describe('Table Vis - Controller', async function () {
createAngularVisualization: VisFactoryProvider(Private).createAngularVisualization,
};

setupVisualizations.types.registerVisualization(() =>
visualizationsSetup.types.registerVisualization(() =>
createTableVisTypeDefinition(legacyDependencies)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { round } from 'lodash';

import { VisFactoryProvider } from 'ui/vis/vis_factory';
import { createTableVisTypeDefinition } from '../../table_vis_type';
import { setup } from '../../../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../../../visualizations/public/legacy';

describe('Table Vis - AggTable Directive', function () {
let $rootScope;
Expand Down Expand Up @@ -107,7 +107,7 @@ describe('Table Vis - AggTable Directive', function () {
createAngularVisualization: VisFactoryProvider(Private).createAngularVisualization,
};

setup.types.registerVisualization(() => createTableVisTypeDefinition(legacyDependencies));
visualizationsSetup.types.registerVisualization(() => createTableVisTypeDefinition(legacyDependencies));

tableAggResponse = legacyResponseHandlerProvider().handler;
indexPattern = Private(FixturesStubbedLogstashIndexPatternProvider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { tabifyAggResponse } from 'ui/agg_response/tabify';

import { VisFactoryProvider } from 'ui/vis/vis_factory';
import { createTableVisTypeDefinition } from '../../table_vis_type';
import { setup } from '../../../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../../../visualizations/public/legacy';

describe('Table Vis - AggTableGroup Directive', function () {
let $rootScope;
Expand Down Expand Up @@ -66,7 +66,7 @@ describe('Table Vis - AggTableGroup Directive', function () {
createAngularVisualization: VisFactoryProvider(Private).createAngularVisualization,
};

setup.types.registerVisualization(() => createTableVisTypeDefinition(legacyDependencies));
visualizationsSetup.types.registerVisualization(() => createTableVisTypeDefinition(legacyDependencies));

tableAggResponse = legacyResponseHandlerProvider().handler;
indexPattern = Private(FixturesStubbedLogstashIndexPatternProvider);
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/core_plugins/vis_type_table/public/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import { npSetup, npStart } from 'ui/new_platform';
import { plugin } from '.';

import { TablePluginSetupDependencies } from './plugin';
import { setup as setupVisualizations } from '../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../visualizations/public/legacy';
import { LegacyDependenciesPlugin } from './shim';

const plugins: Readonly<TablePluginSetupDependencies> = {
visualizations: setupVisualizations,
visualizations: visualizationsSetup,
data: npSetup.plugins.data,

// Temporary solution
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/vis_type_table/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { VisualizationsSetup } from '../../visualizations/public/np_ready/public';
import { VisualizationsSetup } from '../../visualizations/public';
import { Plugin as DataPublicPlugin } from '../../../../plugins/data/public';

import {
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/core_plugins/vis_type_tagcloud/public/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import { PluginInitializerContext } from 'kibana/public';
import { npSetup, npStart } from 'ui/new_platform';

import { setup as setupVisualizations } from '../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../visualizations/public/legacy';
import { TagCloudPluginSetupDependencies } from './plugin';
import { plugin } from '.';

const plugins: Readonly<TagCloudPluginSetupDependencies> = {
visualizations: setupVisualizations,
visualizations: visualizationsSetup,
data: npSetup.plugins.data,
};

Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/vis_type_tagcloud/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '../../../../core/public';
import { Plugin as DataPublicPlugin } from '../../../../plugins/data/public';
import { VisualizationsSetup } from '../../visualizations/public/np_ready/public';
import { VisualizationsSetup } from '../../visualizations/public';

import { createTagCloudFn } from './tag_cloud_fn';
import { createTagCloudTypeDefinition } from './tag_cloud_type';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { Status } from 'ui/vis/update_status';
import { Schemas } from 'ui/vis/editors/default/schemas';

import { TagCloudOptions } from './components/tag_cloud_options';
import { visFactory } from '../../visualizations/public/np_ready/public';
import { visFactory } from '../../visualizations/public';

// @ts-ignore
import { TagCloudVisualization } from './components/tag_cloud_visualization';
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/core_plugins/vis_type_timeseries/public/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import { PluginInitializerContext } from 'kibana/public';
import { npSetup, npStart } from 'ui/new_platform';

import { setup as setupVisualizations } from '../../visualizations/public/np_ready/public/legacy';
import { setup as visualizationsSetup } from '../../visualizations/public/legacy';
import { MetricsPluginSetupDependencies } from './plugin';
import { plugin } from '.';

const plugins: Readonly<MetricsPluginSetupDependencies> = {
visualizations: setupVisualizations,
visualizations: visualizationsSetup,
data: npSetup.plugins.data,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { i18n } from '@kbn/i18n';
// @ts-ignore
import { defaultFeedbackMessage } from 'ui/vis/default_feedback_message';

import { visFactory } from '../../visualizations/public/np_ready/public';
import { visFactory } from '../../visualizations/public';

// @ts-ignore
import { createMetricsRequestHandler } from './request_handler';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '../../../../core/public';
import { Plugin as DataPublicPlugin } from '../../../../plugins/data/public';
import { VisualizationsSetup } from '../../visualizations/public/np_ready/public';
import { VisualizationsSetup } from '../../visualizations/public';

import { createMetricsFn } from './metrics_fn';
import { createMetricsTypeDefinition } from './metrics_type';
Expand Down
Loading