Skip to content

Commit

Permalink
[Security Solution][Detection Engine] removes ES|QL tech preview badg…
Browse files Browse the repository at this point in the history
…es from rule create form and rule details (#179855)

## Summary

- addresses #178422

### Before


![image](https://github.com/elastic/kibana/assets/92328789/c4fbf8c5-58a1-4277-9fb9-5fd8b382aa92)

<img width="1147" alt="Screenshot 2024-04-02 at 17 19 48"
src="https://github.com/elastic/kibana/assets/92328789/ea40f7a4-762b-40b9-816b-66cbbbd88bfa">


### After

<img width="1186" alt="Screenshot 2024-04-02 at 17 18 18"
src="https://github.com/elastic/kibana/assets/92328789/02f6493c-2224-41d1-959c-028da6e17bf6">

<img width="1124" alt="Screenshot 2024-04-02 at 17 18 54"
src="https://github.com/elastic/kibana/assets/92328789/febee9ca-d787-42c7-8718-727dacb38400">
  • Loading branch information
vitaliidm authored Apr 5, 2024
1 parent 087a070 commit d452da5
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ import { GroupByOptions } from '../../../../detections/pages/detection_engine/ru
import { defaultToEmptyTag } from '../../../../common/components/empty_value';
import { ThreatEuiFlexGroup } from './threat_description';
import { AlertSuppressionTechnicalPreviewBadge } from './alert_suppression_technical_preview_badge';
import { TechnicalPreviewBadge } from '../../../../common/components/technical_preview_badge';
const NoteDescriptionContainer = styled(EuiFlexItem)`
height: 105px;
overflow-y: hidden;
Expand Down Expand Up @@ -477,7 +476,7 @@ export const buildRuleTypeDescription = (label: string, ruleType: Type): ListIte
return [
{
title: label,
description: <TechnicalPreviewBadge label={i18n.ESQL_TYPE_DESCRIPTION} />,
description: i18n.ESQL_TYPE_DESCRIPTION,
},
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
import type { FieldHook } from '../../../../shared_imports';
import * as i18n from './translations';
import { MlCardDescription } from './ml_card_description';
import { TechnicalPreviewBadge } from '../../../../common/components/technical_preview_badge';
import { useIsEsqlRuleTypeEnabled } from '../../../../common/components/hooks';

interface SelectRuleTypeProps {
Expand Down Expand Up @@ -199,7 +198,7 @@ export const SelectRuleType: React.FC<SelectRuleTypeProps> = memo(
<EuiFlexItem>
<EuiCard
data-test-subj="esqlRuleType"
title={<TechnicalPreviewBadge label={i18n.ESQL_TYPE_TITLE} />}
title={i18n.ESQL_TYPE_TITLE}
titleSize="xs"
description={i18n.ESQL_TYPE_DESCRIPTION}
icon={<EuiIcon type="logoElasticsearch" size="l" />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import { MlJobsDescription } from '../../../rule_creation/components/ml_jobs_des
import { MlJobLink } from '../../../rule_creation/components/ml_job_link/ml_job_link';
import { useSecurityJobs } from '../../../../common/components/ml_popover/hooks/use_security_jobs';
import { useKibana } from '../../../../common/lib/kibana/kibana_react';
import { TechnicalPreviewBadge } from '../../../../common/components/technical_preview_badge';
import { BadgeList } from './badge_list';
import { DEFAULT_DESCRIPTION_LIST_COLUMN_WIDTHS } from './constants';
import * as i18n from './translations';
Expand Down Expand Up @@ -231,7 +230,7 @@ const getRuleTypeDescription = (ruleType: Type) => {
case 'eql':
return descriptionStepI18n.EQL_TYPE_DESCRIPTION;
case 'esql':
return <TechnicalPreviewBadge label={descriptionStepI18n.ESQL_TYPE_DESCRIPTION} />;
return descriptionStepI18n.ESQL_TYPE_DESCRIPTION;
case 'threat_match':
return descriptionStepI18n.THREAT_MATCH_TYPE_DESCRIPTION;
case 'new_terms':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
RULE_NAME_OVERRIDE_DETAILS,
} from '../../../../screens/rule_details';

import { ESQL_TYPE, ESQL_QUERY_BAR } from '../../../../screens/create_new_rule';
import { ESQL_QUERY_BAR } from '../../../../screens/create_new_rule';

import { getDetails, goBackToRulesTable } from '../../../../tasks/rule_details';
import { expectNumberOfRules } from '../../../../tasks/alerts_detection_rules';
Expand Down Expand Up @@ -72,9 +72,6 @@ describe('Detection ES|QL rules, creation', { tags: ['@ess'] }, () => {
selectEsqlRuleType();
expandEsqlQueryBar();

// ensures ES|QL rule in technical preview on create page
cy.get(ESQL_TYPE).contains('Technical Preview');

fillDefineEsqlRuleAndContinue(rule);
fillAboutRuleAndContinue(rule);
fillScheduleRuleAndContinue(rule);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ describe('Detection ES|QL rules, details view', { tags: ['@ess'] }, () => {
getDetails(ESQL_QUERY_DETAILS).should('have.text', rule.query);

getDetails(RULE_TYPE_DETAILS).contains('ES|QL');
// ensures ES|QL rule in technical preview
getDetails(RULE_TYPE_DETAILS).contains('Technical Preview');
});
});
});
Expand Down

0 comments on commit d452da5

Please sign in to comment.