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

Remove navigation from Discover to Visualize #89132

Merged
merged 14 commits into from
Feb 3, 2021
Merged
1 change: 0 additions & 1 deletion src/plugins/visualize/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"visualizations",
"embeddable",
"dashboard",
"uiActions",
"presentationUtil"
],
"optionalPlugins": [
Expand Down
88 changes: 0 additions & 88 deletions src/plugins/visualize/public/actions/visualize_field_action.ts

This file was deleted.

34 changes: 3 additions & 31 deletions src/plugins/visualize/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,8 @@ import { DEFAULT_APP_CATEGORIES } from '../../../core/public';
import { SavedObjectsStart } from '../../saved_objects/public';
import { EmbeddableStart } from '../../embeddable/public';
import { DashboardStart } from '../../dashboard/public';
import { UiActionsSetup, VISUALIZE_FIELD_TRIGGER } from '../../ui_actions/public';
import type { SavedObjectTaggingOssPluginStart } from '../../saved_objects_tagging_oss/public';
import {
setUISettings,
setApplication,
setIndexPatterns,
setQueryService,
setShareService,
setVisEditorsRegistry,
} from './services';
import { visualizeFieldAction } from './actions/visualize_field_action';
import { createVisualizeUrlGenerator } from './url_generator';
import { setVisEditorsRegistry, setUISettings } from './services';
import { createVisEditorsRegistry, VisEditorsRegistry } from './vis_editors_registry';

export interface VisualizePluginStartDependencies {
Expand All @@ -71,7 +61,6 @@ export interface VisualizePluginSetupDependencies {
urlForwarding: UrlForwardingSetup;
data: DataPublicPluginSetup;
share?: SharePluginSetup;
uiActions: UiActionsSetup;
}

export interface VisualizePluginSetup {
Expand All @@ -96,7 +85,7 @@ export class VisualizePlugin

public async setup(
core: CoreSetup<VisualizePluginStartDependencies>,
{ home, urlForwarding, data, share, uiActions }: VisualizePluginSetupDependencies
{ home, urlForwarding, data }: VisualizePluginSetupDependencies
) {
const {
appMounted,
Expand Down Expand Up @@ -129,19 +118,8 @@ export class VisualizePlugin
this.stopUrlTracking = () => {
stopUrlTracker();
};
if (share) {
share.urlGenerators.registerUrlGenerator(
createVisualizeUrlGenerator(async () => {
const [coreStart] = await core.getStartServices();
return {
appBasePath: coreStart.application.getUrlForApp('visualize'),
useHashedUrl: coreStart.uiSettings.get('state:storeInSessionStorage'),
};
})
);
}

setUISettings(core.uiSettings);
uiActions.addTriggerAction(VISUALIZE_FIELD_TRIGGER, visualizeFieldAction);

core.application.register({
id: 'visualize',
Expand Down Expand Up @@ -245,12 +223,6 @@ export class VisualizePlugin

public start(core: CoreStart, plugins: VisualizePluginStartDependencies) {
setVisEditorsRegistry(this.visEditorsRegistry);
setApplication(core.application);
setIndexPatterns(plugins.data.indexPatterns);
setQueryService(plugins.data.query);
if (plugins.share) {
setShareService(plugins.share);
}
}

stop() {
Expand Down
17 changes: 1 addition & 16 deletions src/plugins/visualize/public/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,13 @@
* compliance with, at your election, the Elastic License or the Server Side
* Public License, v 1.
*/

import { ApplicationStart, IUiSettingsClient } from '../../../core/public';
import { IUiSettingsClient } from '../../../core/public';
import { createGetterSetter } from '../../../plugins/kibana_utils/public';
import { IndexPatternsContract, DataPublicPluginStart } from '../../../plugins/data/public';
import { SharePluginStart } from '../../../plugins/share/public';
import { VisEditorsRegistry } from './vis_editors_registry';

export const [getUISettings, setUISettings] = createGetterSetter<IUiSettingsClient>('UISettings');

export const [getApplication, setApplication] = createGetterSetter<ApplicationStart>('Application');

export const [getShareService, setShareService] = createGetterSetter<SharePluginStart>('Share');

export const [getIndexPatterns, setIndexPatterns] = createGetterSetter<IndexPatternsContract>(
'IndexPatterns'
);

export const [
getVisEditorsRegistry,
setVisEditorsRegistry,
] = createGetterSetter<VisEditorsRegistry>('VisEditorsRegistry');

export const [getQueryService, setQueryService] = createGetterSetter<
DataPublicPluginStart['query']
>('Query');
89 changes: 0 additions & 89 deletions src/plugins/visualize/public/url_generator.test.ts

This file was deleted.

Loading