BZ 827203
by Charles Crouch
Can we use this BZ/fix as a basis for a more general solution to other fast-clicking problems?
Can we use it to find other instances of fast-clicking problems?
What about tracking down where "detached DOM elements as well, which is seen in that blotchy area above the JON logo." are coming from generically?
Just trying to see if we can solve more than one problem here
----- Forwarded Message -----
From: "ips" <ips(a)fedoraproject.org>
To: rhq-commits(a)lists.fedorahosted.org
Sent: Thursday, May 31, 2012 4:53:13 PM
Subject: [rhq] modules/enterprise
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java | 46 ++++++----
1 file changed, 29 insertions(+), 17 deletions(-)
New commits:
commit a92b7bcace3265964f87fb656b45cf3102ad8708
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu May 31 17:53:02 2012 -0400
[BZ 827203] prevent infinite auto-switching between auto-group nodes occurs after fast-clicking between two auto-group nodes (https://bugzilla.redhat.com/show_bug.cgi?id=827203)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
index ff99825..694f8b6 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
@@ -1,6 +1,6 @@
/*
-fcontext * RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -92,7 +92,6 @@ import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.ResourceGro
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.ResourceGroupDetailView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceTreeDatasource.AutoGroupTreeNode;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceTreeDatasource.ResourceTreeNode;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.factory.ResourceFactoryCreateWizard;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.factory.ResourceFactoryImportWizard;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
import org.rhq.enterprise.gui.coregui.client.util.Log;
@@ -182,17 +181,30 @@ public class ResourceTreeView extends LocatableVLayout {
AutoGroupTreeNode agNode = (AutoGroupTreeNode) selectedRecord;
selectedNodeId = agNode.getID();
- getAutoGroupBackingGroup(agNode, new AsyncCallback<ResourceGroup>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_selection(),
- caught);
- }
+ // [BZ 827203] Disable this view to prevent fast-click issues. It will get re-enabled when
+ // the detail resource or group view is done with its async init and calls
+ // notifyViewRenderedListeners() on itself.
+ disable();
- public void onSuccess(ResourceGroup result) {
- renderAutoGroup(result);
- }
- });
+ try {
+ getAutoGroupBackingGroup(agNode, new AsyncCallback<ResourceGroup>() {
+ public void onSuccess(ResourceGroup result) {
+ renderAutoGroup(result);
+ }
+
+ public void onFailure(Throwable caught) {
+ // Make sure to re-enable ourselves.
+ enable();
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_selection(),
+ caught);
+ }
+ });
+ } catch (RuntimeException re) {
+ // Make sure to re-enable ourselves.
+ enable();
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_selection(), re);
+ }
} else {
// TODO: probably clicked on a subcategory, do we need a message?
treeGrid.deselectRecord(selectedRecord);
@@ -246,7 +258,7 @@ public class ResourceTreeView extends LocatableVLayout {
private void getAutoGroupBackingGroup(final AutoGroupTreeNode agNode, final AsyncCallback<ResourceGroup> callback) {
final ResourceGroupGWTServiceAsync resourceGroupService = GWTServiceLookup.getResourceGroupService();
- // get the children tree nodes and build a child resourceId array
+ // get the children tree nodes and build a child resourceId array
TreeNode[] children = treeGrid.getTree().getChildren(agNode);
final int[] childIds = new int[children.length];
for (int i = 0, size = children.length; (i < size); ++i) {
@@ -262,13 +274,13 @@ public class ResourceTreeView extends LocatableVLayout {
resourceGroupService.findResourceGroupsByCriteria(criteria, new AsyncCallback<PageList<ResourceGroup>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_node(), caught);
+ callback.onFailure(new RuntimeException(MSG.view_tree_common_loadFailed_node(), caught));
}
public void onSuccess(PageList<ResourceGroup> result) {
if (result.isEmpty()) {
// Not found, create new backing group
- // the backing group name is a display name using a unique parentResource-resourceType combo
+ // the backing group name is a display name using a unique parentResource-resourceType combo
final String backingGroupName = agNode.getBackingGroupName();
ResourceGroup backingGroup = new ResourceGroup(backingGroupName);
backingGroup.setAutoGroupParentResource(agNode.getParentResource());
@@ -277,7 +289,7 @@ public class ResourceTreeView extends LocatableVLayout {
resourceGroupService.createPrivateResourceGroup(backingGroup, childIds,
new AsyncCallback<ResourceGroup>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_create(), caught);
+ callback.onFailure(new RuntimeException(MSG.view_tree_common_loadFailed_create(), caught));
}
public void onSuccess(ResourceGroup result) {
@@ -299,7 +311,7 @@ public class ResourceTreeView extends LocatableVLayout {
resourceGroupService.setAssignedResources(backingGroup.getId(), childIds, false,
new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_update(), caught);
+ callback.onFailure(new RuntimeException(MSG.view_tree_common_loadFailed_update(), caught));
}
public void onSuccess(Void result) {
_______________________________________________
rhq-commits mailing list
rhq-commits(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-commits
11 years, 11 months
Attribute "default" removed on c:option
by Heiko W.Rupp
Hi,
after a long time of deprecation warnings, the not-used attribute 'default' on the <c:option> element
has been removed in master.
See https://bugzilla.redhat.com/show_bug.cgi?id=742298
Heiko
--
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C,
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Mark Hegarty, Charlie Peters, Michael Cunningham, Charles Cachera
11 years, 11 months
Auto Clusters
by Richard Hensman
Hi
I am developing a web app that reads metrics from RHQ via the Remote Client
API and am having trouble accessing clustered resources (Auto Clusters)
such as file systems. I am ok if I know the id of the Auto Cluster as I can
use ResourceGroupManagerRemote.getResourceGroupComposite, but cannot see
any way of querying for Auto Clusters via tags (for example). Is there no
way of querying for Auto Clusters using criteria?
Can anyone please advise?
thanks
Richard
11 years, 11 months
Replace old graphs in RHQ with GWT ones. GSOC 2012
by Denis Krusko
Hello!
My Name is Denis Krusko.
I am graduate student of Siberian Federal University (Russia).
I want to work with on the idea "Replace old graphs in RHQ with GWT ones"
I need to define milestones for 3 month like (proposed Heiko W.Rupp):
- evaluate Graphing options
- implement graphing to replace what is there
- resources
---- half time --
- possibility to e.g. take two metrics and graph them in one diagram
- write documentation
- graphs for the different kinds of groups ( can be in a later phase of
the project)
- remove old code
I would be grateful for comments and ideas.
Thank You,
Denis Krusko
11 years, 11 months
CLI built-in commands
by John Sanda
While working on https://bugzilla.redhat.com/show_bug.cgi?id=824129 I
spent some time thinking about the problem. I concluded that there is a
bigger issue at hand than just parsing quotes incorrectly.
CLI code is JavaScript with the exception of a handful of built-in
commands. So we have the majority of code that is written and executed
as JavaScript, and then we have a small fixed set of commands that
executes as Java. Because of this we have multiple layers of parsing
code. These multiple layers of parsers have led to this bug as well as
bug 813912 <https://bugzilla.redhat.com/show_bug.cgi?id=813912>, and
others. To make things even worse, not all of these built-in commands
are available in batch mode.
I want to propose that we do away with these built-in commands. The
functionality provided by the built-in commands should be implemented
within the framework in which users operate; in other words, the
functionality should be exposed via functions and methods of objects
that are available in the script bindings. In so we doing, we can
eliminate most if not all of these buggy parsing layers, provide a
uniform and consistent syntax, and take better advantage of the features
that JavaScript has to offer (if we so choose). I do not see any value
add in these built-in commands as opposed to providing the same
functionality in JavaScript, whether that comes in the form of actual
JavaScript code or as exposed, native Java objects.
- John
11 years, 11 months