Description of problem: If you check quadicon of a template, Power dropdown (and all its options) are enabled. See the attached screenshot. Version-Release number of selected component (if applicable): CFME 5.10.0.17 How reproducible: 100 % Steps to Reproduce: 1. Have a infra provider (tested with RHV 4.2.7) with at least one template. 2. Go to Compute -> Infrastructure -> Virtual Machines. 3. On the left-side panel, choose VMs & Templates -> All VMs & Templates -> <your provider> 4. Find you template and select its checkbox. Actual results: Power dropdown in the upper toolbar and all of its options are enabled. Expected results: The whole dropdown should be disabled as power operations for a template don't make a sense. Additional info: - If you try to perform one of the power actions on a template (e.g. Power On), this gets printed into evm.log: [----] W, [2018-10-01T07:49:50.153325 #11978:fcaf80] WARN -- : <AuditFailure> MIQ(ProcessTasksMixin.task_audit_event) userid: [admin] - golden_mixed_virtio_template: There is no owning Host for this VM, 'start' is not allowed - If you try to perform one of the power actions on a template (e.g. Power On), success flash message is displayed in the UI. See the attached screenshot for reference. - Power problem does not occur if you locate your template in UI this way: Compute -> Infrastructure -> Providers -> <your provider> -> Relationships section -> Templates -> <select your template's checkbox>
Created attachment 1489029 [details] Power dropdown enabled for a template
Created attachment 1489030 [details] Sucess flash message after performing Power On on a template
Also, this *might* be connected to https://bugzilla.redhat.com/show_bug.cgi?id=1633727
Actually, after some more digging I found out that this is most probably 5.10 clone of https://bugzilla.redhat.com/show_bug.cgi?id=1496383
Jan, it is not possible by design to fix this according to 'Expected results' you've written. If there are different items displayed in the same list (VMs, Templates, etc.) the toolbar is enabled if the operations in the toolbar are suitable for ANY of the items. So this does work as expected. The real problem is if we click on some operation and there is no flash message about the fact that the operation is not allowed for selected item(s) (for example power operations for templates). It could be fixed only this way. What do you think? Thanks.
(In reply to Hilda Stastna from comment #7) > Jan, > > it is not possible by design to fix this according to 'Expected results' > you've written. > If there are different items displayed in the same list (VMs, Templates, > etc.) the toolbar > is enabled if the operations in the toolbar are suitable for ANY of the > items. So this > does work as expected. > The real problem is if we click on some operation and there is no flash > message about the > fact that the operation is not allowed for selected item(s) (for example > power operations > for templates). It could be fixed only this way. What do you think? Thanks. Hello Hilda, I have little understanding of CFME design, so if this cannot be changed in accordance with 'Expected Results', I think your proposed solution works fine. Jan
This bug is also true for 5.9.7.0.20181217174909_1f8a1d7
Fixing https://github.com/ManageIQ/manageiq-ui-classic/pull/5128
New commit detected on ManageIQ/manageiq-ui-classic/master: https://github.com/ManageIQ/manageiq-ui-classic/commit/74b2cf8b26ae7dfcc8a0d849de23f9a518976cc2 commit 74b2cf8b26ae7dfcc8a0d849de23f9a518976cc2 Author: Hilda Stastna <hstastna> AuthorDate: Mon Jan 7 07:52:04 2019 -0500 Commit: Hilda Stastna <hstastna> CommitDate: Mon Jan 7 07:52:04 2019 -0500 Fix enabling Power operations for a template Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1634713 app/controllers/application_controller/ci_processing.rb | 5 +- 1 file changed, 1 insertion(+), 4 deletions(-)
Verified in CFME 5.11.0.11, selecting a power option for a template results in the proper flash message appearing.