mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Security Solution] Trusted Apps about text updated to add new docs link (#142467)
This commit is contained in:
parent
fdba8d3a56
commit
44d028fdf8
8 changed files with 93 additions and 7 deletions
|
@ -363,6 +363,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
|
|||
eventFilters: `${SECURITY_SOLUTION_DOCS}event-filters.html`,
|
||||
blocklist: `${SECURITY_SOLUTION_DOCS}blocklist.html`,
|
||||
threatIntelInt: `${SECURITY_SOLUTION_DOCS}es-threat-intel-integrations.html`,
|
||||
endpointArtifacts: `${SECURITY_SOLUTION_DOCS}endpoint-artifacts.html`,
|
||||
policyResponseTroubleshooting: {
|
||||
full_disk_access: `${SECURITY_SOLUTION_DOCS}deploy-elastic-endpoint.html#enable-fda-endpoint`,
|
||||
macos_system_ext: `${SECURITY_SOLUTION_DOCS}deploy-elastic-endpoint.html#system-extension-endpoint`,
|
||||
|
|
|
@ -265,6 +265,7 @@ export interface DocLinks {
|
|||
readonly trustedApps: string;
|
||||
readonly eventFilters: string;
|
||||
readonly blocklist: string;
|
||||
readonly endpointArtifacts: string;
|
||||
readonly policyResponseTroubleshooting: {
|
||||
full_disk_access: string;
|
||||
macos_system_ext: string;
|
||||
|
|
|
@ -74,6 +74,7 @@ export interface ArtifactListPageProps {
|
|||
allowCardEditAction?: boolean;
|
||||
allowCardDeleteAction?: boolean;
|
||||
allowCardCreateAction?: boolean;
|
||||
secondaryPageInfo?: React.ReactNode;
|
||||
}
|
||||
|
||||
export const ArtifactListPage = memo<ArtifactListPageProps>(
|
||||
|
@ -82,6 +83,7 @@ export const ArtifactListPage = memo<ArtifactListPageProps>(
|
|||
ArtifactFormComponent,
|
||||
searchableFields = DEFAULT_EXCEPTION_LIST_ITEM_SEARCHABLE_FIELDS,
|
||||
labels: _labels = {},
|
||||
secondaryPageInfo,
|
||||
onFormSubmit,
|
||||
flyoutSize,
|
||||
'data-test-subj': dataTestSubj,
|
||||
|
@ -240,6 +242,24 @@ export const ArtifactListPage = memo<ArtifactListPageProps>(
|
|||
setSelectedItemForEdit(undefined);
|
||||
}, []);
|
||||
|
||||
const description = useMemo(() => {
|
||||
const subtitleText = labels.pageAboutInfo ? (
|
||||
<span data-test-subj="header-panel-subtitle">{labels.pageAboutInfo}</span>
|
||||
) : undefined;
|
||||
const detailedPageInfoElement = secondaryPageInfo ? (
|
||||
<>
|
||||
<EuiSpacer size="m" />
|
||||
{secondaryPageInfo}
|
||||
</>
|
||||
) : undefined;
|
||||
return (
|
||||
<>
|
||||
{subtitleText}
|
||||
{detailedPageInfoElement}
|
||||
</>
|
||||
);
|
||||
}, [labels.pageAboutInfo, secondaryPageInfo]);
|
||||
|
||||
if (isPageInitializing) {
|
||||
return <ManagementPageLoader data-test-subj={getTestId('pageLoader')} />;
|
||||
}
|
||||
|
@ -249,7 +269,7 @@ export const ArtifactListPage = memo<ArtifactListPageProps>(
|
|||
headerBackComponent={backButtonHeaderComponent}
|
||||
hideHeader={!doesDataExist}
|
||||
title={labels.pageTitle}
|
||||
subtitle={labels.pageAboutInfo}
|
||||
subtitle={description}
|
||||
actions={
|
||||
allowCardCreateAction && (
|
||||
<EuiButton
|
||||
|
@ -300,6 +320,7 @@ export const ArtifactListPage = memo<ArtifactListPageProps>(
|
|||
primaryButtonLabel={labels.emptyStatePrimaryButtonLabel}
|
||||
backComponent={backButtonEmptyComponent}
|
||||
data-test-subj={getTestId('emptyState')}
|
||||
secondaryAboutInfo={secondaryPageInfo}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React, { memo } from 'react';
|
||||
import styled, { css } from 'styled-components';
|
||||
import { EuiButton, EuiEmptyPrompt } from '@elastic/eui';
|
||||
import { EuiButton, EuiEmptyPrompt, EuiSpacer } from '@elastic/eui';
|
||||
import { ManagementEmptyStateWrapper } from '../../management_empty_state_wrapper';
|
||||
import { useTestIdGenerator } from '../../../hooks/use_test_id_generator';
|
||||
|
||||
|
@ -25,6 +25,7 @@ export const NoDataEmptyState = memo<{
|
|||
/** Should the Add button be disabled */
|
||||
isAddDisabled?: boolean;
|
||||
backComponent?: React.ReactNode;
|
||||
secondaryAboutInfo?: React.ReactNode;
|
||||
'data-test-subj'?: string;
|
||||
}>(
|
||||
({
|
||||
|
@ -35,6 +36,7 @@ export const NoDataEmptyState = memo<{
|
|||
titleLabel,
|
||||
aboutInfo,
|
||||
primaryButtonLabel,
|
||||
secondaryAboutInfo,
|
||||
}) => {
|
||||
const getTestId = useTestIdGenerator(dataTestSubj);
|
||||
|
||||
|
@ -44,7 +46,17 @@ export const NoDataEmptyState = memo<{
|
|||
data-test-subj={dataTestSubj}
|
||||
iconType="plusInCircle"
|
||||
title={<h2 data-test-subj={getTestId('title')}>{titleLabel}</h2>}
|
||||
body={<div data-test-subj={getTestId('aboutInfo')}>{aboutInfo}</div>}
|
||||
body={
|
||||
<div data-test-subj={getTestId('aboutInfo')}>
|
||||
{aboutInfo}
|
||||
{secondaryAboutInfo ? (
|
||||
<>
|
||||
<EuiSpacer size="m" />
|
||||
{secondaryAboutInfo}
|
||||
</>
|
||||
) : undefined}
|
||||
</div>
|
||||
}
|
||||
actions={[
|
||||
<EuiButton
|
||||
fill
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import React, { memo } from 'react';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { EuiLink } from '@elastic/eui';
|
||||
import { useKibana } from '../../../../../common/lib/kibana';
|
||||
|
||||
export const TrustedAppsArtifactsDocsLink = memo(() => {
|
||||
const {
|
||||
docLinks: {
|
||||
links: { securitySolution },
|
||||
},
|
||||
} = useKibana().services;
|
||||
|
||||
return (
|
||||
<>
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.trustedApps.docsLinkInfoStart"
|
||||
defaultMessage="Have too many alerts? Add an "
|
||||
/>
|
||||
<EuiLink target="_blank" href={`${securitySolution.endpointArtifacts}`}>
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.trustedApps.docsLinkText"
|
||||
defaultMessage="endpoint alert exception"
|
||||
/>
|
||||
</EuiLink>
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.trustedApps.docsLinkInfoEnd"
|
||||
defaultMessage=" instead."
|
||||
/>
|
||||
</>
|
||||
);
|
||||
});
|
||||
|
||||
TrustedAppsArtifactsDocsLink.displayName = 'TrustedAppsArtifactsDocsLink';
|
|
@ -71,6 +71,7 @@ import {
|
|||
} from '../../../../../../common/endpoint/service/artifacts/constants';
|
||||
import type { ArtifactFormComponentProps } from '../../../../components/artifact_list_page';
|
||||
import { isGlobalPolicyEffected } from '../../../../components/effected_policy_select/utils';
|
||||
import { TrustedAppsArtifactsDocsLink } from './artifacts_docs_link';
|
||||
|
||||
interface FieldValidationState {
|
||||
/** If this fields state is invalid. Drives display of errors on the UI */
|
||||
|
@ -419,7 +420,15 @@ export const TrustedAppsForm = memo<ArtifactFormComponentProps>(
|
|||
<EuiSpacer size="xs" />
|
||||
{mode === 'create' && (
|
||||
<EuiText size="s" data-test-subj={getTestId('about')}>
|
||||
<p>{DETAILS_HEADER_DESCRIPTION}</p>
|
||||
<p>
|
||||
{DETAILS_HEADER_DESCRIPTION}
|
||||
{
|
||||
<>
|
||||
<EuiSpacer size="m" />
|
||||
<TrustedAppsArtifactsDocsLink />
|
||||
</>
|
||||
}
|
||||
</p>
|
||||
</EuiText>
|
||||
)}
|
||||
<EuiSpacer size="m" />
|
||||
|
|
|
@ -25,7 +25,7 @@ export const DETAILS_HEADER_DESCRIPTION = i18n.translate(
|
|||
'xpack.securitySolution.trustedApps.details.header.description',
|
||||
{
|
||||
defaultMessage:
|
||||
'Trusted applications improve performance or alleviate conflicts with other applications running on your hosts.',
|
||||
'Add a trusted application to improve performance or alleviate conflicts with other applications running on your hosts. Trusted applications may still generate alerts in some cases.',
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ import { ArtifactListPage } from '../../../components/artifact_list_page';
|
|||
import { TrustedAppsApiClient } from '../service';
|
||||
import { TrustedAppsForm } from './components/form';
|
||||
import { SEARCHABLE_FIELDS } from '../constants';
|
||||
import { TrustedAppsArtifactsDocsLink } from './components/artifacts_docs_link';
|
||||
|
||||
const TRUSTED_APPS_PAGE_LABELS: ArtifactListPageProps['labels'] = {
|
||||
pageTitle: i18n.translate('xpack.securitySolution.trustedApps.pageTitle', {
|
||||
|
@ -24,7 +25,7 @@ const TRUSTED_APPS_PAGE_LABELS: ArtifactListPageProps['labels'] = {
|
|||
}),
|
||||
pageAboutInfo: i18n.translate('xpack.securitySolution.trustedApps.pageAboutInfo', {
|
||||
defaultMessage:
|
||||
'Trusted applications improve performance or alleviate conflicts with other applications running on your hosts.',
|
||||
'Add a trusted application to improve performance or alleviate conflicts with other applications running on your hosts. Trusted applications may still generate alerts in some cases.',
|
||||
}),
|
||||
pageAddButtonTitle: i18n.translate('xpack.securitySolution.trustedApps.pageAddButtonTitle', {
|
||||
defaultMessage: 'Add trusted application',
|
||||
|
@ -92,7 +93,7 @@ const TRUSTED_APPS_PAGE_LABELS: ArtifactListPageProps['labels'] = {
|
|||
}),
|
||||
emptyStateInfo: i18n.translate('xpack.securitySolution.trustedApps.emptyStateInfo', {
|
||||
defaultMessage:
|
||||
'Add a trusted application to improve performance or alleviate conflicts with other applications running on your hosts.',
|
||||
'Add a trusted application to improve performance or alleviate conflicts with other applications running on your hosts. Trusted applications may still generate alerts in some cases.',
|
||||
}),
|
||||
emptyStatePrimaryButtonLabel: i18n.translate(
|
||||
'xpack.securitySolution.trustedApps.emptyStatePrimaryButtonLabel',
|
||||
|
@ -117,6 +118,7 @@ export const TrustedAppsList = memo(() => {
|
|||
labels={TRUSTED_APPS_PAGE_LABELS}
|
||||
data-test-subj="trustedAppsListPage"
|
||||
searchableFields={SEARCHABLE_FIELDS}
|
||||
secondaryPageInfo={<TrustedAppsArtifactsDocsLink />}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue