Skip to content

Commit

Permalink
Final Embeddable API V2 PR
Browse files Browse the repository at this point in the history
  • Loading branch information
stacey-gammon committed Jun 19, 2019
1 parent e7987e1 commit ea2ee21
Show file tree
Hide file tree
Showing 128 changed files with 1,731 additions and 6,897 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import React from 'react';
import { EuiLoadingChart } from '@elastic/eui';
import { InjectedIntl, injectI18n } from '@kbn/i18n/react';

import { ErrorEmbeddable, IEmbeddable } from 'plugins/embeddable_api';

import { Subscription } from 'rxjs';
import { ErrorEmbeddable, IEmbeddable } from '../embeddables';

import { EmbeddablePanel } from '../panel';
import { IContainer } from './i_container';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@ function convertPanelActionToContextMenuItem({
'data-test-subj': `embeddablePanelAction-${action.id}`,
};

if (action.getHref(actionContext) === undefined) {
menuPanelItem.onClick = () => {
action.execute(actionContext);
closeMenu();
};
}
menuPanelItem.onClick = () => {
action.execute(actionContext);
closeMenu();
};

if (action.getHref(actionContext)) {
menuPanelItem.href = action.getHref(actionContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@

import { Action } from './actions';
import { IEmbeddable } from './embeddables';
import { IContainer } from './containers';
import { IRegistry, Trigger } from './types';

export async function getActionsForTrigger(
actionRegistry: IRegistry<Action>,
triggerRegistry: IRegistry<Trigger>,
triggerId: string,
context: { embeddable: IEmbeddable; container?: IContainer }
context: { embeddable: IEmbeddable; triggerContext?: { [key: string]: unknown } }
) {
const trigger = triggerRegistry.get(triggerId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export async function executeTriggerActions(
) {
const actions = await getActionsForTrigger(actionRegistry, triggerRegistry, triggerId, {
embeddable,
triggerContext,
});

if (actions.length > 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Needs to correspond with the react root nested inside angular.
*/
dashboard-viewport-provider {
#dashboardViewport {
flex: 1;
display: flex;
[data-reactroot] {
Expand Down
3 changes: 0 additions & 3 deletions src/legacy/core_plugins/kibana/public/dashboard/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@
// dshChart__legend-isLoading

@import './dashboard_app';
@import './grid/index';
@import './panel/index';
@import './viewport/index';

This file was deleted.

128 changes: 0 additions & 128 deletions src/legacy/core_plugins/kibana/public/dashboard/actions/embeddables.ts

This file was deleted.

23 changes: 0 additions & 23 deletions src/legacy/core_plugins/kibana/public/dashboard/actions/index.ts

This file was deleted.

This file was deleted.

Loading

0 comments on commit ea2ee21

Please sign in to comment.