diff --git a/src/__tests__/RepoPage/Tags.test.js b/src/__tests__/RepoPage/Tags.test.js index 635afe07..55829dbe 100644 --- a/src/__tests__/RepoPage/Tags.test.js +++ b/src/__tests__/RepoPage/Tags.test.js @@ -69,7 +69,7 @@ const mockedTagsData = [ describe('Tags component', () => { it('should open and close details dropdown for tags', async () => { render(); - const openBtn = screen.getAllByText(/digest/i); + const openBtn = screen.getAllByText(/show/i); fireEvent.click(openBtn[0]); expect(screen.getByText(/OS\/ARCH/i)).toBeInTheDocument(); fireEvent.click(openBtn[0]); @@ -87,7 +87,7 @@ describe('Tags component', () => { it('should navigate to specific manifest when clicking the digest', async () => { render(); - const openBtn = screen.getAllByText(/digest/i); + const openBtn = screen.getAllByText(/show/i); await fireEvent.click(openBtn[0]); const tagLink = await screen.findByText(/sha256:adca4/i); fireEvent.click(tagLink); diff --git a/src/__tests__/TagPage/VulnerabilitiesDetails.test.js b/src/__tests__/TagPage/VulnerabilitiesDetails.test.js index 47cf2956..3bc1a7ef 100644 --- a/src/__tests__/TagPage/VulnerabilitiesDetails.test.js +++ b/src/__tests__/TagPage/VulnerabilitiesDetails.test.js @@ -1,5 +1,6 @@ import { render, screen, waitFor, fireEvent } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; +import MockThemeProvier from '__mocks__/MockThemeProvider'; import { api } from 'api'; import VulnerabilitiesDetails from 'components/Tag/Tabs/VulnerabilitiesDetails'; import React from 'react'; @@ -7,9 +8,11 @@ import { MemoryRouter } from 'react-router-dom'; const StateVulnerabilitiesWrapper = () => { return ( - - - + + + + + ); }; @@ -500,7 +503,7 @@ describe('Vulnerabilties page', () => { it('sends filtered query if user types in the search bar', async () => { jest.spyOn(api, 'get').mockResolvedValue({ status: 200, data: { data: mockCVEList } }); render(); - const cveSearchInput = screen.getByPlaceholderText(/search for/i); + const cveSearchInput = screen.getByPlaceholderText(/search/i); jest.spyOn(api, 'get').mockRejectedValueOnce({ status: 200, data: { data: mockCVEListFiltered } }); await userEvent.type(cveSearchInput, '2022'); expect((await screen.queryAllByText(/2023/i).length) === 0); diff --git a/src/components/Repo/RepoDetails.jsx b/src/components/Repo/RepoDetails.jsx index ae2cd70f..d15e307a 100644 --- a/src/components/Repo/RepoDetails.jsx +++ b/src/components/Repo/RepoDetails.jsx @@ -77,6 +77,9 @@ const useStyles = makeStyles((theme) => ({ width: '100%', boxShadow: 'none!important' }, + tagsContent: { + padding: '1.5rem' + }, platformText: { backgroundColor: '#EDE7F6', color: '#220052', @@ -290,7 +293,7 @@ function RepoDetails() { - + diff --git a/src/components/Repo/Tabs/Tags.jsx b/src/components/Repo/Tabs/Tags.jsx index ab03d738..808d55f5 100644 --- a/src/components/Repo/Tabs/Tags.jsx +++ b/src/components/Repo/Tabs/Tags.jsx @@ -3,33 +3,13 @@ import React, { useState } from 'react'; // components import Typography from '@mui/material/Typography'; -import { Card, CardContent, Stack, InputBase, FormControl, Select, InputLabel, MenuItem } from '@mui/material'; +import { Stack, InputBase, FormControl, Select, InputLabel, MenuItem } from '@mui/material'; import SearchIcon from '@mui/icons-material/Search'; import { makeStyles } from '@mui/styles'; import TagCard from '../../Shared/TagCard'; import { tagsSortByCriteria } from 'utilities/sortCriteria'; const useStyles = makeStyles(() => ({ - tagContainer: { - marginBottom: 2, - display: 'flex', - flexDirection: 'row', - alignItems: 'center', - background: '#FFFFFF', - boxShadow: 'none!important', - borderRadius: '1.875rem', - flex: 'none', - alignSelf: 'stretch', - flexGrow: 0, - order: 0, - width: '100%' - }, - content: { - textAlign: 'left', - color: '#606060', - padding: '2% 3% 2% 3%', - width: '100%' - }, clickCursor: { cursor: 'pointer' }, @@ -39,8 +19,6 @@ const useStyles = makeStyles(() => ({ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', - marginTop: '1rem', - marginBottom: '1rem', boxShadow: 'none', border: '0.063rem solid #E7E7E7', borderRadius: '0.625rem' @@ -49,11 +27,14 @@ const useStyles = makeStyles(() => ({ color: '#52637A', paddingRight: '3%' }, + searchInputBase: { + width: '90%', + paddingLeft: '1.5rem', + height: 40 + }, input: { color: '#464141', fontSize: '1rem', - paddingLeft: '1rem', - width: '90%', '&::placeholder': { opacity: '1' } @@ -99,51 +80,45 @@ export default function Tags(props) { }; return ( - - - - + + + Tags History + + + Sort + - {Object.values(tagsSortByCriteria).map((el) => ( - - {el.label} - - ))} - - - - - - -
- -
-
- {renderTags(tags)} -
-
+ {Object.values(tagsSortByCriteria).map((el) => ( + + {el.label} + + ))} + + + + + +
+ +
+
+ {renderTags(tags)} + ); } diff --git a/src/components/Shared/TagCard.jsx b/src/components/Shared/TagCard.jsx index ad80d326..f2eb7624 100644 --- a/src/components/Shared/TagCard.jsx +++ b/src/components/Shared/TagCard.jsx @@ -32,6 +32,13 @@ const useStyles = makeStyles((theme) => ({ clickCursor: { cursor: 'pointer' }, + dropdownToggle: { + color: '#1479FF', + paddingTop: '1rem', + fontSize: '0.8125rem', + fontWeight: '600', + cursor: 'pointer' + }, dropdown: { flexDirection: 'row', alignItems: 'center' @@ -117,17 +124,7 @@ export default function TagCard(props) { ) : ( )} - - DIGEST - + {!open ? `Show more` : `Show less`} diff --git a/src/components/Shared/VulnerabilityCard.jsx b/src/components/Shared/VulnerabilityCard.jsx new file mode 100644 index 00000000..4a921516 --- /dev/null +++ b/src/components/Shared/VulnerabilityCard.jsx @@ -0,0 +1,213 @@ +import React, { useEffect, useMemo, useState } from 'react'; + +// utility +import { api, endpoints } from '../../api'; + +// components +import Collapse from '@mui/material/Collapse'; +import { Box, Card, CardContent, Stack, Typography, Divider } from '@mui/material'; +import makeStyles from '@mui/styles/makeStyles'; +import { host } from '../../host'; +import { isEmpty } from 'lodash'; +import { Link } from 'react-router-dom'; +import { KeyboardArrowDown, KeyboardArrowRight } from '@mui/icons-material'; +import { VulnerabilityChipCheck } from 'utilities/vulnerabilityAndSignatureCheck'; +import { CVE_FIXEDIN_PAGE_SIZE } from 'utilities/paginationConstants'; + +const useStyles = makeStyles((theme) => ({ + card: { + display: 'flex', + flexDirection: 'row', + alignItems: 'center', + background: '#FFFFFF', + boxShadow: '0rem 0.3125rem 0.625rem rgba(131, 131, 131, 0.08)', + border: '1px solid #E0E5EB', + borderRadius: '0.75rem', + flex: 'none', + alignSelf: 'stretch', + width: '100%', + marginTop: '2rem', + marginBottom: '2rem' + }, + content: { + textAlign: 'left', + color: '#606060', + padding: '2% 3% 2% 3%', + width: '100%' + }, + cveId: { + color: theme.palette.primary.main, + fontSize: '1rem', + fontWeight: 400, + textDecoration: 'underline' + }, + cveSummary: { + color: theme.palette.secondary.dark, + fontSize: '0.75rem', + fontWeight: '600', + textOverflow: 'ellipsis', + marginTop: '0.5rem' + }, + link: { + color: '#52637A', + fontSize: '1rem', + letterSpacing: '0.009375rem', + paddingRight: '1rem', + textDecorationLine: 'underline' + }, + dropdown: { + flexDirection: 'row', + alignItems: 'center' + }, + dropdownText: { + color: '#1479FF', + fontSize: '0.75rem', + fontWeight: '600', + cursor: 'pointer', + textAlign: 'center' + }, + vulnerabilityCardDivider: { + margin: '1rem 0' + } +})); +function VulnerabilitiyCard(props) { + const classes = useStyles(); + const { cve, name } = props; + const [openDesc, setOpenDesc] = useState(false); + const [openFixed, setOpenFixed] = useState(false); + const [loadingFixed, setLoadingFixed] = useState(true); + const [fixedInfo, setFixedInfo] = useState([]); + const abortController = useMemo(() => new AbortController(), []); + + // pagination props + const [pageNumber, setPageNumber] = useState(1); + const [isEndOfList, setIsEndOfList] = useState(false); + + const getPaginatedResults = () => { + if (!openFixed || isEndOfList) { + return; + } + setLoadingFixed(true); + api + .get( + `${host()}${endpoints.imageListWithCVEFixed(cve.id, name, { pageNumber, pageSize: CVE_FIXEDIN_PAGE_SIZE })}`, + abortController.signal + ) + .then((response) => { + if (response.data && response.data.data) { + const fixedTagsList = response.data.data.ImageListWithCVEFixed?.Results?.map((e) => e.Tag); + setFixedInfo((previousState) => [...previousState, ...fixedTagsList]); + setIsEndOfList( + [...fixedInfo, ...fixedTagsList].length >= response.data.data.ImageListWithCVEFixed?.Page?.TotalCount + ); + } + setLoadingFixed(false); + }) + .catch((e) => { + console.error(e); + setIsEndOfList(true); + setLoadingFixed(false); + }); + }; + + useEffect(() => { + getPaginatedResults(); + return () => { + abortController.abort(); + }; + }, [openFixed, pageNumber]); + + const loadMore = () => { + if (loadingFixed || isEndOfList) return; + setPageNumber((pageNumber) => pageNumber + 1); + }; + + const renderFixedVer = () => { + if (!isEmpty(fixedInfo)) { + return fixedInfo.map((tag, index) => { + return ( + + {tag} + + ); + }); + } else { + return 'Not fixed'; + } + }; + + const renderLoadMore = () => { + return ( + !isEndOfList && ( + + Load more + + ) + ); + }; + + return ( + + + + + {cve.id} + + + + + {cve.title} + + + setOpenFixed(!openFixed)}> + {!openFixed ? ( + + ) : ( + + )} + Fixed in + + + + {loadingFixed ? ( + 'Loading...' + ) : ( + + {renderFixedVer()} + {renderLoadMore()} + + )} + + + setOpenDesc(!openDesc)}> + {!openDesc ? ( + + ) : ( + + )} + Description + + + + + {cve.description} + + + + + + ); +} + +export default VulnerabilitiyCard; diff --git a/src/components/Tag/Tabs/DependsOn.jsx b/src/components/Tag/Tabs/DependsOn.jsx index c7fd7983..56b0ed51 100644 --- a/src/components/Tag/Tabs/DependsOn.jsx +++ b/src/components/Tag/Tabs/DependsOn.jsx @@ -14,52 +14,11 @@ import { mapToImage } from 'utilities/objectModels'; import { EXPLORE_PAGE_SIZE } from 'utilities/paginationConstants'; const useStyles = makeStyles(() => ({ - card: { - background: '#FFFFFF', - boxShadow: '0rem 0.3125rem 0.625rem rgba(131, 131, 131, 0.08)', - borderRadius: '1.875rem', - flex: 'none', - alignSelf: 'stretch', - flexGrow: 0, - order: 0, - width: '100%', - marginTop: '2rem', - marginBottom: '2rem', - display: 'flex', - flexDirection: 'column', - alignItems: 'flex-start' - }, - content: { - textAlign: 'left', - color: '#606060', - padding: '2% 3% 2% 3%', - width: '100%' - }, title: { - color: '#828282', - fontSize: '1rem', - paddingRight: '0.5rem', - paddingBottom: '0.5rem', - paddingTop: '0.5rem' - }, - values: { - color: '#000000', - fontSize: '1rem', - fontWeight: '600', - paddingBottom: '0.5rem', - paddingTop: '0.5rem' - }, - link: { - color: '#52637A', - fontSize: '1rem', - letterSpacing: '0.009375rem', - paddingRight: '1rem', - textDecorationLine: 'underline' - }, - monitor: { - width: '27.25rem', - height: '24.625rem', - paddingTop: '2rem' + marginBottom: '1.7rem', + color: 'rgba(0, 0, 0, 0.87)', + fontSize: '1.5rem', + fontWeight: '600' }, none: { color: '#52637A', @@ -172,18 +131,7 @@ function DependsOn(props) { return (
- + Uses diff --git a/src/components/Tag/Tabs/HistoryLayers.jsx b/src/components/Tag/Tabs/HistoryLayers.jsx index ecf50c2d..b7c1eaa1 100644 --- a/src/components/Tag/Tabs/HistoryLayers.jsx +++ b/src/components/Tag/Tabs/HistoryLayers.jsx @@ -7,61 +7,11 @@ import makeStyles from '@mui/styles/makeStyles'; import Loading from '../../Shared/Loading'; const useStyles = makeStyles(() => ({ - card: { - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - background: '#FFFFFF', - boxShadow: '0rem 0.3125rem 0.625rem rgba(131, 131, 131, 0.08)', - borderRadius: '1.875rem', - flex: 'none', - alignSelf: 'stretch', - flexGrow: 0, - order: 0, - width: '100%', - marginTop: '0rem', - marginBottom: '0rem', - padding: '1rem 1.5rem ' - }, - content: { - textAlign: 'left', - color: '#606060', - width: '100%', - flexDirection: 'column' - }, title: { - color: '#14191F', - fontSize: '1rem', - fontWeight: '400', - paddingRight: '0.5rem', - paddingBottom: '0.5rem', - paddingTop: '0.5rem' - }, - layer: { - color: '#14191F', - fontSize: '1rem', - fontWeight: '400', - paddingRight: '0.5rem', - paddingBottom: '0.5rem', - paddingTop: '0.5rem', - width: '100%', - whiteSpace: 'nowrap', - overflow: 'hidden', - textOverflow: 'ellipsis', - cursor: 'pointer' - }, - values: { - color: '#52637A', - fontSize: '1rem', - fontWeight: '400', - paddingBottom: '0.5rem', - paddingTop: '0.5rem', - textAlign: 'right' - }, - monitor: { - width: '27.25rem', - height: '24.625rem', - paddingTop: '2rem' + marginBottom: '1.7rem', + color: 'rgba(0, 0, 0, 0.87)', + fontSize: '1.5rem', + fontWeight: '600' }, none: { color: '#52637A', @@ -87,18 +37,7 @@ function HistoryLayers(props) { return ( <> - + Layers {isLoading ? ( diff --git a/src/components/Tag/Tabs/IsDependentOn.jsx b/src/components/Tag/Tabs/IsDependentOn.jsx index 5d1671fa..4afaf675 100644 --- a/src/components/Tag/Tabs/IsDependentOn.jsx +++ b/src/components/Tag/Tabs/IsDependentOn.jsx @@ -14,52 +14,11 @@ import { mapToImage } from 'utilities/objectModels'; import { EXPLORE_PAGE_SIZE } from 'utilities/paginationConstants'; const useStyles = makeStyles(() => ({ - card: { - background: '#FFFFFF', - boxShadow: '0rem 0.3125rem 0.625rem rgba(131, 131, 131, 0.08)', - borderRadius: '1.875rem', - flex: 'none', - alignSelf: 'stretch', - flexGrow: 0, - order: 0, - width: '100%', - marginTop: '2rem', - marginBottom: '2rem', - display: 'flex', - flexDirection: 'column', - alignItems: 'flex-start' - }, - content: { - textAlign: 'left', - color: '#606060', - padding: '2% 3% 2% 3%', - width: '100%' - }, title: { - color: '#828282', - fontSize: '1rem', - paddingRight: '0.5rem', - paddingBottom: '0.5rem', - paddingTop: '0.5rem' - }, - values: { - color: '#000000', - fontSize: '1rem', - fontWeight: '600', - paddingBottom: '0.5rem', - paddingTop: '0.5rem' - }, - link: { - color: '#52637A', - fontSize: '1rem', - letterSpacing: '0.009375rem', - paddingRight: '1rem', - textDecorationLine: 'underline' - }, - monitor: { - width: '27.25rem', - height: '24.625rem', - paddingTop: '2rem' + marginBottom: '1.7rem', + color: 'rgba(0, 0, 0, 0.87)', + fontSize: '1.5rem', + fontWeight: '600' }, none: { color: '#52637A', @@ -172,18 +131,7 @@ function IsDependentOn(props) { return (
- + Used by diff --git a/src/components/Tag/Tabs/ReferredBy.jsx b/src/components/Tag/Tabs/ReferredBy.jsx index 2cadb19f..6a38fc3a 100644 --- a/src/components/Tag/Tabs/ReferredBy.jsx +++ b/src/components/Tag/Tabs/ReferredBy.jsx @@ -1,12 +1,18 @@ import React, { useEffect, useState } from 'react'; import { makeStyles } from '@mui/styles'; import { isEmpty } from 'lodash'; -import { Divider, Typography, Stack } from '@mui/material'; +import { Typography, Stack } from '@mui/material'; import ReferrerCard from '../../Shared/ReferrerCard'; import Loading from '../../Shared/Loading'; import { mapReferrer } from 'utilities/objectModels'; const useStyles = makeStyles(() => ({ + title: { + color: 'rgba(0, 0, 0, 0.87)', + fontSize: '1.5rem', + fontWeight: '600', + paddingTop: '0.5rem' + }, none: { color: '#52637A', fontSize: '1.4rem', @@ -51,24 +57,9 @@ function ReferredBy(props) { return (
- + Referred By - {isLoading ? : renderReferrers()} diff --git a/src/components/Tag/Tabs/VulnerabilitiesDetails.jsx b/src/components/Tag/Tabs/VulnerabilitiesDetails.jsx index 85f81320..bddb6a1b 100644 --- a/src/components/Tag/Tabs/VulnerabilitiesDetails.jsx +++ b/src/components/Tag/Tabs/VulnerabilitiesDetails.jsx @@ -4,250 +4,70 @@ import React, { useEffect, useMemo, useState, useRef } from 'react'; import { api, endpoints } from '../../../api'; // components -import Collapse from '@mui/material/Collapse'; -import { Box, Card, CardContent, Divider, Stack, Typography, InputBase } from '@mui/material'; +import { Stack, Typography, InputBase } from '@mui/material'; import makeStyles from '@mui/styles/makeStyles'; import { host } from '../../../host'; import { debounce, isEmpty } from 'lodash'; -import { Link } from 'react-router-dom'; import Loading from '../../Shared/Loading'; -import { KeyboardArrowDown, KeyboardArrowRight } from '@mui/icons-material'; -import { VulnerabilityChipCheck } from 'utilities/vulnerabilityAndSignatureCheck'; import { mapCVEInfo } from 'utilities/objectModels'; -import { CVE_FIXEDIN_PAGE_SIZE, EXPLORE_PAGE_SIZE } from 'utilities/paginationConstants'; +import { EXPLORE_PAGE_SIZE } from 'utilities/paginationConstants'; import SearchIcon from '@mui/icons-material/Search'; -const useStyles = makeStyles(() => ({ - card: { - display: 'flex', - flexDirection: 'row', - alignItems: 'center', - background: '#FFFFFF', - boxShadow: '0rem 0.3125rem 0.625rem rgba(131, 131, 131, 0.08)', - borderRadius: '1.875rem', - flex: 'none', - alignSelf: 'stretch', - flexGrow: 0, - order: 0, - width: '100%', - marginTop: '2rem', - marginBottom: '2rem' - }, - content: { - textAlign: 'left', - color: '#606060', - padding: '2% 3% 2% 3%', - width: '100%' - }, +import VulnerabilitiyCard from '../../Shared/VulnerabilityCard'; + +const useStyles = makeStyles((theme) => ({ title: { - color: '#828282', - fontSize: '1rem', - paddingRight: '0.5rem', - paddingBottom: '0.5rem', - paddingTop: '0.5rem' - }, - values: { - color: '#000000', - fontSize: '1rem', + color: theme.palette.primary.main, + fontSize: '1.5rem', fontWeight: '600', - paddingBottom: '0.5rem', - paddingTop: '0.5rem', - textOverflow: 'ellipsis' + marginBottom: '0' }, - link: { - color: '#52637A', + cveId: { + color: theme.palette.primary.main, fontSize: '1rem', - letterSpacing: '0.009375rem', - paddingRight: '1rem', - textDecorationLine: 'underline' + fontWeight: 400, + textDecoration: 'underline' }, - monitor: { - width: '27.25rem', - height: '24.625rem', - paddingTop: '2rem' + cveSummary: { + color: theme.palette.secondary.dark, + fontSize: '0.75rem', + fontWeight: '600', + textOverflow: 'ellipsis', + marginTop: '0.5rem' }, none: { color: '#52637A', fontSize: '1.4rem', fontWeight: '600' }, - dropdown: { - flexDirection: 'row', - alignItems: 'center' - }, - dropdownText: { - color: '#1479FF', - paddingTop: '1rem', - fontSize: '1rem', - fontWeight: '600', - cursor: 'pointer', - textAlign: 'center' - }, search: { position: 'relative', - minWidth: '100%', + maxWidth: '100%', flexDirection: 'row', - marginBottom: '1.7rem', - boxShadow: '0rem 0.3125rem 0.625rem rgba(131, 131, 131, 0.08)', - border: '0.125rem solid #E7E7E7', - borderRadius: '1rem', - zIndex: 1155 + alignItems: 'center', + justifyContent: 'space-between', + boxShadow: 'none', + border: '0.063rem solid #E7E7E7', + borderRadius: '0.625rem' }, searchIcon: { color: '#52637A', paddingRight: '3%' }, + searchInputBase: { + width: '90%', + paddingLeft: '1.5rem', + height: 40, + color: 'rgba(0, 0, 0, 0.6)' + }, input: { color: '#464141', - marginLeft: 1, - width: '90%' + '&::placeholder': { + opacity: '1' + } } })); -function VulnerabilitiyCard(props) { - const classes = useStyles(); - const { cve, name } = props; - const [openDesc, setOpenDesc] = useState(false); - const [openFixed, setOpenFixed] = useState(false); - const [loadingFixed, setLoadingFixed] = useState(true); - const [fixedInfo, setFixedInfo] = useState([]); - const abortController = useMemo(() => new AbortController(), []); - - // pagination props - const [pageNumber, setPageNumber] = useState(1); - const [isEndOfList, setIsEndOfList] = useState(false); - - const getPaginatedResults = () => { - if (!openFixed || isEndOfList) { - return; - } - setLoadingFixed(true); - api - .get( - `${host()}${endpoints.imageListWithCVEFixed(cve.id, name, { pageNumber, pageSize: CVE_FIXEDIN_PAGE_SIZE })}`, - abortController.signal - ) - .then((response) => { - if (response.data && response.data.data) { - const fixedTagsList = response.data.data.ImageListWithCVEFixed?.Results?.map((e) => e.Tag); - setFixedInfo((previousState) => [...previousState, ...fixedTagsList]); - setIsEndOfList( - [...fixedInfo, ...fixedTagsList].length >= response.data.data.ImageListWithCVEFixed?.Page?.TotalCount - ); - } - setLoadingFixed(false); - }) - .catch((e) => { - console.error(e); - setIsEndOfList(true); - setLoadingFixed(false); - }); - }; - - useEffect(() => { - getPaginatedResults(); - return () => { - abortController.abort(); - }; - }, [openFixed, pageNumber]); - - const loadMore = () => { - if (loadingFixed || isEndOfList) return; - setPageNumber((pageNumber) => pageNumber + 1); - }; - - const renderFixedVer = () => { - if (!isEmpty(fixedInfo)) { - return fixedInfo.map((tag, index) => { - return ( - - {tag} - - ); - }); - } else { - return 'Not fixed'; - } - }; - - const renderLoadMore = () => { - return ( - !isEndOfList && ( - - Load more - - ) - ); - }; - - return ( - - - - - {' '} - {cve.id} - - - - - - {' '} - {cve.title} - - - setOpenFixed(!openFixed)}> - {!openFixed ? ( - - ) : ( - - )} - Fixed in - - - - {loadingFixed ? ( - 'Loading...' - ) : ( - - {renderFixedVer()} - {renderLoadMore()} - - )} - - - setOpenDesc(!openDesc)}> - {!openDesc ? ( - - ) : ( - - )} - Description - - - - - {' '} - {cve.description}{' '} - - - - - - ); -} - function VulnerabilitiesDetails(props) { const classes = useStyles(); const [cveData, setCveData] = useState([]); @@ -369,48 +189,23 @@ function VulnerabilitiesDetails(props) { }; return ( -
- + + Vulnerabilities - - +
- - - {renderCVEs()} - {renderListBottom()} - - -
+ {renderCVEs()} + {renderListBottom()} +
); } diff --git a/src/components/Tag/TagDetails.jsx b/src/components/Tag/TagDetails.jsx index 801c3265..a43fb91a 100644 --- a/src/components/Tag/TagDetails.jsx +++ b/src/components/Tag/TagDetails.jsx @@ -109,6 +109,9 @@ const useStyles = makeStyles((theme) => ({ cardContent: { paddingBottom: '1rem' }, + tabCardContent: { + padding: '1.5rem' + }, cardRoot: { boxShadow: 'none!important', borderRadius: '0.75rem' @@ -314,7 +317,7 @@ function TagDetails() { - {renderTabContent()} + {renderTabContent()}