diff --git a/src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly b/src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly
index b48d6a1..e5ace12 100644
--- a/src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly
+++ b/src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly
@@ -257,20 +257,31 @@
xHrsTr.style.display = 'none';
apiServerTr.style.display = 'none';
- if (apiServerTr.next('tr')) {
- apiServerTr.next('tr').style.display = 'none';
+ var apiServerNextTr = apiServerTr.nextElementSibling;
+ while (apiServerNextTr && apiServerNextTr.nodeName !== 'TR') {
+ apiServerNextTr = apiServerNextTr.nextElementSibling;
+ }
+ if (apiServerNextTr) {
+ apiServerNextTr.style.display = 'none';
}
document.getElementById("platform").onchange = function(){
+ var apiServerPlatformNextTr = apiServerTr.nextElementSibling;
if(this.value === "PCP"){
apiServerTr.style.display = 'table-row';
- if (apiServerTr.next('tr')) {
- apiServerTr.next('tr').style.display = 'table-row';
+ while (apiServerPlatformNextTr && apiServerPlatformNextTr.nodeName !== 'TR') {
+ apiServerPlatformNextTr = apiServerPlatformNextTr.nextElementSibling;
+ }
+ if (apiServerPlatformNextTr) {
+ apiServerPlatformNextTr.style.display = 'table-row';
}
}else{
apiServerTr.style.display = 'none';
- if (apiServerTr.next('tr')) {
- apiServerTr.next('tr').style.display = 'none';
+ while (apiServerPlatformNextTr && apiServerPlatformNextTr.nodeName !== 'TR') {
+ apiServerPlatformNextTr = apiServerPlatformNextTr.nextElementSibling;
+ }
+ if (apiServerPlatformNextTr) {
+ apiServerPlatformNextTr.style.display = 'none';
}
}
}
@@ -286,26 +297,26 @@
document.getElementById("optionProfile").onchange = function(){
if(this.value === "other"){
otherOptionTr.style.display = 'table-row';
- if (otherOptionTr.next()) {
- otherOptionTr.next().style.display='table-row';
+ if (otherOptionTr.nextElementSibling) {
+ otherOptionTr.nextElementSibling.style.display='table-row';
}
}else{
otherOptionTr.style.display = 'none';
- if (otherOptionTr.next()) {
- otherOptionTr.next().style.display='none';
+ if (otherOptionTr.nextElementSibling) {
+ otherOptionTr.nextElementSibling.style.display='none';
}
}
}
document.getElementById("authRecord").onchange = function(){
if(this.value === "other"){
otherAuthTr.style.display = 'table-row';
- if (otherAuthTr.next()) {
- otherAuthTr.next().style.display='table-row';
+ if (otherAuthTr.nextElementSibling) {
+ otherAuthTr.nextElementSibling.style.display='table-row';
}
}else{
otherAuthTr.style.display = 'none';
- if (otherAuthTr.next()) {
- otherAuthTr.next().style.display='none';
+ if (otherAuthTr.nextElementSibling) {
+ otherAuthTr.nextElementSibling.style.display='none';
}
}
}
diff --git a/src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly b/src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly
index 41647cd..c2fd324 100644
--- a/src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly
+++ b/src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly
@@ -71,44 +71,55 @@
apiServerTr.style.display = 'none';
//apiServerTr.previous('tr').style.display = 'none';
- if (apiServerTr.next('tr')) {
- apiServerTr.next('tr').style.display = 'none';
+ var apiServerNextTr = apiServerTr.nextElementSibling;
+ while (apiServerNextTr && apiServerNextTr.nodeName !== 'TR') {
+ apiServerNextTr = apiServerNextTr.nextElementSibling;
+ }
+ if (apiServerNextTr) {
+ apiServerNextTr.style.display = 'none';
}
document.getElementById("platform").onchange = function(){
+ var apiServerPlatformNextTr = apiServerTr.nextElementSibling;
if(this.value === "PCP"){
apiServerTr.style.display = 'table-row';
//apiServerTr.previous('tr').style.display = 'table-row';
- if (apiServerTr.next('tr')) {
- apiServerTr.next('tr').style.display = 'table-row';
+ while (apiServerPlatformNextTr && apiServerPlatformNextTr.nodeName !== 'TR') {
+ apiServerPlatformNextTr = apiServerPlatformNextTr.nextElementSibling;
+ }
+ if (apiServerPlatformNextTr) {
+ apiServerPlatformNextTr.style.display = 'table-row';
}
}else{
apiServerTr.style.display = 'none';
//apiServerTr.previous('tr').style.display = 'none';
- if (apiServerTr.next('tr')) {
- apiServerTr.next('tr').style.display = 'none';
+ while (apiServerPlatformNextTr && apiServerPlatformNextTr.nodeName !== 'TR') {
+ apiServerPlatformNextTr = apiServerPlatformNextTr.nextElementSibling;
+ }
+ if (apiServerPlatformNextTr) {
+ apiServerPlatformNextTr.style.display = 'none';
}
}
}
if(document.getElementById("platform").value == "PCP"){
apiServerTr.style.display = 'table-row';
- if (apiServerTr.next()) {
- apiServerTr.next().style.display='table-row';
+ if (apiServerTr.nextElementSibling) {
+ apiServerTr.nextElementSibling.style.display='table-row';
}
}
if(document.getElementById("optionProfile").value == "other"){
otherOptionTr.style.display = 'table-row';
- if (otherOptionTr.next()) {
- otherOptionTr.next().style.display='table-row';
+ if (otherOptionTr.nextElementSibling) {
+ otherOptionTr.nextElementSibling.style.display='table-row';
}
}
if(document.getElementById("authRecord").value == "other"){
otherAuthTr.style.display = 'table-row';
- if (otherAuthTr.next()) {
- otherAuthTr.next().style.display='table-row';
+ if (otherAuthTr.nextElementSibling) {
+ otherAuthTr.nextElementSibling.style.display='table-row';
}
}
@@ -119,13 +130,13 @@
document.getElementById("optionProfile").onchange = function(){
if(this.value === "other"){
otherOptionTr.style.display = 'table-row';
- if (otherOptionTr.next()) {
- otherOptionTr.next().style.display='table-row';
+ if (otherOptionTr.nextElementSibling) {
+ otherOptionTr.nextElementSibling.style.display='table-row';
}
}else{
otherOptionTr.style.display = 'none';
- if (otherOptionTr.next()) {
- otherOptionTr.next().style.display='none';
+ if (otherOptionTr.nextElementSibling) {
+ otherOptionTr.nextElementSibling.style.display='none';
}
}
}
@@ -134,13 +145,13 @@
//document.getElementById("otherAuth").value = "";
//document.getElementById("authInfoMessage").innerHTML = "";
otherAuthTr.style.display = 'table-row';
- if (otherAuthTr.next()) {
- otherAuthTr.next().style.display='table-row';
+ if (otherAuthTr.nextElementSibling) {
+ otherAuthTr.nextElementSibling.style.display='table-row';
}
}else{
otherAuthTr.style.display = 'none';
- if (otherAuthTr.next()) {
- otherAuthTr.next().style.display='none';
+ if (otherAuthTr.nextElementSibling) {
+ otherAuthTr.nextElementSibling.style.display='none';
}
}
}
@@ -173,25 +184,31 @@
"useProxy": useProxy
};
- new Ajax.Request(checkUrl + 'getWebAppList', {
- parameters: parameters,
- onComplete: function(rsp) {
+ fetch(checkUrl + 'getWebAppList' + "?" + new URLSearchParams(params), {
+ method: "POST",
+ headers: crumb.wrap({
+ "Content-Type": "application/x-www-form-urlencoded",
+ }),
+ }).then((rsp) => {
updateDropdowns(rsp, 'webapp');
- }
});
- new Ajax.Request(checkUrl + 'getAuthRecordList', {
- parameters: parameters,
- onComplete: function(rsp) {
+ fetch(checkUrl + 'getAuthRecordList' + "?" + new URLSearchParams(params), {
+ method: "POST",
+ headers: crumb.wrap({
+ "Content-Type": "application/x-www-form-urlencoded",
+ }),
+ }).then((rsp) => {
updateDropdowns(rsp, 'authRecord');
- }
});
- new Ajax.Request(checkUrl + 'getOptionProfileList', {
- parameters: parameters,
- onComplete: function(rsp) {
+ fetch(checkUrl + 'getOptionProfileList' + "?" + new URLSearchParams(params), {
+ method: "POST",
+ headers: crumb.wrap({
+ "Content-Type": "application/x-www-form-urlencoded",
+ }),
+ }).then((rsp) => {
updateDropdowns(rsp, 'optionProfile');
- }
});
}
}
Suggest the following patch (untested):