-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
host-controller use GenericSessionMixin #472
Conversation
@miq-bot remove_label wip |
app/controllers/host_controller.rb
Outdated
@@ -646,20 +647,18 @@ def get_hosts | |||
end | |||
|
|||
def get_session_data | |||
super | |||
@title = _("Hosts") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@title
should live in the title
method now, which is being used by the mixin so you should no longer have to set it here..
app/controllers/host_controller.rb
Outdated
@@ -646,20 +647,18 @@ def get_hosts | |||
end | |||
|
|||
def get_session_data | |||
super | |||
@title = _("Hosts") | |||
@layout = "host" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@layout
will probably be set automagically from model
..
app/controllers/host_controller.rb
Outdated
@@ -646,20 +647,18 @@ def get_hosts | |||
end | |||
|
|||
def get_session_data | |||
super | |||
@title = _("Hosts") | |||
@layout = "host" | |||
@drift_db = "Host" | |||
@lastaction = session[:host_lastaction] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lastaction
is already handled by GenericSessionMixin .. and so is @catinfo
.
app/controllers/host_controller.rb
Outdated
@title = _("Hosts") | ||
@layout = "host" | ||
@drift_db = "Host" | ||
@lastaction = session[:host_lastaction] | ||
@display = session[:host_display] | ||
@filters = session[:host_filters] | ||
@catinfo = session[:host_catinfo] | ||
@base = session[:vm_compare_base] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@base
you can ignore/delete, it should be completely gone after #665
Also missing PR description ;) |
(The travis failures are valid, but not caused by changes in your PR - rebasing should make travis green again :).) |
This pull request is not mergeable. Please rebase and repush. |
@petoS6 This looks good, I'd merge, but I'm going to ask you for one more change (sorry :))... Please add a Thanks |
app/controllers/host_controller.rb
Outdated
end | ||
|
||
def set_session_data | ||
super | ||
session[:host_lastaction] = @lastaction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, one more thing, can you also remove this (lastaction
) line? That one is handled by the mixin too.
Also, the same for catinfo
.
Checked commits https://github.com/petoS6/manageiq-ui-classic/compare/4653c8500c80d986ad47cb96e6de482199d332de~...1267c3a319bbde92160b4c3db03251c3c5f95556 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Thanks @petoS6, merged :) |
Delete useless lines in hostController, using GenericSessionMixin now.