Bug 858952

Summary: webadmin [Tree]: when "x" main tab is displayed and "x1" (type "x") item is selected on the tree, hide "New" + "Remove" actions, and disable Name editing of the item.
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engine-webadmin-portalAssignee: Greg Sheremeta <gshereme>
Status: CLOSED UPSTREAM QA Contact: Jiri Belka <jbelka>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.0CC: acathrow, ecohen, iheim, jkt, mkolesni, Rhev-m-bugs, yeylon
Target Milestone: ---   
Target Release: 3.3.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: ux
Fixed In Version: is10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-18 08:41:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1019461    
Attachments:
Description Flags
screen shot
none
screen-shots - Cluster/Host selected on left-pane tree none

Description Dafna Ron 2012-09-20 07:32:01 UTC
Created attachment 614778 [details]
screen shot

Description of problem:

If I select a DC in the tree view I can see the force remove button but not the remove button. 

Version-Release number of selected component (if applicable):

si18

How reproducible:

100%

Steps to Reproduce:
1. select the DC in the tree view
2. select the system in the tree view
3.
  
Actual results:

when selecting the DC in the tree view we see the force remove button but not the remove button 
when selecting the system we have the remove button

Expected results:

I think that the remove button should be in the the tree view of the DC 

Additional info:screen shot

Comment 4 Einav Cohen 2013-07-22 15:45:42 UTC
Created attachment 776955 [details]
screen-shots - Cluster/Host selected on left-pane tree

Comment 5 Einav Cohen 2013-07-22 16:09:07 UTC
(In reply to Dafna Ron from comment #0)
> 
> I think that the remove button should be in the the tree view of the DC 
> 

actually, the convention is to not show the "Remove" button when a specific item is selected in the tree (see attachment 776955 [details]) - it shows the buttons on the relevant main tab when a Host is selected and when a Cluster is selected. 
When the "Force Remove" button was added not too long ago, the button-hiding logic was left out. Same for Networks tree-item/main tab.

allowing "Remove" in this context is a bit tricky, since if "Remove" will be allowed while standing on that item in the tree, the selected node in the tree wouldn't be relevant anymore; in fact, in this case, the node should be removed and tree-selection should be changed [to the parent node (?)], so it requires some more handling than a "regular" action.

[BTW, for similar reasons, we also block editing Name field in the "Edit" dialog  and hiding the New button - please contact me for further details if needed]

I suggest to open a separate RFE for allowing Removal and Name-editing of items that are selected in the left-pane tree (I believe that we shouldn't allow "New" from this context though).

In the mean time - for the use-case of a specific "x1" item (type "x"), need to make sure that the following is taken care of when the "x" main tab is displayed and the "x1" item is selected on the left-pane tree:

(1) "Remove" (including "flavors", e.g "Force Remove") button / context menu item is hidden.

(2) Name field within the "Edit" dialog is disabled.

(3) "New" button / context-menu item is hidden.

Comment 6 Greg Sheremeta 2013-08-09 18:24:39 UTC
oVirt gerrit patch 17882 fixes these things:
Datacenter -- now hiding force-remove
Storage -- now hiding destroy
Networks -- now hiding new and remove
Volumes -- now hiding create and remove

Still working on the edit name disabling.

Comment 7 Greg Sheremeta 2013-08-12 12:57:51 UTC
oVirt gerrit patch 17886 fixes the "edit name" disabling functionality.

DataCenter already worked as it should.
Network is now fixed.
Cluster is now fixed.
Host is now fixed.
Storage already worked as intended, but I did a code refactor, so that should be tested too.
Volume doesn't appear to have any edit functionality.

Hovering over the disabled names will now give a tooltip as to why they cannot be edited.

Comment 9 Lior Vernia 2013-11-26 09:59:41 UTC
*** Bug 988002 has been marked as a duplicate of this bug. ***