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

scripts.views.sonar-totalquality-view-min.js Maven / Gradle / Ivy

AJS.$.namespace("AJS.sonar.views.totalquality");AJS.sonar.views.totalquality.VIEW_NAME="totalquality";AJS.sonar.views.totalquality.METRICS="coverage,violations_density,isoqa_tc,isoqa_cc,isoqa_ac,isoqa_ca,isoqa_ce,isoqa_a,isoqa_i,isoqa_d,isoqa_dc,isoqa_dit,isoqa_cbo,isoqa_rfc,isoqa_lcom,isoqa_design_nom,isoqa_design_rfc,isoqa_design_cbo,isoqa_design_dit,isoqa_design,isoqa_architecture_coh,isoqa_architecture_adi,isoqa_architecture,isoqa_ts,isoqa_code,isoqa_doc,isoqa_dry,isoqa_tq";AJS.sonar.views.totalquality.CHART_METRICS=[{id:"isoqa_architecture_coh",text:"isoqa_architecture_coh"},{id:"isoqa_architecture_adi",text:"isoqa_architecture_adi"},{id:"isoqa_design_nom",text:"isoqa_design_nom"},{id:"isoqa_design_rfc",text:"isoqa_design_rfc"},{id:"isoqa_design_cbo",text:"isoqa_design_cbo"},{id:"isoqa_design_dit",text:"isoqa_design_dit"},{id:"isoqa_doc",text:"isoqa_doc"},{id:"isoqa_dry",text:"isoqa_dry"},{id:"violations_density",text:"violations_density"},{id:"coverage",text:"chart_coverage"}];AJS.sonar.views.totalquality.generateView=function(d,f,g,a){AJS.sonar.text.load(d);var b=AJS.sonar.views.createViewContainer();var c=AJS.sonar.views.createColumn(true);c.css("width","38%");c.append(AJS.sonar.views.createHeader("sonar.views.totalquality"));AJS.sonar.views.createMeasureRow(f.host,AJS.sonar.views.totalquality.VIEW_NAME,g.id,AJS.sonar.utils.getMeasureFromResource(g,"isoqa_tq"),AJS.sonar.utils.getMetricFromMetricsArray(a,"isoqa_tq"),true).appendTo(c);AJS.sonar.views.createMeasureRow(f.host,AJS.sonar.views.totalquality.VIEW_NAME,g.id,AJS.sonar.utils.getMeasureFromResource(g,"coverage"),AJS.sonar.utils.getMetricFromMetricsArray(a,"coverage"),false).appendTo(c);AJS.sonar.views.createMeasureRow(f.host,AJS.sonar.views.totalquality.VIEW_NAME,g.id,AJS.sonar.utils.getMeasureFromResource(g,"isoqa_architecture"),AJS.sonar.utils.getMetricFromMetricsArray(a,"isoqa_architecture"),false).appendTo(c);AJS.sonar.views.createMeasureRow(f.host,AJS.sonar.views.totalquality.VIEW_NAME,g.id,AJS.sonar.utils.getMeasureFromResource(g,"isoqa_design"),AJS.sonar.utils.getMetricFromMetricsArray(a,"isoqa_design"),false).appendTo(c);AJS.sonar.views.createMeasureRow(f.host,AJS.sonar.views.totalquality.VIEW_NAME,g.id,AJS.sonar.utils.getMeasureFromResource(g,"isoqa_code"),AJS.sonar.utils.getMetricFromMetricsArray(a,"isoqa_code"),false).appendTo(c);c.append(AJS.$("
"));c.append(AJS.sonar.views.createHeader("sonar.views.totalquality.distance"));AJS.sonar.views.createMeasureRow(f.host,AJS.sonar.views.totalquality.VIEW_NAME,g.id,AJS.sonar.utils.getMeasureFromResource(g,"isoqa_d"),AJS.sonar.utils.getMetricFromMetricsArray(a,"isoqa_d"),true).appendTo(c);AJS.sonar.views.createMeasureRow(f.host,AJS.sonar.views.totalquality.VIEW_NAME,g.id,AJS.sonar.utils.getMeasureFromResource(g,"isoqa_tc"),AJS.sonar.utils.getMetricFromMetricsArray(a,"isoqa_tc"),false).appendTo(c);AJS.sonar.views.createMeasureRow(f.host,AJS.sonar.views.totalquality.VIEW_NAME,g.id,AJS.sonar.utils.getMeasureFromResource(g,"isoqa_ac"),AJS.sonar.utils.getMetricFromMetricsArray(a,"isoqa_ac"),false).appendTo(c);AJS.sonar.views.createMeasureRow(f.host,AJS.sonar.views.totalquality.VIEW_NAME,g.id,AJS.sonar.utils.getMeasureFromResource(g,"isoqa_cc"),AJS.sonar.utils.getMetricFromMetricsArray(a,"isoqa_cc"),false).appendTo(c);c.append(AJS.$("
"));c.append(AJS.sonar.views.createHeader("sonar.views.totalquality.cycles"));AJS.sonar.views.createMeasureRow(f.host,AJS.sonar.views.totalquality.VIEW_NAME,g.id,AJS.sonar.utils.getMeasureFromResource(g,"isoqa_dc"),AJS.sonar.utils.getMetricFromMetricsArray(a,"isoqa_dc"),true).appendTo(c);c.appendTo(b);var e=AJS.sonar.views.createColumn(false);e.css("width","58%");AJS.sonar.views.totalquality.generateTotalQualityChart(f.host,g,a).appendTo(e);e.appendTo(b);AJS.sonar.views.addViewFooter(b,f.host);return b};AJS.sonar.views.totalquality.generateTotalQualityChart=function(b,e,a){var d="";var c="";AJS.$(AJS.sonar.views.totalquality.CHART_METRICS).each(function(g,h){if(d.length>0){d+=",";c+=","}var f=AJS.sonar.utils.getMeasureFromResource(e,h.id);d+=AJS.sonar.text.getMsg("sonar.views.totalquality."+h.text);c+=f.val});return AJS.$("").attr({width:250,height:250,src:b+"/chart?ck=xradar&w=250&h=250&c=777777|F8A036&m=100&g=0.25&l="+d+"&v="+c})};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy