All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scripts.sonar-utils-min.js Maven / Gradle / Ivy

AJS.$.namespace("AJS.sonar.utils");AJS.sonar.utils.getTrendImage=function(A,C){if(A.trend===undefined||A["var"]===undefined){return""}else{if(A.trend===0&&A["var"]===0){return""}else{var B="/tendency/"+A["var"]+"-";if(A.trend===1){B=B+"green"}else{B=B+"black"}if(C){B=B+"-small"}return B+".png"}}};AJS.sonar.utils.getMeasureFromResource=function(B,C){for(var A in B.msr){if(B.msr[A].key===C){return B.msr[A]}}return{}};AJS.sonar.utils.getMetricFromMetricsArray=function(B,C){for(var A in B){if(B[A].key===C){return B[A]}}return{}};AJS.sonar.utils.isValidMetric=function(A){return !(A!=null&&A!==undefined&&A.key!==undefined)};AJS.sonar.utils.isValidMeasure=function(A){return !(A!=null&&A!==undefined&&A.key!==undefined)};AJS.sonar.utils.getColorMetrics=function(C){var A=new Array();for(var B in C){if(C[B].val_type==="LEVEL"||C[B].val_type==="PERCENT"){A.push(C[B])}}A.sort(function(E,D){return(E.name>D.name)-(D.name>E.name)});return A};AJS.sonar.utils.getSizeMetrics=function(B){var C=new Array();for(var A in B){if((B[A].val_type==="INT"||B[A].val_type==="FLOAT"||B[A].val_type==="MILLISEC")&&B[A].val_type!=="PERCENT"&&B[A].domain!=undefined&&B[A].domain!=null&&B[A].domain!==""){C.push(B[A])}}C.sort(function(E,D){return(E.name>D.name)-(D.name>E.name)});return C};AJS.sonar.utils.createMetricSelectElement=function(D,F,C,E,B){var A=AJS.$("