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,file_complexity";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.complexity.createComplexityRow(b.host,AJS.sonar.views.complexity.VIEW_NAME,i.id,AJS.sonar.utils.getMeasureFromResource(i,"file_complexity"),AJS.sonar.utils.getMetricFromMetricsArray(e,"file_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};