diff --git a/app/controllers/mixins/generic_session_mixin.rb b/app/controllers/mixins/generic_session_mixin.rb index 29c47b8dacc..9ba444c1f31 100644 --- a/app/controllers/mixins/generic_session_mixin.rb +++ b/app/controllers/mixins/generic_session_mixin.rb @@ -22,6 +22,8 @@ def set_session_data session["#{prefix}_filters".to_sym] = @filters session["#{prefix}_catinfo".to_sym] = @catinfo session["#{prefix}_showtype".to_sym] = @showtype + session[:miq_compressed] = @compressed unless @compressed.nil? + session[:miq_exists_mode] = @exists_mode unless @exists_mode.nil? end end end diff --git a/app/controllers/vm_controller.rb b/app/controllers/vm_controller.rb index 341814da07d..e2e5b1d8b45 100644 --- a/app/controllers/vm_controller.rb +++ b/app/controllers/vm_controller.rb @@ -5,6 +5,7 @@ class VmController < ApplicationController after_action :set_session_data include VmCommon # common methods for vm controllers include VmRemote # methods for VM remote access + include Mixins::GenericSessionMixin def index session[:vm_type] = nil # Reset VM type if coming in from All tab @@ -17,28 +18,20 @@ def show_list process_show_list(options) end - private #### + def title + _("Virtual Machines") + end + + private def get_session_data - @title = _("Virtual Machines") - @layout = "vm" - @lastaction = session[:vm_lastaction] - @showtype = session[:vm_showtype] - @filters = session[:vm_filters] - @catinfo = session[:vm_catinfo] - @display = session[:vm_display] + super @polArr = session[:polArr] || "" # current tags in effect @policy_options = session[:policy_options] || "" end def set_session_data - session[:vm_lastaction] = @lastaction - session[:vm_showtype] = @showtype - session[:miq_compressed] = @compressed unless @compressed.nil? - session[:miq_exists_mode] = @exists_mode unless @exists_mode.nil? - session[:vm_filters] = @filters - session[:vm_catinfo] = @catinfo - session[:vm_display] = @display unless @display.nil? + super session[:polArr] = @polArr unless @polArr.nil? session[:policy_options] = @policy_options unless @policy_options.nil? end