-
Notifications
You must be signed in to change notification settings - Fork 897
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
Support for hidden columns in reports and views #17133
Conversation
Columns, including headers, with MiqReport#col_options[<column_name>][:hidden] == true should not are included in html, pdf, text output formats and only be included in csv
app/models/miq_report.rb
Outdated
|
||
@hidden_cols ||= col_options.keys.each_with_object([]) do |c, a| | ||
a << c if col_options[c][:hidden] | ||
a |
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 do not need the array as the last line in the block when using each_with_object
. This line can be removed.
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.
@gmcculloug I was going to remove that but then I realized that if the column is not hidden, the last line in the block would be nil. Not sure if that's correct. I'll need to try it. Thanks.
@miq-bot add_label transformation |
I was able to validate this PR by added the following changes in the ui-classic repo. --- a/product/views/VmOrTemplate.yaml
+++ b/product/views/VmOrTemplate.yaml
@@ -27,6 +27,12 @@ cols:
- allocated_disk_storage
- last_scan_on
- region_description
+- uid_ems
+
+col_options:
+ uid_ems:
+ :hidden: true
+
# Included tables (joined, has_one, has_many) and columns
include:
@@ -75,6 +81,7 @@ headers:
- Allocated Size
- Last Analysis Time
- Region
+- uid_ems |
3e535fc
to
cc9fd3a
Compare
cc9fd3a
to
eb3e0b0
Compare
Checked commits gtanzillo/manageiq@7b22d8f~...eb3e0b0 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@gmcculloug This should be good to go |
@gtanzillo Please add BZ link. Edit: never mind... it's for v2v. |
Support for hidden columns in reports and views (cherry picked from commit 2206775)
Gaprindashvili backport details:
|
Columns, including headers, with MiqReport#col_options[<column_name>][:hidden] == true should not
are included in html, pdf, text output formats and only be included in csv
UI changes in ManageIQ/manageiq-ui-classic#3564
/cc @dclarizio