Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Revert "[SIEM][CASE] Init Configure Case Page (elastic#58121)"
Browse files Browse the repository at this point in the history
This reverts commit 967bef7.
  • Loading branch information
spalger committed Feb 28, 2020
1 parent ad7b046 commit 30047d7
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 341 deletions.
2 changes: 0 additions & 2 deletions x-pack/legacy/plugins/siem/public/components/link_to/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ export {
getCaseDetailsUrl,
getCaseUrl,
getCreateCaseUrl,
getConfigureCasesUrl,
RedirectToCasePage,
RedirectToCreatePage,
RedirectToConfigureCasesPage,
} from './redirect_to_case';
11 changes: 1 addition & 10 deletions x-pack/legacy/plugins/siem/public/components/link_to/link_to.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ import { RedirectToHostsPage, RedirectToHostDetailsPage } from './redirect_to_ho
import { RedirectToNetworkPage } from './redirect_to_network';
import { RedirectToOverviewPage } from './redirect_to_overview';
import { RedirectToTimelinesPage } from './redirect_to_timelines';
import {
RedirectToCasePage,
RedirectToCreatePage,
RedirectToConfigureCasesPage,
} from './redirect_to_case';
import { RedirectToCasePage, RedirectToCreatePage } from './redirect_to_case';
import { DetectionEngineTab } from '../../pages/detection_engine/types';

interface LinkToPageProps {
Expand All @@ -47,11 +43,6 @@ export const LinkToPage = React.memo<LinkToPageProps>(({ match }) => (
component={RedirectToCreatePage}
path={`${match.url}/:pageName(${SiemPageName.case})/create`}
/>
<Route
exact
component={RedirectToConfigureCasesPage}
path={`${match.url}/:pageName(${SiemPageName.case})/configure`}
/>
<Route
component={RedirectToCasePage}
path={`${match.url}/:pageName(${SiemPageName.case})/:detailName`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ export const RedirectToCasePage = ({
);

export const RedirectToCreatePage = () => <RedirectWrapper to={`/${SiemPageName.case}/create`} />;
export const RedirectToConfigureCasesPage = () => (
<RedirectWrapper to={`/${SiemPageName.case}/configure`} />
);

const baseCaseUrl = `#/link-to/${SiemPageName.case}`;

export const getCaseUrl = () => baseCaseUrl;
export const getCaseDetailsUrl = (detailName: string) => `${baseCaseUrl}/${detailName}`;
export const getCreateCaseUrl = () => `${baseCaseUrl}/create`;
export const getConfigureCasesUrl = () => `${baseCaseUrl}/configure`;
27 changes: 14 additions & 13 deletions x-pack/legacy/plugins/siem/public/pages/case/case.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,30 @@

import React from 'react';

import { EuiButton, EuiButtonIcon, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { CaseHeaderPage } from './components/case_header_page';
import { EuiButton, EuiFlexGroup } from '@elastic/eui';
import { HeaderPage } from '../../components/header_page';
import { WrapperPage } from '../../components/wrapper_page';
import { AllCases } from './components/all_cases';
import { SpyRoute } from '../../utils/route/spy_routes';
import * as i18n from './translations';
import { getCreateCaseUrl, getConfigureCasesUrl } from '../../components/link_to';
import { getCreateCaseUrl } from '../../components/link_to';

const badgeOptions = {
beta: true,
text: i18n.PAGE_BADGE_LABEL,
tooltip: i18n.PAGE_BADGE_TOOLTIP,
};

export const CasesPage = React.memo(() => (
<>
<WrapperPage>
<CaseHeaderPage subtitle={i18n.PAGE_SUBTITLE} title={i18n.PAGE_TITLE}>
<HeaderPage badgeOptions={badgeOptions} subtitle={i18n.PAGE_SUBTITLE} title={i18n.PAGE_TITLE}>
<EuiFlexGroup alignItems="center" gutterSize="s" responsive={false} wrap={true}>
<EuiFlexItem grow={false}>
<EuiButton fill href={getCreateCaseUrl()} iconType="plusInCircle">
{i18n.CREATE_TITLE}
</EuiButton>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonIcon href={getConfigureCasesUrl()} iconType="gear" />
</EuiFlexItem>
<EuiButton fill href={getCreateCaseUrl()} iconType="plusInCircle">
{i18n.CREATE_TITLE}
</EuiButton>
</EuiFlexGroup>
</CaseHeaderPage>
</HeaderPage>
<AllCases />
</WrapperPage>
<SpyRoute />
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import { UserActionTree } from '../user_action_tree';
import { UserList } from '../user_list';
import { useUpdateCase } from '../../../../containers/case/use_update_case';
import { WrapperPage } from '../../../../components/wrapper_page';
import { WhitePageWrapper } from '../wrappers';

interface Props {
caseId: string;
Expand All @@ -53,6 +52,14 @@ const MyWrapper = styled(WrapperPage)`
padding-bottom: 0;
`;

const BackgroundWrapper = styled.div`
${({ theme }) => css`
background-color: ${theme.eui.euiColorEmptyShade};
border-top: ${theme.eui.euiBorderThin};
height: 100%;
`}
`;

export interface CaseProps {
caseId: string;
initialData: Case;
Expand Down Expand Up @@ -272,7 +279,7 @@ export const CaseComponent = React.memo<CaseProps>(({ caseId, initialData, isLoa
</EuiFlexGroup>
</HeaderPage>
</MyWrapper>
<WhitePageWrapper>
<BackgroundWrapper>
<MyWrapper>
<EuiFlexGroup>
<EuiFlexItem grow={6}>
Expand All @@ -298,7 +305,7 @@ export const CaseComponent = React.memo<CaseProps>(({ caseId, initialData, isLoa
</EuiFlexItem>
</EuiFlexGroup>
</MyWrapper>
</WhitePageWrapper>
</BackgroundWrapper>
</>
);
});
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

54 changes: 0 additions & 54 deletions x-pack/legacy/plugins/siem/public/pages/case/configure_cases.tsx

This file was deleted.

Loading

0 comments on commit 30047d7

Please sign in to comment.