Skip to content

Commit

Permalink
Revert "add apply query trigger"
Browse files Browse the repository at this point in the history
This reverts commit 0e8c681772d600569baad169dd9d8901b8bfabd1.
  • Loading branch information
joshuali925 committed Jun 4, 2024
1 parent ee51bce commit 0589b24
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 121 deletions.
45 changes: 0 additions & 45 deletions src/plugins/data/public/actions/apply_query_action.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/plugins/data/public/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ export {
createFilterAction,
ApplyGlobalFilterActionContext,
} from './apply_filter_action';
export {
ACTION_GLOBAL_APPLY_QUERY,
createQueryAction,
ApplyGlobalQueryActionContext,
} from './apply_query_action';
export { createFiltersFromValueClickAction } from './filters/create_filters_from_value_click';
export { createFiltersFromRangeSelectAction } from './filters/create_filters_from_range_select';
export * from './select_range_action';
Expand Down
6 changes: 1 addition & 5 deletions src/plugins/data/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,7 @@ export {

export { isTimeRange, isQuery, isFilter, isFilters } from '../common';

export {
ACTION_GLOBAL_APPLY_FILTER,
ApplyGlobalFilterActionContext,
ApplyGlobalQueryActionContext,
} from './actions';
export { ACTION_GLOBAL_APPLY_FILTER, ApplyGlobalFilterActionContext } from './actions';

export * from '../common/field_mapping';

Expand Down
10 changes: 0 additions & 10 deletions src/plugins/data/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ import {
SELECT_RANGE_TRIGGER,
VALUE_CLICK_TRIGGER,
APPLY_FILTER_TRIGGER,
APPLY_QUERY_TRIGGER,
} from '../../ui_actions/public';
import {
ACTION_GLOBAL_APPLY_FILTER,
Expand All @@ -85,9 +84,6 @@ import {
ValueClickActionContext,
createValueClickAction,
createSelectRangeAction,
ACTION_GLOBAL_APPLY_QUERY,
ApplyGlobalQueryActionContext,
createQueryAction,
} from './actions';

import { SavedObjectsClientPublicToCommon } from './index_patterns';
Expand All @@ -100,7 +96,6 @@ import { DEFAULT_DATA_SOURCE_TYPE } from './data_sources/constants';

declare module '../../ui_actions/public' {
export interface ActionContextMapping {
[ACTION_GLOBAL_APPLY_QUERY]: ApplyGlobalQueryActionContext;
[ACTION_GLOBAL_APPLY_FILTER]: ApplyGlobalFilterActionContext;
[ACTION_SELECT_RANGE]: SelectRangeActionContext;
[ACTION_VALUE_CLICK]: ValueClickActionContext;
Expand Down Expand Up @@ -149,11 +144,6 @@ export class DataPublicPlugin
createFilterAction(queryService.filterManager, queryService.timefilter.timefilter)
);

uiActions.addTriggerAction(
APPLY_QUERY_TRIGGER,
createQueryAction(queryService.queryString, queryService.timefilter.timefilter)
);

uiActions.addTriggerAction(
SELECT_RANGE_TRIGGER,
createSelectRangeAction(() => ({
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/ui_actions/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ export {
selectRangeTrigger,
VALUE_CLICK_TRIGGER,
valueClickTrigger,
APPLY_QUERY_TRIGGER,
applyQueryTrigger,
APPLY_FILTER_TRIGGER,
applyFilterTrigger,
VISUALIZE_FIELD_TRIGGER,
Expand Down
6 changes: 2 additions & 4 deletions src/plugins/ui_actions/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@
* under the License.
*/

import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from 'src/core/public';
import { CoreStart, CoreSetup, Plugin, PluginInitializerContext } from 'src/core/public';
import { UiActionsService } from './service';
import {
applyFilterTrigger,
applyQueryTrigger,
selectRangeTrigger,
valueClickTrigger,
applyFilterTrigger,
visualizeFieldTrigger,
visualizeGeoFieldTrigger,
} from './triggers';
Expand All @@ -59,7 +58,6 @@ export class UiActionsPlugin implements Plugin<UiActionsSetup, UiActionsStart> {
public setup(core: CoreSetup): UiActionsSetup {
this.service.registerTrigger(selectRangeTrigger);
this.service.registerTrigger(valueClickTrigger);
this.service.registerTrigger(applyQueryTrigger);
this.service.registerTrigger(applyFilterTrigger);
this.service.registerTrigger(visualizeFieldTrigger);
this.service.registerTrigger(visualizeGeoFieldTrigger);
Expand Down
43 changes: 0 additions & 43 deletions src/plugins/ui_actions/public/triggers/apply_query_trigger.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/plugins/ui_actions/public/triggers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export * from './trigger_contract';
export * from './trigger_internal';
export * from './select_range_trigger';
export * from './value_click_trigger';
export * from './apply_query_trigger';
export * from './apply_filter_trigger';
export * from './visualize_field_trigger';
export * from './visualize_geo_field_trigger';
Expand Down
7 changes: 1 addition & 6 deletions src/plugins/ui_actions/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,9 @@ import {
VISUALIZE_FIELD_TRIGGER,
VISUALIZE_GEO_FIELD_TRIGGER,
DEFAULT_TRIGGER,
APPLY_QUERY_TRIGGER,
} from './triggers';
import type { RangeSelectContext, ValueClickContext } from '../../embeddable/public';
import type {
ApplyGlobalQueryActionContext,
ApplyGlobalFilterActionContext,
} from '../../data/public';
import type { ApplyGlobalFilterActionContext } from '../../data/public';

export type TriggerRegistry = Map<TriggerId, TriggerInternal<any>>;
export type ActionRegistry = Map<string, ActionInternal>;
Expand All @@ -64,7 +60,6 @@ export interface TriggerContextMapping {
[DEFAULT_TRIGGER]: TriggerContext;
[SELECT_RANGE_TRIGGER]: RangeSelectContext;
[VALUE_CLICK_TRIGGER]: ValueClickContext;
[APPLY_QUERY_TRIGGER]: ApplyGlobalQueryActionContext;
[APPLY_FILTER_TRIGGER]: ApplyGlobalFilterActionContext;
[VISUALIZE_FIELD_TRIGGER]: VisualizeFieldContext;
[VISUALIZE_GEO_FIELD_TRIGGER]: VisualizeFieldContext;
Expand Down

0 comments on commit 0589b24

Please sign in to comment.