Skip to content

Commit 6384ec8

Browse files
authored
Merge pull request #228 from SoftwareDesignLab/dev
SVIP-ui v1.2.1-alpha Pre-Release
2 parents 0e1f109 + 9e367f7 commit 6384ec8

20 files changed

+224
-191
lines changed

doc/changelog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [v1.2.1] - (11/29/23)
9+
### Added
10+
- Support for XML CDX SBOM's in Convert and Generate added
11+
12+
## [v1.2.0] - (11/10/23)
13+
### Added
14+
- Repair Button shows Repair Modal for fixing issues
15+
16+
## [v1.1.1] - (11/10/23)
17+
- Change name from SVIP to SBOM-in-a-Box to better represent the platform
18+
819
## [v1.1.0] - (9/28/23)
920
### Added
1021
- Can download `vex` and `metrics` reports

package-lock.json

Lines changed: 55 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readme.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
# SBOM Visualization and Integration Platform GUI
2-
3-
> The SBOM Visualization and Integration Platform (**SVIP**) is a unified platform to promote the
1+
# SBOM-in-a-Box GUI
2+
> The **SBOM-in-a-Box** is a unified platform to promote the
43
> production, consumption, and utilization of Software Bills of Materials.
4+
> This includes conversion between schemas, generation, comparision and evaluation of quality.
5+
6+
# Purpose of SBOM-in-a-Box
7+
> SBOM-in-a-box has unique features including generation of SBOMs using multiple tools that allow for a more a complete SBOM to be created. There is also a feature within metrics, where the tool provides suggestions if there is a potential better way to showcase the attributes. There is also the ability to convert between SPDX and CycloneDX SBOM schemas, and to gain insight into vulnerabilities of software through SBOMs. These features allow for developers to create an SBOM that is the most relevant and suits their needs.
58
9+
# SBOM-in-a-Box GUI
10+
This serves as the front-end and human interaction with our software.
611

7-
### Latest Release: [[v1.1.0] - (9/28/23)](doc/changelog.md)
12+
### Latest Release: [[v1.2.1] - (11/30/23)](doc/changelog.md)
813

914
### System Requirements
1015

1116
- Requires Node >= 18.12.1
1217

1318
### Quick Start
1419

