Skip to content

Commit

Permalink
Merge pull request #204 from siemens/licenseClearing
Browse files Browse the repository at this point in the history
feat(license_clearing): Add list view table for project license clearing
  • Loading branch information
heliocastro authored Jan 12, 2024
2 parents 4f92ecd + bf2c8e0 commit 66d3d96
Show file tree
Hide file tree
Showing 6 changed files with 541 additions and 8 deletions.
9 changes: 9 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
"Cloud Backend": "Cloud Backend",
"Cloud Service": "Cloud Service",
"Code Snippet": "Code Snippet",
"Collapse all": "Collapse all",
"Comment": "Comment",
"Comments": "Comments",
"Commercial Details": "Commercial Details",
Expand Down Expand Up @@ -321,6 +322,7 @@
"External URL": "External URL",
"External URLs": "External URLs",
"External ids": "External ids",
"Expand Next Level": "Expand Next Level",
"Field Name": "Field Name",
"File name": "File name",
"Finalized License Scan Report": "Finalized License Scan Report",
Expand Down Expand Up @@ -419,6 +421,7 @@
"Link to Projects": "Link to Projects",
"Linked Releases": "Linked Releases",
"Linked Releases and Projects": "Linked Releases and Projects",
"List View": "List View",
"Logout": "Sign Out",
"MAINLINE": "Mainline",
"MEDIUM": "MEDIUM",
Expand Down Expand Up @@ -516,9 +519,11 @@
"Programming Languages": "Programming Languages",
"Project": "Project",
"Project Clearing State": "Project Clearing State",
"Project Mainline State": "Project Mainline State",
"Project Manager": "Project Manager",
"Project Name": "Project Name",
"Project Owner": "Project Owner",
"Project Path": "Project Path",
"Project Relationship": "Project Relationship",
"Project Responsible": "Project Responsible",
"Project Responsible (Email)": "Project Responsible (Email)",
Expand Down Expand Up @@ -552,12 +557,15 @@
"Reference Doc Changes": "Reference Doc Changes",
"References": "References",
"Related": "Related",
"Relation": "Relation",
"Release": "Release",
"Release Aggregate Data": "Release Aggregate Data",
"Release Clearing State": "Release Clearing State",
"Release Create failed": "Release Create failed",
"Release Date of this Release": "Release Date of this Release",
"Release Mainline State": "Release Mainline State",
"Release Overview": "Release Overview",
"Release Path": "Release Path",
"Release Repository": "Release Repository",
"Release Summary": "Release Summary",
"Release Vendor": "Release Vendor",
Expand Down Expand Up @@ -700,6 +708,7 @@
"Token Name": "Token Name",
"Total Number Of Files": "Total Number Of Files",
"Total vulnerabilities": "Total vulnerabilities",
"Tree View": "Tree View",
"Type": "Type",
"UNDER_CLEARING": "Under Clearing",
"UNKNOWN": "Unknown",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright (C) Siemens AG, 2023. Part of the SW360 Frontend Project.

// This program and the accompanying materials are made
// available under the terms of the Eclipse Public License 2.0
// which is available at https://www.eclipse.org/legal/epl-2.0/

// SPDX-License-Identifier: EPL-2.0
// License-Filename: LICENSE

'use client'

import { useTranslations } from 'next-intl'
import { useState } from 'react'
import { Nav, Tab } from 'react-bootstrap'
import ListView from './ListView'

export default function LicenseClearing({
projectId,
projectName,
projectVersion,
}: {
projectId: string
projectName: string
projectVersion: string
}) {
const t = useTranslations('default')
const [key, setKey] = useState('tree-view')

return (
<>
<Tab.Container id='views-tab' activeKey={key} onSelect={(k) => setKey(k)}>
<div className='row'>
<div className='col ps-0'>
<Nav variant='pills' className='d-inline-flex'>
<Nav.Item>
<Nav.Link eventKey='tree-view'>
<span className='fw-medium'>{t('Tree View')}</span>
</Nav.Link>
</Nav.Item>
<Nav.Item>
<Nav.Link eventKey='list-view'>
<span className='fw-medium'>{t('List View')}</span>
</Nav.Link>
</Nav.Item>
</Nav>
</div>
</div>
<Tab.Content className='mt-3'>
<Tab.Pane eventKey='tree-view'></Tab.Pane>
<Tab.Pane eventKey='list-view'>
<ListView projectId={projectId} projectName={projectName} projectVersion={projectVersion} />
</Tab.Pane>
</Tab.Content>
</Tab.Container>
</>
)
}
Loading

0 comments on commit 66d3d96

Please sign in to comment.