From 756bd94e824e12819d20d50079794046dc2ec3bc Mon Sep 17 00:00:00 2001 From: Thomas Johnson <123108455+hawkishpolicy@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:10:57 -0400 Subject: [PATCH] Search Results are full width now. Deleted Search Result Details Panel. Detailed View is now standalone to match All Domains and All Vulnerabilities. --- frontend/src/pages/Search/Dashboard.tsx | 4 ++-- frontend/src/pages/Search/ResultCard.tsx | 4 ++++ .../pages/Search/Styling/dashboardStyle.ts | 20 +++++++++++-------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/frontend/src/pages/Search/Dashboard.tsx b/frontend/src/pages/Search/Dashboard.tsx index 65e57ef9..c2abd871 100644 --- a/frontend/src/pages/Search/Dashboard.tsx +++ b/frontend/src/pages/Search/Dashboard.tsx @@ -208,9 +208,9 @@ export const DashboardUI: React.FC = ( /> ))} -
+ {/*
{selectedDomain && } -
+
*/} diff --git a/frontend/src/pages/Search/ResultCard.tsx b/frontend/src/pages/Search/ResultCard.tsx index 38978fd7..2c1562f8 100644 --- a/frontend/src/pages/Search/ResultCard.tsx +++ b/frontend/src/pages/Search/ResultCard.tsx @@ -1,4 +1,5 @@ import React, { useState } from 'react'; +import { useHistory } from 'react-router-dom'; import { classes, StyledPaper } from './Styling/resultCardStyle'; import clsx from 'classnames'; import { Result } from '../../context/SearchProvider'; @@ -78,6 +79,8 @@ export const ResultCard: React.FC = (props) => { }; let lastSeen; + + const history = useHistory(); try { lastSeen = formatDistanceToNow(parseISO(updatedAt.raw)); } catch (e) { @@ -86,6 +89,7 @@ export const ResultCard: React.FC = (props) => { const onClick = () => { onDomainSelected(id.raw); + history.push(`/inventory/domain/${id.raw}`); }; const ports = services.raw.reduce( diff --git a/frontend/src/pages/Search/Styling/dashboardStyle.ts b/frontend/src/pages/Search/Styling/dashboardStyle.ts index d8af8163..f253be95 100644 --- a/frontend/src/pages/Search/Styling/dashboardStyle.ts +++ b/frontend/src/pages/Search/Styling/dashboardStyle.ts @@ -48,20 +48,24 @@ export const Root = styled('div')(() => ({ alignItems: 'center' }, - [`& .${classes.content}`]: { - display: 'flex', - flexFlow: 'row nowrap', - alignItems: 'stretch', - flex: '1', - overflowY: 'hidden' - }, + // [`& .${classes.content}`]: { + // display: 'flex', + // flexFlow: 'row nowrap', + // alignItems: 'stretch', + // flex: '1', + // overflowY: 'hidden' + // }, [`& .${classes.panel}`]: { position: 'relative', height: '100%', overflowY: 'auto', padding: '0 1rem 2rem 1rem', - flex: '0 0 50%' + // flex: '0 0 50%', + display: 'flex', + flexFlow: 'column nowrap', + alignItems: 'stretch', + gap: '1rem' }, [`& .${classes.pagination}`]: {