forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cloud Security][Findings] Add Vulnerabilities and Configurations tab…
…s to the Findings page (elastic#152414)
- Loading branch information
Showing
49 changed files
with
186 additions
and
87 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
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
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
58 changes: 58 additions & 0 deletions
58
x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.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,58 @@ | ||
/* | ||
* 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 from 'react'; | ||
import { Redirect, Switch, useLocation } from 'react-router-dom'; | ||
import { Route } from '@kbn/shared-ux-router'; | ||
import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; | ||
import { useCspSetupStatusApi } from '../../common/api/use_setup_status_api'; | ||
import { NoFindingsStates } from '../../components/no_findings_states'; | ||
import { CloudPosturePage } from '../../components/cloud_posture_page'; | ||
import { useLatestFindingsDataView } from '../../common/api/use_latest_findings_data_view'; | ||
import { cloudPosturePages, findingsNavigation } from '../../common/navigation/constants'; | ||
import { FindingsByResourceContainer } from './latest_findings_by_resource/findings_by_resource_container'; | ||
import { LatestFindingsContainer } from './latest_findings/latest_findings_container'; | ||
|
||
export const Configurations = () => { | ||
const location = useLocation(); | ||
const dataViewQuery = useLatestFindingsDataView(); | ||
const getSetupStatus = useCspSetupStatusApi(); | ||
|
||
const hasFindings = getSetupStatus.data?.status === 'indexed'; | ||
if (!hasFindings) return <NoFindingsStates />; | ||
|
||
return ( | ||
<CloudPosturePage query={dataViewQuery}> | ||
<Switch> | ||
<Route | ||
exact | ||
path={cloudPosturePages.findings.path} | ||
render={() => ( | ||
<Redirect | ||
to={{ | ||
pathname: findingsNavigation.findings_default.path, | ||
search: location.search, | ||
}} | ||
/> | ||
)} | ||
/> | ||
<Route | ||
path={findingsNavigation.findings_default.path} | ||
render={() => ( | ||
<TrackApplicationView viewId={findingsNavigation.findings_default.id}> | ||
<LatestFindingsContainer dataView={dataViewQuery.data!} /> | ||
</TrackApplicationView> | ||
)} | ||
/> | ||
<Route | ||
path={findingsNavigation.findings_by_resource.path} | ||
render={() => <FindingsByResourceContainer dataView={dataViewQuery.data!} />} | ||
/> | ||
<Route path="*" render={() => <Redirect to={findingsNavigation.findings_default.path} />} /> | ||
</Switch> | ||
</CloudPosturePage> | ||
); | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
x-pack/plugins/cloud_security_posture/public/pages/configurations/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,8 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
export * from './configurations'; |
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
8 changes: 8 additions & 0 deletions
8
x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/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,8 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
export * from './vulnerabilities'; |
Oops, something went wrong.