Skip to content

Commit

Permalink
Re-add untilPluginStartServicesReady
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Sep 18, 2024
1 parent 3cc39f7 commit ded4bef
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/plugins/controls/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { registerControlGroupEmbeddable } from './react_controls/control_group/r
import { registerOptionsListControl } from './react_controls/controls/data_controls/options_list_control/register_options_list_control';
import { registerRangeSliderControl } from './react_controls/controls/data_controls/range_slider/register_range_slider_control';
import { registerTimeSliderControl } from './react_controls/controls/timeslider_control/register_timeslider_control';
import { setKibanaServices } from './services/kibana_services';
import { setKibanaServices, untilPluginStartServicesReady } from './services/kibana_services';
import type { ControlsPluginSetupDeps, ControlsPluginStartDeps } from './types';

export class ControlsPlugin
Expand All @@ -39,17 +39,19 @@ export class ControlsPlugin
const { uiActions } = startPlugins;
setKibanaServices(coreStart, startPlugins);

const deleteControlAction = new DeleteControlAction();
uiActions.registerAction(deleteControlAction);
uiActions.attachAction(PANEL_HOVER_TRIGGER, deleteControlAction.id);
untilPluginStartServicesReady().then(() => {
const deleteControlAction = new DeleteControlAction();
uiActions.registerAction(deleteControlAction);
uiActions.attachAction(PANEL_HOVER_TRIGGER, deleteControlAction.id);

const editControlAction = new EditControlAction();
uiActions.registerAction(editControlAction);
uiActions.attachAction(PANEL_HOVER_TRIGGER, editControlAction.id);
const editControlAction = new EditControlAction();
uiActions.registerAction(editControlAction);
uiActions.attachAction(PANEL_HOVER_TRIGGER, editControlAction.id);

const clearControlAction = new ClearControlAction();
uiActions.registerAction(clearControlAction);
uiActions.attachAction(PANEL_HOVER_TRIGGER, clearControlAction.id);
const clearControlAction = new ClearControlAction();
uiActions.registerAction(clearControlAction);
uiActions.attachAction(PANEL_HOVER_TRIGGER, clearControlAction.id);
});
}

public stop() {}
Expand Down

0 comments on commit ded4bef

Please sign in to comment.