aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-12-14 11:07:41 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-12-14 11:07:41 +0000
commitd6e02414247891007423c0bc29d4895603743eeb (patch)
tree4fe342fb224cd3a7865027dd6b7a39a6e43be834 /sonar-server
parent1f8226fe972595dc9ec2f7cefe588bf95e86b090 (diff)
downloadsonarqube-d6e02414247891007423c0bc29d4895603743eeb.tar.gz
sonarqube-d6e02414247891007423c0bc29d4895603743eeb.zip
SONAR-833 remove support of XML format
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb
index 62d0788e211..746c27cadf4 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb
@@ -106,7 +106,6 @@ class Api::TimemachineController < Api::ApiController
objects = { :snapshots => snapshots, :measures_by_sid => measures_by_sid, :metric_keys => metric_keys }
respond_to do |format|
format.json { render :json => jsonp(to_json(objects)) }
- format.xml { render :xml => to_xml(objects) }
format.csv {
send_data(to_csv(objects),
:type => 'text/csv; charset=utf-8; header=present',
@@ -146,35 +145,6 @@ class Api::TimemachineController < Api::ApiController
json
end
- def to_xml(objects)
- snapshots = objects[:snapshots]
- measures_by_sid = objects[:measures_by_sid]
- metric_keys = objects[:metric_keys]
-
- xml = Builder::XmlMarkup.new(:indent => 0)
- xml.instruct!
-
- xml.snapshots do
- snapshots.each do |snapshot|
- snapshot_to_xml(xml, snapshot, measures_by_sid[snapshot.id], metric_keys)
- end
- end
- end
-
- def snapshot_to_xml(xml, snapshot, measures, metric_keys)
- values_by_key = {}
- measures.each do |measure|
- values_by_key[measure.metric.name] = measure.value.to_f if measure.value
- end
-
- xml.snapshot do
- xml.date(format_datetime(snapshot.created_at))
- metric_keys.each do |metric|
- xml.measure(values_by_key[metric])
- end
- end
- end
-
def to_csv(objects)
snapshots = objects[:snapshots]
measures_by_sid = objects[:measures_by_sid]