From a0871dd572aa5709ee53e1b77984e0f029c3f394 Mon Sep 17 00:00:00 2001 From: Nate Weller Date: Fri, 20 Sep 2024 14:02:50 -0600 Subject: [PATCH] Protect: Remove database category from threats navigation (#39467) --- .../changelog/remove-protect-database-results | 4 ++++ .../js/components/threats-list/navigation.jsx | 21 +------------------ 2 files changed, 5 insertions(+), 20 deletions(-) create mode 100644 projects/plugins/protect/changelog/remove-protect-database-results diff --git a/projects/plugins/protect/changelog/remove-protect-database-results b/projects/plugins/protect/changelog/remove-protect-database-results new file mode 100644 index 0000000000000..ff0dc3ea3a23c --- /dev/null +++ b/projects/plugins/protect/changelog/remove-protect-database-results @@ -0,0 +1,4 @@ +Significance: patch +Type: removed + +Security Scanning: disabled database threat category diff --git a/projects/plugins/protect/src/js/components/threats-list/navigation.jsx b/projects/plugins/protect/src/js/components/threats-list/navigation.jsx index f1d4c63863739..9befe85a78612 100644 --- a/projects/plugins/protect/src/js/components/threats-list/navigation.jsx +++ b/projects/plugins/protect/src/js/components/threats-list/navigation.jsx @@ -6,7 +6,6 @@ import { warning as warningIcon, color as themesIcon, code as filesIcon, - grid as databaseIcon, } from '@wordpress/icons'; import { useCallback, useMemo } from 'react'; import useAnalyticsTracks from '../../hooks/use-analytics-tracks'; @@ -19,12 +18,7 @@ const ThreatsNavigation = ( { selected, onSelect, sourceType = 'scan', statusFil const { results: { plugins, themes }, counts: { - current: { - threats: numThreats, - core: numCoreThreats, - files: numFilesThreats, - database: numDatabaseThreats, - }, + current: { threats: numThreats, core: numCoreThreats, files: numFilesThreats }, }, } = useProtectData( { sourceType, filter: { status: statusFilter } } ); @@ -51,10 +45,6 @@ const ThreatsNavigation = ( { selected, onSelect, sourceType = 'scan', statusFil recordEvent( 'jetpack_protect_navigation_file_click' ); }, [ recordEvent ] ); - const trackNavigationClickDatabase = useCallback( () => { - recordEvent( 'jetpack_protect_navigation_database_click' ); - }, [ recordEvent ] ); - const allLabel = useMemo( () => { if ( statusFilter === 'fixed' ) { return __( 'All fixed threats', 'jetpack-protect' ); @@ -131,15 +121,6 @@ const ThreatsNavigation = ( { selected, onSelect, sourceType = 'scan', statusFil onClick={ trackNavigationClickFiles } checked={ true } /> - ) }