Author: max.andersen(a)jboss.com
Date: 2012-04-27 07:39:03 -0400 (Fri, 27 Apr 2012)
New Revision: 40563
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/ApplicationPropertySource.java
Log:
JBIDE-11680 revert to eagerload cartridges since it can cause ui lockup otherwise with bad
network. introduce system property to allow override for now
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java 2012-04-27
11:06:22 UTC (rev 40562)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java 2012-04-27
11:39:03 UTC (rev 40563)
@@ -157,7 +157,8 @@
// Get the actual children, with the delay
loadingUsers.add(user);
try {
- getChildrenForElement(user, false);
+ getChildrenForElement(user,
Boolean.valueOf(System.getProperty("org.jboss.tools.openshift.express.ui.eagerloading",
"true"))); // JBIDE-11680 false = fast, but blocks ui while loading cartridges,
true = slow, but no blocking since cartridges is forced loaded.
+
} catch(OpenShiftException e) {
errors.put(user, e);
} catch(SocketTimeoutException e) {
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/ApplicationPropertySource.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/ApplicationPropertySource.java 2012-04-27
11:06:22 UTC (rev 40562)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/ApplicationPropertySource.java 2012-04-27
11:39:03 UTC (rev 40563)
@@ -11,6 +11,7 @@
package org.jboss.tools.openshift.express.internal.ui.viewer.property;
import java.text.SimpleDateFormat;
+import java.util.List;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
@@ -18,7 +19,9 @@
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import com.openshift.client.IApplication;
+import com.openshift.client.IApplicationPortForwarding;
import com.openshift.client.OpenShiftException;
+import com.openshift.client.OpenShiftSSHOperationException;
/**
* @author Xavier Coulon
@@ -43,7 +46,7 @@
new PropertyDescriptor("6.UUID", "UUID"),
new PropertyDescriptor("5.Git URI", "Git URI"),
new PropertyDescriptor("2.Type", "Type"),
- new PropertyDescriptor("4.Created on", "Created on") };
+ new PropertyDescriptor("4.Created on", "Created on"), new
PropertyDescriptor("7.Port Forward", "Port Forward") };
}
@Override
@@ -68,6 +71,18 @@
if (id.equals("5.Git URI")) {
return application.getGitUrl();
}
+ if(id.equals("7.Port Forward")) {
+ try {
+ StringBuffer bf = new StringBuffer();
+ List<IApplicationPortForwarding> forwardablePorts =
application.getForwardablePorts();
+ for (IApplicationPortForwarding iApplicationPortForwarding : forwardablePorts) {
+ bf.append(iApplicationPortForwarding);
+ }
+ return bf.toString();
+ } catch (OpenShiftSSHOperationException e) {
+ e.printStackTrace();
+ }
+ }
return null;
}
Show replies by date