Bug 1634713 - Power dropdown enabled for a template
Summary: Power dropdown enabled for a template
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.9.7
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: GA
: 5.11.0
Assignee: Hilda Stastna
QA Contact: John Dupuy
URL:
Whiteboard:
Depends On:
Blocks: 1686012
TreeView+ depends on / blocked
 
Reported: 2018-10-01 11:59 UTC by Jan Zmeskal
Modified: 2019-12-13 15:09 UTC (History)
10 users (show)

Fixed In Version: 5.11.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1686012 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:09:51 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Power dropdown enabled for a template (90.16 KB, image/png)
2018-10-01 12:00 UTC, Jan Zmeskal
no flags Details
Sucess flash message after performing Power On on a template (81.69 KB, image/png)
2018-10-01 12:01 UTC, Jan Zmeskal
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1496383 0 low CLOSED Template quad icon choice allow power control operations 2021-02-22 00:41:40 UTC

Internal Links: 1496383

Description Jan Zmeskal 2018-10-01 11:59:46 UTC
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>

Comment 2 Jan Zmeskal 2018-10-01 12:00:27 UTC
Created attachment 1489029 [details]
Power dropdown enabled for a template

Comment 3 Jan Zmeskal 2018-10-01 12:01:01 UTC
Created attachment 1489030 [details]
Sucess flash message after performing Power On on a template

Comment 5 Jan Zmeskal 2018-10-01 12:02:49 UTC
Also, this *might* be connected to https://bugzilla.redhat.com/show_bug.cgi?id=1633727

Comment 6 Jan Zmeskal 2018-10-01 12:13:41 UTC
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

Comment 7 Hilda Stastna 2018-12-18 13:23:17 UTC
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.

Comment 8 Jan Zmeskal 2018-12-19 08:46:31 UTC
(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

Comment 9 Angelina Vasileva 2019-01-09 12:30:44 UTC
This bug is also true for 5.9.7.0.20181217174909_1f8a1d7

Comment 10 Hilda Stastna 2019-01-28 12:29:08 UTC
Fixing https://github.com/ManageIQ/manageiq-ui-classic/pull/5128

Comment 11 CFME Bot 2019-02-18 07:16:25 UTC
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(-)

Comment 13 John Dupuy 2019-07-02 19:14:33 UTC
Verified in CFME 5.11.0.11, selecting a power option for a template results in the proper flash message appearing.


Note You need to log in before you can comment on or make changes to this bug.