You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Static Report is a user interface for the Scan SBOM. As the name suggests, it's completely static in nature, and does not talk to any external APIs.
4
+
5
+
## Developing / Contributing
6
+
7
+
### How it works?
8
+
9
+
As stated in the introduction, the interface is completely static in nature. All of the data displayed in the UI resides in `client/src/static-report/data.js` file. It is empty by default when you build the project. In order to display actual output of an analysis, `data.js` must contain data generated from an analysis.
10
+
11
+
The `data.js` should be populated by the output of `POST /api/v2/vulnerability/analyze`
12
+
13
+
### Running in developtment mode
14
+
15
+
At the **root** of the entire project.
16
+
17
+
- Install dependencies:
18
+
19
+
```shell
20
+
npm ci
21
+
```
22
+
23
+
- Run the project:
24
+
25
+
```shell
26
+
npm run start:dev:static-report
27
+
```
28
+
29
+
This will serve the report at http://localhost:3000 and will render the data that lives in `client/src/static-report/data.js`
30
+
31
+
### Running in production mode
32
+
33
+
- Build the project:
34
+
35
+
```shell
36
+
npm run build
37
+
```
38
+
39
+
This will generate a `client/dist/static-report` directory. It serves as a template; therefore, It doesn't contain the `data.js` file as it must be generated manually or by other tool like the backend.
0 commit comments