<%
@filter=::Filter.find(:first, :conditions => {:kee => widget_properties['filter']})
- @filter_context=Filters.execute(@filter, self, params)
+ @filter_context=Filters.execute(@filter, self, params) unless @filter.ajax_loading?
%>
<%= render :partial => "filters/#{@filter.default_view}", :locals => {:edit_mode => false, :widget => widget} %>
load_resource()
load_dashboard()
@category=params[:category]
- load_widget_definitions(@dashboard, @category)
+ load_widget_definitions(@category)
unless @dashboard
redirect_to home_path
end
@category=params[:category]
load_resource()
load_dashboard()
- load_widget_definitions(@dashboard, @category)
+ load_widget_definitions(@category)
render :partial => 'widget_definitions', :locals => {:category => @category}
end
end
end
- def load_widget_definitions(dashboard, filter_on_category=nil)
+ def load_widget_definitions(filter_on_category)
@widget_definitions=java_facade.getWidgets()
@widget_categories=@widget_definitions.map(&:getWidgetCategories).flatten.uniq.sort
# load measures
#
if @metric_ids.size>0
- measures=ProjectMeasure.find(:all, :conditions => ['rule_priority is null and rule_id is null and characteristic_id is null and person_id is null and snapshot_id in (?)', @page_sids])
+ measures=ProjectMeasure.find(:all, :conditions => ['rule_priority is null and rule_id is null and characteristic_id is null and person_id is null and snapshot_id in (?) and metric_id in (?)', @page_sids, @metric_ids])
measures.each do |m|
snapshot=@snapshots_by_id[m.snapshot_id]