diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-03-13 14:25:42 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-03-17 12:16:33 +0100 |
commit | 7485c34dead228336791067e3a6b03cbb3dcaaa2 (patch) | |
tree | 6f34d0fbd59d3fd671659147ee6c35395cf8a81c /plugins | |
parent | 8f99dd245c257c72b351625e9fa34dd7375fe5ef (diff) | |
download | sonarqube-7485c34dead228336791067e3a6b03cbb3dcaaa2.tar.gz sonarqube-7485c34dead228336791067e3a6b03cbb3dcaaa2.zip |
SONAR-6261 Persist events in compute stack
Diffstat (limited to 'plugins')
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb index 9f0381f48cb..d6be1d2e667 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb @@ -1,8 +1,8 @@ <% if @resource.scope=='PRJ' - conditions = "resource_id=:resource_id" - values = {:resource_id => @resource.id} + conditions = "component_uuid=:component_uuid" + values = {:component_uuid => @resource.uuid} # in order to not display events linked to deleted snapshot, we build the SQL request with 'NOT IN' as most of the time, there won't be unprocessed snapshots snapshots_to_be_deleted = Snapshot.find(:all, :conditions => ["status='U' AND project_id=?", @resource.id]) unless snapshots_to_be_deleted.empty? diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb index 55ce78fe4d6..7e7ad6ec44f 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb @@ -101,7 +101,7 @@ from_date = first_date if !from_date || from_date > first_date end end - Event.find(:all, :conditions => ["resource_id=? AND event_date>=?", @resource.id, from_date.to_i*1000], :order => 'event_date').each() do |event| + Event.find(:all, :conditions => ["component_uuid=? AND event_date>=?", @resource.uuid, from_date.to_i*1000], :order => 'event_date').each() do |event| if events[event.event_date] events[event.event_date] << event else |