|
@@ -47,16 +47,14 @@ import java.util.function.Supplier;
|
|
|
|
|
|
public class EqlPlugin extends Plugin implements ActionPlugin {
|
|
|
|
|
|
- private final boolean enabled;
|
|
|
-
|
|
|
public static final Setting<Boolean> EQL_ENABLED_SETTING = Setting.boolSetting(
|
|
|
"xpack.eql.enabled",
|
|
|
true,
|
|
|
- Setting.Property.NodeScope
|
|
|
+ Setting.Property.NodeScope,
|
|
|
+ Setting.Property.Deprecated
|
|
|
);
|
|
|
|
|
|
- public EqlPlugin(final Settings settings) {
|
|
|
- this.enabled = EQL_ENABLED_SETTING.get(settings);
|
|
|
+ public EqlPlugin() {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -86,16 +84,10 @@ public class EqlPlugin extends Plugin implements ActionPlugin {
|
|
|
|
|
|
@Override
|
|
|
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
|
|
- if (enabled) {
|
|
|
- return List.of(
|
|
|
- new ActionHandler<>(EqlSearchAction.INSTANCE, TransportEqlSearchAction.class),
|
|
|
- new ActionHandler<>(EqlStatsAction.INSTANCE, TransportEqlStatsAction.class),
|
|
|
- new ActionHandler<>(EqlAsyncGetResultAction.INSTANCE, TransportEqlAsyncGetResultAction.class),
|
|
|
- new ActionHandler<>(XPackUsageFeatureAction.EQL, EqlUsageTransportAction.class),
|
|
|
- new ActionHandler<>(XPackInfoFeatureAction.EQL, EqlInfoTransportAction.class)
|
|
|
- );
|
|
|
- }
|
|
|
return List.of(
|
|
|
+ new ActionHandler<>(EqlSearchAction.INSTANCE, TransportEqlSearchAction.class),
|
|
|
+ new ActionHandler<>(EqlStatsAction.INSTANCE, TransportEqlStatsAction.class),
|
|
|
+ new ActionHandler<>(EqlAsyncGetResultAction.INSTANCE, TransportEqlAsyncGetResultAction.class),
|
|
|
new ActionHandler<>(XPackUsageFeatureAction.EQL, EqlUsageTransportAction.class),
|
|
|
new ActionHandler<>(XPackInfoFeatureAction.EQL, EqlInfoTransportAction.class)
|
|
|
);
|
|
@@ -106,8 +98,8 @@ public class EqlPlugin extends Plugin implements ActionPlugin {
|
|
|
}
|
|
|
|
|
|
// TODO: this needs to be used by all plugin methods - including getActions and createComponents
|
|
|
- public static boolean isEnabled(Settings settings) {
|
|
|
- return EQL_ENABLED_SETTING.get(settings);
|
|
|
+ public static boolean isEnabled() {
|
|
|
+ return true; // basic license level features are always enabled
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -119,15 +111,12 @@ public class EqlPlugin extends Plugin implements ActionPlugin {
|
|
|
IndexNameExpressionResolver indexNameExpressionResolver,
|
|
|
Supplier<DiscoveryNodes> nodesInCluster) {
|
|
|
|
|
|
- if (enabled) {
|
|
|
- return List.of(
|
|
|
- new RestEqlSearchAction(),
|
|
|
- new RestEqlStatsAction(),
|
|
|
- new RestEqlGetAsyncResultAction(),
|
|
|
- new RestEqlDeleteAsyncResultAction()
|
|
|
- );
|
|
|
- }
|
|
|
- return List.of();
|
|
|
+ return List.of(
|
|
|
+ new RestEqlSearchAction(),
|
|
|
+ new RestEqlStatsAction(),
|
|
|
+ new RestEqlGetAsyncResultAction(),
|
|
|
+ new RestEqlDeleteAsyncResultAction()
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
// overridable by tests
|