-
-
-
- {t('Import SBOM')}
-
- {t('SPDX')}
- {t('CycloneDX')}
-
-
-
- {t('Export Spreadsheet')}
-
- {t('Projects only')}
- {t('Projects with linked releases')}
-
-
-
-
+ <>
+
+
+
+
-
+
+
+
+
+
+
+
+ {t('Import SBOM')}
+
+ {t('SPDX')}
+ {t('CycloneDX')}
+
+
+
+
+ {t('Export Spreadsheet')}
+
+ {t('Projects only')}
+ {t('Projects with linked releases')}
+
+
+
+
+
{t('PROJECTS')}
+
{status === 'authenticated' ? (
) : (
@@ -308,7 +329,7 @@ function Project() {
-
+ >
)
}
diff --git a/src/components/sw360/Table/Table.tsx b/src/components/sw360/Table/Table.tsx
index 1756337ea..101c0b8a0 100644
--- a/src/components/sw360/Table/Table.tsx
+++ b/src/components/sw360/Table/Table.tsx
@@ -33,14 +33,15 @@ class Table extends Component
{
private wrapper: RefObject = createRef()
// Grid.js instance
private readonly instance: Grid = null
+ private tableProps: TableProps = {}
constructor(props: TableProps) {
super(props)
- let tableProps = { ...defaultOptions, ...props }
+ this.tableProps = { ...defaultOptions, ...props }
- if (tableProps.server) {
- tableProps = {
- ...tableProps,
+ if (this.tableProps.server) {
+ this.tableProps = {
+ ...this.tableProps,
pagination: {
limit: 10,
server: {
@@ -52,7 +53,7 @@ class Table extends Component {
}
}
- this.instance = new Grid(tableProps)
+ this.instance = new Grid(this.tableProps)
}
getInstance(): Grid {
@@ -79,10 +80,12 @@ class Table extends Component {
.updateConfig({
pagination: {
limit: pageSize,
- server: {
- url: (prev: string, page: number, limit: number) =>
- `${prev}${prev.includes('?') ? '&' : '?'}page=${page}&page_entries=${limit}`,
- },
+ server: this.tableProps.server
+ ? {
+ url: (prev: string, page: number, limit: number) =>
+ `${prev}${prev.includes('?') ? '&' : '?'}page=${page}&page_entries=${limit}`,
+ }
+ : undefined,
},
})
.forceRender()
diff --git a/src/object-types/Project.ts b/src/object-types/Project.ts
index d16b645ce..805f2a13a 100644
--- a/src/object-types/Project.ts
+++ b/src/object-types/Project.ts
@@ -9,7 +9,7 @@
// SPDX-License-Identifier: EPL-2.0
// License-Filename: LICENSE
-import { Links, User } from '@/object-types'
+import { Attachment, Links, Release, User } from '@/object-types'
interface Project {
id?: string
@@ -34,7 +34,7 @@ interface Project {
phaseOutSince?: string
preevaluationDeadline?: string
projectResponsible?: string
- projectType: string
+ projectType?: string
remarksAdditionalRequirements?: string
specialRisks3rdParty?: string
specialRisksOSS?: string
@@ -55,6 +55,9 @@ interface Project {
_embedded?: {
leadArchitect?: User
createdBy?: User
+ 'sw360:releases'?: Array
+ 'sw360:attachments'?: Array
+ 'sw360:projects'?: Array
}
}