@@ -27,6 +27,10 @@ import { PackitPagination } from "../shared/PackitPagination";
2727import { PackitPaginationContext } from "../shared/PackitPaginationContext" ;
2828import { StatusLabel } from "../statusLabels/StatusLabel" ;
2929
30+ function getHTMLScanUrl ( scanUrl : string ) : string {
31+ return scanUrl ?. replace ( ".js?format=raw" , ".html" ) ;
32+ }
33+
3034const OSHScansTable = ( ) => {
3135 const [ page , setPage ] = useState ( 1 ) ;
3236 const [ perPage , setPerPage ] = useState ( 10 ) ;
@@ -36,10 +40,11 @@ const OSHScansTable = () => {
3640 const columnNames = {
3741 forge : "Forge" ,
3842 trigger : "Trigger" ,
39- scanDetails : "Scan details " ,
43+ scanDetails : "Scan Details " ,
4044 timeProcessed : "Time Processed" ,
41- scan : "OpenScanHub task" ,
42- newFindings : "New findings" ,
45+ scan : "OpenScanHub Task" ,
46+ allFindings : "All Findings" ,
47+ newFindings : "New Findings" ,
4348 } ;
4449
4550 const { isLoading, isError, data } = useQuery (
@@ -48,7 +53,7 @@ const OSHScansTable = () => {
4853
4954 const TableHeads = [
5055 < Th key = { columnNames . forge } screenReaderText = { columnNames . forge } > </ Th > ,
51- < Th key = { columnNames . trigger } width = { 35 } >
56+ < Th key = { columnNames . trigger } width = { 20 } >
5257 { columnNames . trigger }
5358 </ Th > ,
5459 < Th key = { columnNames . scanDetails } width = { 20 } >
@@ -57,12 +62,15 @@ const OSHScansTable = () => {
5762 < Th key = { columnNames . newFindings } width = { 15 } >
5863 { columnNames . newFindings }
5964 </ Th > ,
60- < Th key = { columnNames . timeProcessed } width = { 20 } >
65+ < Th key = { columnNames . timeProcessed } width = { 10 } >
6166 { columnNames . timeProcessed }
6267 </ Th > ,
63- < Th key = { columnNames . scan } width = { 20 } >
68+ < Th key = { columnNames . scan } width = { 15 } >
6469 { columnNames . scan }
6570 </ Th > ,
71+ < Th key = { columnNames . allFindings } width = { 15 } >
72+ { columnNames . allFindings }
73+ </ Th > ,
6674 ] ;
6775
6876 // If backend API is down
@@ -117,6 +125,19 @@ const OSHScansTable = () => {
117125 </ a >
118126 </ strong >
119127 </ Td >
128+ < Td dataLabel = { columnNames . allFindings } >
129+ { scan . scan_results_url && (
130+ < strong >
131+ < a
132+ href = { getHTMLScanUrl ( scan . scan_results_url ) }
133+ target = "_blank"
134+ rel = "noreferrer"
135+ >
136+ results
137+ </ a >
138+ </ strong >
139+ ) }
140+ </ Td >
120141 </ Tr >
121142 ) ) }
122143 </ Tbody >
0 commit comments