Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
Fixed pipeline syntax UI
Browse files Browse the repository at this point in the history
  • Loading branch information
sadmananik committed Sep 21, 2023
1 parent 7c089aa commit d7bfce8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,14 @@ public ListBoxModel doFillSynopsys_security_productItems() {
Map<String, String> customLabels = new HashMap<>();

items.add(new Option("Select", "Select"));
customLabels.put(SecurityProduct.BLACKDUCK.toString().toLowerCase(), "Black Duck");
customLabels.put(SecurityProduct.COVERITY.toString().toLowerCase(), "Coverity");
customLabels.put(SecurityProduct.POLARIS.toString().toLowerCase(), "Polaris");
customLabels.put(SecurityProduct.BLACKDUCK.name().toLowerCase(), "Black Duck");
customLabels.put(SecurityProduct.COVERITY.name().toLowerCase(), "Coverity");
customLabels.put(SecurityProduct.POLARIS.name().toLowerCase(), "Polaris");

for (SecurityProduct product : SecurityProduct.values()) {
String label = customLabels.getOrDefault(product, product.name());
items.add(new Option(label, product.name()));
String value = product.name().toLowerCase();
String label = customLabels.getOrDefault(value, product.name()); // Use product.name() for label
items.add(new Option(label, value));
}
return items;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,28 +105,26 @@
var inputFields = div.querySelectorAll('input[type="text"], input[type="checkbox"]');
inputFields.forEach(function (field) {
if (field.type === 'text') {
field.value = ''; // Clear text fields
field.value = '';
} else if (field.type === 'checkbox') {
field.checked = false; // Uncheck checkboxes
field.checked = false;
}
});
}
}

synopsysSecurityProduct.addEventListener('change', function () {
hideAllDivs(); // Hide all divs initially
// Determine the selected option value
hideAllDivs();
var selectedOption = synopsysSecurityProduct.value;
// Show the corresponding div based on the selected option
if (selectedOption == 'BLACKDUCK') {
if (selectedOption == 'blackduck') {
clearInputFields(coverityDiv);
clearInputFields(polarisDiv);
showDiv(blackduckDiv);
} else if (selectedOption == 'COVERITY') {
} else if (selectedOption == 'coverity') {
clearInputFields(blackduckDiv);
clearInputFields(polarisDiv);
showDiv(coverityDiv);
} else if (selectedOption == 'POLARIS') {
} else if (selectedOption == 'polaris') {
clearInputFields(blackduckDiv);
clearInputFields(coverityDiv);
showDiv(polarisDiv);
Expand Down

0 comments on commit d7bfce8

Please sign in to comment.