Bug 730991 - Left nav tree does not refresh after resource creation
Summary: Left nav tree does not refresh after resource creation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Jay Shaughnessy
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: rhq41-ui
TreeView+ depends on / blocked
 
Reported: 2011-08-16 13:43 UTC by Heiko W. Rupp
Modified: 2012-02-07 19:25 UTC (History)
4 users (show)

Fixed In Version: 4,1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-07 19:25:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Heiko W. Rupp 2011-08-16 13:43:34 UTC
After a new child resource has been created, it will show up in inventory of the parent resource (only) after (manually  clicking) refresh.
Unfortunately the (sub)tree does not refresh, only sometimes when changing tabs or clicking on inventory, which is very confusing.

Comment 1 Heiko W. Rupp 2011-08-16 15:10:57 UTC
Not the non-updates include the availability state.

Comment 2 Jay Shaughnessy 2011-08-21 20:35:14 UTC
I've been looking at this for a little while.  I agree this is frustrating.  The problem is that certain actions, like resource create, finish asynchronously as they depend on Agent interaction.  We don't want to wait around polling in the UI, so we just continue.

We can add an immediate refresh here, and in other places that affect the tree, like univentory and delete, but in my testing it's typical that the refresh is faster that the async completion (at least for create, which is what I've been testing).  So, you end up taking a refresh hit and still not seeing your new resource.  (by the way, this is because, I think, the resource has NEW status until that async completion, and we only show COMMITTED resources. This is the right thing to do, I think.)

I think what I may try and do is a two-fold solution.

First, do perform a refresh in these situations, on the hope that the change will show up.

Second, add a new "Refresh Children" option to the resource tree node context menu, that on-demand refreshed the requested subtree.  So at least a user can ask for a partial refresh of the tree.

additionally, perhaps we should enhance our message to note that the new resource will not show up until it has been fully acknowledged and committed by the Agent.

Comment 3 Jay Shaughnessy 2011-08-21 20:36:58 UTC
I bumped the prio to high for this release, as it is a long-standing annoyance, is something we can at least somewhat resolve, and seems to fall well into the category of solidifying the gui.

Comment 4 Jay Shaughnessy 2011-08-22 19:11:15 UTC
master commit de0e2844e6588790e1f07842d41bdeb33ab5480a
Date:   Mon Aug 22 14:54:14 2011 -0400

Two things done here:
First, In the resource search views we now perform a CoreGUI refresh after
uninv/delete/import/create.  This updates the tree but in all cases other
than uninventory (and maybe import), the action is actually async and
depends on agent interaction, and possible a discovery run.  If async
stuff finishes very quickly it may get picked up by the refresh but it
probably will not.
So, second, The resource tree resource and autogroup nodes now offer
'Refresh' in the context menu.  This will refresh the subtree below the
node (for autogroups, below the parent resource node).  So, a user can
perform a point refresh of the tree as desired.
Note that group trees do not offer refresh. Mixed groups show only the
top node anyway, so it's not needed.  Compat group trees really require
a full CoreGUI refresh to build from the top down, and we already do that
on membership change. So, a refresh in the context menu is not really
needed/feasbible.

TEST NOTES: Definitely try the four different scenarios in the resource
tree: uninventory, delete, import, create new. Note, AS datasources are
helpful, they can be created easily and also deleted.  And they are 
service level so they come back automatically after uninventory and a
discovery.

For uninventory you should see immediate changes in the tree.  For the
others you may or may not. Probably not.  So, right click on the context
menu and you can try refresh. Note that this still won't show changes
until there have actually been server side changes. Make sure you have
your agent running. The 'Discovery -f' prompt command can help the agent
along if needed. 

Refresh is supported in the resource tree only, and on resource and
autogroup nodes.  It should not be seen anywhere else.  The Refresh
buttons in the resource inventory views have not changed, they should 
refresh only the list view, not the tree.

Comment 5 Sunil Kondkar 2011-08-23 11:43:22 UTC
Verified on build#326 (Version: 4.1.0-SNAPSHOT Build Number: 846a462)

Create child and a right click Refresh at resource tree displays the resource in resource tree.

Uninventory immediately refreshes the resource tree and does not display the uninventoried resource.

Did a Discovery -f at agent prompt and a right click Refresh at resource tree. The resource is again displayed in the resource tree.

Delete immediately refreshes the resource tree and does not display the removed resource.

Import script and a right click Refresh at resource tree displays the imported script in resource tree.

Marking as verified.

Comment 6 Mike Foley 2012-02-07 19:25:17 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE


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