modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
| 2 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/ErrorHandler.java
| 13 +++++++++-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
| 3 ++
3 files changed, 16 insertions(+), 2 deletions(-)
New commits:
commit 85349670fb3e4fc3b99c3a99afe3e387869b6587
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue May 3 14:45:16 2011 -0400
BZ 696753 and 701314
bump up the timeout when importing, ignoring and unignoring from the auto-discovery
queue.
in addition, if any timeout occurs anywhere in the ui, we'll log it as a Warning
now and give the user
some information about what is happening (i.e the request timed out, the server may
still be processing the request and to wait and see if it succeeded)
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
index a1d1403..6dde533 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
@@ -74,7 +74,7 @@ public class ResourceAutodiscoveryView extends LocatableVLayout {
private ToolStrip footer;
private DataSource dataSource;
- private ResourceGWTServiceAsync resourceService =
GWTServiceLookup.getResourceService();
+ private ResourceGWTServiceAsync resourceService =
GWTServiceLookup.getResourceService(60000);
public ResourceAutodiscoveryView(String locatorId) {
super(locatorId);
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/ErrorHandler.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/ErrorHandler.java
index e54ee38..3ce2f52 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/ErrorHandler.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/ErrorHandler.java
@@ -25,6 +25,7 @@ import com.allen_sauer.gwt.log.client.Log;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.Messages;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
/**
* @author Greg Hinkle
@@ -42,7 +43,17 @@ public class ErrorHandler {
}
public void handleError(String message, Throwable t) {
- Message errorMessage = new Message(message, t, Message.Severity.Error);
+ Severity severity;
+
+ if ((t != null) && (t instanceof
com.google.gwt.http.client.RequestTimeoutException)) {
+ // if its a timeout exception, log it as a warning since the request might
still complete on the server
+ severity = Message.Severity.Warning;
+ message = MSG.common_msg_asyncTimeout(message);
+ } else {
+ severity = Message.Severity.Error;
+ }
+
+ Message errorMessage = new Message(message, t, severity);
CoreGUI.getMessageCenter().notify(errorMessage);
if (t != null) {
diff --git
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index cf9dbbc..0f75682 100644
---
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -231,6 +231,9 @@ common_msg_noItemsToShow = No items to show
common_msg_notYetImplemented = Not Yet Implemented
common_msg_see_more = see more...
common_msg_step_x_of_y = Step {0} of {1}
+common_msg_asyncTimeout = {0}. This occurred because the server is taking a long time to
complete this request. \
+Please be aware that the server may still be processing your request and it may complete
shortly. \
+You can check the server logs to see if any abnormal errors occurred.
# Common Values
#--------------
Show replies by date