mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[ResponseOps][Cases] Make case templates GA (#205940)
## Summary This PR makes case templates GA. <details><summary>Case settings</summary> <img width="1133" alt="image" src="https://github.com/user-attachments/assets/45c5896f-88dc-4199-ab83-398d05c8746a" /> </details> <details><summary>Case create</summary> <img width="1094" alt="image" src="https://github.com/user-attachments/assets/05df0a4a-44e8-4bf2-ad8d-e50f5d9851ef" /> </details> <details><summary>Case action</summary> <img width="1079" alt="image" src="https://github.com/user-attachments/assets/b321e926-3b2d-4773-90a3-3bd0b45aac3c" /> </details> ### Checklist Check the PR satisfies following conditions. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### Release Notes Case templates are now GA ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
This commit is contained in:
parent
39774bfc48
commit
7386e26824
3 changed files with 1 additions and 27 deletions
|
@ -7,15 +7,8 @@
|
|||
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import type { EuiSelectOption } from '@elastic/eui';
|
||||
import {
|
||||
EuiFlexItem,
|
||||
EuiFormRow,
|
||||
EuiSelect,
|
||||
EuiFlexGroup,
|
||||
useIsWithinMaxBreakpoint,
|
||||
} from '@elastic/eui';
|
||||
import { EuiFlexItem, EuiFormRow, EuiSelect, EuiFlexGroup } from '@elastic/eui';
|
||||
import { css } from '@emotion/react';
|
||||
import { ExperimentalBadge } from '../experimental_badge/experimental_badge';
|
||||
import type { CasesConfigurationUI, CasesConfigurationUITemplate } from '../../containers/types';
|
||||
import { OptionalFieldLabel } from '../optional_field_label';
|
||||
import { TEMPLATE_HELP_TEXT, TEMPLATE_LABEL } from './translations';
|
||||
|
@ -39,7 +32,6 @@ export const TemplateSelectorComponent: React.FC<Props> = ({
|
|||
const [selectedTemplate, onSelectTemplate] = useState<string | undefined>(
|
||||
initialTemplate?.key ?? undefined
|
||||
);
|
||||
const isSmallScreen = useIsWithinMaxBreakpoint('s');
|
||||
|
||||
const options: EuiSelectOption[] = templates.map((template) => ({
|
||||
text: template.name,
|
||||
|
@ -72,14 +64,6 @@ export const TemplateSelectorComponent: React.FC<Props> = ({
|
|||
`}
|
||||
responsive={false}
|
||||
>
|
||||
<EuiFlexItem
|
||||
grow={false}
|
||||
css={css`
|
||||
line-height: 0;
|
||||
`}
|
||||
>
|
||||
<ExperimentalBadge compact={isSmallScreen} />
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>{OptionalFieldLabel}</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
}
|
||||
|
|
|
@ -111,12 +111,6 @@ describe.skip('Templates', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('shows the experimental badge', async () => {
|
||||
appMockRender.render(<Templates {...props} />);
|
||||
|
||||
expect(await screen.findByTestId('case-experimental-badge')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('shows error when templates reaches the limit', async () => {
|
||||
const mockTemplates = [];
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import {
|
|||
} from '@elastic/eui';
|
||||
import { MAX_TEMPLATES_LENGTH } from '../../../common/constants';
|
||||
import type { CasesConfigurationUITemplate } from '../../../common/ui';
|
||||
import { ExperimentalBadge } from '../experimental_badge/experimental_badge';
|
||||
import * as i18n from './translations';
|
||||
import { TemplatesList } from './templates_list';
|
||||
|
||||
|
@ -72,9 +71,6 @@ const TemplatesComponent: React.FC<Props> = ({
|
|||
title={
|
||||
<EuiFlexGroup alignItems="center" gutterSize="none">
|
||||
<EuiFlexItem grow={false}>{i18n.TEMPLATE_TITLE}</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<ExperimentalBadge />
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
}
|
||||
description={<p>{i18n.TEMPLATE_DESCRIPTION}</p>}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue