-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into task/resolver-dat…
…a-fetching
- Loading branch information
Showing
23 changed files
with
352 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
This folder is just a left-over of the things that can't be moved to Kibana platform just yet: | ||
|
||
* Styling (this can be moved as soon as there is support for styling in Kibana platform) | ||
* Check whether there are no dev tools and hide the link in the nav bar (this can be moved as soon as all dev tools are moved) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
x-pack/legacy/plugins/siem/public/pages/case/components/case_header_page/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { HeaderPage, HeaderPageProps } from '../../../../components/header_page'; | ||
import * as i18n from './translations'; | ||
|
||
const CaseHeaderPageComponent: React.FC<HeaderPageProps> = props => <HeaderPage {...props} />; | ||
|
||
CaseHeaderPageComponent.defaultProps = { | ||
badgeOptions: { | ||
beta: true, | ||
text: i18n.PAGE_BADGE_LABEL, | ||
tooltip: i18n.PAGE_BADGE_TOOLTIP, | ||
}, | ||
}; | ||
|
||
export const CaseHeaderPage = React.memo(CaseHeaderPageComponent); |
16 changes: 16 additions & 0 deletions
16
x-pack/legacy/plugins/siem/public/pages/case/components/case_header_page/translations.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const PAGE_BADGE_LABEL = i18n.translate('xpack.siem.case.caseView.pageBadgeLabel', { | ||
defaultMessage: 'Beta', | ||
}); | ||
|
||
export const PAGE_BADGE_TOOLTIP = i18n.translate('xpack.siem.case.caseView.pageBadgeTooltip', { | ||
defaultMessage: | ||
'Case Workflow is still in beta. Please help us improve by reporting issues or bugs in the Kibana repo.', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/connectors.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { | ||
EuiDescribedFormGroup, | ||
EuiFormRow, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiLink, | ||
} from '@elastic/eui'; | ||
|
||
import styled from 'styled-components'; | ||
|
||
import { ConnectorsDropdown } from './connectors_dropdown'; | ||
import * as i18n from './translations'; | ||
|
||
const EuiFormRowExtended = styled(EuiFormRow)` | ||
.euiFormRow__labelWrapper { | ||
.euiFormRow__label { | ||
width: 100%; | ||
} | ||
} | ||
`; | ||
|
||
const ConnectorsComponent: React.FC = () => { | ||
const dropDownLabel = ( | ||
<EuiFlexGroup justifyContent="spaceBetween"> | ||
<EuiFlexItem grow={false}>{i18n.INCIDENT_MANAGEMENT_SYSTEM_LABEL}</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<EuiLink>{i18n.ADD_NEW_CONNECTOR}</EuiLink> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
); | ||
|
||
return ( | ||
<EuiDescribedFormGroup | ||
fullWidth | ||
title={<h3>{i18n.INCIDENT_MANAGEMENT_SYSTEM_TITLE}</h3>} | ||
description={i18n.INCIDENT_MANAGEMENT_SYSTEM_DESC} | ||
> | ||
<EuiFormRowExtended fullWidth label={dropDownLabel}> | ||
<ConnectorsDropdown /> | ||
</EuiFormRowExtended> | ||
</EuiDescribedFormGroup> | ||
); | ||
}; | ||
|
||
export const Connectors = React.memo(ConnectorsComponent); |
56 changes: 56 additions & 0 deletions
56
...y/plugins/siem/public/pages/case/components/configure_cases/connectors_dropdown/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { useState, useCallback } from 'react'; | ||
import { EuiSuperSelect, EuiIcon, EuiSuperSelectOption } from '@elastic/eui'; | ||
import styled from 'styled-components'; | ||
|
||
import * as i18n from '../translations'; | ||
|
||
const ICON_SIZE = 'm'; | ||
|
||
const EuiIconExtended = styled(EuiIcon)` | ||
margin-right: 13px; | ||
`; | ||
|
||
const connectors: Array<EuiSuperSelectOption<string>> = [ | ||
{ | ||
value: 'no-connector', | ||
inputDisplay: ( | ||
<> | ||
<EuiIconExtended type="minusInCircle" size={ICON_SIZE} /> | ||
<span>{i18n.NO_CONNECTOR}</span> | ||
</> | ||
), | ||
'data-test-subj': 'no-connector', | ||
}, | ||
{ | ||
value: 'servicenow-connector', | ||
inputDisplay: ( | ||
<> | ||
<EuiIconExtended type="logoWebhook" size={ICON_SIZE} /> | ||
<span>{'My ServiceNow connector'}</span> | ||
</> | ||
), | ||
'data-test-subj': 'servicenow-connector', | ||
}, | ||
]; | ||
|
||
const ConnectorsDropdownComponent: React.FC = () => { | ||
const [selectedConnector, selectConnector] = useState(connectors[0].value); | ||
const onChange = useCallback(connector => selectConnector(connector), [selectedConnector]); | ||
|
||
return ( | ||
<EuiSuperSelect | ||
options={connectors} | ||
valueOfSelected={selectedConnector} | ||
fullWidth | ||
onChange={onChange} | ||
/> | ||
); | ||
}; | ||
|
||
export const ConnectorsDropdown = React.memo(ConnectorsDropdownComponent); |
37 changes: 37 additions & 0 deletions
37
x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/translations.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const INCIDENT_MANAGEMENT_SYSTEM_TITLE = i18n.translate( | ||
'xpack.siem.case.configureCases.incidentManagementSystemTitle', | ||
{ | ||
defaultMessage: 'Connect to third-party incident management system', | ||
} | ||
); | ||
|
||
export const INCIDENT_MANAGEMENT_SYSTEM_DESC = i18n.translate( | ||
'xpack.siem.case.configureCases.incidentManagementSystemDesc', | ||
{ | ||
defaultMessage: | ||
'You may optionally connect SIEM cases to a third-party incident management system of your choosing. This will allow you to push case data as an incident in your chosen third-party system.', | ||
} | ||
); | ||
|
||
export const INCIDENT_MANAGEMENT_SYSTEM_LABEL = i18n.translate( | ||
'xpack.siem.case.configureCases.incidentManagementSystemLabel', | ||
{ | ||
defaultMessage: 'Incident management system', | ||
} | ||
); | ||
|
||
export const NO_CONNECTOR = i18n.translate('xpack.siem.case.configureCases.noConnector', { | ||
defaultMessage: 'No connector selected', | ||
}); | ||
|
||
export const ADD_NEW_CONNECTOR = i18n.translate('xpack.siem.case.configureCases.addNewConnector', { | ||
defaultMessage: 'Add new connector option', | ||
}); |
22 changes: 22 additions & 0 deletions
22
x-pack/legacy/plugins/siem/public/pages/case/components/wrappers/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import styled, { css } from 'styled-components'; | ||
|
||
export const WhitePageWrapper = styled.div` | ||
${({ theme }) => css` | ||
background-color: ${theme.eui.euiColorEmptyShade}; | ||
border-top: ${theme.eui.euiBorderThin}; | ||
height: 100%; | ||
min-height: 100vh; | ||
`} | ||
`; | ||
|
||
export const SectionWrapper = styled.div` | ||
box-sizing: content-box; | ||
margin: 0 auto; | ||
max-width: 1175px; | ||
`; |
Oops, something went wrong.