15-
1. Follow the [SVIP API](https://github.com/SoftwareDesignLab/SVIP/tree/main#quick-start) quick start to launch the backend
20+
1. Follow the [SBOM-in-a-Box API](https://github.com/SoftwareDesignLab/SVIP/tree/main#quick-start) quick start to launch the backend
1621
2. `npm ci`
1722
3. `npm start`
1823

src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div id="main-wrapper">
2-
<app-navbar />
2+
<app-navbar/>
33
<div class="body flex" style="overflow-y: auto;">
44
<app-upload/>
55
<app-view *ngIf="routing.GetPage() === 1"/>

src/app/features/metrics/metrics/metrics.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<ng-template #metadata>
2626
<div class="list">
2727
<!-- Test results -->
28-
<ng-container *ngFor="let testResult of getTestResults('metadata')">
28+
<ng-container *ngFor="let testResult of getTestResults('0')">
2929
<app-accordion *ngIf="isFiltered(testResult)">
3030
<div title class="test-result">
3131
<span>
@@ -54,7 +54,7 @@
5454
</div>
5555
<span body class="flex error-result">
5656
{{ testResult.details }}
57-
<app-button style="margin-left: auto;" text="Repair" (click)="openRepairModal(testResult.details)" *ngIf="testResult.status === 'FAIL'" icon="build"></app-button>
57+
<app-button style="margin-left: auto;" (click)="openRepairModal(testResult, '0')" *ngIf="testResult.status === 'FAIL' && testResult.fixes.length > 0" icon="build"></app-button>
5858
</span>
5959
</app-accordion>
6060
</ng-container>
@@ -67,11 +67,11 @@
6767
<app-accordion
6868
*ngIf="
6969
component &&
70-
component.key !== 'metadata' &&
70+
component.key !== '0' &&
7171
getTestResults(component.key).length
7272
"
7373
>
74-
<div title class="component-title">{{ component.key }}</div>
74+
<div title class="component-title">{{ this.qa.hashCodeMapping[component.key] }}</div>
7575
<div body>
7676
<!-- Test results -->
7777
<ng-container
@@ -107,7 +107,7 @@
107107
</div>
108108
<span body class="flex error-result">
109109
{{ testResult.details }}
110-
<app-button style="margin-left: auto;" text="Repair" (click)="openRepairModal(testResult.details)" *ngIf="testResult.status === 'FAIL'" icon="build"></app-button>
110+
<app-button style="margin-left: auto;" (click)="openRepairModal(testResult, component.key)" *ngIf="testResult.status === 'FAIL' && testResult.fixes.length > 0" icon="build"></app-button>
111111
</span>
112112
</app-accordion>
113113
</ng-container>
@@ -137,4 +137,4 @@
137137
</ng-template>
138138
</app-viewer>
139139

140-
<app-repair-modal [selectedErrorMessage]="returnMessage()" [opened] = "repairModal" (close)="repairModal = false"/>
140+
<app-repair-modal [sbomID]="sbomID" [error]="selectedError" [opened] = "repairModal" (close)="repairModal = false"/>

src/app/features/metrics/metrics/metrics.component.ts

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ export class MetricsComponent implements OnInit {
1616
components: { [componentName: string]: testResult[] } = {};
1717
attributes: filter = {};
1818
name: string = '';
19+
sbomID: number = 0;
1920
palettes = palettes;
20-
selectedErrorMessage: string = '';
21+
selectedError: any = {};
2122
public repairModal: boolean = false;
2223
private _palette = PALETTE.DEFAULT;
2324
get palette() {
@@ -61,6 +62,7 @@ export class MetricsComponent implements OnInit {
6162
const sbom = data;
6263

6364
this.name = data.fileName;
65+
this.sbomID = sbom.id;
6466
SVIP.gradeSBOM(sbom.id).subscribe((qa) => {
6567
if (qa) {
6668
this.qa = qa;
@@ -75,23 +77,18 @@ export class MetricsComponent implements OnInit {
7577

7678
getKeys() {
7779
// Components
78-
Object.keys(this.qa.components).forEach((component) => {
80+
Object.keys(this.qa.results).forEach((component) => {
7981
this.components[component] = [];
80-
const componentTestNames = Object.keys(this.qa.components[component]);
81-
const tests = componentTestNames;
82-
// Component tests
83-
tests.forEach((test: any) => {
84-
// test results
85-
this.qa.components[component][test].forEach((testResult: any) => {
86-
this.components[component].push(testResult);
87-
if (testResult.status !== 'ERROR') {
88-
const processors = testResult.attributes as string[];
89-
// Processors/Attributes
90-
processors.forEach((processor: string) => {
91-
this.attributes[processor] = { shown: true, color: '' };
92-
});
93-
}
94-
});
82+
83+
this.qa.results[component].forEach((testResult: any) => {
84+
this.components[component].push(testResult);
85+
if (testResult.status !== 'ERROR') {
86+
const processors = testResult.attributes as string[];
87+
// Processors/Attributes
88+
processors.forEach((processor: string) => {
89+
this.attributes[processor] = { shown: true, color: '' };
90+
});
91+
}
9592
});
9693
});
9794
this.setColor();
@@ -132,14 +129,14 @@ export class MetricsComponent implements OnInit {
132129
this.downloadService.Download(fileName, new Blob([reportJson], { type: 'application/json' }));
133130
}
134131

135-
openRepairModal(errorMessage: string) {
136-
console.log('Error Message:', errorMessage);
137-
this.selectedErrorMessage = errorMessage;
132+
openRepairModal(test: any, id: string) {
133+
this.selectedError = test;
134+
this.selectedError.id = id;
138135
this.repairModal = true;
139136
}
140137

141-
returnMessage(){
142-
return this.selectedErrorMessage;
138+
selectedTest(){
139+
return this.selectedError;
143140
}
144141
}
145142

@@ -149,4 +146,11 @@ interface testResult {
149146
message: string;
150147
details: string;
151148
status: string;
149+
fixes: fix<Object>[];
150+
}
151+
152+
interface fix<T> {
153+
old: T;
154+
new: T;
155+
type: any;
152156
}

0 commit comments

Comments
 (0)