Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71315

Remove usages of Prototype from Qualys Web App Scanning Connector

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • qualys-was-plugin
    • None

      See this blog post for details. Prototype will eventually be removed from Jenkins core, and to prepare for this transition, this plugin must be migrated away from Prototype. The blog post contains instructions on how to find and eliminate usages of Prototype. In this plugin, the following usages of Prototype have been identified. This may not be an exhaustive list:

      ./src/main/resources/com/qualys/plugins/wasPlugin/report/ReportAction/index.jelly:202:          jQuery("#vulnerabilities").hide();
      ./src/main/resources/com/qualys/plugins/wasPlugin/report/ReportAction/index.jelly:217:          jQuery("td#vulns #vulnsCount-link").on("click", function(e){
      ./src/main/resources/com/qualys/plugins/wasPlugin/report/ReportAction/index.jelly:222:       jQuery(".left-pill-item").on("click", function(e){
      ./src/main/resources/com/qualys/plugins/wasPlugin/report/ReportAction/index.jelly:227:                          jQuery(".reports-main-content").hide();
      ./src/main/resources/com/qualys/plugins/wasPlugin/report/ReportAction/index.jelly:230:                                  jQuery("#vulnerabilities").show();
      ./src/main/resources/com/qualys/plugins/wasPlugin/report/ReportAction/index.jelly:233:                                  jQuery("#build-summary").show();
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:260:                    if (apiServerTr.next('tr')) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:261:                            apiServerTr.next('tr').style.display = 'none';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:267:                                    if (apiServerTr.next('tr')) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:268:                                            apiServerTr.next('tr').style.display = 'table-row';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:272:                                    if (apiServerTr.next('tr')) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:273:                                            apiServerTr.next('tr').style.display = 'none';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:289:                                    if (otherOptionTr.next()) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:290:                                            otherOptionTr.next().style.display='table-row';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:294:                                    if (otherOptionTr.next()) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:295:                                            otherOptionTr.next().style.display='none';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:302:                                    if (otherAuthTr.next()) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:303:                                            otherAuthTr.next().style.display='table-row';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:307:                                    if (otherAuthTr.next()) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanBuildStep/config.jelly:308:                                            otherAuthTr.next().style.display='none';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:73:                      //apiServerTr.previous('tr').style.display = 'none';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:74:                      if (apiServerTr.next('tr')) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:75:                              apiServerTr.next('tr').style.display = 'none';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:81:                                      //apiServerTr.previous('tr').style.display = 'table-row';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:82:                                      if (apiServerTr.next('tr')) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:83:                                              apiServerTr.next('tr').style.display = 'table-row';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:87:                                      //apiServerTr.previous('tr').style.display = 'none';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:88:                                      if (apiServerTr.next('tr')) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:89:                                              apiServerTr.next('tr').style.display = 'none';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:96:                      if (apiServerTr.next()) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:97:                                      apiServerTr.next().style.display='table-row';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:103:                     if (otherOptionTr.next()) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:104:                                     otherOptionTr.next().style.display='table-row';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:110:                     if (otherAuthTr.next()) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:111:                                     otherAuthTr.next().style.display='table-row';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:122:                                     if (otherOptionTr.next()) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:123:                                             otherOptionTr.next().style.display='table-row';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:127:                                     if (otherOptionTr.next()) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:128:                                             otherOptionTr.next().style.display='none';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:137:                                     if (otherAuthTr.next()) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:138:                                             otherAuthTr.next().style.display='table-row';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:142:                                     if (otherAuthTr.next()) {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:143:                                             otherAuthTr.next().style.display='none';
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:176:                           new Ajax.Request(checkUrl + 'getWebAppList', {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:183:                               new Ajax.Request(checkUrl + 'getAuthRecordList', {
      ./src/main/resources/com/qualys/plugins/wasPlugin/WASScanNotifier/config.jelly:190:                               new Ajax.Request(checkUrl + 'getOptionProfileList', {
      ./src/main/webapp/js/report.js:98:     jQuery('.severity-dropdown').on('change', function(e){
      ./src/main/webapp/js/report.js:104:     jQuery(".custom-filter-checkbox").on("change", function(e){
      ./src/main/webapp/js/report.js:152:    jQuery("#sevVulns-error").hide();
      ./src/main/webapp/js/report.js:153:    jQuery("#sevVulns").show();
      ./src/main/webapp/js/report.js:154:    jQuery("#pie-legend-div").show();
      ./src/main/webapp/js/report.js:157:        jQuery("#sevVulns").hide();
      ./src/main/webapp/js/report.js:158:        jQuery("#pie-legend-div").hide();
      ./src/main/webapp/js/report.js:159:        jQuery("#sevVulns-error").show();
      

          [JENKINS-71315] Remove usages of Prototype from Qualys Web App Scanning Connector

          Basil Crow added a comment -

          Suggest the following patch (untested):

          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');
          -				      }
           				  });
           			}
           		}
          

          Basil Crow added a comment - Suggest the following patch (untested): 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'); - } }); } }

          Hi basil 

          we have completed the changes for this issue and the changes are available in branch https://github.com/jenkinsci/qualys-was-plugin/tree/dev/JENKINS-71315.

          PR link:Release/2.0.11 by Bhagyashri-Sapnar · Pull Request #22 · jenkinsci/qualys-was-plugin (github.com)

          The suggested patch in JENKINS-71315 didnt worked for our plugin in higher version as it is. We have done some more changes along with suggested patch to make plugin compatible to Jenkins version 2.4x.

          we have tested the changes in jenkins version 2.415 with the experimental flag that has been added to remove Prototype and the plugin is working as expected.

          Changes will be released after QA testing and verification.

          Qualys Plugins added a comment - Hi basil   we have completed the changes for this issue and the changes are available in branch  https://github.com/jenkinsci/qualys-was-plugin/tree/dev/JENKINS-71315 . PR link: Release/2.0.11 by Bhagyashri-Sapnar · Pull Request #22 · jenkinsci/qualys-was-plugin (github.com) The suggested patch in JENKINS-71315 didnt worked for our plugin in higher version as it is. We have done some more changes along with suggested patch to make plugin compatible to Jenkins version 2.4x. we have tested the changes in jenkins version 2.415 with the experimental flag that has been added to remove Prototype and the plugin is working as expected. Changes will be released after QA testing and verification.

          Basil Crow added a comment -

          Changes will be released after QA testing and verification.

          Great!

          Basil Crow added a comment - Changes will be released after QA testing and verification. Great!

            qualys Qualys Plugins
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: