Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
scripts.views.sonar-complexity-view-min.js Maven / Gradle / Ivy
AJS.$.namespace("AJS.sonar.views.complexity");AJS.sonar.views.complexity.VIEW_NAME="complexity";AJS.sonar.views.complexity.METRICS="function_complexity,class_complexity,complexity,statements,function_complexity_distribution,class_complexity_distribution";AJS.sonar.views.complexity.generateView=function(F,B,I,E){AJS.sonar.text.load(F);var H=AJS.sonar.views.createViewContainer();var G=AJS.$("
").attr({id:"leftColumn"}).addClass("left-column-onethird");G.append(AJS.sonar.views.createHeader("sonar.views.complexity"));AJS.sonar.views.complexity.createComplexityRow(B.host,AJS.sonar.views.complexity.VIEW_NAME,I.id,AJS.sonar.utils.getMeasureFromResource(I,"function_complexity"),AJS.sonar.utils.getMetricFromMetricsArray(E,"function_complexity"),false).appendTo(G);AJS.sonar.views.complexity.createComplexityRow(B.host,AJS.sonar.views.complexity.VIEW_NAME,I.id,AJS.sonar.utils.getMeasureFromResource(I,"class_complexity"),AJS.sonar.utils.getMetricFromMetricsArray(E,"class_complexity"),false).appendTo(G);AJS.sonar.views.createMeasureRow(B.host,AJS.sonar.views.complexity.VIEW_NAME,I.id,AJS.sonar.utils.getMeasureFromResource(I,"complexity"),AJS.sonar.utils.getMetricFromMetricsArray(E,"complexity"),false).appendTo(G);AJS.sonar.views.createMeasureRow(B.host,AJS.sonar.views.complexity.VIEW_NAME,I.id,AJS.sonar.utils.getMeasureFromResource(I,"statements"),AJS.sonar.utils.getMetricFromMetricsArray(E,"statements"),false).appendTo(G);G.appendTo(H);var C=AJS.$("
").attr({id:"rightColumn"}).addClass("right-column-twothird");var A=AJS.$("
").attr({id:"tabs"});var D=AJS.$("
").attr({id:"charts"});AJS.sonar.views.complexity.addComplexityChart(B.host,A,D,AJS.sonar.utils.getMeasureFromResource(I,"function_complexity_distribution"),AJS.sonar.utils.getMetricFromMetricsArray(E,"function_complexity_distribution"),true);AJS.sonar.views.complexity.addComplexityChart(B.host,A,D,AJS.sonar.utils.getMeasureFromResource(I,"class_complexity_distribution"),AJS.sonar.utils.getMetricFromMetricsArray(E,"class_complexity_distribution"),false);A.appendTo(C);D.appendTo(C);C.appendTo(H);AJS.sonar.views.addViewFooter(H,B.host);return H};AJS.sonar.views.complexity.addComplexityChart=function(A,G,H,F,C,B){var E=AJS.$(" ").attr({id:"tab_"+C.key}).addClass("tab").text(AJS.sonar.text.getMsg("sonar.views.complexity.tabs."+C.key));if(B){E.addClass("selected")}E.click(function(){AJS.$("#tabs .tab").each(function(I,J){AJS.$("#"+J.id).removeClass("selected")});AJS.$("#charts .chart").each(function(I,J){AJS.$("#"+J.id).css("display","none")});AJS.$("#tab_"+C.key).addClass("selected");AJS.$("#chart_"+C.key).css("display","block")});G.append(E);var D=AJS.$("
").attr({id:"chart_"+C.key}).addClass("chart").append(AJS.$(" ").attr({src:A+"/chart?ck=distbar&c=777777&v="+escape(F.data)+"&w=300&h=150&fs=8&bgc=ffffff"}));if(B){D.css("display","block")}else{D.css("display","none")}H.append(D)};AJS.sonar.views.complexity.createComplexityRow=function(D,H,F,B,E){var C="sonar.views."+H+".";var I=AJS.$("
");var A=AJS.$(" ").attr({href:D+"/drilldown/measures/"+F+"?metric="+E.key,target:"_parent"}).addClass("big-measure");A.append(AJS.$(" ").addClass("alert_"+B.alert).text(B.frmt_val));A.appendTo(I);var G=AJS.sonar.utils.getTrendImage(B,false);if(G!==""){I.append(AJS.$(" ").attr({src:D+"/images"+G}))}if(AJS.sonar.text.getMsg(C+E.key)!==""&&AJS.sonar.text.getMsg(C+E.key)!==(C+E.key)){I.append(AJS.$(" ").text(" "+AJS.sonar.text.getMsg(C+E.key)))}return I};