Skip to content

Commit

Permalink
Search Results are full width now. Deleted Search Result Details Pane…
Browse files Browse the repository at this point in the history
…l. Detailed View is now standalone to match All Domains and All Vulnerabilities.
  • Loading branch information
hawkishpolicy committed Mar 19, 2024
1 parent 0c76b7a commit 756bd94
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions frontend/src/pages/Search/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ export const DashboardUI: React.FC<ContextType & { location: any }> = (
/>
))}
</div>
<div className={classes.panel}>
{/* <div className={classes.panel}>
{selectedDomain && <DomainDetails domainId={selectedDomain} />}
</div>
</div> */}
</div>
<Paper classes={{ root: classes.pagination }}>
<span>
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/pages/Search/ResultCard.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -78,6 +79,8 @@ export const ResultCard: React.FC<Props> = (props) => {
};

let lastSeen;

const history = useHistory();
try {
lastSeen = formatDistanceToNow(parseISO(updatedAt.raw));
} catch (e) {
Expand All @@ -86,6 +89,7 @@ export const ResultCard: React.FC<Props> = (props) => {

const onClick = () => {
onDomainSelected(id.raw);
history.push(`/inventory/domain/${id.raw}`);
};

const ports = services.raw.reduce(
Expand Down
20 changes: 12 additions & 8 deletions frontend/src/pages/Search/Styling/dashboardStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`]: {
Expand Down

0 comments on commit 756bd94

Please sign in to comment.