scripts.views.sonar-views-min.js Maven / Gradle / Ivy
AJS.$.namespace("AJS.sonar.views");AJS.sonar.views.ALTERNATE_METRIC_LINK_PARAMS={line_coverage:"highlight=line_coverage&metric=uncovered_lines",branch_coverage:"highlight=branch_coverage&metric=uncovered_conditions",public_documented_api_density:"highlight=public_documented_api_density&metric=public_undocumented_api",public_undocumented_api:"highlight=public_undocumented_api&metric=public_undocumented_api",commented_out_code_lines:"highlight=commented_out_code_lines&metric=commented_out_code_lines",duplicated_lines_density:"highlight=duplicated_lines_density&metric=duplicated_lines",violations_density:"highlight=weighted_violations&metric=weighted_violations"};AJS.sonar.views.createViewContainer=function(){return AJS.$("").addClass("view-container")};AJS.sonar.views.createColumn=function(B){var A=AJS.$("");if(B){A.attr({id:"leftColumn"});A.addClass("left-column")}else{A.attr({id:"rightColumn"});A.addClass("right-column")}return A};AJS.sonar.views.createHeader=function(A){return AJS.$("").text(AJS.sonar.text.getMsg(A))};AJS.sonar.views.createMeasureRow=function(D,J,G,B,F,E){var C="sonar.views."+J+".";var K=AJS.$("");if(E){K.addClass("big-measure")}var H="metric="+F.key;if(AJS.sonar.views.ALTERNATE_METRIC_LINK_PARAMS[F.key]){H=AJS.sonar.views.ALTERNATE_METRIC_LINK_PARAMS[F.key]}var A=AJS.$("").attr({href:D+"/drilldown/measures/"+G+"?"+H,target:"_parent"});A.append(AJS.$("").addClass("alert_"+B.alert).text(B.frmt_val));if(AJS.sonar.text.getMsg(C+F.key)!==""&&AJS.sonar.text.getMsg(C+F.key)!==(C+F.key)){A.append(AJS.$("").text(" "+AJS.sonar.text.getMsg(C+F.key)))}var I=AJS.sonar.utils.getTrendImage(B,!E);if(I!==""){A.append(AJS.$("").attr({src:D+"/images"+I}))}A.appendTo(K);return K};AJS.sonar.views.addViewFooter=function(B,A){var C=AJS.$("").addClass("sonar-footer").text(AJS.sonar.text.getMsg("sonar.views.connected.to"));AJS.$("").attr({href:A,target:"_parent"}).text(A).appendTo(C);B.append(C)};