import { CoreSetup , CoreStart , Plugin , PluginInitializerContext } from 'src/core/public' ; import { EmbeddableSetup , EmbeddableStart } from '../../../../../src/plugins/embeddable/public' ; import { AdvancedUiActionsSetup , AdvancedUiActionsStart , urlDrilldownGlobalScopeProvider , } from '../../../ui_actions_enhanced/public' ; import { UrlDrilldown } from './lib' ; import { createStartServicesGetter } from '../../../../../src/plugins/kibana_utils/public' ; export interface SetupDependencies { embeddable : EmbeddableSetup ; uiActionsEnhanced : AdvancedUiActionsSetup ; } export interface StartDependencies { embeddable : EmbeddableStart ; uiActionsEnhanced : AdvancedUiActionsStart ; } export interface SetupContract { } export interface StartContract { } export class UrlDrilldownPlugin implements Plugin < SetupContract , StartContract , SetupDependencies , StartDependencies > { constructor ( protected readonly context ) { } public setup ( core , plugins ) { const startServices = createStartServicesGetter ( core . getStartServices ) ; plugins . uiActionsEnhanced . registerDrilldown ( new UrlDrilldown ( { externalUrl : core . http . externalUrl , getGlobalScope : urlDrilldownGlobalScopeProvider ( { core } ) , navigateToUrl : ( url ) => core . getStartServices ( ) . then ( ( [ { application } ] ) => application . navigateToUrl ( url ) ) , getSyntaxHelpDocsLink : ( ) => startServices ( ) . core . docLinks . links . dashboard . urlDrilldownTemplateSyntax , getVariablesHelpDocsLink : ( ) => startServices ( ) . core . docLinks . links . dashboard . urlDrilldownVariables , uiSettings : core . uiSettings , } ) ) ; return { } ; } public start ( core , plugins ) { return { } ; } public stop ( ) { } }