Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'Create Rule' button from Rule Group page #164167

Merged
merged 11 commits into from
Aug 23, 2023
22 changes: 2 additions & 20 deletions x-pack/plugins/security_solution/public/rules/landing.tsx
Original file line number Diff line number Diff line change
@@ -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 = () => (
<EuiFlexGroup gutterSize="none" direction="row">
<EuiFlexItem>
<Title title={RULES_PAGE_TITLE} />
</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}