Committed by
Gerrit Code Review
Changing application description in CLI is -s is provided to shortest possibile
Change-Id: I12aed55fbd0cb68ce356bd8ecfe512bc11537f10
Showing
1 changed file
with
4 additions
and
2 deletions
... | @@ -69,9 +69,11 @@ public class ApplicationsListCommand extends AbstractShellCommand { | ... | @@ -69,9 +69,11 @@ public class ApplicationsListCommand extends AbstractShellCommand { |
69 | boolean isActive = service.getState(app.id()) == ACTIVE; | 69 | boolean isActive = service.getState(app.id()) == ACTIVE; |
70 | if (activeOnly && isActive || !activeOnly) { | 70 | if (activeOnly && isActive || !activeOnly) { |
71 | if (shortOnly) { | 71 | if (shortOnly) { |
72 | + String shortDescription = app.title().equals(app.id().name()) ? | ||
73 | + app.description().replaceAll("[\\r\\n]", " ").replaceAll(" +", " ") : | ||
74 | + app.title(); | ||
72 | print(SHORT_FMT, isActive ? "*" : " ", | 75 | print(SHORT_FMT, isActive ? "*" : " ", |
73 | - app.id().id(), app.id().name(), app.version(), | 76 | + app.id().id(), app.id().name(), app.version(), shortDescription); |
74 | - app.description().replaceAll("[\\r\\n]", " ").replaceAll(" +", " ")); | ||
75 | } else { | 77 | } else { |
76 | print(FMT, isActive ? "*" : " ", | 78 | print(FMT, isActive ? "*" : " ", |
77 | app.id().id(), app.id().name(), app.version(), app.origin(), | 79 | app.id().id(), app.id().name(), app.version(), app.origin(), | ... | ... |
-
Please register or login to post a comment