diff --git a/app/models/vm_or_template.rb b/app/models/vm_or_template.rb index 650436d50c94..a23c401208dc 100644 --- a/app/models/vm_or_template.rb +++ b/app/models/vm_or_template.rb @@ -151,6 +151,7 @@ class VmOrTemplate < ApplicationRecord virtual_column :v_owning_blue_folder, :type => :string, :uses => :all_relationships virtual_column :v_owning_blue_folder_path, :type => :string, :uses => :all_relationships virtual_column :v_datastore_path, :type => :string, :uses => :storage + virtual_column :v_folder_path_no_non_display_folders, :type => :string, :uses => :all_relationships virtual_column :thin_provisioned, :type => :boolean, :uses => {:hardware => :disks} virtual_column :used_storage, :type => :integer, :uses => [:used_disk_storage, :mem_cpu] virtual_column :used_storage_by_state, :type => :integer, :uses => :used_storage @@ -803,6 +804,11 @@ def parent_datacenter end alias_method :owning_datacenter, :parent_datacenter + def parent_blue_folder_path_with_excluded_non_display_folders + parent_blue_folder_path(:exclude_non_display_folders => true) + end + alias_method :v_folder_path_no_non_display_folders, :parent_blue_folder_path_with_excluded_non_display_folders + def lans !hardware.nil? ? hardware.nics.collect(&:lan).compact : [] end