anchor.diff:  <%
      end
   %>
  +</div>
   
  +<script>
  +(function () {
  +    var queryParams = [
  +        'format=json',
  +        'metrics=ncloc,files,lines,classes,functions'
  +    ];
  +    var query = queryParams.join('&');
  +    var url = baseUrl + '/api/resources?' + query;
   
  +    jQuery.ajax({
  +        type: "GET",
  +        url: url,
  +        dataType:"json",
  +        success: function(data, textStatus, jqXHR) {
  +            var ncloc = 0;
  +            var lines = 0;
  +            var files = 0;
  +            var classes = 0;
  +            var functions = 0;
  +
  +            //Iterate over the projects
  +            jQuery.each(data, function(index, element) {
  +                //Gather the values
  +                jQuery.each(element.msr, function(msr_index, msr_element){
  +                    if (msr_element.key == "ncloc"){
  +                        ncloc = ncloc + msr_element.val;
  +                    } else if (msr_element.key == "lines"){
  +                        lines = lines + msr_element.val;
  +                    } else if (msr_element.key == "files"){
  +                        files = files + msr_element.val;
  +                    } else if (msr_element.key == "classes"){
  +                        classes = classes + msr_element.val;
  +                    } else if (msr_element.key == "functions"){
  +                        functions = functions + msr_element.val;
  +                    }
  +                });
  +            });
  +
  +            jQuery("#aggregate_projects").html("" + (1 + parseInt(jQuery("#aggregate_projects").html())));
  +            jQuery("#aggregate_loc").html("" + (ncloc + parseInt(jQuery("#aggregate_loc").html())));
  +            jQuery("#aggregate_functions").html("" + (functions + parseInt(jQuery("#aggregate_functions").html())));
  +            jQuery("#aggregate_files").html("" + (files + parseInt(jQuery("#aggregate_files").html())));
  +            jQuery("#aggregate_classes").html("" + (classes + parseInt(jQuery("#aggregate_classes").html())));
  +            jQuery("#aggregate_lines").html("" + (lines + parseInt(jQuery("#aggregate_lines").html())));
  +        }
  +    });
  +})();
  +</script>
  
positive.code:             <p class="widget-measure widget-measure-main">
              <span class="widget-label">Projects</span>
              <span class="nowrap">
                  <a href="" class="widget-link " rel="" title=""><span id="aggregate_projects">0.0</span></a>
              </span>
              </p>
              <p class="widget-measure widget-measure-main">
              <span class="widget-label">Files</span>
              <span class="nowrap">
                  <a href="" class="widget-link " rel="" title=""><span id="aggregate_files">0.0</span></a>
              </span>
              </p>
          </div>
  
negative.code:             <p class="widget-measure widget-measure-main">
              <span class="widget-label">Functions</span>
              <span class="nowrap">
                  <a href="" class="widget-link " rel="" title=""><span id="aggregate_functions">0</span></a>
              </span>
              </p>
              <p class="widget-measure widget-measure-main">
              <span class="widget-label">Classes</span>
              <span class="nowrap">
                  <a href="" class="widget-link " rel="" title=""><span id="aggregate_classes">0</span></a>
              </span>
              </p>
          </div>
      </div>
  </div>
  
  <div style="display:none;">
  <%
     filter_id = widget_properties['filter']
     filter = MeasureFilter.find_by_id(filter_id.to_i) if filter_id
  