+++ /dev/null
-#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2008-2011 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class BrowseController < ApplicationController
-
- SECTION=Navigation::SECTION_RESOURCE
- helper DashboardHelper
-
- def index
- @resource = Project.by_key(params[:id])
-
- if (@resource && has_role?(:user, @resource))
- params[:layout]='false'
- @snapshot=@resource.last_snapshot
-
- load_extensions()
-
- if @extension
- if (@extension.getId()=='violations')
- render_violations()
- elsif (@extension.getId()=='coverage')
- render_coverage()
- elsif (@extension.getId()=='source')
- render_source()
- else
- render_extension()
- end
- else
- render_nothing()
- end
- else
- access_denied
- end
- end
-
- private
-
- def load_extensions
- @extensions=[]
- java_facade.getResourceTabs(@resource.scope, @resource.qualifier, @resource.language).each do |tab|
- tab.getUserRoles().each do |role|
- if has_role?(role, @resource)
- @extensions<<tab
- break
- end
- end
- end
-
- if !params[:tab].blank?
- @extension=@extensions.find{|extension| extension.getId()==params[:tab]}
-
- elsif !params[:metric].blank?
- metric=Metric.by_key(params[:metric])
- @extension=@extensions.find{|extension| extension.getDefaultTabForMetrics().include?(metric.key)}
-
- end
- @extension=@extensions.find{|extension| extension.isDefaultTab()} if @extension==nil
- end
-
- def load_sources(use_scm_for_periods=true)
- @period = params[:period].to_i unless params[:period].blank?
- @display_scm=(params[:scm]=='true')
- @expanded=(params[:expand]=='true')
-
- if @snapshot.source
- source_lines=Java::OrgSonarServerUi::JRubyFacade.new.colorizeCode(@snapshot.source.data, @snapshot.project.language).split("\n")
- init_scm((@period && use_scm_for_periods) || @display_scm)
-
- @lines=[]
- source_lines.each_with_index do |source, index|
- line=Line.new(source)
- @lines<<line
-
- line.revision=@revisions_by_line[index+1]
- line.author=@authors_by_line[index+1]
-
- date_string=@dates_by_line[index+1]
- line.datetime=(date_string ? DateTime::strptime(date_string): nil)
- end
- end
- end
-
- def init_scm(scm)
- @scm_available=(@snapshot.measure('last_commit_datetimes_by_line')!=nil)
- if scm
- @authors_by_line=load_distribution('authors_by_line')
- @revisions_by_line=load_distribution('revisions_by_line')
- @dates_by_line=load_distribution('last_commit_datetimes_by_line')
- else
- @authors_by_line={}
- @revisions_by_line={}
- @dates_by_line={}
- end
- end
-
- def load_distribution(metric_key)
- m=@snapshot.measure(metric_key)
- m ? m.data_as_line_distribution() : {}
- end
-
- def render_coverage
- load_sources(true)
- @display_coverage=true
- @hits_by_line=load_distribution('coverage_line_hits_data')
- @conditions_by_line=load_distribution('conditions_by_line')
- @covered_conditions_by_line=load_distribution('covered_conditions_by_line')
-
- @hits_by_line.each_pair do |line_id,hits|
- line=@lines[line_id-1]
- if line
- line.hits=hits.to_i
- line.conditions=@conditions_by_line[line_id].to_i
- line.covered_conditions=@covered_conditions_by_line[line_id].to_i
- end
- end
-
- if @snapshot.measure('conditions_by_line').nil?
- deprecated_branches_by_line=load_distribution('branch_coverage_hits_data')
- deprecated_branches_by_line.each_pair do |line_id,label|
- line=@lines[line_id-1]
- if line
- line.deprecated_conditions_label=label
- end
- end
- end
-
- filter_lines_by_date()
- render :action => 'index', :layout => !request.xhr?
- end
-
-
-
- def render_violations
- load_sources(false)
- @display_violations=true
- @global_violations=[]
- @expandable=true
-
- conditions='snapshot_id=?'
- values=[@snapshot.id]
- unless params[:rule].blank?
- severity=Sonar::RulePriority.id(params[:rule])
- if severity
- conditions += ' AND failure_level=?'
- values<<severity
- else
- rule=Rule.by_key_or_id(params[:rule])
- conditions += ' AND rule_id=?'
- values<<(rule ? rule.id : -1)
- end
- end
-
- if @period
- date=@snapshot.period_datetime(@period)
- if date
- conditions+=' AND created_at>=?'
- values<<date
- else
- conditions+=' AND id=-1'
- end
- end
-
- RuleFailure.find(:all, :include => 'rule', :conditions => [conditions] + values, :order => 'failure_level DESC').each do |violation|
- # sorted by severity => from blocker to info
- if violation.line && violation.line>0 && @lines
- @lines[violation.line-1].add_violation(violation)
- else
- @global_violations<<violation
- end
- end
-
- if !@expanded && @lines
- @lines.each_with_index do |line,index|
- if line.violations?
- for i in index-4..index+4
- @lines[i].hidden=false if i>=0 && i<@lines.size
- end
- elsif line.hidden==nil
- line.hidden=true
- end
- end
- end
- render :action => 'index', :layout => !request.xhr?
- end
-
-
-
-
- def render_source
- load_sources(true)
- filter_lines_by_date()
- render :action => 'index', :layout => !request.xhr?
- end
-
-
- def filter_lines_by_date
- if @period
- date=@snapshot.period_datetime(@period)
- if date
- @lines.each do |line|
- line.hidden=true if line.datetime==nil || line.datetime<date
- end
- end
- end
- end
-
- class Line
- attr_accessor :source, :revision, :author, :datetime, :violations, :hits, :conditions, :covered_conditions, :hidden, :deprecated_conditions_label
-
- def initialize(source)
- @source=source
- end
-
- def add_violation(violation)
- @violations||=[]
- @violations<<violation
- @visible=true
- end
-
- def violations?
- @violations && @violations.size>0
- end
-
- def violation_severity
- if @violations && @violations.size>0
- @violations[0].failure_level
- else
- nil
- end
- end
-
- def date
- @datetime ? @datetime.to_date : nil
- end
-
- def deprecated_conditions_label=(label)
- if label
- @deprecated_conditions_label=label
- if label=='0%'
- @conditions=2
- @covered_conditions=0
- elsif label=='100%'
- @conditions=2
- @covered_conditions=2
- else
- @conditions=2
- @covered_conditions=1
- end
- end
- end
- end
-
-
-
-
- def render_extension()
- render :action => 'extension', :layout => !request.xhr?
- end
-
-def render_nothing()
- render :action => 'nothing', :layout => !request.xhr?
- end
-end
\ No newline at end of file
+++ /dev/null
-<div id="coverage_header" class="tab_header">
- <table class="col">
- <tr>
- <td class="big"><%= format_measure('coverage', :default => '-') -%></td>
- </tr>
- </table>
-
- <table class="col">
- <% if m=measure('line_coverage') %>
- <tr>
- <td class="name">Line coverage:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('uncovered_lines') %>
- <tr>
- <td class="name">Uncovered lines:</td>
- <td class="value"><%= format_measure(m) -%> / <%= format_measure('lines_to_cover') -%></td>
- </tr>
- <% end %>
- </table>
-
- <table class="col">
- <% if m=measure('branch_coverage') %>
- <tr>
- <td class="name">Branch coverage:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('uncovered_conditions') %>
- <tr>
- <td class="name">Uncovered conditions:</td>
- <td class="value"><%= format_measure(m) -%> / <%= format_measure('conditions_to_cover') -%></td>
- </tr>
- <% end %>
- </table>
-
- <%= render :partial => 'options' -%>
- <div class="clear"></div>
-</div>
-
+++ /dev/null
-<div id="source_header" class="tab_header">
- <table class="col">
- <% if m=measure('lines') %>
- <tr>
- <td class="name">Lines:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('ncloc') %>
- <tr>
- <td class="name">Lines of code:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('functions') %>
- <tr>
- <td class="name">Methods:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('accessors') %>
- <tr>
- <td class="name">Accessors:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('paragraphs') %>
- <tr>
- <td class="name">Paragraphs:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- </table>
-
- <table class="col">
- <% if m=measure('statements') %>
- <tr>
- <td class="name">Statements:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('complexity') %>
- <tr>
- <td class="name">Complexity:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('function_complexity') %>
- <tr>
- <td class="name">Complexity/method:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('paragraph_complexity') %>
- <tr>
- <td class="name">Complexity/paragraph:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- </table>
-
- <table class="col">
- <% if m=measure('comment_lines_density') %>
- <tr>
- <td class="name">Comments:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('comment_lines') %>
- <tr>
- <td class="name">Comment lines:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('commented_out_code_lines') %>
- <tr>
- <td class="name">Commented-out LOC:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('comment_blank_lines') %>
- <tr>
- <td class="name">Blank comments:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- </table>
-
- <table class="col">
- <% if m=measure('public_documented_api_density') %>
- <tr>
- <td class="name">Public documented API:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('public_undocumented_api') %>
- <tr>
- <td class="name">Public undocumented API:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('public_api') %>
- <tr>
- <td class="name">Public API:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- </table>
-
- <table class="col">
- <% if m=measure('classes') %>
- <tr>
- <td class="name">Classes:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('noc') %>
- <tr>
- <td class="name">Number of Children:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('dit') %>
- <tr>
- <td class="name">Depth in Tree:</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- <% if m=measure('rfc') %>
- <tr>
- <td class="name">Response for Class (RFC):</td>
- <td class="value"><%= format_measure(m) -%></td>
- </tr>
- <% end %>
- </table>
-
- <%= render :partial => 'options' -%>
-</div>
-
+++ /dev/null
-<div id="violations_header" class="tab_header">
-
- <table class="bottomcol">
- <tr>
- <td><span class="big"><%= format_measure('violations', :default => '-') -%></span> violations</td>
- </tr>
- </table>
-
- <table class="bottomcol">
- <tr>
- <td><%= image_tag 'priority/BLOCKER.png' -%></td>
- <td class="name">Blocker:</td>
- <td class="value"><%= format_measure('blocker_violations', :default => 0) -%></td>
- </tr>
- </table>
- <table class="bottomcol">
- <tr>
- <td><%= image_tag 'priority/CRITICAL.png' -%></td>
- <td class="name">Critical:</td>
- <td class="value"><%= format_measure('critical_violations', :default => 0) -%></td>
- </tr>
- </table>
- <table class="bottomcol">
- <tr>
- <td><%= image_tag 'priority/MAJOR.png' -%></td>
- <td class="name">Major:</td>
- <td class="value"><%= format_measure('major_violations', :default => 0) -%></td>
- </tr>
- </table>
- <table class="bottomcol">
- <tr>
- <td><%= image_tag 'priority/MINOR.png' -%></td>
- <td class="name">Minor:</td>
- <td class="value"><%= format_measure('minor_violations', :default => 0) -%></td>
- </tr>
- </table>
- <table class="bottomcol">
- <tr>
- <td><%= image_tag 'priority/INFO.png' -%></td>
- <td class="name">Info:</td>
- <td class="value"><%= format_measure('info_violations', :default => 0) -%></td>
- </tr>
- </table>
-
- <%= render :partial => 'options' -%>
- <div class="clear"></div>
-</div>
-
+++ /dev/null
-<% display_options = @scm_available || @expandable || @snapshot.project_snapshot.periods? || @display_violations
- if display_options
-%>
-
-<div id="source_options">
- <script>
- applyOptions=function() {
- $('resource-loading').show();
- <% if request.xhr? %>
- var params = Form.serialize($('options-form'));
- new Ajax.Updater('resource_container', '<%= url_for :controller => 'resource', :id => @resource.key -%>', {asynchronous:true, parameters:params});
- return true;
- <% else %>
- $('options-form').submit();
- return false;
- <% end %>
- };
- </script>
- <form method="GET" action="<%= url_for :controller => 'browse', :id => @resource.key -%>" id="options-form">
- <input type="hidden" name="tab" value="<%= params[:tab] -%>"/>
- <input type="hidden" name="metric" value="<%= params[:metric] -%>"/>
- <input type="hidden" name="period" value="<%= params[:period] -%>"/>
-
- <table>
- <tr>
- <% first=true %>
- <% if @scm_available %>
- <td class="<%= 'first' if first -%>">
- <input type="checkbox" value="true" name="scm" id="scm" <%= 'checked' if @display_scm -%> onclick="applyOptions()"/>
- <label for="scm">Show commits</label>
- </td>
- <% first=false
- end %>
-
- <% if @expandable %>
- <td class="<%= 'first' if first -%>">
- <input type="checkbox" value="true" name="expand" id="expand" <%= 'checked' if @expanded -%> onclick="applyOptions()"/>
- <label for="expand">Full source</label>
- </td>
- <% first=false
- end %>
-
- <% if @snapshot.project_snapshot.periods? %>
- <td class="<%= 'first' if first -%>">
- <select id="period" name="period" onchange="applyOptions()">
- <option value="">Time changes...</option>
- <%= period_select_options(@snapshot, 1) -%>
- <%= period_select_options(@snapshot, 2) -%>
- <%= period_select_options(@snapshot, 3) -%>
- <%= period_select_options(@snapshot, 4) -%>
- <%= period_select_options(@snapshot, 5) -%>
- </select>
- </td>
- <%
- first=false
- end %>
-
- <% if @display_violations %>
- <td class="<%= 'first' if first -%>"><%= render :partial => 'rules_filter' -%></td>
- <% end %>
- </tr>
- </table>
- </form>
-</div>
-<% end %>
\ No newline at end of file
+++ /dev/null
-<%
- 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<<rule_measure.rule
- end
-
- rule_options=[]
- rules.uniq.sort_by{|rule| rule.name}.each do |rule|
- rule_options<<["#{h rule.name} (#{rule_counts[rule.id]})", rule.id]
- end
-%>
-<select id="rule" name="rule" onchange="applyOptions()">
- <option value="">No filters</option>
- <optgroup label="Severity">
- <% if blocker_violations && blocker_violations.value>0 %>
- <option value="<%= Sonar::RulePriority::BLOCKER.to_s -%>" <%= 'selected' if params[:rule]==Sonar::RulePriority::BLOCKER.to_s -%>>Blocker (<%= blocker_violations.formatted_value -%>)</option>
- <% end %>
- <% if critical_violations && critical_violations.value>0 %>
- <option value="<%= Sonar::RulePriority::CRITICAL.to_s -%>" <%= 'selected' if params[:rule]==Sonar::RulePriority::CRITICAL.to_s -%>>Critical (<%= critical_violations.formatted_value -%>)</option>
- <% end %>
- <% if major_violations && major_violations.value>0 %>
- <option value="<%= Sonar::RulePriority::MAJOR.to_s -%>" <%= 'selected' if params[:rule]==Sonar::RulePriority::MAJOR.to_s -%>>Major (<%= major_violations.formatted_value -%>)</option>
- <% end %>
- <% if minor_violations && minor_violations.value>0 %>
- <option value="<%= Sonar::RulePriority::MINOR.to_s -%>" <%= 'selected' if params[:rule]==Sonar::RulePriority::MINOR.to_s -%>>Minor (<%= minor_violations.formatted_value -%>)</option>
- <% end %>
- <% if info_violations && info_violations.value>0 %>
- <option value="<%= Sonar::RulePriority::INFO.to_s -%>" <%= 'selected' if params[:rule]==Sonar::RulePriority::INFO.to_s -%>>Info (<%= info_violations.formatted_value -%>)</option>
- <% end %>
- </optgroup>
-
-
- <optgroup label="Rule">
- <%= options_for_select(rule_options, params[:rule].to_i) -%>
- </optgroup>
-</select>
\ No newline at end of file
+++ /dev/null
-<style>
-
-</style>
-
-<div id="source_title">
- <span class="h1"><%= qualifier_icon(@resource) -%> <%= @resource.long_name -%></span>
-</div>
-
-<div id="source_tabs">
- <ul class="tablinks">
- <%
- first=true
- if @snapshot.source
- %>
- <li class="<%= 'first' if first -%>"><a href="<%= ApplicationController.root_context -%>/api/sources?resource=<%= @resource.key -%>&format=txt">Raw</a></li>
- <% first=false
- end
- if request.xhr? %>
- <li class="<%= 'first' if first -%>"><a href="<%= ApplicationController.root_context -%>/browse/<%= @resource.key -%>" target="sonar">New Window</a></li>
- <% end %>
- </ul>
- <ul class="tabs" >
- <% if request.xhr? %>
- <% @extensions.each do |extension| %>
- <li><a href="#" onclick="loadAjaxTab('<%= @resource.id -%>','<%= extension.getId() -%>')" class="<%= 'selected' if @extension.getId()==extension.getId() -%>"><%= extension.getTitle() -%></a></li>
- <% end %>
- <% else %>
- <script>function loadTab(url) {$('resource-loading').show();document.location.href=url;return false;}</script>
- <% @extensions.each do |extension| %>
- <li><a href="#" onClick="loadTab('<%= url_for(:overwrite_params => {:tab => extension.getId()}) -%>')" class="<%= 'selected' if @extension.getId()==extension.getId() -%>"><%= extension.getTitle() -%></a></li>
- <% end %>
- <% end %>
- <li>
- <img src="<%= ApplicationController.root_context -%>/images/loading.gif" id="resource-loading" style="display:none"/>
- </li>
- </ul>
-</div>
+++ /dev/null
-<img src="<%= ApplicationController.root_context -%>/images/priority/<%=violation.failure_level-%>.png"/>
-
-<span class="rulename"><a onclick="window.open(this.href,'rule','height=800,width=900,scrollbars=1,resizable=1');return false;" href="<%= url_for :controller => 'rules', :action => 'show', :id => violation.rule.key, :layout => 'false' -%>"><%= h(violation.rule.name) -%></a></span>
- ยป
-<%= h(violation.message) -%>
-<%
- if violation.created_at
- duration=Date.today - violation.created_at.to_date
-
-%>
- <span class="violation_date"><%= duration==0 ? 'today' : "#{duration} days ago" -%></span>
-<% end %>
\ No newline at end of file
+++ /dev/null
-<%= render :partial => 'tabs' -%>
-
-<% if @extension.isGwt() %>
-
- <% if request.xhr? %>
- <div id="gwtpage"> </div>
- <script>loadGWT('<%= @extension.getId() -%>', <%= @resource.id -%>,'<%= @resource.key -%>', '<%= @resource.name -%>', '<%= @resource.scope -%>', '<%= @resource.qualifier -%>', '<%= @resource.language -%>');</script>
-
- <% else %>
-
-
- <div id="gwtpage"> </div>
- <!-- for SmartGWT -->
- <script>var isomorphicDir = "<%= "#{ApplicationController.root_context}/deploy/gwt/#{@extension.getId()}" -%>/sc/";</script>
-
- <%= render :partial => 'gwt/base', :locals => {:resource => @resource, :popup => false, :metric => params[:metric]} -%>
- <script src="<%= ApplicationController.root_context -%>/deploy/gwt/<%= @extension.getId() -%>/<%= @extension.getId() -%>.nocache.js?<%= sonar_version -%>"></script>
-
- <% end %>
-
-<% else # ruby on rails page %>
- <%= render :inline => @page.getTemplate() %>
-<% end %>
\ No newline at end of file
+++ /dev/null
-<%= render :partial => 'tabs' -%>
-
-<%= render :partial => "browse/header_#{@extension.getId()}" -%>
-
-
-<% if @display_violations && @global_violations && @global_violations.size>0 -%>
- <table id="global_violations" cellpadding="0" cellspacing="0" border="0">
- <% @global_violations.each do |violation| %>
- <tr>
- <td><%= render :partial => 'violation', :locals => {:violation => violation} -%></td>
- </tr>
- <% end %>
- </table>
-<% end %>
-
-<% if @lines && @lines.size>0 %>
-<table id="sources" class="sources2 code" cellpadding="0" cellspacing="0" border="0">
- <%
- current_revision=nil
- colspan=2
- colspan+=1 if @display_scm
- colspan+=1 if @display_violations
- colspan+=2 if @display_coverage
- previous_hidden=false
- first_section=true
- @lines.each_with_index do |line, index|
- if line.hidden
- previous_hidden=true
- next
- end
-
- if previous_hidden && !first_section
- current_revision=nil
-%>
- <tr>
- <td colspan="<%= colspan -%>" class="new_section"> </td>
- </tr>
-<%
- end
- previous_hidden=false
- first_section=false
-
- status=hits_status=conditions_status=''
- if @display_coverage && line.hits
- hits_status=(line.hits>0 ? 'ok' : 'ko')
- if line.conditions && line.conditions>0 && line.covered_conditions
- if line.covered_conditions==0
- status='ko'
- conditions_status='ko'
- elsif line.covered_conditions==line.conditions
- status=''
- conditions_status='ok'
- else
- conditions_status='warn'
- status='warn'
- end
- elsif line.hits
- status=(line.hits>0 ? '' : 'ko')
- end
- elsif @display_violations
- status="sev#{line.violation_severity}"
- end
- %>
- <tr>
- <% if @display_scm
- if current_revision!=line.revision
- current_revision=line.revision
- title = "Revision #{h(line.revision)} (#{l(line.datetime)})"
- %>
- <td class="scm revision"><span class="date"><a href="#" title="<%= title -%>" alt="<%= title -%>"><%= l(line.date) -%></a></span> <span class="author"><%= h(line.author) -%></span></td>
- <% else %>
- <td class="scm"></td>
- <% end
- end %>
- <% if @display_violations %>
- <td class="rule <%= 'violations section' if line.violations? -%>">
- <% if line.violations?
- line.violations.each_with_index do |violation, violation_index| %>
- <%= '<br/>' if violation_index>0 %>
- <%= render :partial => 'violation', :locals => {:violation => violation} -%>
- <%
- end
- end
- %>
- </td>
- <% end %>
- <td class="lid <%= ' section' if line.violations? -%>" id="L<%= index+1 -%>"><a name="L<%= index+1 -%>" href="#L<%= index+1 -%>"><%= index + 1 -%></a></td>
-
- <% if @display_coverage %>
- <td class="ind <%= hits_status -%>"><%= line.hits -%></td>
- <td class="ind <%= conditions_status -%>">
- <% if line.deprecated_conditions_label -%>
- <%= line.deprecated_conditions_label -%>
- <% elsif line.conditions && line.conditions>0 -%>
- <%= line.covered_conditions -%>/<%= line.conditions -%>
- <% end %>
- </td>
- <% end %>
- <td class="line <%= status -%>"><pre><%= line.source -%></pre></td>
- </tr>
- <% end %>
-</table>
-<% end %>
\ No newline at end of file
+++ /dev/null
-<%= render :partial => 'tabs' -%>
\ No newline at end of file