Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 0da8651

Browse files
committed
New UI changes
1 parent 88fc54f commit 0da8651

File tree

2 files changed

+19
-25
lines changed
  • src/main/resources/io/jenkins/plugins/security/scan/extension

2 files changed

+19
-25
lines changed

src/main/resources/io/jenkins/plugins/security/scan/extension/freestyle/SecurityScanFreestyle/config.jelly

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
<div id="blackducksca_sarif_report_sec">
4040
<f:advanced title="SARIF Report Options">
41-
<f:entry class="sarif-checkbox" field="blackducksca_reports_sarif_create" title="Generate SARIF Report (Optional)">
41+
<f:entry field="blackducksca_reports_sarif_create" title="Generate SARIF Report (Optional)">
4242
<f:checkbox checked="${instance.isBlackducksca_reports_sarif_create() == true}"/>
4343
</f:entry>
4444
<div id="blackducksca_sarif_params">
@@ -184,7 +184,7 @@
184184

185185
<div id="polaris_sarif_report_sec">
186186
<f:advanced title="SARIF Report Options">
187-
<f:entry class="sarif-checkbox" field="polaris_reports_sarif_create" title="Generate SARIF Report(Optional)">
187+
<f:entry field="polaris_reports_sarif_create" title="Generate SARIF Report(Optional)">
188188
<f:checkbox checked="${instance.isPolaris_reports_sarif_create() == true}"/>
189189
</f:entry>
190190
<div id="polaris_sarif_params">
@@ -310,29 +310,23 @@
310310
margin-top: 4px;
311311
}
312312

313-
/* Styling for the checkbox entry */
314-
.sarif-checkbox {
315-
display: block;
316-
margin-bottom: 25px; /* Space below the checkbox entry */
317-
}
318-
319313
/* Style for the nested div to be indented */
320314
#polaris_sarif_params,
321315
#blackducksca_sarif_params,
322316
#source_upload {
323-
margin-left: 10px;
324-
border-left: 2.23px solid #C3CCD1;
325-
padding-left: 10px;
317+
margin-left: 10px;
318+
border-left: 2.23px solid #C3CCD1;
319+
padding-left: 10px;
326320
}
327321

328322
/* Style for entries within the nested div */
329323
#polaris_sarif_params .f\:entry,
330324
#blackducksca_sarif_params .f\:entry {
331-
margin-bottom: 10px; /* Space below each entry */
325+
margin-bottom: 10px;
332326
}
333327

334328
.advancedButton {
335-
font-size: 17px; /* Increases the font size */
329+
font-size: 17px;
336330
}
337331
</style>
338332

src/main/resources/io/jenkins/plugins/security/scan/extension/pipeline/SecurityScanStep/config.jelly

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</f:entry>
5050
<div id="blackducksca_sarif_params">
5151
<f:entry field="blackducksca_reports_sarif_groupSCAIssues" title="Group SCA Issues by Component (Optional)">
52-
<f:checkbox default="true"/>
52+
<f:checkbox/>
5353
</f:entry>
5454
<f:entry field="blackducksca_reports_sarif_file_path" title="SARIF Report File Path (Optional)">
5555
<f:textbox/>
@@ -182,7 +182,7 @@
182182
</f:entry>
183183
<div id="polaris_sarif_params">
184184
<f:entry field="polaris_reports_sarif_groupSCAIssues" title="Group SCA Issues by Component (Optional)">
185-
<f:checkbox default="true"/>
185+
<f:checkbox/>
186186
</f:entry>
187187
<f:entry field="polaris_reports_sarif_file_path" title="Polaris SARIF Report File Path (Optional)">
188188
<f:textbox/>
@@ -276,12 +276,6 @@
276276
</div>
277277

278278
<style>
279-
/* Styling for the checkbox entry */
280-
.sarif-checkbox {
281-
display: block;
282-
margin-bottom: 25px; /* Space below the checkbox entry */
283-
}
284-
285279
/* Style for the nested div to be indented */
286280
#polaris_sarif_params,
287281
#blackducksca_sarif_params,
@@ -292,13 +286,13 @@
292286
}
293287

294288
.advancedButton {
295-
font-size: 17px; /* Increases the font size */
289+
font-size: 17px;
296290
}
297291

298292
/* Style for entries within the nested div */
299293
#polaris_sarif_params .f\:entry,
300294
#blackducksca_sarif_params .f\:entry {
301-
margin-bottom: 10px; /* Space below each entry */
295+
margin-bottom: 10px;
302296
}
303297
</style>
304298

@@ -410,7 +404,7 @@
410404
}
411405
});
412406

413-
document.addEventListener('change', function() {
407+
document.addEventListener('change', function(event) {
414408
var polarisAssessmentModeOption = document.querySelector('select[name="_.polaris_assessment_mode"]')?.value;
415409
var sourceUploadDiv = document.getElementById('source_upload');
416410

@@ -423,7 +417,7 @@
423417
hideParticularDiv(sourceUploadDiv);
424418
}
425419

426-
toggleSarifParamsDivs();
420+
toggleSarifParamsDivs(event);
427421
togglePrCommentDivs();
428422
handlePostMergeWorkflowSectionsVisibility();
429423
});
@@ -439,6 +433,9 @@
439433
blackduckSarifParamSection.style.display = 'none';
440434
clearInputFields(blackduckSarifParamSection);
441435
}
436+
if(event.target.name == "_.blackducksca_reports_sarif_create" ){
437+
setCheckboxToDefaultTrue(['_.blackducksca_reports_sarif_groupSCAIssues']);
438+
}
442439
} else if (selectedOption == "polaris") {
443440
var polarisCheckbox = document.querySelector('input[name="_.polaris_reports_sarif_create"]')
444441
var polarisSarifParamSection = document.getElementById('polaris_sarif_params')
@@ -449,6 +446,9 @@
449446
polarisSarifParamSection.style.display = 'none';
450447
clearInputFields(polarisSarifParamSection);
451448
}
449+
if(event.target.name == "_.polaris_reports_sarif_create"){
450+
setCheckboxToDefaultTrue(['_.polaris_reports_sarif_groupSCAIssues']);
451+
}
452452
}
453453

454454
}

0 commit comments

Comments
 (0)