-
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
Hide "Hide Deprecated" checkbox and remove "Deprecated" column when provisioning infra VM #3615
Hide "Hide Deprecated" checkbox and remove "Deprecated" column when provisioning infra VM #3615
Conversation
@miq-bot add_label bug |
@miq-bot remove_label wip |
:onclick => "miqAjax('" + url_for_only_path({:action => "vm_pre_prov", :id => id.to_s, :hide_deprecated_templates => !@edit[:hide_deprecated_templates]}) + "')", | ||
:checked => @edit[:hide_deprecated_templates]} | ||
= _('Hide deprecated') | ||
- if request.parameters[:controller] == "vm_cloud" |
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.
Here you can test against @edit[:hide_deprecated_templates]
instead.
@@ -17,8 +17,9 @@ | |||
= h(number_to_human_size(row.mem_cpu.to_i * 1024 * 1024)) | |||
%td | |||
= h(number_to_human_size(row.allocated_disk_storage)) | |||
%td | |||
= h(row.deprecated ? _("true") : _("false")) | |||
- if @edit[:vm_headers].key? 'deprecated' |
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.
Please use parentheses around the argument.
@@ -52,8 +52,9 @@ | |||
= h(number_to_human_size(row.mem_cpu.to_i * 1024 * 1024)) | |||
%td | |||
= h(number_to_human_size(row.allocated_disk_storage)) | |||
%td | |||
= h(row.deprecated ? _("true") : _("false")) | |||
- if @edit[:vm_headers].key? 'deprecated' |
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.
same here...
@@ -85,8 +86,9 @@ | |||
= h(number_to_human_size(@vm.mem_cpu.to_i * 1024 * 1024)) | |||
%td | |||
= h(number_to_human_size(@vm.allocated_disk_storage)) | |||
%td | |||
= h(@vm.deprecated ? _("true") : _("false")) | |||
- if @edit[:vm_headers].key? 'deprecated' |
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 omit parentheses only when you're using a DSL and here you're clearly not.
cd1ed41
to
936da9f
Compare
On pre provisioning screen, hide "Hide Deprecated" checkbox when user is submitting a provisioning request for Infrastructure VM.
Also set @edit[:hide_deprecated_templates] to true only if cloud provisioning.
Remove 'Deprecated' column from the grid after a template is selected, when Infrastructure provisioning.
936da9f
to
13620b3
Compare
@skateman I think the changes should be done ;) |
Checked commits hstastna/manageiq-ui-classic@8050114~...13620b3 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.
@miq-bot add_label gaprindashvili/yes |
@martinpovolny @mzazrivec Could you please look at this PR? Any comment appreciated. Thanks! |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1399378
On pre provisioning screen, hide "Hide Deprecated" checkbox and remove "Deprecated" column from the table when user is submitting a provisioning request for Infrastructure VM, as those (the checkbox and the column) apply only to cloud provisioning. Cloud provisioning remains unchanged.
Before:
![infra_prov_before1](https://user-images.githubusercontent.com/13417815/37361083-5001ff42-26f2-11e8-973e-944e388096b8.png)
![infra_prov_before2](https://user-images.githubusercontent.com/13417815/37361089-534e09a2-26f2-11e8-9fcb-8ef17fc6cdcd.png)
After:
![infra_prov1](https://user-images.githubusercontent.com/13417815/37360742-648e051a-26f1-11e8-9c04-810fb5ef279a.png)
![infra_prov2](https://user-images.githubusercontent.com/13417815/37360749-69af9018-26f1-11e8-99e6-2801edc57cd8.png)