Metric.by_key(key)
end
+ # URL to static resource.
+ #
+ # === Optional parameters
+ #
+ # * <tt>:plugin</tt> - key of plugin, from where this resource should be loaded.
+ #
+ # === Examples
+ #
+ # url_for_static(:path => 'images/sonarqube-24x100.png')
+ # url_for_static(:plugin => 'myplugin', :path => 'image.png')
+ def url_for_static(options={})
+ if options[:plugin]
+ "#{ApplicationController.root_context}/static/#{options[:plugin]}/#{options[:path]}"
+ else
+ "#{ApplicationController.root_context}/#{options[:path]}"
+ end
+ end
+
#
#
# Numeric value of variation