-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] [Exceptions] Adds a new react route for viewing details about an individual exception list #144754
Changes from 16 commits
78a5ed0
d8b8c4d
f631fcc
6b2f851
9e2d090
7c8e825
e5c5a65
039a425
0d8774d
8e61a3d
3c63c44
4c43ba7
093edb8
2ba516e
83c35c9
06ef0ae
e3ef783
a3e8029
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* 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 { useParams } from 'react-router-dom'; | ||
import { EuiTitle } from '@elastic/eui'; | ||
import { ALL_ENDPOINT_ARTIFACT_LIST_IDS } from '../../../../common/endpoint/service/artifacts/constants'; | ||
import { NotFoundPage } from '../../../app/404'; | ||
|
||
export const ExceptionListsDetailView = memo(() => { | ||
const { exceptionListId: listId } = useParams<{ | ||
exceptionListId: string; | ||
}>(); | ||
return ALL_ENDPOINT_ARTIFACT_LIST_IDS.includes(listId) ? ( | ||
<NotFoundPage /> | ||
) : ( | ||
<EuiTitle> | ||
<h2>{listId}</h2> | ||
</EuiTitle> | ||
); | ||
}); | ||
Comment on lines
+18
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @paul-tavares How does this look for a start? |
||
|
||
ExceptionListsDetailView.displayName = 'ExceptionListsDetailView'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ import { | |
} from '@elastic/eui'; | ||
|
||
import type { NamespaceType, ExceptionListFilter } from '@kbn/securitysolution-io-ts-list-types'; | ||
import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; | ||
import { useApi, useExceptionLists } from '@kbn/securitysolution-list-hooks'; | ||
|
||
import { AutoDownload } from '../../../common/components/auto_download/auto_download'; | ||
|
@@ -83,7 +84,9 @@ export const SharedLists = React.memo(() => { | |
const [referenceModalState, setReferenceModalState] = useState<ReferenceModalState>( | ||
exceptionReferenceModalInitialState | ||
); | ||
const [filters, setFilters] = useState<ExceptionListFilter | undefined>(undefined); | ||
const [filters, setFilters] = useState<ExceptionListFilter | undefined>({ | ||
types: [ExceptionListTypeEnum.DETECTION, ExceptionListTypeEnum.ENDPOINT], | ||
}); | ||
Comment on lines
+88
to
+89
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @WafaaNasr @peluja1012 This PR adds a filter to only display shared lists and the endpoint list. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Devin 🥳 |
||
const [loadingExceptions, exceptions, pagination, setPagination, refreshExceptions] = | ||
useExceptionLists({ | ||
errorMessage: i18n.ERROR_EXCEPTION_LISTS, | ||
|
@@ -487,7 +490,6 @@ export const SharedLists = React.memo(() => { | |
key={excList.list_id} | ||
data-test-subj="exceptionsListCard" | ||
readOnly={canUserREAD && !canUserCRUD} | ||
http={http} | ||
exceptionsList={excList} | ||
handleDelete={handleDelete} | ||
handleExport={handleExport} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{' '}
I think this space is unwanted :DThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah interesting - not sure how that got in there. Thanks!