@@ -99,13 +99,13 @@ def polymorphic_includes
9999 end
100100 end
101101
102- def get_include_for_find_rbac
102+ def get_ar_includes
103103 polymorphic_includes . each_with_object ( get_include_for_find . dup ) do |key , includes |
104104 includes . delete ( key )
105105 end
106106 end
107107
108- def get_include_rbac
108+ def get_ar_references
109109 polymorphic_includes . each_with_object ( get_include . dup ) do |key , includes |
110110 includes . delete ( key )
111111 end
@@ -290,8 +290,8 @@ def generate_daily_metric_rollup_results(options = {})
290290 . where ( where_clause )
291291 . where ( options [ :where_clause ] )
292292 . where ( :timestamp => performance_report_time_range )
293- . preload ( get_include_for_find )
294- . eager_load ( get_include )
293+ . preload ( get_ar_includes )
294+ . eager_load ( get_ar_references )
295295 . limit ( options [ :limit ] )
296296 results = Rbac . filtered ( results , :class => db ,
297297 :filter => conditions ,
@@ -305,8 +305,8 @@ def generate_interval_metric_results(options = {})
305305 results = db_class . with_interval_and_time_range ( interval , performance_report_time_range )
306306 . where ( where_clause )
307307 . where ( options [ :where_clause ] )
308- . preload ( get_include_for_find )
309- . eager_load ( get_include )
308+ . preload ( get_ar_includes )
309+ . eager_load ( get_ar_references )
310310 . limit ( options [ :limit ] )
311311
312312 # Rbac will only add miq_expression for hourly report. It will not work properly for daily because many values are rolled up from hourly.
@@ -339,8 +339,8 @@ def generate_basic_results(options = {})
339339 rbac_opts = options . merge (
340340 :targets => targets ,
341341 :filter => conditions ,
342- :include_for_find => get_include_for_find_rbac ,
343- :references => get_include_rbac ,
342+ :include_for_find => get_ar_includes ,
343+ :references => get_ar_references ,
344344 :skip_counts => true
345345 )
346346
0 commit comments