Skip to content

Commit

Permalink
Merge pull request #246 from soham4abc/license-browser
Browse files Browse the repository at this point in the history
fix(licenses): header fixed and limit for responses removed

Reviewed-by: mishra.gaurav@siemens.com
Tested-by: shaheem.azmal@siemens.com
  • Loading branch information
shaheemazmalmmd authored Aug 26, 2022
2 parents b3f22a0 + e6dba87 commit 73076d3
Showing 1 changed file with 34 additions and 11 deletions.
45 changes: 34 additions & 11 deletions src/pages/BrowseUploads/LicenseBrowser/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const LicenseBrowser = () => {
handleError(error, setMessage);
setShowMessage(true);
});
getUploadLicense(uploadId, ["ojo", "nomos", "monk"])
getUploadLicense(uploadId, ["ojo,nomos,monk"])
.then((res) => {
setFilesData(res);
setShowMessage(false);
Expand Down Expand Up @@ -117,22 +117,45 @@ const LicenseBrowser = () => {
<tbody>
{filesData &&
filesData.length > 0 &&
filesData.map((data, index) => (
<>
{index < 10 ? (
filesData.map((data) => {
const filteredScanner = [...new Set(data.findings.scanner)];
const filteredConclusion = [
...new Set(data.findings.conclusion),
];

return (
<>
<tr key={data.id}>
<td>{data.filePath}</td>
<td>{data.findings.scanner}</td>
<td>-</td>
<td>
{filteredScanner !== null
? filteredScanner.map((dataScanner, index) => {
return `${dataScanner}${
index + 1 === filteredScanner.length
? ""
: ", "
}`;
})
: null}
</td>
<td>
{filteredConclusion !== null
? filteredConclusion.map((dataScanner, index) => {
return `${dataScanner}${
index + 1 === filteredConclusion.length
? ""
: ", "
}`;
})
: null}
</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
) : (
""
)}
</>
))}
</>
);
})}
</tbody>
</table>
</div>
Expand Down

0 comments on commit 73076d3

Please sign in to comment.