-
Notifications
You must be signed in to change notification settings - Fork 898
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
Add product files for physical server dashboard widgets #17172
Add product files for physical server dashboard widgets #17172
Conversation
@miq-bot add_label wip |
358d191
to
e90a8d9
Compare
1ae080b
to
21fe1a9
Compare
21fe1a9
to
bbf84bf
Compare
@miq-bot remove_label wip |
@miq-bot add_label providers/physical |
@agrare Can you take a look at this PR when you get a chance? Thanks |
@skovic can you address the spec failures? |
a365613
to
6f4a563
Compare
@agrare The tests pass now. Thanks |
app/models/physical_server.rb
Outdated
@@ -27,6 +27,9 @@ class PhysicalServer < ApplicationRecord | |||
|
|||
scope :with_hosts, -> { where("physical_servers.id in (select hosts.physical_server_id from hosts)") } | |||
|
|||
virtual_column :v_availability, :type => :string |
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.
You should add :uses => :host
to both of these lines to force eager loading. This'll prevent n+1 queries when the widgets are generated.
Checked commits skovic/manageiq@16d2ce1~...fbc1e4d with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
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.
LGTM 👍
This PR adds the product files needed for the new physical server dashboard widgets.