From 7b1731d132f721a0005435198353920d4c0eb354 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 23 Aug 2023 05:40:30 -0400 Subject: [PATCH] [8.10] Remove 'Create Rule' button from Rule Group page (#164167) (#164535) # Backport This will backport the following commits from `main` to `8.10`: - [Remove 'Create Rule' button from Rule Group page (#164167)](https://github.com/elastic/kibana/pull/164167) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Pablo Machado --- .../public/rules/landing.tsx | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/x-pack/plugins/security_solution/public/rules/landing.tsx b/x-pack/plugins/security_solution/public/rules/landing.tsx index aaf28d48d0bd7..e934c917a9d30 100644 --- a/x-pack/plugins/security_solution/public/rules/landing.tsx +++ b/x-pack/plugins/security_solution/public/rules/landing.tsx @@ -7,14 +7,13 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; -import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; +import { EuiSpacer } from '@elastic/eui'; import { LandingLinksIconsCategories } from '@kbn/security-solution-navigation/landing_links'; import { SecurityPageName } from '../../common'; import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper'; import { SecuritySolutionPageWrapper } from '../common/components/page_wrapper'; import { SpyRoute } from '../common/utils/route/spy_routes'; import { Title } from '../common/components/header_page/title'; -import { SecuritySolutionLinkButton } from '../common/components/links'; import { useRootNavLink } from '../common/links/nav_links'; import { useGlobalQueryString } from '../common/utils/global_query_string'; import { trackLandingLinkClick } from '../common/lib/telemetry/trackers'; @@ -23,23 +22,6 @@ const RULES_PAGE_TITLE = i18n.translate('xpack.securitySolution.rules.landing.pa defaultMessage: 'Rules', }); -const CREATE_RULE_BUTTON = i18n.translate('xpack.securitySolution.rules.landing.createRule', { - defaultMessage: 'Create rule', -}); - -const RulesLandingHeader: React.FC = () => ( - - - - </EuiFlexItem> - <EuiFlexItem grow={false}> - <SecuritySolutionLinkButton deepLinkId={SecurityPageName.rulesCreate} iconType="plusInCircle"> - {CREATE_RULE_BUTTON} - </SecuritySolutionLinkButton> - </EuiFlexItem> - </EuiFlexGroup> -); - export const RulesLandingPage = () => { const { links = [], categories = [] } = useRootNavLink(SecurityPageName.rulesLanding) ?? {}; const urlState = useGlobalQueryString(); @@ -48,7 +30,7 @@ export const RulesLandingPage = () => { <PluginTemplateWrapper> <TrackApplicationView viewId={SecurityPageName.rulesLanding}> <SecuritySolutionPageWrapper> - <RulesLandingHeader /> + <Title title={RULES_PAGE_TITLE} /> <EuiSpacer size="xl" /> <LandingLinksIconsCategories links={links}