File tree Expand file tree Collapse file tree 5 files changed +48
-2
lines changed Expand file tree Collapse file tree 5 files changed +48
-2
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,11 @@ v34.5.0 (unreleased)
25
25
26
26
- Fix `inspect_packages ` pipeline to properly link discovered packages and dependencies to
27
27
codebase resources of package manifests where they were found. Also correctly assign
28
- the datasource_ids atrribute for packages and dependencies.
29
- https://github.com/nexB/scancode.io/pull/1180/
28
+ the datasource_ids attribute for packages and dependencies.
29
+ https://github.com/nexB/scancode.io/pull/1180
30
+
31
+ - Add "Product name" and "Product version" as new project settings.
32
+ https://github.com/nexB/scancode.io/issues/1197
30
33
31
34
v34.4.0 (2024-04-22)
32
35
--------------------
Original file line number Diff line number Diff line change @@ -281,6 +281,8 @@ class ProjectSettingsForm(forms.ModelForm):
281
281
"ignored_patterns" ,
282
282
"scancode_license_score" ,
283
283
"attribution_template" ,
284
+ "product_name" ,
285
+ "product_version" ,
284
286
]
285
287
extract_recursively = forms .BooleanField (
286
288
label = "Extract recursively" ,
@@ -318,6 +320,16 @@ class ProjectSettingsForm(forms.ModelForm):
318
320
help_text = "Custom attribution template." ,
319
321
widget = forms .Textarea (attrs = {"class" : "textarea is-dynamic" , "rows" : 3 }),
320
322
)
323
+ product_name = forms .CharField (
324
+ label = "Product name" ,
325
+ required = False ,
326
+ widget = forms .TextInput (attrs = {"class" : "input" }),
327
+ )
328
+ product_version = forms .CharField (
329
+ label = "Product version" ,
330
+ required = False ,
331
+ widget = forms .TextInput (attrs = {"class" : "input" }),
332
+ )
321
333
322
334
class Meta :
323
335
model = Project
Original file line number Diff line number Diff line change 20
20
< i class ="fa-solid fa-barcode mr-2 "> </ i > ScanCode
21
21
</ a >
22
22
</ li >
23
+ < li >
24
+ < a href ="#dejacode ">
25
+ < i class ="fa-solid fa-laptop-code mr-2 "> </ i > DejaCode
26
+ </ a >
27
+ </ li >
23
28
< li >
24
29
< a href ="#attribution ">
25
30
< i class ="fa-solid fa-file-lines mr-2 "> </ i > Attribution
Original file line number Diff line number Diff line change 93
93
</ div >
94
94
</ div >
95
95
96
+ < div class ="panel ">
97
+ < p id ="dejacode " class ="panel-heading py-2 is-size-6 "> DejaCode</ p >
98
+ < div class ="panel-block is-block px-4 ">
99
+ < div class ="field ">
100
+ < label class ="label " for ="{{ form.product_name.id_for_label }} ">
101
+ Product name
102
+ </ label >
103
+ < div class ="control ">
104
+ {{ form.product_name }}
105
+ </ div >
106
+ < p class ="help "> {{ form.product_name.help_text }}</ p >
107
+ </ div >
108
+ < div class ="field ">
109
+ < label class ="label " for ="{{ form.product_version.id_for_label }} ">
110
+ Product version
111
+ </ label >
112
+ < div class ="control ">
113
+ {{ form.product_version }}
114
+ </ div >
115
+ < p class ="help "> {{ form.product_version.help_text }}</ p >
116
+ </ div >
117
+ </ div >
118
+ </ div >
119
+
96
120
< div class ="panel ">
97
121
< p id ="attribution " class ="panel-heading py-2 is-size-6 "> Attribution</ p >
98
122
< div class ="panel-block is-block px-4 ">
Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ def test_scanpipe_forms_project_settings_form_update_project_settings(self):
136
136
expected = {
137
137
"extract_recursively" : False ,
138
138
"ignored_patterns" : ["*.ext" , "dir/*" ],
139
+ "product_name" : "" ,
140
+ "product_version" : "" ,
139
141
"attribution_template" : "" ,
140
142
"scancode_license_score" : 10 ,
141
143
}
You can’t perform that action at this time.
0 commit comments