Skip to content

Commit

Permalink
SBOM/Package replace id by version (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosthe19916 authored Jun 26, 2024
1 parent 92f0c3b commit f26e776
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions client/src/app/api/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export interface Package {
export interface PackageWithinSBOM {
id: string;
name: string;
version: string;
purl: string[];
}

Expand Down
18 changes: 9 additions & 9 deletions client/src/app/pages/sbom-details/packages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export const Packages: React.FC<PackagesProps> = ({ sbomId }) => {
tableName: "packages-table",
persistenceKeyPrefix: TablePersistenceKeyPrefixes.packages,
columnNames: {
id: "Id",
name: "Name",
version: "Version",
},
isPaginationEnabled: true,
isSortEnabled: true,
Expand Down Expand Up @@ -112,8 +112,8 @@ export const Packages: React.FC<PackagesProps> = ({ sbomId }) => {
<Thead>
<Tr>
<TableHeaderContentWithControls {...tableControls}>
<Th {...getThProps({ columnKey: "id" })} />
<Th {...getThProps({ columnKey: "name" })} />
<Th {...getThProps({ columnKey: "version" })} />
</TableHeaderContentWithControls>
</Tr>
</Thead>
Expand All @@ -125,24 +125,24 @@ export const Packages: React.FC<PackagesProps> = ({ sbomId }) => {
>
{currentPageItems?.map((item, rowIndex) => {
return (
<Tbody key={item.name}>
<Tbody key={item.id}>
<Tr {...getTrProps({ item })}>
<TableRowContentWithControls
{...tableControls}
item={item}
rowIndex={rowIndex}
>
<Td
width={30}
{...getTdProps({ columnKey: "id" })}
width={60}
{...getTdProps({ columnKey: "name" })}
>
{item.id}
{item.name}
</Td>
<Td
width={70}
{...getTdProps({ columnKey: "name" })}
width={40}
{...getTdProps({ columnKey: "version" })}
>
{item.name}
{item.version}
</Td>
</TableRowContentWithControls>
</Tr>
Expand Down

0 comments on commit f26e776

Please sign in to comment.