sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefane...@apache.org
Subject svn commit: r1589031 - /sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/TopologyWebConsolePlugin.java
Date Tue, 22 Apr 2014 07:23:28 GMT
Author: stefanegli
Date: Tue Apr 22 07:23:28 2014
New Revision: 1589031

URL: http://svn.apache.org/r1589031
Log:
SLING-3506 : fix false error-status-message in webconsole for loop connectors - those should
just be marked as OK with a corresponding message saying that it is a loop

Modified:
    sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/TopologyWebConsolePlugin.java

Modified: sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/TopologyWebConsolePlugin.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/TopologyWebConsolePlugin.java?rev=1589031&r1=1589030&r2=1589031&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/TopologyWebConsolePlugin.java
(original)
+++ sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/TopologyWebConsolePlugin.java
Tue Apr 22 07:23:28 2014
@@ -389,7 +389,8 @@ public class TopologyWebConsolePlugin ex
             final String remoteSlingId = topologyConnectorClient.getRemoteSlingId();
             final boolean isConnected = topologyConnectorClient.isConnected() &&
remoteSlingId != null;
             final boolean autoStopped = topologyConnectorClient.isAutoStopped();
-            if (isConnected || autoStopped) {
+            final boolean representsLoop = topologyConnectorClient.representsLoop();
+            if (isConnected || autoStopped || representsLoop) {
                 pw.println("<tr class=\"" + oddEven + " ui-state-default\">");
             } else {
                 pw.println("<tr class=\"" + oddEven + " ui-state-error\">");
@@ -400,10 +401,10 @@ public class TopologyWebConsolePlugin ex
             if (autoStopped) {
             	pw.println("<td><b>auto-stopped</b></td>");
             	pw.println("<td><b>auto-stopped due to local-loop</b></td>");
-            } else if (isConnected && !topologyConnectorClient.representsLoop())
{
+            } else if (isConnected && !representsLoop) {
                 pw.println("<td>" + remoteSlingId + "</td>");
                 pw.println("<td>ok, in use</td>");
-            } else if (isConnected && topologyConnectorClient.representsLoop()) {
+            } else if (representsLoop) {
                 pw.println("<td>" + remoteSlingId + "</td>");
                 pw.println("<td>ok, unused (loop or duplicate): standby</td>");
             } else {
@@ -795,7 +796,7 @@ public class TopologyWebConsolePlugin ex
                     pw.print("Connected to Sling Id : ");
                     pw.println(remoteSlingId);
                     pw.println("Connector status : ok, in use");
-                } else if (isConnected && topologyConnectorClient.representsLoop())
{
+                } else if (topologyConnectorClient.representsLoop()) {
                     pw.print("Connected to Sling Id : ");
                     pw.println(remoteSlingId);
                     pw.println("Connector status : ok, unused (loop or duplicate): standby");



Mime
View raw message