From: simonbrandhof Date: Fri, 4 Mar 2011 15:51:32 +0000 (+0100) Subject: SONAR-2218 add missing files X-Git-Tag: 2.7~80 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=04323d78c5c7520dca1f6645b0c47662b5348c49;p=sonarqube.git SONAR-2218 add missing files --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb new file mode 100644 index 00000000000..7590306ac0f --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb @@ -0,0 +1,41 @@ +
+ + + + +
<%= format_measure('coverage', :default => '-') -%>
+ + + <% if m=measure('line_coverage') %> + + + + + <% end %> + <% if m=measure('uncovered_lines') %> + + + + + <% end %> +
Line coverage:<%= format_measure(m) -%>
Uncovered lines:<%= format_measure(m) -%> / <%= format_measure('lines_to_cover') -%>
+ + + <% if m=measure('branch_coverage') %> + + + + + <% end %> + <% if m=measure('uncovered_conditions') %> + + + + + <% end %> +
Branch coverage:<%= format_measure(m) -%>
Uncovered conditions:<%= format_measure(m) -%> / <%= format_measure('conditions_to_cover') -%>
+ + <%= render :partial => 'options' -%> +
+
+ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_source.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_source.html.erb new file mode 100644 index 00000000000..2a4d1851f78 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_source.html.erb @@ -0,0 +1,139 @@ +
+ + <% if m=measure('lines') %> + + + + + <% end %> + <% if m=measure('ncloc') %> + + + + + <% end %> + <% if m=measure('functions') %> + + + + + <% end %> + <% if m=measure('accessors') %> + + + + + <% end %> + <% if m=measure('paragraphs') %> + + + + + <% end %> +
Lines:<%= format_measure(m) -%>
Lines of code:<%= format_measure(m) -%>
Methods:<%= format_measure(m) -%>
Accessors:<%= format_measure(m) -%>
Paragraphs:<%= format_measure(m) -%>
+ + + <% if m=measure('statements') %> + + + + + <% end %> + <% if m=measure('complexity') %> + + + + + <% end %> + <% if m=measure('function_complexity') %> + + + + + <% end %> + <% if m=measure('paragraph_complexity') %> + + + + + <% end %> +
Statements:<%= format_measure(m) -%>
Complexity:<%= format_measure(m) -%>
Complexity/method:<%= format_measure(m) -%>
Complexity/paragraph:<%= format_measure(m) -%>
+ + + <% if m=measure('comment_lines_density') %> + + + + + <% end %> + <% if m=measure('comment_lines') %> + + + + + <% end %> + <% if m=measure('commented_out_code_lines') %> + + + + + <% end %> + <% if m=measure('comment_blank_lines') %> + + + + + <% end %> +
Comments:<%= format_measure(m) -%>
Comment lines:<%= format_measure(m) -%>
Commented-out LOC:<%= format_measure(m) -%>
Blank comments:<%= format_measure(m) -%>
+ + + <% if m=measure('public_documented_api_density') %> + + + + + <% end %> + <% if m=measure('public_undocumented_api') %> + + + + + <% end %> + <% if m=measure('public_api') %> + + + + + <% end %> +
Public documented API:<%= format_measure(m) -%>
Public undocumented API:<%= format_measure(m) -%>
Public API:<%= format_measure(m) -%>
+ + + <% if m=measure('classes') %> + + + + + <% end %> + <% if m=measure('noc') %> + + + + + <% end %> + <% if m=measure('dit') %> + + + + + <% end %> + <% if m=measure('rfc') %> + + + + + <% end %> +
Classes:<%= format_measure(m) -%>
Number of Children:<%= format_measure(m) -%>
Depth in Tree:<%= format_measure(m) -%>
Response for Class (RFC):<%= format_measure(m) -%>
+ + <%= render :partial => 'options' -%> +
+ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_violations.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_violations.html.erb new file mode 100644 index 00000000000..67e1d36eff8 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_violations.html.erb @@ -0,0 +1,48 @@ +
+ + + + + +
<%= format_measure('violations', :default => 0) -%> violations
+ + + + + + + +
<%= image_tag 'priority/BLOCKER.png' -%>Blocker:<%= format_measure('blocker_violations', :default => 0) -%>
+ + + + + + +
<%= image_tag 'priority/CRITICAL.png' -%>Critical:<%= format_measure('critical_violations', :default => 0) -%>
+ + + + + + +
<%= image_tag 'priority/MAJOR.png' -%>Major:<%= format_measure('major_violations', :default => 0) -%>
+ + + + + + +
<%= image_tag 'priority/MINOR.png' -%>Minor:<%= format_measure('minor_violations', :default => 0) -%>
+ + + + + + +
<%= image_tag 'priority/INFO.png' -%>Info:<%= format_measure('info_violations', :default => 0) -%>
+ + <%= render :partial => 'options' -%> +
+
+ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb new file mode 100644 index 00000000000..ab81eaae342 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb @@ -0,0 +1,65 @@ +<% display_options = @scm_available || @expandable || @snapshot.project_snapshot.periods? || @display_violations + if display_options +%> + +
+ +
+ + + + + + + <% first=true %> + <% if @scm_available %> + + <% first=false + end %> + + <% if @expandable %> + + <% first=false + end %> + + <% if @snapshot.project_snapshot.periods? %> + + <% + first=false + end %> + + <% if @display_violations %> + + <% end %> + +
+ onclick="applyOptions()"/> + + + onclick="applyOptions()"/> + + + + <%= render :partial => 'rules_filter' -%>
+
+
+<% end %> \ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_rules_filter.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_rules_filter.html.erb new file mode 100644 index 00000000000..900711898b0 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_rules_filter.html.erb @@ -0,0 +1,45 @@ +<% + blocker_violations = @snapshot.measure('blocker_violations') + critical_violations = @snapshot.measure('critical_violations') + major_violations = @snapshot.measure('major_violations') + minor_violations = @snapshot.measure('minor_violations') + info_violations = @snapshot.measure('info_violations') + + rule_counts={} + rules=[] + rule_measures=ProjectMeasure.find(:all, :include => 'rule', :conditions => ['metric_id=? AND snapshot_id=? AND rule_id IS NOT NULL AND characteristic_id IS NULL', Metric.by_key('violations').id, @snapshot.id]) + rule_measures.each do |rule_measure| + rule_counts[rule_measure.rule_id]=rule_measure.value.to_i + rules< + \ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb new file mode 100644 index 00000000000..3428c56040e --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb @@ -0,0 +1,37 @@ + + +
+ <%= qualifier_icon(@resource) -%> <%= @resource.long_name -%> +
+ +
+ +
    + <% if request.xhr? %> + <% @extensions.each do |extension| %> +
  • <%= extension.getTitle() -%>
  • + <% end %> + <% else %> + + <% @extensions.each do |extension| %> +
  • <%= extension.getTitle() -%>
  • + <% end %> + <% end %> +
  • + +
  • +
+
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb new file mode 100644 index 00000000000..c3feeb1f0b4 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb @@ -0,0 +1,12 @@ + + +<%= h(violation.rule.name) -%> + » +<%= h(violation.message) -%> +<% + if violation.created_at + duration=Date.today - violation.created_at.to_date + +%> + <%= duration==0 ? 'today' : "#{duration} days ago" -%> +<% end %> \ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/extension.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/extension.html.erb new file mode 100644 index 00000000000..b61e6259fc4 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/extension.html.erb @@ -0,0 +1,23 @@ +<%= render :partial => 'tabs' -%> + +<% if @extension.isGwt() %> + + <% if request.xhr? %> +
+ + + <% else %> + + +
+ + + + <%= render :partial => 'gwt/base', :locals => {:resource => @resource, :popup => false, :metric => params[:metric]} -%> + + + <% end %> + +<% else # ruby on rails page %> + <%= render :inline => @page.getTemplate() %> +<% end %> \ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/nothing.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/nothing.html.erb new file mode 100644 index 00000000000..d22506de4cf --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/nothing.html.erb @@ -0,0 +1 @@ +<%= render :partial => 'tabs' -%> \ No newline at end of file