camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: Polished karaf command
Date Wed, 05 Aug 2015 13:16:49 GMT
Repository: camel
Updated Branches:
  refs/heads/master 371f90e75 -> 06db3cd24


Polished karaf command


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/887a21ea
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/887a21ea
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/887a21ea

Branch: refs/heads/master
Commit: 887a21ea213bf52c9f917c0c6af0a7ab7ae3164e
Parents: 371f90e
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Aug 5 15:13:37 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Aug 5 15:24:11 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/commands/EndpointStatisticCommand.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/887a21ea/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointStatisticCommand.java
----------------------------------------------------------------------
diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointStatisticCommand.java
b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointStatisticCommand.java
index 9e33f12..d123414 100644
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointStatisticCommand.java
+++ b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointStatisticCommand.java
@@ -222,6 +222,9 @@ public class EndpointStatisticCommand extends AbstractCamelCommand {
         int dynamicLen = Math.min(columnWidths.get(DYNAMIC_COLUMN_LABEL) + columnWidthIncrement,
getMaxColumnWidth());
         dynamicLen = Math.max(MIN_COLUMN_WIDTH, dynamicLen);
 
+        int totalLen = Math.min(columnWidths.get(HITS_COLUMN_LABEL) + columnWidthIncrement,
getMaxColumnWidth());
+        totalLen = Math.max(MIN_COLUMN_WIDTH, totalLen);
+
         // last row does not have min width
 
         final StringBuilder retval = new StringBuilder(DEFAULT_FORMAT_BUFFER_LENGTH);
@@ -231,7 +234,7 @@ public class EndpointStatisticCommand extends AbstractCamelCommand {
         retval.append(fieldPreamble).append("%-").append(directionLen).append('.').append(directionLen).append('s').append(fieldPostamble).append('
');
         retval.append(fieldPreamble).append("%-").append(staticLen).append('.').append(staticLen).append('s').append(fieldPostamble).append('
');
         retval.append(fieldPreamble).append("%-").append(dynamicLen).append('.').append(dynamicLen).append('s').append(fieldPostamble).append('
');
-        retval.append(fieldPreamble).append("%s").append(fieldPostamble).append(' ');
+        retval.append(fieldPreamble).append("%").append(totalLen).append('.').append(totalLen).append('s').append(fieldPostamble).append('
');
 
         return retval.toString();
     }


Mime
View raw message