mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
[Security Solution] - Rename esql setting (#182432)
## Summary Follow up to this PR: https://github.com/elastic/kibana/pull/181616 Renaming `discover:enableEsql` to `enableESQL` according to this change: https://github.com/elastic/kibana/pull/182074
This commit is contained in:
parent
f328ec6e6b
commit
c0532083ea
1 changed files with 7 additions and 1 deletions
|
@ -6,12 +6,18 @@
|
|||
*/
|
||||
|
||||
import { useMemo } from 'react';
|
||||
import { ENABLE_ESQL } from '@kbn/esql-utils';
|
||||
import { useKibana } from '../../lib/kibana';
|
||||
import { useIsExperimentalFeatureEnabled } from '../use_experimental_features';
|
||||
|
||||
/**
|
||||
* This hook combines the checks for esql availability within the security solution
|
||||
* If the advanced setting is disabled, ESQL will not be accessible in the UI for any new timeline or new rule creation workflows
|
||||
* The feature flags are still available to provide users an escape hatch in case of any esql related performance issues
|
||||
*/
|
||||
export const useEsqlAvailability = () => {
|
||||
const { uiSettings } = useKibana().services;
|
||||
const isEsqlAdvancedSettingEnabled = uiSettings?.get('discover:enableESQL');
|
||||
const isEsqlAdvancedSettingEnabled = uiSettings?.get(ENABLE_ESQL);
|
||||
const isEsqlRuleTypeEnabled =
|
||||
!useIsExperimentalFeatureEnabled('esqlRulesDisabled') && isEsqlAdvancedSettingEnabled;
|
||||
const isESQLTabInTimelineEnabled =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue