|
1 | 1 | import React from "react";
|
| 2 | +import PropTypes from "prop-types"; |
2 | 3 | import InputContainer from "../../../Widgets/Input";
|
3 | 4 |
|
4 |
| -function OptionalAnalysis() { |
5 |
| - const handleChange = () => {}; |
| 5 | +function OptionalAnalysis({ analysis, handleChange }) { |
6 | 6 | return (
|
7 | 7 | <div id="uplod-optional-analysis" className="mt-4">
|
8 | 8 | <p className="font-demi">Select optional analysis</p>
|
9 | 9 | <InputContainer
|
10 | 10 | type="checkbox"
|
11 |
| - checked={false} |
12 |
| - name="licenseConcluded" |
13 |
| - id="upload-report-license-concluded" |
| 11 | + checked={analysis.copyrightEmailAuthor} |
| 12 | + name="copyrightEmailAuthor" |
| 13 | + id="upload-file-copyright-email-author" |
14 | 14 | onChange={(e) => handleChange(e)}
|
15 | 15 | >
|
16 | 16 | Copyright/Email/URL/Author Analysis
|
17 | 17 | </InputContainer>
|
18 | 18 | <InputContainer
|
19 | 19 | type="checkbox"
|
20 |
| - checked={false} |
21 |
| - name="licenseConcluded" |
22 |
| - id="upload-report-license-concluded" |
| 20 | + checked={analysis.ecc} |
| 21 | + name="ecc" |
| 22 | + id="upload-file-ecc" |
23 | 23 | onChange={(e) => handleChange(e)}
|
24 | 24 | >
|
25 | 25 | ECC Analysis, scanning for text fragments potentially relevant for
|
26 | 26 | export control
|
27 | 27 | </InputContainer>
|
28 | 28 | <InputContainer
|
29 | 29 | type="checkbox"
|
30 |
| - checked={false} |
31 |
| - name="licenseConcluded" |
32 |
| - id="upload-report-license-concluded" |
| 30 | + checked={analysis.keyword} |
| 31 | + name="keyword" |
| 32 | + id="upload-file-keyword" |
33 | 33 | onChange={(e) => handleChange(e)}
|
34 | 34 | >
|
35 | 35 | Keyword Analysis
|
36 | 36 | </InputContainer>
|
37 | 37 | <InputContainer
|
38 | 38 | type="checkbox"
|
39 |
| - checked={false} |
40 |
| - name="licenseConcluded" |
41 |
| - id="upload-report-license-concluded" |
| 39 | + checked={analysis.mime} |
| 40 | + name="mime" |
| 41 | + id="upload-file-mime" |
42 | 42 | onChange={(e) => handleChange(e)}
|
43 | 43 | >
|
44 | 44 | MIME-type Analysis (Determine mimetype of every file. Not needed for
|
45 | 45 | licenses or buckets)
|
46 | 46 | </InputContainer>
|
47 | 47 | <InputContainer
|
48 | 48 | type="checkbox"
|
49 |
| - checked={false} |
50 |
| - name="licenseConcluded" |
51 |
| - id="upload-report-license-concluded" |
| 49 | + checked={analysis.monk} |
| 50 | + name="monk" |
| 51 | + id="upload-file-monk" |
52 | 52 | onChange={(e) => handleChange(e)}
|
53 | 53 | >
|
54 | 54 | Monk License Analysis, scanning for licenses performing a text
|
55 | 55 | comparison
|
56 | 56 | </InputContainer>
|
57 | 57 | <InputContainer
|
58 | 58 | type="checkbox"
|
59 |
| - checked={false} |
60 |
| - name="licenseConcluded" |
61 |
| - id="upload-report-license-concluded" |
| 59 | + checked={analysis.nomos} |
| 60 | + name="nomos" |
| 61 | + id="upload-file-nomos" |
62 | 62 | onChange={(e) => handleChange(e)}
|
63 | 63 | >
|
64 | 64 | Nomos License Analysis, scanning for licenses using regular expressions
|
65 | 65 | </InputContainer>
|
66 | 66 | <InputContainer
|
67 | 67 | type="checkbox"
|
68 |
| - checked={false} |
69 |
| - name="licenseConcluded" |
70 |
| - id="upload-report-license-concluded" |
| 68 | + checked={analysis.ojo} |
| 69 | + name="ojo" |
| 70 | + id="upload-file-ojo" |
71 | 71 | onChange={(e) => handleChange(e)}
|
72 | 72 | >
|
73 | 73 | Ojo License Analysis, scanning for licenses using
|
74 | 74 | SPDX-License-Identifier
|
75 | 75 | </InputContainer>
|
76 | 76 | <InputContainer
|
77 | 77 | type="checkbox"
|
78 |
| - checked={false} |
79 |
| - name="licenseConcluded" |
80 |
| - id="upload-report-license-concluded" |
| 78 | + checked={analysis.package} |
| 79 | + name="package" |
| 80 | + id="upload-file-package" |
81 | 81 | onChange={(e) => handleChange(e)}
|
82 | 82 | >
|
83 | 83 | Package Analysis (Parse package headers)
|
84 | 84 | </InputContainer>
|
85 |
| - <InputContainer |
86 |
| - type="checkbox" |
87 |
| - checked={false} |
88 |
| - name="licenseConcluded" |
89 |
| - id="upload-report-license-concluded" |
90 |
| - onChange={(e) => handleChange(e)} |
91 |
| - > |
92 |
| - Software Heritage Analysis |
93 |
| - </InputContainer> |
94 | 85 | </div>
|
95 | 86 | );
|
96 | 87 | }
|
97 | 88 |
|
| 89 | +OptionalAnalysis.propTypes = { |
| 90 | + analysis: PropTypes.object, |
| 91 | + handleChange: PropTypes.func, |
| 92 | +}; |
| 93 | + |
98 | 94 | export default OptionalAnalysis;
|
0 commit comments